query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Enable the start button | protected void enableStartButton(boolean enable) {
m_startBut.setEnabled(enable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void start() {\n m_enabled = true;\n }",
"public void enableBeginButton(boolean bool) {\n\t\tbegin.setEnabled(bool);\n\t}",
"public void setStart(){\n\t\tthis.isStart=true;\n\t}",
"public void updateStartButton(){\n if (getPrimHasRun() == true){\n startButton.setAlpha(0.5f);\n startButton.setClickable(false);\n } else {\n startButton.setAlpha(1f);\n startButton.setClickable(true);\n }\n }",
"public void disableStartButton(boolean b){\n start.setDisable(b);\n }",
"void enableControls( boolean starting ) {\n btn_start.setEnabled( !starting );\n btn_stop.setEnabled( starting );\n slide_numAgents.setEnabled( !starting );\n btn_Exit.setEnabled( !starting );\n }",
"public void enableQuitButton(){\n\t\tbtnStop.setVisible(true);\n\t}",
"private void startButtonAction(){\n scoreboard.setStartAction(event->initControl());\n }",
"public void start() {\n enableEvents = true;\n reset();\n }",
"public void setStartButton(JButton startButton) {\n\t\tthis.startButton = startButton;\n\t}",
"public void startClick() {\n if(!isRunning){\n startButton.setText(\"Pause\");\n isRunning = true;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.play();\n }else{\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.pause();\n }\n }",
"public Component startButton() {\n startButton = new JButton(\"Start\");\n setFocusable(false);\n return startButton;\n }",
"public void start() {\n\t\t setVisible(true);\n\t}",
"public boolean clickOnStartButton() {\r\n\t\ttry {\r\n\t\t\tgetAssignmentStratButton().click();\r\n\t\t\treturn true;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void onStartClickEvent() {\n\t\tmBtnStart.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tLog.d(TAG, \"onStartClickEvent\");\n\n\t\t\t\t//initViewConfig();\n\n//\t\t\t\tAVCom.start();\n\t\t\t\tavcom.Start();\n\t\t\t\tLog.d(TAG, \"onStartClickEvent done.\");\n\n\n\t\t\t}\n\t\t});\n\t}",
"public void start(){\n\t\tif (host.getGameSettings().isMusicOn()) {\r\n\t\t\tspr_btnMute.setFrame(0);\r\n\t\t}else{\r\n\t\t\tspr_btnMute.setFrame(1);\r\n\t\t}\r\n\t}",
"public void setCanStart(boolean canStart) {\n this.canStart = canStart;\n }",
"public void enableEndOfProductionButton(){\n this.endOfproductionButton.setEnabled(true);\n }",
"public boolean start()\n {\n panel.initialize();\n return true;\n }",
"public void hideStartButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_START_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"public void starting();",
"private void StartActionPerformed(final java.awt.event.ActionEvent evt) {\n\t\t\tif (!started) {\n\t\t\t\tlog(\"Starting...\");\n\t\t\t\tchangeActionPerformed(evt);\n\t\t\t\tstarted = true;\n\t\t\t\tStart.setText(\"Stop Script\");\n\t\t\t\tlog(\"Successfully started! Here we go!\");\n\t\t\t} else {\n\t\t\t\tlog(\"Stopped script.\");\n\t\t\t\tloggingOut = false;\n\t\t\t\tquit = true;\n\t\t\t}\n\t\t}",
"public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}",
"private StartDebuggingButton() {\r\n\t\t\tsetToolTipText(\"Start debugging the currently open tab\");\r\n\t\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\t\t\ttry {\r\n\t\t\t\tsetIcon(new ImageIcon(ImageIO.read(ClassLoader.getSystemResource(\"images/debug.png\")).getScaledInstance(FlowClient.BUTTON_ICON_SIZE, FlowClient.BUTTON_ICON_SIZE, Image.SCALE_SMOOTH)));\r\n\t\t\t} catch (IOException e1) {\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t\taddActionListener(new ActionListener() {\r\n\r\n\t\t\t\t/**\r\n\t\t\t\t * Gets the currently active code and starts the debugging process\r\n\t\t\t\t */\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\t// TODO Do some stuff to start debugging\r\n\t\t\t\t\tSystem.out.println(\"Debug button pressed!\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}",
"public static void clickStartBtn() {\t\n\t\tdriver.findElement(By.id(\"startB\")).click();\t\n\t}",
"public void start(){\n started = true;\n bot.setHumanInputEnabled(false);\n scriptStart();\n }",
"public void enable() {\r\n m_enabled = true;\r\n }",
"public boolean start() {\n\t\treturn true;\n\t}",
"public void setFocus() {\n startButton.setFocus();\n }",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"public JButton getStartButton() {\n\t\treturn this.btnStartSystem;\n\t}",
"private JButton getCmdStart() {\r\n\t\tif (cmdStart == null) {\r\n\t\t\tcmdStart = new JButton();\r\n\t\t\tcmdStart.setText(\"\");\r\n\r\n\t\t\tcmdStart.setToolTipText(\"Start checking the status of all proxy.\");\r\n\t\t\tcmdStart.setIcon(new ImageIcon(getClass().getResource(\"/start.png\")));\r\n\t\t\tcmdStart.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tcmdPause.setEnabled(true);\t\r\n\t\t\t\t\tcmdStart.setEnabled(false);\r\n\r\n\t\t\t\t\tif (chkproxy.isPause()==true) {\r\n\t\t\t\t\t\tsynchronized(chkproxy) {\r\n\t\t\t\t\t\t\tchkproxy.notify();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tchkproxy.execute();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcmdStop.setEnabled(true);\r\n\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdStart;\r\n\t}",
"private void startToggleMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_startToggleMouseReleased\n if(this.startToggle.isSelected()){\n this.controller.setStart(true);\n this.startToggle.setText(\"Stop system\");\n this.powerIcon.setEnabled(true);\n this.systemOn = true;\n }\n else{\n this.controller.setStart(false);\n this.startToggle.setText(\"Start system\");\n this.powerIcon.setEnabled(false);\n this.systemOn = false;\n }\n }",
"public boolean start();",
"public void enable() {\n\t\tm_enabled = true;\n\t\tm_controller.reset();\n\t}",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"private void startButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_startButtonActionPerformed\n if (files.isEmpty()) {\n noFile.setVisible(true);\n return;\n }\n startButton.setEnabled(false);\n this.setCursor(new Cursor(Cursor.WAIT_CURSOR));\n WorkTask task = new WorkTask();\n task.execute();\n }",
"@Override\n\tpublic void start() {\n\t\t\n\t\t_mode.init();\n\t\t\n\t\t_mode.start();\n\t}",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}",
"public Server() {\n initComponents();\n\n btnStart.setEnabled(true);\n btnStop.setEnabled(false);\n }",
"void enableBtn() {\n findViewById(R.id.button_play).setEnabled(true);\n findViewById(R.id.button_pause).setEnabled(true);\n findViewById(R.id.button_reset).setEnabled(true);\n }",
"public void enableEndTurnButton(){\n this.endTurnButton.setEnabled(true);\n }",
"public void enable() {\n\t\tm_controller.reset();\n\t\tm_runner.enable();\n\t}",
"@FXML\n private void handleButtonAction(ActionEvent event) {\n restart = false;\n \n //Change start button to quit button\n restartButton.setVisible(true);\n restartButton.setDisable(false);\n startButton.setVisible(false);\n startButton.setDisable(true);\n\n // enable all the sliders and the help button\n enableSliderBoxes();\n helpButton.setDisable(false);\n\n start = true;\n }",
"public void start(){\n }",
"void doManualStart();",
"@Override\n\tpublic boolean getStart() {\n\t\treturn true;\n\t}",
"public Start() {\n initComponents();\n }",
"public Start() {\n initComponents();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartService(streamService);\n\t\t\t\tstartButton.setEnabled(false);\n\t\t\t}",
"public void start(){\n\t\tsuper.start();\n\t}",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start();",
"public void start() {\n SetupGUI setup = new SetupGUI();\n }",
"public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == startButton) {\n\t\t\tinit();\n\t\t}\n\t}",
"public void enable(){\r\n\t\tthis.activ = true;\r\n\t}",
"public boolean isStartable () ;",
"public void start() {\r\n message = \"Now I'm starting up...\";\r\n repaint();\r\n }",
"private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }",
"public static void checkStartButton() {\r\n\t\tcheckNoSuchElementExceptionByID(\"startB\", \"\\\"Start\\\" button\");\r\n\t}",
"public void start() {\n\n\t}",
"@Override\r\n\tpublic void start() {\n\t\tthis.controller.start();\r\n\t}",
"public void start() {\n }",
"public void start(int p) {\n\t\t_start.setEnabled(true);\n\t\tupdateToPlace(p);\n\t}",
"private void start() {\n\n\t}",
"@Override\n public void startThread() {\n Log.d(TAG, \"Starting \" + getName() + \" thread!\");\n if (!started)\n start();\n running = enabled;\n doStartAction();\n }",
"public void start() {\n\n }",
"public void onStart() {\r\n\t\tthis.setVisible(true);\r\n\t}",
"public void enable() {\n\t\tenabled = true;\n\t\t//System.out.println(\"Enabled Controller\");\n\t}",
"protected abstract boolean start();",
"private void startSlideMenuItemActionPerformed() {//GEN-FIRST:event_startSlideMenuItemActionPerformed\r\n this.controller.StartSlideshow();\r\n startAndStopToggleButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/assets/pause.png\")));\r\n startAndStopToggleButton.setSelected(true);\r\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstart_click(e);\r\n\t\t\t}",
"public JButton getStartButton() {\n\t\treturn startButton;\n\t}",
"public static void checkAndClickStartButton() {\r\n\t\tcheckElementNotInteractableExceptionByID(\"startB\", \"\\\"Start\\\" button\");\r\n\t}",
"protected void start() {\n }",
"@Override\n public void onClick(View v) {\n start();\n }",
"public boolean getStart(){\n\t\treturn this.isStart;\n\t}",
"public void startServerGUIChanges() {\n\t\tbtnStopServer.setEnabled(true);\n\t\tbtnStartServer.setEnabled(false);\n\t\tlblStatusValue.setText(\"Online\");\n\t\tcbxFEP.setEnabled(false);\n\t\ttxtPort.setEnabled(false);\n\t\tbtnSaveServerConfiguration.setEnabled(false);\n\t}",
"public void startExperiment() {\n Runnable starter = new Runnable() {\n public void run() {\n manualAdvance = control.isManualControl();\n setStartPeriodButtonEnabled(manualAdvance);\n setSwitchStatus();\n \n control.startExperiment();\n }\n };\n \n Thread stThread = new Thread(starter);\n stThread.start();\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tvalues.setBtnStartVal(btn_start.isActivated());\r\n\t\t\t\tif (btn_start.isActivated()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (syncsrv == null) {\r\n\t\t\t\t\t\t\tsyncsrv = new SyncService();\r\n\t\t\t\t\t\t\tSyncProc.loadConfig(new AndroidLogger());\r\n\t\t\t\t\t\t\tsyncsrv.start();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSyncProc.pause = false;\r\n\t\t\t\t\t\tvalues.setStatusStr(\"SyncService started.\");\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\tvalues.setStatusStr(\"cannot start service: \" + e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSyncProc.pause = true;\r\n\t\t\t\t\tvalues.setStatusStr(\"SyncService paused.\");\r\n\t\t\t\t}\r\n\t\t\t\tvalues.resetAllControls();\r\n\t\t\t}",
"public void start()\n {}",
"public void enable() {\n operating = true;\n }",
"private void toggleButtonsEnabled() {\r\n final Button headsBtn = findViewById(R.id.b_heads);\r\n final Button tailsBtn = findViewById(R.id.b_tails);\r\n final Button startBtn = findViewById(R.id.b_startGame);\r\n\r\n headsBtn.setEnabled(false);\r\n tailsBtn.setEnabled(false);\r\n startBtn.setEnabled(true);\r\n }",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"private void enableButtons() {\n\t\tcapture.setEnabled(true);\r\n\t\tstop.setEnabled(true);\r\n\t\tselect.setEnabled(true);\r\n\t\tfilter.setEnabled(true);\r\n\t}",
"public void start(){\n return;\n }",
"@Override\n public void start() {\n runtime.reset();\n\n telemetry.addData(\"Instructions:\", \"To increase or decrease the shooter speed, use A button to decrease\" +\n \"speed and B button to increase speed. Use the right and left bumper to control the intake. To change \" +\n \"the intake speed, use d-pad down to decrease the speed and dpad up to increase the speed. The normal driving \" +\n \"should work as normal. Both speeds are initialized to .5, and you should be able to read that in the telemetry \" +\n \"once you start the program :) buena suerte\");\n telemetry.update();\n }",
"public void enable(){\n if(criticalStop) return;\n getModel().setStatus(true);\n }"
] | [
"0.78118306",
"0.75889266",
"0.75829166",
"0.7525716",
"0.7480814",
"0.7375488",
"0.7363032",
"0.73625964",
"0.7353882",
"0.72830033",
"0.723942",
"0.7214462",
"0.7083174",
"0.7044068",
"0.700929",
"0.6985196",
"0.69289786",
"0.6878883",
"0.6821285",
"0.681695",
"0.6815436",
"0.68133134",
"0.6796989",
"0.6793259",
"0.6771502",
"0.6769788",
"0.6764535",
"0.6758101",
"0.6757105",
"0.67196506",
"0.67076206",
"0.6705172",
"0.66995454",
"0.6696071",
"0.6690989",
"0.6689674",
"0.66843116",
"0.6668615",
"0.66623574",
"0.66399974",
"0.66398686",
"0.6617302",
"0.6608844",
"0.6605114",
"0.6601226",
"0.6600444",
"0.6592019",
"0.6584938",
"0.6576271",
"0.6576271",
"0.6571922",
"0.65600294",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.65586823",
"0.6554013",
"0.6552163",
"0.653092",
"0.6521248",
"0.6517217",
"0.65153325",
"0.6507747",
"0.65050906",
"0.65024686",
"0.65020865",
"0.64989465",
"0.64912856",
"0.6491148",
"0.6487625",
"0.6486954",
"0.6485569",
"0.6482291",
"0.6476354",
"0.6471907",
"0.6469213",
"0.64689213",
"0.64630145",
"0.64596355",
"0.6435415",
"0.6435003",
"0.64328617",
"0.6427928",
"0.64262766",
"0.6417766",
"0.6417718",
"0.6408955",
"0.6408955",
"0.6408277",
"0.64082307",
"0.6406499",
"0.6403915"
] | 0.827187 | 0 |
Opens the named result in a separate frame | protected void openResultFrame(String name) {
StringBuffer buffer = m_history.getNamedBuffer(name);
JTabbedPane tabbedPane = m_framedOutputMap.get(name);
if (buffer != null && tabbedPane == null) {
JTextArea textA = new JTextArea(20, 50);
textA.setEditable(false);
textA.setFont(new Font("Monospaced", Font.PLAIN, 12));
textA.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
textA.setText(buffer.toString());
tabbedPane = new JTabbedPane();
tabbedPane.addTab("Output", new JScrollPane(textA));
updateComponentTabs(name, tabbedPane);
m_framedOutputMap.put(name, tabbedPane);
final JFrame jf = new JFrame(name);
jf.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
m_framedOutputMap.remove(jf.getTitle());
jf.dispose();
}
});
jf.setLayout(new BorderLayout());
jf.add(tabbedPane, BorderLayout.CENTER);
jf.pack();
jf.setSize(550, 400);
jf.setVisible(true);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void resultPopup(final String name, int x, int y) {\n final String selectedName = name;\n JPopupMenu resultListMenu = new JPopupMenu();\n \n JMenuItem showMainBuff = new JMenuItem(\"View in main window\");\n if (selectedName != null) {\n showMainBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n m_history.setSingle(selectedName);\n updateMainTabs(selectedName);\n }\n });\n } else {\n showMainBuff.setEnabled(false);\n }\n resultListMenu.add(showMainBuff);\n \n JMenuItem showSepBuff = new JMenuItem(\"View in separate window\");\n if (selectedName != null) {\n showSepBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n openResultFrame(selectedName);\n }\n });\n } else {\n showSepBuff.setEnabled(false);\n }\n resultListMenu.add(showSepBuff); \n \n JMenuItem deleteResultBuff = new JMenuItem(\"Delete result\");\n if (selectedName != null && m_runThread == null) {\n deleteResultBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n m_history.removeResult(selectedName);\n }\n });\n } else {\n deleteResultBuff.setEnabled(false);\n }\n\n \n resultListMenu.add(deleteResultBuff);\n \n resultListMenu.addSeparator();\n List<Object> resultList = null;\n if (selectedName != null) { \n resultList = (List<Object>)m_history.getNamedObject(name);\n }\n \n WekaForecaster saveForecaster = null;\n Instances saveForecasterStructure = null;\n if (resultList != null) {\n for (Object o : resultList) {\n if (o instanceof WekaForecaster){\n saveForecaster = (WekaForecaster)o;\n } else if (o instanceof Instances) {\n saveForecasterStructure = (Instances)o;\n }\n }\n }\n \n final WekaForecaster toSave = saveForecaster;\n final Instances structureToSave = saveForecasterStructure;\n JMenuItem saveForecasterMenuItem = new JMenuItem(\"Save forecasting model\");\n if (saveForecaster != null) {\n saveForecasterMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n saveForecaster(name, toSave, structureToSave); \n }\n });\n } else {\n saveForecasterMenuItem.setEnabled(false);\n }\n resultListMenu.add(saveForecasterMenuItem);\n \n JMenuItem loadForecasterMenuItem = new JMenuItem(\"Load forecasting model\");\n resultListMenu.add(loadForecasterMenuItem);\n loadForecasterMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n loadForecaster();\n }\n });\n \n if (m_isRunningAsPerspective) {\n JMenuItem copyToKFClipboardMenuItem = \n new JMenuItem(\"Copy model to Knowledge Flow clipboard\");\n resultListMenu.add(copyToKFClipboardMenuItem);\n copyToKFClipboardMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();\n String encoded = \n TimeSeriesForecasting.encodeForecasterToBase64(toSave, structureToSave);\n \n TimeSeriesForecasting component = new TimeSeriesForecasting();\n component.setEncodedForecaster(encoded); \n\n TimeSeriesForecastingKFPerspective.setClipboard(component);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n });\n }\n \n \n JMenuItem reevaluateModelItem = new JMenuItem(\"Re-evaluate model\");\n if (selectedName != null && m_runThread == null) {\n \n reevaluateModelItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n reevaluateForecaster(selectedName, toSave, structureToSave);\n }\n });\n \n reevaluateModelItem.\n setEnabled((m_advancedConfigPanel.m_trainingCheckBox.isSelected() ||\n m_advancedConfigPanel.m_holdoutCheckBox.isSelected()) &&\n m_instances != null);\n } else {\n reevaluateModelItem.setEnabled(false);\n } \n \n resultListMenu.add(reevaluateModelItem);\n \n resultListMenu.show(m_history.getList(), x, y);\n }",
"void open(VirtualFrame frame);",
"public void openSavedFilesFrame()\n {\n //create a new load frame\n savedFilesFrame = new SavedFilesFrame(this);\n //if user saved some games and wants to see them on this frame\n if( !firstLoadGame )\n {\n savedFilesFrame.updatePanel(sideMenu.getSaved_files());\n }\n }",
"void openNextFrameSet();",
"public void popResultDialog(int index) {\n JFrame frame = (JFrame) SwingUtilities.windowForComponent(this);\n if (frame != null && index > 0 && index < listRank.size()) {\n Record record = listRank.get(index);\n ResultDetailDialog dialog = new ResultDetailDialog(frame, record);\n dialog.setModal(true);\n int x = frame.getX() + (frame.getWidth() - dialog.getWidth()) / 2;\n int y = frame.getY() + (frame.getHeight() - dialog.getHeight()) / 2;\n dialog.setLocation(x, y);\n dialog.setVisible(true);\n }\n }",
"public void createframe(String cid) {\n\t\tviewframe = new JFrame();\n\t\tviewconsumer(cid);\n\t\tviewframe.setTitle(\"Search result\");\n\t\tviewframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\tviewframe.setLayout(new BorderLayout()); \n\t\tviewframe.add(viewpage);\n\t\tviewframe.setVisible(true); \n\t\tviewframe.setSize(500, 400);\n\t\tviewframe.setResizable(true);\n\t}",
"private MockPIFrame openSubWindow(MockPIFrame frame1) {\n DriverRequest driverRequest = sendCommand(\"click\", \"openWindow\", \"\");\n frame1.expectCommand(\"click\", \"openWindow\", \"\");\n frame1.sendResult(\"OK\");\n driverRequest.expectResult(\"OK\");\n\n // wait for subWindow to popup\n driverRequest = sendCommand(\"waitForPopUp\", \"subWindow\", \"2000\");\n MockPIFrame subWindow =\n new MockPIFrame(DRIVER_URL, sessionId, \"subWindowId\", \"top\", \"subWindow\");\n subWindow.seleniumStart();\n subWindow.expectCommand(\"getTitle\", \"\", \"\");\n subWindow.sendResult(\"OK,Sub Window\");\n driverRequest.expectResult(\"OK\");\n\n // select the subWindow\n sendCommand(\"selectWindow\", \"subWindow\", \"\").expectResult(\"OK\");\n\n // send the subWindow a type command\n driverRequest = sendCommand(\"type\", \"subWindowLink\", \"foo\");\n subWindow.expectCommand(\"type\", \"subWindowLink\", \"foo\");\n subWindow.sendResult(\"OK\");\n driverRequest.expectResult(\"OK\");\n\n return subWindow;\n }",
"private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }",
"private JFrame popError() {\n\t\tJFrame f = new JFrame();\n\t\tf.setTitle(\"Error!\");\n\t\tf.setSize(200, 200);\n\t\tf.setLocationRelativeTo(null);\n\t\tJPanel showResult = new JPanel();\n\t\tJTextArea area = new JTextArea(\"No such Record!\");\n\t\tshowResult.add(area);\n\t\tf.add(showResult);\n\t\tf.setVisible(true);\n\t\treturn f;\n\t}",
"@Override\n public void resultFrameVisible(boolean yes) {\n\t\n }",
"@Then(\"^display result window$\")\n public void display_result_window() throws Throwable {\n \tSystem.out.println(\"display_result_window\");\n \n }",
"@Override\n\tpublic void execute() {\n\t\ttry {\n\t\t\tProperties properties\t = new Properties();\n\t\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n\t\t\tInputStream propertiesFile = classLoader.getResourceAsStream(\"languages/language_\" + lang + \".properties\");\n\t\t\tproperties.load(propertiesFile);\n\t\t\tResultSearchFrame rsf = new ResultSearchFrame(properties.getProperty(\"view_search_result\") , dto.getRootNode() , dto.getSessionId() , dto.getSearchName() , wordManagerFrame.getTransmitter() , lang);\n\t\t\trsf.showWindows();\n\t\t\tpropertiesFile.close();\n\t\t} catch (Exception e) {\n\t\t\tlogger.fatal(\"Problem to load languages\" , e);\n\t\t}\n\t\t\n\t}",
"protected void createFrame(String x) {\n InternalFrame frame = new InternalFrame();\n frame.setVisible(true);\n JOptionPane.showMessageDialog(frame, x, \"ERROR\", JOptionPane.ERROR_MESSAGE);\n JLabel invalid = new JLabel(x);\n invalid.setBounds(180, 500, 200, 100);\n frame.add(invalid);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {\n e.printStackTrace();\n }\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}",
"private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }",
"public void showIndividual() {\n JFrame newFrame = new JFrame();\n if (this.m_Indy == null) {\n System.out.println(\"No individual!\");\n return;\n }\n newFrame.setTitle(this.m_Indy.getName()+\": \"+this.m_Indy);\n newFrame.addWindowListener(new WindowAdapter() {\n public void windowClosing(WindowEvent ev) {\n System.gc();\n }\n });\n newFrame.getContentPane().add(this.m_Problem.drawIndividual(-1, -1, this.m_Indy));\n newFrame.setSize(200, 300);\n newFrame.pack();\n newFrame.validate();\n newFrame.setVisible(true);\n newFrame.show();\n }",
"public void Open() {\r\n\t click();\r\n\t }",
"private void openView(String viewToOpen)\n throws IOException, InterruptedException, URISyntaxException {\n Parent root = null;\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(viewToOpen + \"/\" + viewToOpen + \".fxml\"));\n root = loader.load();\n\n if (\"view0\".equals(viewToOpen)) {\n view0Controller = loader.getController();\n view0Controller.init(getVmFactory());\n }\n\n Scene s;\n s = new Scene(root);\n primaryStage.setScene(s);\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.initStyle(StageStyle.TRANSPARENT);\n primaryStage.show();\n\n // getcounter/iteratorvalue\n\n }",
"public void otherWin\n (String name);",
"private JFrame showNewFrame(String title) {\n\t\tJFrame f = new JFrame();\n\t\tf.setTitle(title);\n\t\tf.setSize(400, 500);\n\t\tf.setLocationRelativeTo(null);\n\t\tf.setVisible(true);\n\t\treturn f;\n\t}",
"public void openImage(String name) throws ViewerException {\n\n\t}",
"public ICurrentPage openNewWindow(String url);",
"public void switchToFrame(String name){\n\n\t\ttry {\n\t\t\tWebDriverWait wait = new WebDriverWait(driver,60);\n\t\t\twait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(name));\n\t\t\tLOGGER.info(\"Step : Switched to the frame with name\"+name+\" :Pass\");\n\t\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : Switched to Frame frame with name\"+name+\" :Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to frame\");\n\t\t\t}\n\t\t}",
"@Override\n public void run() {\n Frame parentFrame = getParentFrame(IFrameSource.FULL_CONTEXT);\n if (parentFrame != null) {\n getFrameList().gotoFrame(parentFrame);\n }\n }",
"public NewJFrame1(NewJFrame n) {\n main = n;\n initComponents();\n winOpen();\n setLocationFrame();\n this.setVisible(true);\n }",
"private void btn_ReturnActionPerformed(java.awt.event.ActionEvent evt) {\n \n Filight_Details FD = new Filight_Details();\n FD.setVisible(true);\n this.close();\n \n }",
"public static void createAndShowMatrix() {\n JFrame frame = new JFrame(\"Results Matrix\");\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frame.getContentPane().add(new ResultsMatrix().getRootPanel());\n frame.pack();\n frame.setVisible(true);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tResourceTestFrame frame=new ResourceTestFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}",
"public void actionPerformed(ActionEvent e) \n {\n resultFrame.setVisible(false);\n starterFrame.setVisible(true);\n }",
"private void chooseFileWindow()\n\t{\n\t\tInitFrame init = new InitFrame();\n\t\tinit.setFilePath(FILE_NAME);\n\t\tJFrame frame = new JFrame(\"Bowling Game\");\t\t\t\n\t\tSplashScreen splash = new SplashScreen();\n splash.setFilePath(FILE_NAME);\n // Normally, we'd call splash.showSplash() and get on \n // with the program. But, since this is only a test... \n\t\t\n\t\tsplash.showSplash();\t\t\n\t\tframe.setSize(400,400);\t\t\n\t\tinit.LoadComponents(frame);\n\t\t\n\n\t\t// first show the first fileChooser window\n\t\t\n\t\tString p1 = \"\", p = init.FileChooser(frame);\n\t\tsimpleProgressBar progres = new simpleProgressBar(100,100);\n\t\t\t\n\t\t//System.out.println(\"p(VIEWCONTORLLER):\" + p + \" \" + p.length());\n\t\t\n\t\tint i = p.length() - 1, j = 0;\n\t\t//System.out.println(i + \" \" + p.charAt(i));\n\t\twhile(i > 0)\n\t\t{\n\t\t\tif( (p.charAt(i) == '/') || (p.charAt(i) == '\\''))\n\t\t\t{\n\t\t\t\tj = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\tp1 = p.substring(j, p.length());\n\t\t//FILE_NAME = p1;\n\t\tInitView.setTxtFilePath(p);\n\t\t//BowlFrame bFrame = new BowlFrame();\n\t\t//bFrame.setVisible(true);\n\t\twhile ( null==InitView.getTxtFilePath() )\n\t\t{ \n\t\t\t\n\t\t}\n\t\tSystem.out.println(\" FILENAME: \" + FILE_NAME);\n\t\tBowl = new BowlFrame(FILE_NAME);\t\t\n\t\tBowl.setVisible(true);\n\t\n\t\tframe.dispose();\n\t}",
"private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }",
"public void refreshFrame() {\n switchWindow();\n this.switchToFrame(\"botFr\");\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnumb = 2;\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t\tconn = DriverManager.getConnection(URL, USERNAME, PASSWORD);\r\n\t\t\t\t\tstmt = conn.createStatement();\r\n\t\t\t\t\tString sql = \"select sqlSelectName from sqlSelect\";\r\n\t\t\t\t\trs = stmt.executeQuery(sql);\r\n\t\t\t\t\tString str_show = \"\";\r\n\t\t\t\t\twhile(rs.next()) {\r\n\t\t\t\t\t\tstr_show += rs.getString(\"sqlSelectName\") + \" \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tshowFileName.setText(str_show);\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tupJFrame();\r\n\t\t\t\t} catch (SQLException 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}",
"@Override\r\n\t\t\t\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\t\t\t\tWindow.open(result.get(\"description\"), \"description\", result.get(\"description\"));\r\n\r\n\t\t\t\t\t\t}",
"private void openUserReporttWindow() {\r\n\t\tnew JFrameReport();\r\n\t}",
"private void main() {\n // # I DON'T HAVE A MAIN DASHBOARD YET. MACAYLA MIGHT WANT #\n // # TO DESIGN THAT PART. FOR NOW, I HAVE A \"FAUX\" RESULTS #\n // # PAGE SHOWING, JUST SO I CAN GET A LOOK AT HOW THE RESULTS PAGE #\n // # WILL LOOK. #\n // ######################################################################\n\n ResultsFragment fragment = new ResultsFragment();\n String tag = ResultsFragment.class.getCanonicalName();\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_frame, fragment, tag).commit();\n }",
"public void buildFrame();",
"private void verPDFFrame(String filePath) {\n SwingController c = new SwingController();\n c.setIsEmbeddedComponent(true);\n\n PropertiesManager prop = new PropertiesManager(\n System.getProperties(),\n ResourceBundle.getBundle(PropertiesManager.DEFAULT_MESSAGE_BUNDLE));\n\n prop.set(PropertiesManager.PROPERTY_DEFAULT_ZOOM_LEVEL, \"1.25\");\n prop.setBoolean(PropertiesManager.PROPERTY_VIEWPREF_FITWINDOW, Boolean.TRUE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_ANNOTATION, Boolean.FALSE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_FIT, Boolean.FALSE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_ROTATE, Boolean.FALSE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_TOOLBAR_TOOL, Boolean.FALSE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_UPANE, Boolean.FALSE);\n prop.setBoolean(PropertiesManager.PROPERTY_SHOW_UTILITY_SEARCH, Boolean.FALSE);\n\n SwingViewBuilder fac = new SwingViewBuilder(c, prop);\n\n // add interactive mouse link annotation support via callback\n c.getDocumentViewController().setAnnotationCallback(\n new org.icepdf.ri.common.MyAnnotationCallback(c.getDocumentViewController()));\n javax.swing.JPanel viewerComponentPanel = fac.buildViewerPanel();\n JFrame applicationFrame = new JFrame();\n\n applicationFrame.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n applicationFrame.getContentPane().add(viewerComponentPanel);\n // Now that the GUI is all in place, we can try openning a PDF\n c.setPageFitMode(DocumentViewController.PAGE_FIT_WINDOW_WIDTH, false);\n c.openDocument(filePath);\n // show the component\n applicationFrame.pack();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n applicationFrame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n applicationFrame.setSize(screenSize);\n applicationFrame.setLocationRelativeTo(null);\n applicationFrame.setResizable(false);\n applicationFrame.setVisible(true);\n\n }",
"IFRAME createIFRAME();",
"public void run() {\r\n frame = new MainFrame(this);\r\n newAccountFrame = new NewAccountPage(this);\r\n \r\n frame.setVisible(true);\r\n }",
"private void nexttest(){\n\t\tif (TestListPanel.ktea2yn = true){\n\t\tnextframe = new Ktea2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\t/*else if (wiscyn = true){\n\t\tnextframe = new Wiscframe();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse if (basc2yn = true){\n\t\tnextframe = new Basc2frame();\n\t\tDas2panel.das2fr.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\n\t\t}*/\n\t\t\n\t}",
"public abstract void newWindow(ReFrame newFrame);",
"@Override\n public void actionPerformed(ActionEvent e){\n try{\n //Open a new window with the past game data\n new PastDataWindow();\n }catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"Error! No data loaded!\",\"Error!\",JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void additionalAWRPanel() {\n try {\n Cursor myCursor = new Cursor(\"stats$importedAWRdbid.sql\", true);\n QueryResult myResult = ExecuteDisplay.execute(myCursor, false, false, null);\n if (myResult.getNumRows() > 0) {\n String[][] resultSet = myResult.getResultSetAsStringArray();\n\n Object[] dbids = new Object[resultSet.length];\n for (int i = 0; i < resultSet.length; i++) {\n dbids[i] = resultSet[i][0];\n }\n\n String s = (String)JOptionPane.showInputDialog(this, \"Complete the sentence:\\n\" +\n \"Enter the dbid for the AWR data you wish a view\", \"Customized Dialog\", JOptionPane.PLAIN_MESSAGE, null, dbids, dbids[0]);\n \n String p = JOptionPane.showInputDialog(this,\"Enter a prefix which will appear on the new tab to help you identify the dataset.\",\"Enter a prefix\",JOptionPane.QUESTION_MESSAGE);\n String prefix = \"\";\n if (p != null && p.length() > 0) prefix = p;\n\n //If a string was returned, say so.\n if ((s != null) && (s.length() > 0)) {\n long selectedDBID = Long.valueOf(s).longValue();\n \n // add AWRInstance Panels\n\n Cursor myCursor2 = new Cursor(\"stats$importedAWR.sql\", true);\n QueryResult myResult2 = ExecuteDisplay.execute(myCursor2, false, false, null);\n String[][] myResultSet2 = myResult2.getResultSetAsStringArray();\n \n for (int i=0; i < myResultSet2.length; i++) {\n long dbid = Long.valueOf(myResultSet2[i][0]).longValue();\n int inum = Integer.valueOf(myResultSet2[i][2]).intValue();\n String iname = myResultSet2[i][1].toString();\n if (selectedDBID == dbid) StatspackAWRPanel.addInstancePanel(inum,iname,dbid,true,prefix);\n }\n }\n }\n else {\n JOptionPane.showMessageDialog(this, \"No imported AWR snapshots found!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n \n } \n catch (Exception e) {\n displayError(e,this,\"getting imported AWR dbid\");\n }\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tEx02 frame=new Ex02();\r\n\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t}catch(Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}",
"public void openLoadSelection() {\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/LoadSelectionView.fxml\"));\n\t\t\tfxmlLoader.setResources(bundle);\n\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\tStage stage = new Stage();\n\t\t\tLoadSelectionController lsc = fxmlLoader.getController();\n\t\t\tlsc.setMainController(this);\n\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\tstage.setTitle(bundle.getString(\"lSTitle\"));\n\t\t\tstage.setScene(new Scene(root1));\n\t\t\tstage.show();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void browserMouseClicked(java.awt.event.MouseEvent evt) {\n \n int ret = jfc.showOpenDialog(rootPane);\n if(ret==JFileChooser.APPROVE_OPTION)\n openFile(jfc.getSelectedFile());\n else\n {\n JOptionPane.showMessageDialog(rootPane, \"Not Working!\");\n }\n jPanel1.requestFocusInWindow();\n }",
"public void switchToFrame(int index){\n\n\t\ttry {\n\t\t\tdriver.switchTo().frame(index);\n\t\t\tLOGGER.info(\"Step : Switched to Frame with index \"+index+\" :Pass\");\n\t\t}catch(Exception e)\n\t\t{\n\t\t\tLOGGER.error(\"Step : Switched to Frame with index \"+index+\" :Fail\");\n\t\t\t//e.printStackTrace();\n\t\t\tthrow new NotFoundException(\"Exception while switching to frame\");\n\t\t\t}\n\t\t}",
"ShowDialog(JFrame aFrame){\n fFrame = aFrame;\n }",
"@Test\n public void testSubFrames() {\n openSubFrames();\n }",
"public void SwitchToFrame(String handle)\n\t{\n\t}",
"public void open();",
"public void open();",
"public void opened();",
"public ReadPlanFrame() {\r\n\t\tReadPlan read = new ReadPlan();\r\n\t\tsetTitle(\"Plan dnia\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(950,70,550,200);\r\n\t\tContainer contentPane = new JPanel();\r\n\t\tcontentPane.setLayout(null);\r\n\t\tsetContentPane(contentPane);\r\n\t\tthis.add(read.getInfo_file());\r\n\t\tthis.add(read.getText());\r\n\t\tthis.add(read.getOdczytaj());\r\n\t}",
"@Test\n public void testFramesOpen() {\n SmallFrameSet set = openSubFrames();\n\n DriverRequest driverRequest = sendCommand(\"selectFrame\", \"subFrame1\", \"\");\n set.topFrame.expectCommand(\"getWhetherThisFrameMatchFrameExpression\", \"top\", \"subFrame1\");\n set.topFrame.sendResult(\"OK,false\");\n set.subFrame0.expectCommand(\"getWhetherThisFrameMatchFrameExpression\", \"top\", \"subFrame1\");\n set.subFrame0.sendResult(\"OK,false\");\n set.subFrame1.expectCommand(\"getWhetherThisFrameMatchFrameExpression\", \"top\", \"subFrame1\");\n set.subFrame1.sendResult(\"OK,true\");\n driverRequest.expectResult(\"OK\");\n\n driverRequest = sendCommand(\"open\", \"blah.html\", \"\");\n set.subFrame1.expectCommand(\"open\", \"blah.html\", \"\");\n set.subFrame1.sendResult(\"OK\");\n set.subFrame1.sendClose();\n\n MockPIFrame newSubFrame1 =\n new MockPIFrame(DRIVER_URL, sessionId, \"newSubFrame1\", \"top.frames[1]\", \"\");\n newSubFrame1.seleniumStart();\n\n newSubFrame1.expectCommand(\"getTitle\", \"\", \"\");\n newSubFrame1.sendResult(\"OK,blah.html\");\n driverRequest.expectResult(\"OK\");\n }",
"public static void openPictureJFrame(String fileName) {\n\t SwingUtilities.invokeLater(new Runnable() {\n\t\t \n\t\t @Override\n\t\t public void run() {\n\t\t\t JFrame frame = new JFrame(fileName); \n\t\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t BufferedImage img = null;\n\t\t\t //attempt to open file\n\t\t\t try {\n\t\t\t\t img = ImageIO.read(new File(fileName));\n\t\t\t }catch(Exception e ) { e.printStackTrace(); }\n\t\t\t \n\t\t\t //add image to img icon and jlabel\n\t\t\t JLabel lbl = new JLabel();\n\t\t\t lbl.setIcon(new ImageIcon(img));\n\t\t\t frame.getContentPane().add(lbl, BorderLayout.CENTER);\n\t\t\t //set size if you want\n\t\t\t frame.setSize(1920, 1080);\n\t\t\t frame.pack();\n\t\t\t frame.setLocationRelativeTo(null);\n\t\t\t frame.setVisible(true);\n\t\t }\n\t });\n }",
"private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }",
"private void favouriteChampion() {\r\n JFrame recordWindow = new JFrame(\"Favourite a champion\");\r\n// recordWindow.setLocationRelativeTo(null);\r\n// recordWindow.getContentPane().setLayout(new BoxLayout(recordWindow.getContentPane(), BoxLayout.Y_AXIS));\r\n initiateFavouriteChampionFields(recordWindow);\r\n new Frame(recordWindow);\r\n// recordWindow.pack();\r\n// recordWindow.setVisible(true);\r\n }",
"private void switchToFrame() {\n\t\tdriver.switchTo().frame(\"mainpanel\");\n\t}",
"void displayReport ()\n {\n\tStatFrame statTable;\n String winTitle = new String (\"Statistical Results Window\");\n\n\tif (use_xml) {\n\t try {\n\t\tVector data = new Vector (); data.add (modelReport);\n\t\tString xmlStr = XMLSerializer.serialize (data);\n\t\tstatTable = new StatFrame (winTitle, xmlStr);\n\t } catch (Exception e) {\n\t\ttrc.tell (\"displayReport\", e.getMessage ());\n\t\te.printStackTrace ();\n\t\treturn;\n\t }\n\t} else {\n statTable = new StatFrame (winTitle, modelReport);\n\t}; // if\n\n statTable.showWin ();\n\n }",
"void nextFrame(PreviousRecords prevRecordsF){\n\t\tprevRecordsF.setVisible(false);\n\t\twelcomeF.setVisible(true);\n\t\t\n\t}",
"public launchFrame() {\n \n initComponents();\n \n }",
"private void showResultsTableView(String viewName)\n {\n CardLayout cLayout = (CardLayout) resultsRotatePane.getLayout();\n cLayout.show(resultsRotatePane, viewName);\n }",
"public void newWindow() {\n\t\tJMenuTest frame1 = new JMenuTest();\n\t\tframe1.setBounds(100, 100, 400, 400);\n\t\tframe1.setVisible(true);\n\t}",
"public void go(QA qa){\n\t\tpanel = new MyPanel (qa);\r\n\t\tframe = new JFrame (\"Random:Q&A\");\r\n\t\tJMenuBar menubar = new JMenuBar ();\r\n\t\tJMenu fileMenu = new JMenu (\"file\");\r\n\t\tJMenuItem loadQ = new JMenuItem (\"Load Q\");\r\n\t\tJMenuItem loadA = new JMenuItem (\"Load A\");\r\n\t\tloadQ.addActionListener(new LoadQActionListener());\r\n\t\tloadA.addActionListener(new loadAActionListener());\r\n\t\tfileMenu.add(loadQ);\r\n\t\tfileMenu.add(loadA);\r\n\t\tmenubar.add(fileMenu);\r\n//\t\tframe.setLayout(null);\r\n//\t\tpanel.setSize(1200,500);\r\n\t\tframe.add(panel);\r\n//\t\tpanel.repaint();\r\n\t\tframe.setJMenuBar(menubar);\r\n\t\tframe.setSize(1200,400);\r\n\t\tframe.setLocation(400, 400);\r\n\t\tframe.setVisible(true);\r\n\t\t\r\n\t}",
"public SmallFrameSet openSubFrames() {\n MockPIFrame oldFrame = startSession();\n\n DriverRequest driverRequest = sendCommand(\"open\", \"frames.html\", \"\");\n oldFrame.expectCommand(\"open\", \"frames.html\", \"\");\n oldFrame.sendResult(\"OK\");\n oldFrame.sendClose();\n\n MockPIFrame subFrame0 =\n new MockPIFrame(DRIVER_URL, sessionId, \"subFrame0Id\", \"top.frames[0]\", \"\");\n MockPIFrame subFrame1 =\n new MockPIFrame(DRIVER_URL, sessionId, \"subFrame1Id\", \"top.frames[1]\", \"\");\n subFrame0.seleniumStart();\n subFrame1.seleniumStart();\n // topFrame opens last, after his subFrames have finished loading\n MockPIFrame topFrame = new MockPIFrame(DRIVER_URL, sessionId, \"frameId\");\n topFrame.seleniumStart();\n\n topFrame.expectCommand(\"getTitle\", \"\", \"\");\n topFrame.sendResult(\"OK,frames.html\");\n\n driverRequest.expectResult(\"OK\");\n SmallFrameSet set = new SmallFrameSet(topFrame, subFrame0, subFrame1);\n return set;\n }",
"private void basicUIButtonActionPerformed() {\n dbCopyFrame basicFrame = new dbCopyFrame(mainFrame, true);\n basicFrame.pack();\n basicFrame.setVisible(true);\n }",
"public void open() {\n popupWindow = new Window(getTypeCaption());\n popupWindow.addStyleName(\"e-export-form-window\");\n popupWindow.addStyleName(\"opaque\");\n VerticalLayout layout = (VerticalLayout) popupWindow.getContent();\n layout.setMargin(true);\n layout.setSpacing(true);\n layout.setSizeUndefined();\n popupWindow.setSizeUndefined();\n popupWindow.setModal(false);\n popupWindow.setClosable(true);\n\n popupWindow.addComponent(this);\n getMainApplication().getMainWindow().addWindow(popupWindow);\n\n onDisplay();\n }",
"public void launchFrame() {\n\t\tf.getContentPane().add(sbrText);\n\t\tf.getContentPane().add(btnQuit);\n\n\t\t// Close when the close button is clicked\n\t\tf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// Display Frame\n\t\tf.pack(); // Adjusts frame to size of components\n\t\tf.setVisible(true);\n\t}",
"public void openNSE() {\n\t\t\t this.open.getText();\r\n\t\t}",
"public void openMacrosCalculator(View view)\n\t{\n\t\tIntent intent = new Intent(this, MacrosCalculator.class);\n\t\tstartActivityForResult(intent, MY_REQUEST_CODE);\n\t}",
"private void showWebResultForNode(IndexNode node)\n {\n if(node == null) return;\n \n final int MAX_CHARS = 25; \n JPanel panel = new JPanel(new GridLayout(7, 2));\n \n panel.add(new JLabel(\"URL\"));\n panel.add(new JLabel(limitString(node.getURL(), MAX_CHARS)));\n panel.add(new JLabel(\"Parent URL\"));\n panel.add(new JLabel(limitString(node.getParent(), MAX_CHARS)));\n panel.add(new JLabel(\"Title\"));\n panel.add(new JLabel(limitString(node.getTitle(), MAX_CHARS)));\n panel.add(new JLabel(\"Description\"));\n panel.add(new JLabel(limitString(node.getDescription(), MAX_CHARS + 10)));\n panel.add(new JLabel(\"Last updated\"));\n panel.add(new JLabel(limitString(node.getLastUpdated().toString(), MAX_CHARS + 10)));\n panel.add(new JLabel(\"Page rank\"));\n panel.add(new JLabel(limitString(\"\" + node.getRank(), 12)));\n \n JButton openInBrowser = new JButton(\"Open in browser\");\n JButton copyClipboard = new JButton(\"Copy to clipboard\");\n openInBrowser.setIcon(new ImageIcon(webIconImage));\n copyClipboard.setIcon(new ImageIcon(clipboardImage));\n panel.add(openInBrowser);\n panel.add(copyClipboard);\n \n ActionListener listener = (ActionEvent e) -> \n {\n Object src = e.getSource();\n \n //Open page at URL\n if(src == openInBrowser)\n openPage(node.getURL());\n \n //Copy URL to clipboard\n else if(src == copyClipboard)\n copyToClipboard(node.getURL());\n };\n \n openInBrowser.addActionListener(listener);\n copyClipboard.addActionListener(listener);\n \n\n \n panel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15));\n JDialog modal = new JDialog(frame);\n modal.getContentPane().add(panel);\n modal.setLocation(frame.getWidth() - panel.getSize().width, frame.getHeight() / 2 - panel.getSize().height);\n modal.setTitle(\"Address Data\");\n modal.pack();\n \n modal.addWindowListener(new WindowAdapter()\n {\n @Override\n public void windowClosing(WindowEvent e)\n {\n resultsTable.clearSelection();\n modalOpen = false;\n }\n });\n \n modal.setVisible(true);\n }",
"@Override\n \t\t\t\tpublic void doOpen() {\n \n \t\t\t\t}",
"private void openLabButton() throws IOException{\n int returnVal = labChooser.showOpenDialog(this);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File lab = labChooser.getSelectedFile();\n openLab(lab);\n } \n }",
"private void openFile()\r\n {\r\n int returnState = openFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = openFileChooser.getSelectedFile();\r\n openUriInBackground(file.toURI());\r\n } \r\n }",
"public void start() {\n\t\tPetriNetView pnmlData = ApplicationSettings.getApplicationView()\n\t\t\t\t.getCurrentPetriNetView();\n\t\t//if (pnmlData.getTokenViews().size() > 1) {\n\t\tif(pnmlData.getEnabledTokenClassNumber() > 1){\n\t\t\tExpander expander = new Expander(pnmlData);\n\t\t\tpnmlData = expander.unfold();\n\t\t\tJOptionPane.showMessageDialog(null, \"This is CGSPN. The analysis will only apply to default color (black)\",\n\t\t\t\t\t\"Information\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t\t// Build interface\n\t\tEscapableDialog guiDialog = new EscapableDialog(\n\t\t\t\tApplicationSettings.getApplicationView(), MODULE_NAME, true);\n\n\t\t// 1 Set layout\n\t\tContainer contentPane = guiDialog.getContentPane();\n\t\tcontentPane.setLayout(new BoxLayout(contentPane, BoxLayout.PAGE_AXIS));\n\n\t\t// 2 Add file browser\n\t\tsourceFilePanel = new PetriNetChooserPanel(\"Source net\", pnmlData);\n\t\tcontentPane.add(sourceFilePanel);\n\n\t\t// 3 Add results pane\n\t\tresults = new ResultsHTMLPane(pnmlData.getPNMLName());\n\t\tcontentPane.add(results);\n\n\t\t// 4 Add button's\n\t\tcontentPane.add(new ButtonBar(\"Analyse GSPN\", runAnalysis, guiDialog\n\t\t\t\t.getRootPane()));\n\n\t\t// 5 Make window fit contents' preferred size\n\t\tguiDialog.pack();\n\n\t\t// 6 Move window to the middle of the screen\n\t\tguiDialog.setLocationRelativeTo(null);\n\n\t\ttry {\n\t\t\tguiDialog.setVisible(true);\n\t\t} catch (NullPointerException e) {\n\t\t}\n\n\t}",
"public void run() {\n\t\t\t\tLayoutFrame frame = new LayoutFrame();\n\t\t\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\tframe.setVisible(true);\n\t\t\t}",
"public void show(String fileName, Item itemType) {\n JFrame frame = new JFrame();\n frame.add(new mapPanel(fileName, itemType));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n }",
"@Override\n public void run() {\n JFrame frame = new JFrame(\"Survey\");\n frame.setPreferredSize(new Dimension(300, 400));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n createComponents(frame.getContentPane());\n frame.pack();\n frame.setVisible(true);\n }",
"private void open() {\n\t\tdelegate.questionTabOpened(assesmentProxy.getId(),question.getId(),this);\n\t\t\n\t\tif(answersLoaded==false){\n\t\t\tdelegate.twistieOpenQuestionClicked(this);\n\t\t\tanswersLoaded=true;\n\t\t}\n\t\ttwistieOpen.setVisible(false);\n\t\tanswers.setVisible(true);\n\t\ttwistieClose.setVisible(true);\n\t\tanswersVisible=true;\n\t\tdetailsTablePanel.setVisible(true);\n\t\tquestionTable.setClassName(\"questionTable-open\");\n\t}",
"public void openMMUModeSelect(){\n\t\tmodeFrame = new JFrame(\"MMU Simulator\");\n\t\tmodeFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tselectModePane = new SelectModePane(this);\n\t\tselectModePane.setBackground(new Color(238,255,255));\n\t\tmodeFrame.setResizable(false);\n\t\tselectModePane.setOpaque(true); \n\t\tmodeFrame.setContentPane(selectModePane);\n\t\tImageIcon icon=new ImageIcon(\"docs/mmuIcon.jpg\");\n\t\tmodeFrame.setIconImage(icon.getImage());\n\t\tmodeFrame.pack();\n\t\tmodeFrame.setVisible(true);\n\t}",
"private void printLeagueOfLegendsAccount() {\r\n JFrame recordWindow = new JFrame(\"Print out account details\");\r\n// recordWindow.setLocationRelativeTo(null);\r\n// recordWindow.getContentPane().setLayout(new BoxLayout(recordWindow.getContentPane(), BoxLayout.Y_AXIS));\r\n initiateAccountPrintFields(recordWindow);\r\n new Frame(recordWindow);\r\n// recordWindow.pack();\r\n// recordWindow.setVisible(true);\r\n }",
"public JFrame editFrame(String name) throws Exception {\r\n\t\tJFrame frame = new JFrame(name);\r\n\r\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\r\n\r\n\t\tdouble width = GameScreen.WIDTH.getValue();\r\n\t\tdouble height = GameScreen.HEIGHT.getValue();\r\n\t\tdim.width = (int) (dim.width * width);\r\n\t\tdim.height = (int) (dim.height * height);\r\n\r\n\t\tSystem.out.println(dim.getHeight() + \" \" + dim.getWidth());\r\n\t\tframe.setSize(dim);\r\n\t\tBoxLayout boxLayout = new BoxLayout(frame.getContentPane(), BoxLayout.Y_AXIS); // top to bottom\r\n\t\tframe.setLayout(boxLayout);\r\n\r\n\t\treturn frame;\r\n\t}",
"public void launch() {\n m_frame.pack();\n m_frame.setVisible(true);\n }",
"@Override\r\n\tpublic void run() {\n\t\tshowViewer();\r\n\t}",
"public JFrame openInWindow(String title)\n {\n JFrame frame = new JFrame(title);\n frame.setContentPane(this);\n frame.pack();\n frame.setResizable(false);\n frame.setLocationRelativeTo(null);\n\n return frame;\n }",
"public void OpenWorkout(String workName){\n Intent openWorkout = new Intent(work_workoutList.this, work_exerciseList.class);\n openWorkout.putExtra(\"wName\", workName);\n startActivity(openWorkout);\n }",
"@Test\n public void testEvilOpen() {\n MockPIFrame frame1 = startSession();\n\n // 1. driver issues an \"open\" command\n DriverRequest driverRequest = sendCommand(\"open\", \"blah.html\", \"\");\n // 2. original frame receives open request\n // ... but doesn't reply \"OK\" yet (this is the evil part!)\n frame1.expectCommand(\"open\", \"blah.html\", \"\");\n // 3. old frame unloads; new frame with same frame address loads and replies \"START\"\n MockPIFrame frame2 = new MockPIFrame(DRIVER_URL, sessionId, \"frame2\");\n frame2.seleniumStart();\n // X. original frame finally manages to reply \"OK\" to original \"open\" command\n sleepForAtLeast(100);\n frame1.sendResult(\"OK\");\n // 4. server automatically begins waiting for load; asks frame2 for \"getTitle\"\n frame2.expectCommand(\"getTitle\", \"\", \"\");\n // 5. browser replies \"blah.html\"\n frame2.sendResult(\"OK,blah.html\");\n // 6. server replies \"OK\" to driver's original \"open\" command\n driverRequest.expectResult(\"OK\");\n }",
"private void affiche1(JFrame f) throws ClassNotFoundException, SQLException {\n\t\tMyConnexion.affiche(\"select * from bibliotheque.livre where etat='R'\", f);\n\t}",
"Frame createFrame();",
"public static void main(String args[]) {\n\n try {\n HtmlHead hd = new HtmlHead(\"PreLoadMRNFrame local\");\n HtmlBody bd = new HtmlBody();\n HtmlPage hp = new HtmlPage(hd,bd);\n //PreLoadMRNFrame local= new PreLoadMRNFrame(args);\n bd.addItem(new ConfirmStationsFrame(args));\n hp.printHeader();\n hp.print();\n } catch(Exception e) {\n ec.processErrorStatic(e, \"ConfirmStationsFrame\", \"Constructor\", \"\");\n // close the connection to the database\n common2.DbAccessC.close();\n } // try-catch\n\n }",
"FRAME createFRAME();",
"private void showCreateWalkActivity() {\n Intent intent = new Intent(this, ActivityNewWalk.class);\n this.startActivityForResult(intent, CREATE_WALK_REQUEST);\n }",
"protected void generateMainWindow(String name) {\r\n\t\t\r\n\t\t//Main Frame\r\n\t\tframe = new JFrame(name);\r\n\t\tframe.setBackground(Color.decode(\"#500000\"));\r\n\t\tframe.setSize(1000, 400);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t//Main Panel\r\n\t\tmainPanel = new MainPanel();\r\n\t\tframe.add(mainPanel);\r\n\t\tplaceComponents(mainPanel);\r\n\t\tframe.setVisible(true);\r\n\t}",
"public void runDisplay()\n\t{\n\t\tscFrame = new SpellCheckFrame();\n\t\tscFrame.setVisible(true);\n\t}",
"public void open() {\r\n\t}",
"public void showResultsWindow() {\r\n \t\tshowResults.setSelected(true);\r\n \t\tshowResultsWindow(true);\r\n \t}",
"public void run() {\n displayFileWindow();\n }",
"public String f9action() throws Exception {\r\n\t\tString query = \" SELECT QUES_NAME , QUES_TYPE,QUES_CODE FROM HRMS_QUES \" \r\n\t\t\t\t\t+\" ORDER BY upper(QUES_NAME) \";\t\t\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tSET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW.\t\t * \r\n\t\t */ \r\n\t\tString[] headers={ getMessage(\"questionname\")};\r\n\t\t\r\n\t\tString[] headerWidth={ \"100\"};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\t-SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A ROW IS SELECTED.\r\n\t\t * \t\t-USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * \t\t-PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN INDEX.\r\n\t\t * \t\tNOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF FIELDNAMES\t\t \r\n\t\t * */ \t\r\n\t\t\r\n\t\tString[] fieldNames={\"quesName\",\"quesType\",\"quesCode\"};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t \tSET THE COLUMN INDEX\r\n\t\t * \t\tE.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON CLICKING A ROW\r\n\t\t * \t\t\tONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN IN THE PARENT WINDOW FIELDS\r\n\t\t * \t\t\tTHEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \t\t\r\n\t\t * \t\tNOTE: COLUMN NUMBERS STARTS WITH 0\t\t \t\r\n\t\t * \r\n\t\t */ \r\n\t\tint[] columnIndex={0,1,2};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tWHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"true\";\r\n\t\t\r\n\t\t/**\t\t \r\n\t\t * \t\tIF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL FOLLOWING METHOD IN THE ACTION * \r\n\t\t * \t\tNAMING CONVENSTION: <NAME OF ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod=\"QuestionnaireMaster_showRecord.action\";\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tCALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED\t\t * \r\n\t\t */\r\n\t\t\r\n\t\tsetF9Window(query,headers,headerWidth,fieldNames,columnIndex,submitFlag,submitToMethod);\r\n\t\t\r\n\t\treturn \"f9page\";\r\n\t}"
] | [
"0.6416849",
"0.6052934",
"0.6005124",
"0.59740025",
"0.5817895",
"0.5803494",
"0.57454133",
"0.5699128",
"0.5685408",
"0.5661",
"0.5660333",
"0.5573635",
"0.55545115",
"0.5549685",
"0.5542348",
"0.5496237",
"0.54740757",
"0.54644555",
"0.54478145",
"0.54476386",
"0.5434173",
"0.54328614",
"0.5429796",
"0.5417962",
"0.5410221",
"0.53955615",
"0.53885114",
"0.5388431",
"0.53782773",
"0.5366855",
"0.5314055",
"0.5311935",
"0.52997035",
"0.5292256",
"0.52912396",
"0.52807635",
"0.52637035",
"0.5237916",
"0.5237566",
"0.5237158",
"0.5226394",
"0.5212952",
"0.5212454",
"0.5183634",
"0.51791483",
"0.5175349",
"0.5175214",
"0.5172229",
"0.51629907",
"0.5157921",
"0.51576954",
"0.51500344",
"0.51500344",
"0.51438093",
"0.514268",
"0.51364416",
"0.5117102",
"0.51148504",
"0.51067007",
"0.5097736",
"0.5091014",
"0.5083629",
"0.50779444",
"0.5070846",
"0.5069918",
"0.506547",
"0.5058813",
"0.5051296",
"0.5047016",
"0.5040522",
"0.5038352",
"0.5038295",
"0.5035388",
"0.5031584",
"0.50307053",
"0.50287914",
"0.50262004",
"0.5025175",
"0.50220174",
"0.5016854",
"0.50164074",
"0.5014115",
"0.5007399",
"0.5002796",
"0.50020033",
"0.49994832",
"0.49985945",
"0.49968824",
"0.49963766",
"0.49930024",
"0.4992145",
"0.49909335",
"0.49899933",
"0.4983315",
"0.49830645",
"0.49815682",
"0.49761447",
"0.4970706",
"0.49652612",
"0.49556687"
] | 0.8031122 | 0 |
Pops up a contextual menu in the result history list | protected void resultPopup(final String name, int x, int y) {
final String selectedName = name;
JPopupMenu resultListMenu = new JPopupMenu();
JMenuItem showMainBuff = new JMenuItem("View in main window");
if (selectedName != null) {
showMainBuff.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
m_history.setSingle(selectedName);
updateMainTabs(selectedName);
}
});
} else {
showMainBuff.setEnabled(false);
}
resultListMenu.add(showMainBuff);
JMenuItem showSepBuff = new JMenuItem("View in separate window");
if (selectedName != null) {
showSepBuff.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
openResultFrame(selectedName);
}
});
} else {
showSepBuff.setEnabled(false);
}
resultListMenu.add(showSepBuff);
JMenuItem deleteResultBuff = new JMenuItem("Delete result");
if (selectedName != null && m_runThread == null) {
deleteResultBuff.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
m_history.removeResult(selectedName);
}
});
} else {
deleteResultBuff.setEnabled(false);
}
resultListMenu.add(deleteResultBuff);
resultListMenu.addSeparator();
List<Object> resultList = null;
if (selectedName != null) {
resultList = (List<Object>)m_history.getNamedObject(name);
}
WekaForecaster saveForecaster = null;
Instances saveForecasterStructure = null;
if (resultList != null) {
for (Object o : resultList) {
if (o instanceof WekaForecaster){
saveForecaster = (WekaForecaster)o;
} else if (o instanceof Instances) {
saveForecasterStructure = (Instances)o;
}
}
}
final WekaForecaster toSave = saveForecaster;
final Instances structureToSave = saveForecasterStructure;
JMenuItem saveForecasterMenuItem = new JMenuItem("Save forecasting model");
if (saveForecaster != null) {
saveForecasterMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveForecaster(name, toSave, structureToSave);
}
});
} else {
saveForecasterMenuItem.setEnabled(false);
}
resultListMenu.add(saveForecasterMenuItem);
JMenuItem loadForecasterMenuItem = new JMenuItem("Load forecasting model");
resultListMenu.add(loadForecasterMenuItem);
loadForecasterMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
loadForecaster();
}
});
if (m_isRunningAsPerspective) {
JMenuItem copyToKFClipboardMenuItem =
new JMenuItem("Copy model to Knowledge Flow clipboard");
resultListMenu.add(copyToKFClipboardMenuItem);
copyToKFClipboardMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();
String encoded =
TimeSeriesForecasting.encodeForecasterToBase64(toSave, structureToSave);
TimeSeriesForecasting component = new TimeSeriesForecasting();
component.setEncodedForecaster(encoded);
TimeSeriesForecastingKFPerspective.setClipboard(component);
} catch (Exception ex) {
ex.printStackTrace();
}
}
});
}
JMenuItem reevaluateModelItem = new JMenuItem("Re-evaluate model");
if (selectedName != null && m_runThread == null) {
reevaluateModelItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
reevaluateForecaster(selectedName, toSave, structureToSave);
}
});
reevaluateModelItem.
setEnabled((m_advancedConfigPanel.m_trainingCheckBox.isSelected() ||
m_advancedConfigPanel.m_holdoutCheckBox.isSelected()) &&
m_instances != null);
} else {
reevaluateModelItem.setEnabled(false);
}
resultListMenu.add(reevaluateModelItem);
resultListMenu.show(m_history.getList(), x, y);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void hookContextMenu() {\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onLoadMenuShow(String result) {\n\n\t\t\t\t\t}",
"private void displayMenu() {\n System.out.println(\"\\nSelect from:\");\n System.out.println(\"\\t1 -> add item to to-do list\");\n System.out.println(\"\\t2 -> remove item from to-do list\");\n System.out.println(\"\\t3 -> view to-do list\");\n System.out.println(\"\\t4 -> save work room to file\");\n System.out.println(\"\\t5 -> load work room from file\");\n System.out.println(\"\\t6 -> quit\");\n }",
"protected void contextMenuAboutToShow(IMenuManager menuManager) {\n IDocument doc = textViewer.getDocument();\n if (doc == null) {\n return;\n }\n\n menuManager\n .add(globalActions.get(ActionFactory.COPY.getId()));\n menuManager.add(globalActions.get(ActionFactory.SELECT_ALL\n .getId()));\n\n menuManager.add(new Separator(\"FIND\")); //$NON-NLS-1$\n menuManager\n .add(globalActions.get(ActionFactory.FIND.getId()));\n\n menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));\n }",
"@Override\n public void showContextMenu()\n {\n showContextMenu(selection, View.SELECTION);\n }",
"protected void createContextMenu() {\n\t\t// TODO : XML Editor 에서 Query Editor 관련 Action 삭제~~\n\t\tMenuManager contextMenu = new MenuManager(\"#PopUp\"); //$NON-NLS-1$\n\t\tcontextMenu.add(new Separator(\"additions\")); //$NON-NLS-1$\n\t\tcontextMenu.setRemoveAllWhenShown(true);\n\t\tcontextMenu.addMenuListener(new NodeActionMenuListener());\n\t\tMenu menu = contextMenu.createContextMenu(getControl());\n\t\tgetControl().setMenu(menu);\n\t\t// makeActions();\n\t\t// hookSingleClickAction();\n\n\t}",
"static void displayMenu(){\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Select operation:\");\n\t\tSystem.out.println(\"1-List movies\");\n\t\tSystem.out.println(\"2-Show movie details\");\n\t\tSystem.out.println(\"3-Add a movie\");\n\t\tSystem.out.println(\"4-Add an example set of 5 movies\");\n\t\tSystem.out.println(\"5-Exit\");\n\t}",
"@Override\n\t\tpublic void openMenu() {\n\t\t}",
"private void fillDetailContextMenu(IMenuManager menu) {\n menu.add(getAction(DETAIL_COPY_ACTION));\n menu.add(getAction(DETAIL_SELECT_ALL_ACTION));\n menu.add(new Separator());\n menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));\n }",
"public void displayHelpMenuView()\n {\n System.out.println(\"\\nHelp menu selected.\");\n }",
"public void showHistorySwitchAction() {\n\t\tanimalsListPanel.switchToPast();\n\t}",
"private void presentMenu() {\n System.out.println(\"\\nHi there, kindly select what you would like to do:\");\n System.out.println(\"\\ta -> add a task\");\n System.out.println(\"\\tr -> remove a task\");\n System.out.println(\"\\tc -> mark a task as complete\");\n System.out.println(\"\\tm -> modify a task\");\n System.out.println(\"\\tv -> view all current tasks as well as tasks saved previously\");\n System.out.println(\"\\tct -> view all completed tasks\");\n System.out.println(\"\\ts -> save tasks to file\");\n System.out.println(\"\\te -> exit\");\n }",
"public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.event_history, menu);\n\t \n\t if (ViewConfiguration.get(this).hasPermanentMenuKey()) {\n\t \t\n\t } else {\n\t new ShowcaseView.Builder(this, true)\n\t .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.OVERFLOW))\n\t .setContentTitle(\"Täältä voit vaihtaa jaksoa\")\n\t .setContentText(\"Klikkaamalla tästä voit valita jakson, jonka suunnitelmat näytetään.\")\n\t .hideOnTouchOutside()\n\t .setStyle(R.style.ShowcaseView)\n\t .singleShot(CHANGE_SPRINT_HELP)\n\t .build();\n\t }\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\r\n\tpublic void menu() {\n\t\tSystem.out.println(\"go to menu\");\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void goToShowList() {\n\t\t\r\n\t}",
"Menu getMenuHelp();",
"private void displayMenu() {\n\t\tSystem.out.println(\"********Loan Approval System***********\");\n\t\tSystem.out.println(\"\\n\");\n\t\tSystem.out.println(\n\t\t\t\t\"Choose the following options:\\n(l)Load Applicaitons\\n(s)Set the Budget\\n(m)Make a decision\\n(p)Print\\n(u)Update the application\");\n\n\t}",
"default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}",
"public static void menu() {\n\t\tSystem.out.println(\"Menu:\");\n\t\tSystem.out.println(\"1: Create\");\n\t\tSystem.out.println(\"2: Merge\");\n\t\tSystem.out.println(\"3: Collection\");\n\t\tSystem.out.println(\"4: Upgrades\");\n\t\tSystem.out.println(\"5: Sell\");\n\t\tSystem.out.println(\"6: Identify Crystal\");\n\t\tSystem.out.println(\"\");\n\t}",
"public void showHistoryAction(boolean selected) {\n\t\tif (selected == true) {\n\t\t\tanimalDetailPanel.showHistoryShiftPane();\n\t\t\tfillAnimalDetailTable();\n\t\t}\n\t}",
"public Menu createToolsMenu();",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n// menu.add(0, 0, 0, \"++Results\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n// menu.add(0, 1, 0, \"++Reload\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n return true;\n }",
"@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}",
"@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.history_item_detail, menu);\r\n\t\treturn true;\r\n\t}",
"public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }",
"private static void displayUserMenu() {\n\t\tSystem.out.println(\"\\t User Menu Help \\n\" \n\t\t\t\t+ \"====================================\\n\"\n\t\t\t\t+ \"ar <reponame> : To add a new repo \\n\"\n\t\t\t\t+ \"dr <reponame> : To delete a repo \\n\"\n\t\t\t\t+ \"or <reponame> : To open repo \\n\"\n\t\t\t\t+ \"lr : To list repo \\n\"\n\t\t\t\t+ \"lo : To logout \\n\"\n\t\t\t\t+ \"====================================\\n\");\n\t}",
"private void mainMenu() {\n System.out.println(\"Canteen Management System\");\n System.out.println(\"-----------------------\");\n System.out.println(\"1. Show Menu\");\n System.out.println(\"2.AcceptReject\");\n System.out.println(\"3.place orders\");\n System.out.println(\"4.show orders\");\n System.out.println(\"5. Exit\");\n mainMenuDetails();\n }",
"public void recordInProductHelpMenuItemClicked() {\n RecordUserAction.record(\"Android.ChromeHome.IPHMenuItemClicked\");\n }",
"private static void returnMenu() {\n\t\t\r\n\t}",
"private void displayMenu() {\r\n System.out.println(\"\\nSelect an option from below:\");\r\n System.out.println(\"\\t1. View current listings\");\r\n System.out.println(\"\\t2. List your vehicle\");\r\n System.out.println(\"\\t3. Remove your listing\");\r\n System.out.println(\"\\t4. Check if you won bid\");\r\n System.out.println(\"\\t5. Save listings file\");\r\n System.out.println(\"\\t6. Exit application\");\r\n\r\n }",
"private void displayMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Main Menu -------------\");\r\n System.out.println(\"(1) Search Cars\");\r\n System.out.println(\"(2) Add Car\");\r\n System.out.println(\"(3) Delete Car\");\r\n System.out.println(\"(4) Exit System\");\r\n System.out.println(\"(5) Edit Cars\");\r\n }",
"public void mainMenu() {\n\n System.out.println(\"\\n HOTEL RESERVATION SYSTEM\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.println(\" COMMANDS:\");\n System.out.println(\" - View Tables\\t\\t(1)\");\n System.out.println(\" - Add Records\\t\\t(2)\");\n System.out.println(\" - Update Records\\t(3)\");\n System.out.println(\" - Delete Records\\t(4)\");\n System.out.println(\" - Search Records\\t(5)\");\n System.out.println(\"+------------------------------------------------------------------------------+\");\n System.out.print(\" > \");\n }",
"@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 }",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n menu.setHeaderTitle(\"Select the Action\");\n getMenuInflater().inflate(R.menu.my_context_menu, menu); // add costume menu\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.show_history, menu);\n return true;\n }",
"void clickFmFromMenu();",
"public String getActivationMenu();",
"private void createPopupMenu()\r\n\t{\r\n\t\tfinal Camera camera = SrvHal.getCamera();\r\n\t\tfinal PopupMenu menu = new PopupMenu();\r\n\t\tfinal MenuItem setColour = new MenuItem(\"Set colour to selected bin\");\r\n\r\n\t\tsetColour.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\t\t\t\tcamera.getDetector().updateColourBinFromCoords();\r\n\t\t\t\tcamera.getDetector().setSampleLock(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenu.add(setColour);\r\n\r\n\t\tfinal Component canvas = this;\r\n\t\tadd(menu);\r\n\t\taddMouseListener(new MouseAdapter()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e)\r\n\t\t\t{\r\n\t\t\t\t// show the context menu when right-click detected within image bounds\r\n\t\t\t\tif (e.getButton() == MouseEvent.BUTTON3)\r\n\t\t\t\t{\r\n\t\t\t\t\tint x = e.getX();\r\n\t\t\t\t\tint y = e.getY();\r\n\t\t\t\t\tRectangle bounds = getOffsetBounds();\r\n\t\t\t\t\tif (bounds.contains(x, y))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcamera.getDetector().setSampleLock(true);\r\n\t\t\t\t\t\tmenu.show(canvas, x, y);\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 initContextMenu() throws Exception {\n\t\t\n\t\tMenuManager menuManager = new MenuManager();\n\t\tMenu menu = menuManager.createContextMenu(wrapedViewer.getTree());\n\t\twrapedViewer.getTree().setMenu(menu);\n\t\t\n\t\t//--RDF and RDFS columns\n\t\tResultViewerColumnInfo labelColumnInfo = new ResultViewerColumnInfo(\"rdfs:label\", RDFS.LABEL);\n\t\tSetColumnVisibleAction showLabelAction = new SetColumnVisibleAction(labelColumnInfo, this);\n\t\tcontextMenuActions.put(labelColumnInfo.getColumnType(), showLabelAction);\n\t\tmenuManager.add(showLabelAction);\n\t\t//ResultViewerColumnInfo typeColumnInfo = new ResultViewerColumnInfo(\"rdf:type\", RDF.TYPE);\n\t\t//SetColumnVisibleAction showTypeAction = new SetColumnVisibleAction(typeColumnInfo, this);\n\t\t//contextMenuActions.put(typeColumnInfo.getColumnType(), showTypeAction);\n\t\t//menuManager.add(showTypeAction);\n\t\t\n\t\t//--Peer column\n\t\tResultViewerColumnInfo peerColumnInfo = new ResultViewerColumnInfo(\"oyster:peer\", Constants.POMVURI+Constants.ontologyOMVLocation);\n\t\tSetColumnVisibleAction showPeerAction = new SetColumnVisibleAction(peerColumnInfo, this);\n\t\tcontextMenuActions.put(peerColumnInfo.getColumnType(), showPeerAction);\n\t\tmenuManager.add(showPeerAction);\n\t\tmenuManager.add(new Separator());\n\t\t\n\t\t\n\t\tOntology resourceTypeOntology = mOyster2.getTypeOntology();\n\t\tOWLClass ontologyClass = KAON2Manager.factory().owlClass(Constants.OMV+Constants.DefaultTypeOntologyRoot);\n\t\ttry{\n\t\t\t/*KAON2 BUG, DOES NOT SUPPORT OWL DL\n\t * SHOULD BE DELETED WHEN IT DOES\n\t */\n\t\t\t\n\t\t\tResultViewerColumnInfo nameColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.name), Constants.OMVURI+Constants.name);\n\t\t\tSetColumnVisibleAction showNameAction = new SetColumnVisibleAction(nameColumnInfo, this);\n\t\t\tcontextMenuActions.put(nameColumnInfo.getColumnType(), showNameAction);\n\t\t\tmenuManager.add(showNameAction);\n\t\t\tResultViewerColumnInfo acronymColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.acronym), Constants.OMVURI+Constants.acronym);\n\t\t\tSetColumnVisibleAction showAcronymAction = new SetColumnVisibleAction(acronymColumnInfo, this);\n\t\t\tcontextMenuActions.put(acronymColumnInfo.getColumnType(), showAcronymAction);\n\t\t\tmenuManager.add(showAcronymAction);\n\t\t\tResultViewerColumnInfo descriptionColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.description), Constants.OMVURI+Constants.description);\n\t\t\tSetColumnVisibleAction showDescriptionAction = new SetColumnVisibleAction(descriptionColumnInfo, this);\n\t\t\tcontextMenuActions.put(descriptionColumnInfo.getColumnType(), showDescriptionAction);\n\t\t\tmenuManager.add(showDescriptionAction);\n\t\t\tResultViewerColumnInfo documentationColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.documentation), Constants.OMVURI+Constants.documentation);\n\t\t\tSetColumnVisibleAction showDocumentationAction = new SetColumnVisibleAction(documentationColumnInfo, this);\n\t\t\tcontextMenuActions.put(documentationColumnInfo.getColumnType(), showDocumentationAction);\n\t\t\tmenuManager.add(showDocumentationAction);\n\t\t\tResultViewerColumnInfo uriColumnInfo = new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Constants.URI), Constants.OMVURI+Constants.URI);\n\t\t\tSetColumnVisibleAction showURIAction = new SetColumnVisibleAction(uriColumnInfo, this);\n\t\t\tcontextMenuActions.put(uriColumnInfo.getColumnType(), showURIAction);\n\t\t\tmenuManager.add(showURIAction);\n\t\t\t\n\t\t\t/* UNTIL HERE */\n\t\t\t\n\t\t\tSet<DataProperty> dataProperties=ontologyClass.getDataPropertiesFrom(resourceTypeOntology);\n\t\t\tfor (DataProperty dataProperty : dataProperties){\n\t\t\t\tSetColumnVisibleAction action = new SetColumnVisibleAction(new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Namespaces.guessLocalName(dataProperty.getURI())), dataProperty.getURI()), this);\n\t\t\t\tcontextMenuActions.put(dataProperty.getURI(), action);\n\t\t\t\tmenuManager.add(action);\n\t\t\t}\n\t Set<ObjectProperty> objectProperties=ontologyClass.getObjectPropertiesFrom(resourceTypeOntology);\n\t for (ObjectProperty objectProperty : objectProperties){\n\t \tSetColumnVisibleAction action = new SetColumnVisibleAction(new ResultViewerColumnInfo(MainWindow.whichName(Constants.omvCondition+Namespaces.guessLocalName(objectProperty.getURI())), objectProperty.getURI()), this);\n\t\t\t\tcontextMenuActions.put(objectProperty.getURI(), action);\n\t\t\t\tmenuManager.add(action);\n\t }\n\t \n\t\t}\n\t catch (KAON2Exception e) {\n\t \tSystem.err.println(e + \" in contextinit()\");\n\t }\n\t\t\n\t}",
"public java.awt.Menu getMenuHook();",
"public void menu()\n {\n System.out.println(\"\\n\\t\\t============================================\");\n System.out.println(\"\\t\\t|| Welcome to the Movie Database ||\");\n System.out.println(\"\\t\\t============================================\");\n System.out.println(\"\\t\\t|| (1) Search Movie ||\");\n System.out.println(\"\\t\\t|| (2) Add Movie ||\");\n System.out.println(\"\\t\\t|| (3) Delete Movie ||\");\n System.out.println(\"\\t\\t|| (4) Display Favourite Movies ||\");\n System.out.println(\"\\t\\t|| (5) Display All Movies ||\");\n System.out.println(\"\\t\\t|| (6) Edit movies' detail ||\");\n System.out.println(\"\\t\\t|| (7) Exit System ||\");\n System.out.println(\"\\t\\t=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.print( \"\\t\\tPlease insert your option: \");\n }",
"@Override\r\n public final void display() {\r\n System.out.println(\"\\n\\t===============================================================\");\r\n System.out.println(\"\\tEnter the letter associated with one of the following commands:\");\r\n \r\n for (String[] menuItem : HelpMenuView.menuItems) {\r\n System.out.println(\"\\t \" + menuItem[0] + \"\\t\" + menuItem[1]);\r\n }\r\n System.out.println(\"\\t===============================================================\\n\");\r\n }",
"public Menu displayMenu() {\n return new CMDDisplayMenu(agg).execute();\n }",
"private void mainMenu() {\r\n System.out.println(\"Canteen Management System\");\r\n System.out.println(\"-----------------------\");\r\n System.out.println(\"1. Show Menu\");\r\n System.out.println(\"2. Employee Login\");\r\n System.out.println(\"3. Vendor Login\");\r\n System.out.println(\"4. Exit\");\r\n mainMenuDetails();\r\n }",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n getActivity().getMenuInflater().inflate(R.menu.menu_context_foreign_workspaces, menu);\n }",
"public void clickFreeDaysHistoryMenu() {\r\n\t\tfreeDaysHistoryButton.click();\r\n\t}",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n getMenuInflater().inflate(R.menu.menu_main_for_context , menu);\n menu.setHeaderTitle(\"Select Menu \");\n }",
"@objid (\"491bee9e-12dd-11e2-8549-001ec947c8cc\")\n private static void createMenuEntriesForAction(IModule module, MMenu moduleMenu, MPart view) {\n Map<String, MMenu> slotMap = new HashMap<>();\n \n // ask module for its IModuleAction that should be inserted into the\n // contextual menu and for each of them\n for (IModuleAction action : module.getActions(ActionLocation.contextualpopup)) {\n // Create the MHandler and MHandledItem for this action.\n \n // MCommand\n MCommand command = ModuleCommandsRegistry.getCommand(module, action);\n \n // MHandler\n final MHandler handler = createAndActivateHandler(command, module, action, view);\n \n // MHandledItem\n MHandledMenuItem item = createAndInsertItem(moduleMenu, action, slotMap);\n // Bind to command\n item.setCommand(command);\n \n Expression visWhen = new IsVisibleExpression(handler.getObject(), item);\n MCoreExpression isVisibleWhenExpression = MUiFactory.INSTANCE.createCoreExpression();\n isVisibleWhenExpression.setCoreExpressionId(\"programmatic.value\");\n isVisibleWhenExpression.setCoreExpression(visWhen);\n \n item.setVisibleWhen(isVisibleWhenExpression);\n }\n }",
"public void showThreadOptionsMenu() {\n System.out.println(\"a - Post to thread\\nb - Main Menu\\nc - Quote\");\n }",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {\n //menu.setHeaderTitle(\"Select The Action\");\n menu.add(0, v.getId(), 0, \"Edit word\");\n menu.add(1, v.getId(), 0, \"Delete word\");\n\n super.onCreateContextMenu(menu, v, menuInfo);\n }",
"public static void architectUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the architects\");\n System.out.println(\"2 - Would you like to search for a architect's information\");\n System.out.println(\"3 - Adding a new architect's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"public void menu() {\n\t\tstate.menu();\n\t}",
"public JPopupMenu buildContextMenu(EditPart select) {\n\t\tJPopupMenu menu = new JPopupMenu();\n //GEFActionConstants.addStandardActionGroups(menu);\n\n menu.add(createItem(GEN_JUNIT_TEST_CODE_MSG, new DecisionTreeCodeGenAction(virtualFile, diagram)));\n menu.addSeparator();\n menu.add(createItem(CREATE_NEW_DECISION_MSG, new DecisionTreeCreateDecisionAction(project, diagram)));\n menu.add(createItem(CREATE_NEW_FACTOR_MSG, new DecisionTreeCreateFactorAction(project, diagram)));\n menu.addSeparator();\n JMenu sub = new JMenu(\"New value for factor\");\n \tgetFactorActions(sub);\n \tmenu.add(sub);\n\n \treturn menu;\n }",
"public static void structEngineerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Structural Engineer's Information\");\n System.out.println(\"2 - Would you like to search for a Structural Engineer's Information\");\n System.out.println(\"3 - Adding a new Structural Engineer's Information\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"void openMenuOptions(Gadget gadget, final Element referenceElement);",
"@UiHandler(\"history\")\n public void showHistory (ClickEvent event){\n \tshowHistory();\n }",
"public void onLoadMenuMyFavoritesSelected();",
"public static void afficherMenu() {\r\n System.out.println(\"\\n## Menu de l'application ##\\n\" +\r\n \" Actions Membres :\\n\"+\r\n \" [ 1] : Inscription d'un Membre\\n\" +\r\n \" [ 2] : Désinscription d'un Membre\\n\" +\r\n \" ( 3) : Afficher liste des Membres\\n\" +\r\n \" [ 4] : Payer Cotisation\\n\" +\r\n \" Actions vote Arbres d'un Membre :\\n\" +\r\n \" ( 5) : Voter pour un Arbre\\n\" +\r\n \" ( 6) : Afficher liste des votes\\n\" +\r\n \" ( 7) : Retirer un vote\\n\" +\r\n \" ( 8) : Supprimer les votes d'un Membre.\\n\" +\r\n \" ( 9) : Remplacer un vote\\n\" +\r\n \" Actions Arbres :\\n\" +\r\n \" (10) : Afficher la liste des Arbres\\n\" +\r\n // ...\r\n \" Actions Administration :\\n\" +\r\n \" (11) : Nommer nouveau Président\\n\" +\r\n // ...\r\n \"\\n ( 0) : Quitter l'application\\n\" +\r\n \" - Veuillez saisir une action. -\");\r\n }",
"public void menu() {\n m.add(\"Go adventuring!!\", this::goAdventuring );\n m.add(\"Display information about your character\", this::displayCharacter );\n m.add(\"Visit shop\", this::goShopping);\n m.add (\"Exit game...\", this::exitGame);\n }",
"protected void showSystemMenu() {\n windowMenu.doClick(0);\n }",
"public static void proManagerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the Project Manager's Information\");\n System.out.println(\"2 - Would you like to search for a Project Manager's information\");\n System.out.println(\"3 - Adding a new Project Manager's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }",
"private JMenuItem createLoadHistoryMenuItem() {\r\n\t\tJMenuItem loadHistory = new JMenuItem(\"Load History\");\r\n\t\tloadHistory.setMnemonic('l');\r\n\t\tloadHistory.setVisible(true);\r\n\t\tloadHistory.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// stop animation temporarily if it was on\r\n\t\t\t\tVariable animateVar = Variable\r\n\t\t\t\t\t\t.getVariable(Grapher2DConstants.Grapher2DAnimateFlag);\r\n\t\t\t\tanimateVar.set(new BooleanValue(false));\r\n\r\n\t\t\t\t// load the script\r\n\t\t\t\tExpressionConsoleHistory history = ActionScriptLoadUtilities\r\n\t\t\t\t\t\t.promptUserToLoadScript();\r\n\r\n\t\t\t\tMap<String, String> initialSymbolTable = history\r\n\t\t\t\t\t\t.getInitialSymbolTableSnapshot();\r\n\r\n\t\t\t\tMap<String, Variable> currentSymbolTable = Variable\r\n\t\t\t\t\t\t.getSymbolTable();\r\n\r\n\t\t\t\tExpressionConsoleModel console = ExpressionConsoleModel\r\n\t\t\t\t\t\t.getInstance();\r\n\r\n\t\t\t\tRecursiveDescentParser parser = console.getParser();\r\n\r\n\t\t\t\t// initialize the symbol table\r\n\t\t\t\tfor (Iterator<Entry<String, Variable>> it = currentSymbolTable\r\n\t\t\t\t\t\t.entrySet().iterator(); it.hasNext();) {\r\n\t\t\t\t\tEntry<String, Variable> currentEntry = it.next();\r\n\t\t\t\t\tString newValue = initialSymbolTable.get(currentEntry\r\n\t\t\t\t\t\t\t.getKey());\r\n\t\t\t\t\tString expressionToEvaluate = currentEntry.getKey() + \" = \"\r\n\t\t\t\t\t\t\t+ (newValue == null ? \"0\" : newValue);\r\n\t\t\t\t\tparser.parse(expressionToEvaluate).evaluate();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// step through all events\r\n\t\t\t\tList<ExpressionConsoleHistoryEntry> historyList = history\r\n\t\t\t\t\t\t.getExpressionList();\r\n\r\n\t\t\t\tfor (Iterator<ExpressionConsoleHistoryEntry> it = historyList\r\n\t\t\t\t\t\t.iterator(); it.hasNext();) {\r\n\t\t\t\t\tExpressionConsoleHistoryEntry currentEntry = it.next();\r\n\t\t\t\t\tif (currentEntry.getType() == ExpressionConsoleHistoryEntry.INPUT)\r\n\t\t\t\t\t\tconsole.enterExpression(currentEntry.getString());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// restart animation if it was on before\r\n\t\t\t\t// animateVar.set(oldAnimateValue);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn loadHistory;\r\n\t}",
"@Override\n public void menuSelected(MenuEvent e) {\n \n }",
"private void displayEditMenu()\r\n {\r\n System.out.println();\r\n System.out.println(\"--------- Edit Menu ------------\");\r\n System.out.println(\"(1) Edit Car Colour\");\r\n System.out.println(\"(2) Edit Car Price\");\r\n System.out.println(\"(3) Back to Main Menu\");\r\n }",
"private void createContextMenu() {\n\t\tMenuManager menuMgr = new MenuManager();\n\t\tmenuMgr.setRemoveAllWhenShown(true);\n\t\tmenuMgr.addMenuListener(new IMenuListener() {\n\t\t\tpublic void menuAboutToShow(IMenuManager mgr) {\n\t\t\t\tfillContextMenuMethodsTableViewer(mgr);\n\t\t\t}\n\n\t\t});\n\t\t// Create menu for methodsTableViewer\n\t\tMenu menu = menuMgr.createContextMenu(tableViewerLeft.getControl());\n\t\ttableViewerLeft.getControl().setMenu(menu);\n\n\t\t// Register menu for extension.\n\t\tgetSite().registerContextMenu(menuMgr, tableViewerLeft);\n\n\t\t// Create menu manager for methodsTableViewer for callsTableViewer\n\t\tMenuManager menuMgr1 = new MenuManager();\n\t\tmenuMgr1.setRemoveAllWhenShown(true);\n\t\tmenuMgr1.addMenuListener(new IMenuListener() {\n\t\t\tpublic void menuAboutToShow(IMenuManager mgr) {\n\t\t\t\tfillContextMenuCallsTableViewer(mgr);\n\t\t\t}\n\n\t\t});\n\t\t// Create menu for callsTableViewer\n\t\tMenu menu1 = menuMgr1.createContextMenu(tableViewerRight.getControl());\n\t\ttableViewerRight.getControl().setMenu(menu1);\n\n\t\t// Register menu for extension.\n\t\tgetSite().registerContextMenu(menuMgr1, tableViewerRight);\n\t}",
"private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}",
"@Override\n public void contextMenuOpened(ObservableList<GUITemplate> selected) {\n }",
"private void createMenuForGCodeRepository(IMenuManager contextMenu) {\r\n\t\tcontextMenu.add(new AddAllGCodeInQueueAction(executionService, rs274Service));\r\n\t}",
"public void onMenuNew() {\n handleMenuOpen(null);\n }",
"void clickAmFromMenu();",
"private void searchMenu(){\n\t\t\n\t}",
"private void hookContextMenuBruck(final TableViewer viewer) {\r\n\t\tMenuManager menuManager = new MenuManager(\"#PrebookingBruckPopupMenu\");\r\n\t\tmenuManager.setRemoveAllWhenShown(true);\r\n\t\tmenuManager.addMenuListener(new IMenuListener() {\r\n\r\n\t\t\tpublic void menuAboutToShow(IMenuManager manager) {\r\n\t\t\t\tfillContextMenuBruck(manager, viewer);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tMenu menu = menuManager.createContextMenu(viewer.getControl());\r\n\t\tviewer.getControl().setMenu(menu);\r\n\t\tgetSite().registerContextMenu(menuManager, viewer);\r\n\t}",
"@Override\n\tprotected void handleHelp(ClickEvent event) {\n\t\t\n\t}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.word_practice_result, menu);\n\t\treturn true;\n\t}",
"private void viewList() {\r\n PrintListMenuView listMenu = new PrintListMenuView();\r\n listMenu.displayMenu();\r\n }",
"public void createContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo){\n \t\tAdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;\n \t\tAdapterItemRef ref = (AdapterItemRef)info.targetView.getTag();\n \t\t\t\t\n \t\tmenu.setHeaderTitle(ref.lblTitle.getText().toString());\t\t\t\t\n \t\tmenu.add(0,2,0,\"Delete\");\n \t\tmenu.add(0,1,1,\"Reset Progress\");\n \t\tmenu.add(0,3,2,\"Mark as Read\");\n \t\tmenu.add(0,4,3,\"Edit Series Name\");\n \t}",
"private static void printFileOperationMenu() {\n System.out.println(\"-------------------------------------\");\n System.out.println(\"File operation menu\");\n System.out.println(\"1. Retrieve file names from directory\");\n System.out.println(\"2. Add a file.\");\n System.out.println(\"3. Delete a file.\");\n System.out.println(\"4. Search a file.\");\n System.out.println(\"5. Change directory.\");\n System.out.println(\"6. Exit to main menu.\");\n\n }",
"protected void showContextMenu(FrameEditorSelectionState seln,\n boolean context)\n {\n // Check the context menu enabled states\n setViewEnabledState(seln, ListenerIdentifierMap.CONTEXT);\n\n // Multiple selection?\n if (seln.getElementSelectionCount() > 0) {\n view.showSelectionMenu(context);\n }\n else {\n view.showBlankSpaceMenu();\n }\n }",
"public void displaymenu()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to the COMP2396 Authentication system!\");\r\n\t\tSystem.out.println(\"1. Authenticate user\");\r\n\t\tSystem.out.println(\"2. Add user record\");\r\n\t\tSystem.out.println(\"3. Edit user record\");\r\n\t\tSystem.out.println(\"4. Reset user password\");\r\n\t\tSystem.out.println(\"What would you like to perform?\");\r\n\t}",
"@Override\n protected void onCreateContextMenu(ContextMenu menu) {\n super.onCreateContextMenu(menu);\n }",
"public void showMenu() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\t1. Show vertices\");\n\t\tSystem.out.println(\"\\t2. Show adjacent vertices\");\n\t\tSystem.out.println(\"\\t3. Get vertex count\");\n\t\tSystem.out.println(\"\\t4. Get edge count\");\n\t\tSystem.out.println(\"\\t5. Add vertex\");\n\t\tSystem.out.println(\"\\t6. Add edge\");\n\t\tSystem.out.println(\"\\t7. Remove vertex\");\n\t\tSystem.out.println(\"\\t8. Remove edge\");\n\t\tSystem.out.println(\"\\t9. Check connectivity\");\n\t\tSystem.out.println(\"\\t0. Check adjacency\");\n\t\tSystem.out.println(\"\\tTRAVERSAL ALGORITHMS\");\n\t\tSystem.out.println(\"\\t11. Depth-first traversal\");\n\t\tSystem.out.println(\"\\t12. Breadth-first traversal\");\n\t\t\n\t\tSystem.out.println(\"\\tINPUT -1 TO EXIT\");\n\t\tSystem.out.println();\n\t}",
"@Override\n public void onCreateContextMenu(ContextMenu menu, View v,\n ContextMenuInfo menuInfo) {\n super.onCreateContextMenu(menu, v, menuInfo);\n menu.setHeaderTitle(\"Select Action:\");\n menu.add(0, v.getId(), 0, \"Edit Activity\");\n menu.add(0, v.getId(), 0, \"Delete Activity\");\n getActivityDetails(v);\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.history, menu);\n return true;\n }",
"@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.history, menu);\n return true;\n }",
"public static void listMainMenuOptions(){\n\t\tSystem.out.println(\"\\nWelcome to Vet Clinic Program. Please choose an option from the list below.\\n\");\n\t\tSystem.out.println(\"1: List all staff.\");\n\t\tSystem.out.println(\"2: List staff by category.\");\n\t\tSystem.out.println(\"3: List admin Staff performing a task.\");\n\t\tSystem.out.println(\"4: Search for a specific member of staff by name.\");\n\t\tSystem.out.println(\"5: List all animals.\");\n\t\tSystem.out.println(\"6: List animals by type.\");\n\t\tSystem.out.println(\"7: Search for a specific animal by name.\");\n\t\tSystem.out.println(\"8: See the Queue to the Veterinary\");\n\t\tSystem.out.println(\"9: Exit\");\n\t}",
"@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}",
"@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }",
"protected ViewerPopupMenu createPopupMenu()\n {\n ViewerPopupMenu menu = super.createPopupMenu();\n\n viewAction = new ViewerAction(this, \"View\", \"view\",\n \"View Dofs\",\n \"View the dofs of an Actor in table form.\",\n null, null, \"Ctrl-V\", null, \"false\");\n\n menu.addSeparator();\n menu.add(viewAction);\n\n return menu;\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"public void createSwitchButtonPopupMenu() {\n\n\t\tremoveAll();\n\t\tadd(midiLearnMenuItem);\n\t\tadd(midiUnlearnMenuItem);\n\t}",
"private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }",
"public abstract void displayMenu();",
"@SuppressLint(\"NewApi\")\n\t\t\t@Override\n\t\t\tpublic void onCreateContextMenu(ContextMenu menu, View arg1,\n\t\t\t\t\tContextMenuInfo arg2) {\n\t\t\t\t\t\t\t\t\n\t\t\t\tmenu.setHeaderTitle(\"操作\");\n\t\t\t\tmenu.add(0,1,0,\"播放\");\n\t\t\t\tmenu.add(0,2,0,\"删除\");\n\t\t\t\tmenu.add(0,3,0,\"详细信息\");\n\t\t\t\tmenu.add(0,4,0,\"取消\");\n\t\t\t}",
"public static void customerUpMenu(){\n\n //Displaying the menu options by using the system out method\n System.out.println(\"1 - Would you like to view all of the customers\");\n System.out.println(\"2 - Would you like to search for a customer's information\");\n System.out.println(\"3 - Adding a new customer's details\\n\");\n\n System.out.println(\"0 - Back to main menu\\n\");\n }",
"public void initMenuContext(){\n GralMenu menuCurve = getContextMenu();\n //menuCurve.addMenuItemGthread(\"pause\", \"pause\", null);\n menuCurve.addMenuItem(\"refresh\", actionPaintAll);\n menuCurve.addMenuItem(\"go\", actionGo);\n menuCurve.addMenuItem(\"show All\", actionShowAll);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"zoom in\", null);\n menuCurve.addMenuItem(\"zoomBetweenCursor\", \"zoom between Cursors\", actionZoomBetweenCursors);\n menuCurve.addMenuItem(\"zoomOut\", \"zoom out\", actionZoomOut);\n menuCurve.addMenuItem(\"cleanBuffer\", \"clean Buffer\", actionCleanBuffer);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to left\", null);\n //menuCurve.addMenuItemGthread(\"zoomOut\", \"to right\", null);\n \n }",
"@Override\n\t\tpublic NavigationTestFacade getContextMenu() {\n\t\t\treturn null;\n\t\t}",
"private void addContextMenu(StringBuilder xml) {\n\t\t\n\t\tif(contextMenu != null) {\n\t\t\tstartElementWithAttributes(xml, \"ContextMenu\");\n\t\t\taddStringAttribute(xml, \"contextObject\", contextMenu.getContextObject());\n\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t}\n\t\t\n\t}"
] | [
"0.6861732",
"0.68428594",
"0.67527",
"0.65516627",
"0.6460148",
"0.6457302",
"0.64379305",
"0.6402329",
"0.63134485",
"0.6309047",
"0.6308536",
"0.6300881",
"0.62838745",
"0.62797856",
"0.627131",
"0.6239355",
"0.62254256",
"0.619455",
"0.61713684",
"0.61358833",
"0.6120151",
"0.6109249",
"0.6094989",
"0.60871255",
"0.6081372",
"0.60734814",
"0.6065714",
"0.6056173",
"0.6045721",
"0.6033999",
"0.60241807",
"0.6024043",
"0.6020623",
"0.60203964",
"0.6017933",
"0.6016779",
"0.5997096",
"0.5996526",
"0.59942824",
"0.59889764",
"0.5985244",
"0.5979947",
"0.5977454",
"0.59715176",
"0.59669477",
"0.5966268",
"0.5956242",
"0.59522086",
"0.5951267",
"0.59440935",
"0.5925299",
"0.5922369",
"0.59209615",
"0.59178907",
"0.59158844",
"0.5915686",
"0.59140295",
"0.5912236",
"0.59066135",
"0.5896025",
"0.58923084",
"0.58881414",
"0.5885904",
"0.5879824",
"0.5877311",
"0.5876125",
"0.5874572",
"0.58721524",
"0.58697295",
"0.5869467",
"0.58665705",
"0.58558846",
"0.58515406",
"0.5846394",
"0.58457553",
"0.5842055",
"0.5834895",
"0.5830606",
"0.58248544",
"0.5824843",
"0.58229965",
"0.5822742",
"0.5813761",
"0.5811324",
"0.5809899",
"0.5809398",
"0.5809398",
"0.5807017",
"0.5805984",
"0.5802831",
"0.5792512",
"0.5787528",
"0.57857877",
"0.57854694",
"0.5782703",
"0.5778501",
"0.57728094",
"0.5756351",
"0.5755632",
"0.5753528"
] | 0.6199592 | 17 |
Load a forecaster and add it to the history list | protected void loadForecaster() {
File sFile = null;
int returnVal = m_fileChooser.showOpenDialog(this);
if (returnVal == m_fileChooser.APPROVE_OPTION) {
sFile = m_fileChooser.getSelectedFile();
if (m_log != null) {
m_log.statusMessage("Loading forecaster...");
}
Object f = null;
Instances header = null;
boolean loadOK = true;
try {
ObjectInputStream is = new ObjectInputStream(new FileInputStream(sFile));
f = is.readObject();
header = (Instances)is.readObject();
is.close();
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, ex, "Load failed",
JOptionPane.ERROR_MESSAGE);
loadOK = false;
}
if (!loadOK) {
if (m_log != null) {
m_log.logMessage("Loading from file " + sFile.getName() + "' failed.");
m_log.statusMessage("OK");
}
} else if (!(f instanceof WekaForecaster)) {
JOptionPane.showMessageDialog(this,
"Loaded model is not a weka forecaster!", "Weka forecasting",
JOptionPane.ERROR_MESSAGE);
loadOK = false;
}
if (loadOK) {
String name = (new SimpleDateFormat("HH:mm:ss - ")).format(new Date());
StringBuffer outBuff = new StringBuffer();
WekaForecaster wf = (WekaForecaster)f;
String lagOptions = "";
if (wf instanceof TSLagUser) {
TSLagMaker lagMaker = ((TSLagUser)wf).getTSLagMaker();
lagOptions = Utils.joinOptions(lagMaker.getOptions());
}
String fname = wf.getAlgorithmName();
String algoName = fname.substring(0, fname.indexOf(' '));
if (algoName.startsWith("weka.classifiers.")) {
name += algoName.substring("weka.classifiers.".length());
} else {
name += algoName;
}
name += " loaded from '" + sFile.getName() + "'";
outBuff.append("Scheme:\n\t" + fname).append("\n");
outBuff.append("loaded from '" + sFile.getName() + "'\n\n");
if (lagOptions.length() > 0) {
outBuff.append("Lagged and derived variable options:\n\t").
append(lagOptions + "\n\n");
}
outBuff.append(wf.toString());
m_history.addResult(name, outBuff);
m_history.setSingle(name);
List<Object> resultList = new ArrayList<Object>();
resultList.add(wf); resultList.add(header);
m_history.addObject(name, resultList);
updateMainTabs(name);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadHistory(SyncedList<MSensor> history) {\n this.history = history;\n }",
"List<HistoryData> loadAllHistoryData();",
"public void add(Load load){\n\t\t}",
"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 }",
"TrackerHistory loadTrackerHistory(final Integer id);",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}",
"protected void reevaluateForecaster(final String name, \n final WekaForecaster forecaster, final Instances trainHeader) {\n \n if (!trainHeader.equalHeaders(m_instances)) {\n JOptionPane.showMessageDialog(null, \"Data used to train this forecaster \" +\n \"is not compatible with the currently loaded data:\\n\\n\" \n + trainHeader.equalHeadersMsg(m_instances), \"Unable to reevaluate model\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, name);\n ((ForecastingThread)m_runThread).setConfigureAndBuild(false);\n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }\n }",
"@Override\n public void addLoadHistoryHeader(boolean showLoader) throws RemoteException {\n }",
"public OperatorSelectionHistory loadHistory(String filename){\n OperatorSelectionHistory history = null;\n try(ObjectInputStream is = new ObjectInputStream( new FileInputStream( filename ))){\n history = (OperatorSelectionHistory)is.readObject();\n } catch (IOException ex) {\n Logger.getLogger(IOSelectionHistory.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(IOSelectionHistory.class.getName()).log(Level.SEVERE, null, ex);\n }\n return history;\n }",
"public void addToCallbacks(entity.LoadCallback element);",
"private void loadHistory(VssFile vssFile) {\r\n \tif(config.useComApi)\r\n {\r\n \t\tgetVss().getComApiFileHistory(vssFile);\r\n }\r\n \telse\r\n \t{\r\n File historyFile = getVss().getFileHistory(vssFile);\r\n VssHistoryParser p = new VssHistoryParser(config);\r\n p.parseFileHistory(historyFile, vssFile);\r\n \t}\r\n }",
"private void loadLegitimateFollowers(String l_file) {\n\t\tL = new ArrayList<String>();\n\t\t\n\t\tFile inFile = new File(l_file);\n\n\t\tif (!inFile.isFile()) {\n\t\t\tSystem.out.println(\"Parameter is not an existing file\");\n\t\t\treturn;\n\t\t}\n\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(l_file));\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\tString line = null;\n\n\t\t//Read from the original file and write to the new\n\t\t//unless content matches data to be removed.\n\t\ttry {\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] followers = line.split(\",\");\n\t\t\t\tthis.L.add(followers[0]);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void load() {\n updater.load(-1); // -1 because Guest ID doesn't matter.\n }",
"private void loadData() {\n this.financeDataList = new ArrayList<>();\n }",
"public void load() ;",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void load() {\n\t}",
"public void load(){\n\t\n\t\ttry {\n\t\t\t\n\t\t\t// Open Streams\n\t\t\tFileInputStream inFile = new FileInputStream(\"user.ser\");\n\t\t\tObjectInputStream objIn = new ObjectInputStream(inFile);\n\t\t\t\n\t\t\t// Load the existing UserList at the head\n\t\t\tthis.head = (User)objIn.readObject();\n\t\t\t\n\t\t\t// Close Streams\n\t\t\tobjIn.close();\n\t\t\tinFile.close();\n\t\t}\n\n\t\tcatch(Exception d) {\n\t\t System.out.println(\"Error loading\");\n\t\t}\n\n\t}",
"@Override\r\n\tpublic void load() {\n\t\ts.load();\r\n\r\n\t}",
"protected void startForecaster(final WekaForecaster forecaster) {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, null); \n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }",
"@Override\n public void load() {\n }",
"private void loadData(){\n\n fileName = EditedFiles.getActiveFacilityFile();\n getFacilities().clear();\n\n try {\n getFacilities().addAll(ReaderThreadRunner.startReader(fileName));\n } catch (ExecutionException | InterruptedException e) {\n e.printStackTrace();\n }\n\n\n observableList = FXCollections.observableList(getFacilities());\n facilitiesView.setItems(observableList);\n }",
"public void loadState() throws IOException, ClassNotFoundException {\n\t\tFile f = new File(workingDirectory() + File.separator + id() + FILE_EXTENSION);\n\t\t\n\t\t// load client state from file\n\t\tObjectInputStream is = new ObjectInputStream(new FileInputStream(f));\n\t\tTrackerDaemon client = (TrackerDaemon) is.readObject();\n\t\tis.close();\n\t\t\n\t\t// copy attributes\n\t\tthis.peerRecord = client.peerRecord();\n\t\t\n\t}",
"@Override\r\n\tpublic void load() {\n\r\n\t}",
"public void load() {\n\t}",
"@Override\n public void load() {\n }",
"public void load() {\n }",
"public void load() {\n handleLoad(false, false);\n }",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void startCusorLoader() {\n\n if (getLoaderManager().getLoader(CURSOR_LOADER_ID) == null) {\n getLoaderManager().initLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n } else {\n getLoaderManager().restartLoader(CURSOR_LOADER_ID, null, new CheckIfFavourite()).forceLoad();\n }\n\n }",
"public RecordSet loadExpHistoryInfo(Record inputRecord);",
"private void loadClubList() {\n SharedPreferences sharedPreferences = getSharedPreferences(\"Shared Preferences\", MODE_PRIVATE);\n Gson gson = new Gson();\n String json = sharedPreferences.getString(\"Club List\", null);\n Type type = new TypeToken<ArrayList<Club>>() {}.getType();\n clubList = gson.fromJson(json, type);\n\n if(clubList == null) {\n clubList = new ArrayList<>();\n }\n }",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tprotected void load() {\n\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}",
"@Before\n public void loadReferenceData() {\n if (fireOnceRule.shouldFireRule()) {\n RefDataUtils.loadReferenceDataToCacheOnly();\n }\n }",
"private void loadMoreHistoryChat(){\n loadChatHistory(CHAT_LIMIT,headIndex,0);\n }",
"public void fileReadGameHistory(String filename)\n {\n \t//ArrayList<GameObject> gameObject = new ArrayList<>();\n\t\tFileReader file = null;\n\t\ttry {\n\t\t\tfile = new FileReader(filename);\n\t\t} catch (FileNotFoundException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(filename);\n\t\tBufferedReader br = new BufferedReader(file);\n\t\tString s = \"\";\n\t\ttry\n\t\t{\n\t\t\twhile((s = br.readLine()) != null )\n\t\t\t{\n\t\t\t\tString[] prop1 = s.split(\"#\");\n\t\t\t\tSystem.out.println(prop1[0] + \" fgdfsgfds \" + prop1[1]);\n\t\t\t\tString indexOfList = prop1[0];\n\t\t\t\tString[] prop2 = prop1[1].split(\",\");\n\t\t\t\tString[] prop3;\n\t\t\t\tString[] prop4 = indexOfList.split(\";\");\n\t\t\t\t//gameObject.add(new GameObject(indexOfList));\n\t\t\t\tcount = count +1;\n\t\t\t\texistCount = existCount + 1;\n\t\t\t\tif (indexOfList.charAt(0) == 's')//when this line is data of a swimming game\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(prop4[0]);\n\t\t\t\t\tgames.add(new Swimming(prop4[1],\"Swimming\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'c')//when this line is data of a cycling game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Cycling(prop4[1],\"Cycling\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (indexOfList.charAt(0) == 'r')//when this line is data of a running game\n\t\t\t\t{\n\t\t\t\t\tgames.add(new Running(prop4[1],\"Running\",prop4[0]));\n\t\t\t\t\tfor(int i = 0; i < Array.getLength(prop2); i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tprop3 = prop2[i].split(\":\");\n\t\t\t\t\t\tgames.get(count - 1).addParticipant(prop3[0], Integer.parseInt(prop3[1]), 0);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setId(prop3[0]);\n//\t\t\t\t\t\tgames.get(count-1).getResults().get(i).setRe(Integer.parseInt(prop3[1]));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (NumberFormatException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }",
"void addRecord(HistoryRecord record) throws IOException;",
"public void load();",
"public void load();",
"private void readObject(java.io.ObjectInputStream stream)\n throws IOException, ClassNotFoundException {\n trackers = new ArrayList<>();\n }",
"public void onModuleLoad() {\n\t\tbentoService = (BentoServiceAsync)GWT.create(BentoService.class);\n\t\tRegistry.register(\"bentoService\", bentoService);\n\n\t\tHistory.addHistoryListener(this);\n\t\tHistory.fireCurrentHistoryState();\n\t}",
"public void loadFromLocalStorage() {\n\t\t\n\t}",
"public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}",
"public void startRecord(Leader leader) {\n this.record = new Record();\n record.add(leader);\n }",
"void onLocationChanged()\n\t{\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}",
"private void initializeUndoHistory() {\n \t\tif (fHistory != null && fUndoContext != null)\n \t\t\tfHistory.dispose(fUndoContext, true, true, false);\n \n \t}",
"public abstract void loaded();",
"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 loadDataHistory(List<tUserCheckinData> _tUserCheckinData) {\n\n if(_tUserCheckinData.size()>0){\n allUsersAdapter = new AllHistoryAdapter(_tUserCheckinData, getContext(), getActivity());\n recyclerView.setAdapter(allUsersAdapter);\n\n } else {\n new clsMainActivity().showCustomToast(getContext(), new clsHardCode().txtMessDataNotFound, false);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n public static void load() {\n\n System.out.print(\"Loading team data from file...\");\n\n try {\n\n String team_fil = config.Server.serverdata_file_location + \"/teams.ser\";\n\n FileInputStream fil = new FileInputStream(team_fil);\n ObjectInputStream in = new ObjectInputStream(fil);\n\n team_list = (ConcurrentHashMap<Integer, Team>) in.readObject();\n cleanTeams();\n\n fil.close();\n in.close();\n\n //Gå gjennom alle lagene og registrer medlemmene i team_members.\n Iterator<Team> lag = team_list.values().iterator();\n\n while (lag.hasNext()) {\n\n Team laget = lag.next();\n\n Iterator<TeamMember> medlemmer = laget.getTeamMembers();\n while (medlemmer.hasNext()) {\n registerMember(medlemmer.next().getCharacterID(), laget.getTeamID());\n }\n\n }\n\n System.out.println(\"OK! \" + team_list.size() + \" teams loaded.\");\n\n } catch (Exception e) {\n System.out.println(\"Error loading team data from file.\");\n }\n\n }",
"public abstract void load();",
"public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }",
"@Override\n public void addLoaders(WorldLoader wl, WorldInfo info) {\n }",
"private void loadRecordDetails() {\n updateRecordCount();\n loadCurrentRecord();\n }",
"private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }",
"private void loadMoreRecentChat(){\n loadChatHistory(CHAT_LIMIT,0,tailIndex);\n }",
"protected void addFather(String url) {\n\t\tif(!fathers.contains(url)) \n\t\t\tfathers.add(url);\n\t}",
"void loadParticipant();",
"private void loadNewBeerData(@NonNull List<BeerDetails> beerDetails) {\n if (rvBeerRecepies.getAdapter() != null) {\n ((BeerListRecyclerAdapter) rvBeerRecepies.getAdapter()).refreshData(beerDetails);\n if (endlessScrollListener != null) {\n endlessScrollListener.resetState();\n }\n }\n }",
"private static void addToHistory() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\tFileChannel resultChannel = null;\n\t\tFileChannel historyChannel = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(\"result.txt\"));\n\t\t\tfos = new FileOutputStream(new File(\"history.txt\"), true);\n\t\t\t\n\t\t\tfos.write(\"\\n\\n\".getBytes(\"utf-8\"));\n\t\t\tfos.flush();\n\t\t\t\n\t\t\tresultChannel = fis.getChannel();\n\t\t\thistoryChannel = fos.getChannel();\n\n\t\t\tresultChannel.transferTo(0, resultChannel.size(), historyChannel);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (fis != null) {\n\t\t\t\t\tfis.close();\n\t\t\t\t}\n\t\t\t\tif (fos != null) {\n\t\t\t\t\tfos.close();\n\t\t\t\t}\n\t\t\t\tif(resultChannel != null) {\n\t\t\t\t\tresultChannel.close();\n\t\t\t\t}\n\t\t\t\tif(historyChannel != null) {\n\t\t\t\t\thistoryChannel.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void addHistory(String s) {\r\n\t\tcurrentPlayer.getHistory().add(s);\r\n\t\tif (currentPlayer.getHistory().size() > 6) currentPlayer.getHistory().remove(0);\r\n\t\t//updatePlayArea(currentPlayer, false);\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}",
"private RubricHistory getRubricHistoryFromLinker(RubricHistoryLinker linker) {\n try {\n ObjectMapper objectMapper = new ObjectMapper();\n if (linker != null) {\n return objectMapper.readValue(linker.getRubricHistory(), RubricHistory.class);\n }\n } catch (JsonProcessingException e) {\n return null;\n }\n return null;\n }",
"public boolean load() {\n // commented out because of new structure issues\n// Fish fish1 = new Fish(\n// \"Karper\",\n// 1,\n// 2,\n// 2,\n// LocalDate.now(),\n// \"Zoet water\",\n// \"Uithoorn\",\n// \"Mais\",\n// true,\n// true,\n// \"niks\"\n// );\n// Fish fish2 = new Fish(\n// \"Karper\",\n// 1,\n// 2,\n// 2,\n// LocalDate.now(),\n// \"Zoet water\",\n// \"Uithoorn\",\n// \"Mais\",\n// true,\n// true,\n// \"niks\"\n// );\n// super.addOrUpdate(fish1);\n// super.addOrUpdate(fish2);\n return true;\n }",
"public static void loadcars() {\n Cars xx = new Cars();\n System.out.println(\"Load cars\");\n listcars.clear();\n try {\n File fileload = new File(\"cars.csv\");\n BufferedReader in = new BufferedReader(new FileReader(fileload));\n String st;\n while((st = in.readLine()) != null) {\n String[] strs = st.split(\"[,//;]\");\n addcar(strs[0], strs[1], strs[2],Integer.parseInt(strs[3]));\n }\n in.close();\n System.out.println(\"cars data restored from cars.csv\");\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n\n }",
"private History() {}",
"public RecordSet loadAllProcessEventHistory(Record inputRecord);",
"@Override\n public void loadState(@Nonnull Element element) {\n final Element state = element.clone();\n StartupManager.getInstance(myProject).runWhenProjectIsInitialized((DumbAwareRunnable)() -> {\n for (Element e : state.getChildren(HistoryEntry.TAG)) {\n try {\n addEntry(HistoryEntry.createHeavy(myProject, e));\n }\n catch (InvalidDataException | ProcessCanceledException e1) {\n // OK here\n }\n catch (Exception anyException) {\n LOG.error(anyException);\n }\n }\n trimToSize(UISettings.getInstance());\n });\n }",
"private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}",
"public static void load() {\n }",
"@Override\n public void onLoaderReset(Loader<ArrayList<Reviews>> loader) {\n\n }",
"public void restore() {\n\t\ttry {\n\t\t\tFile latest = null;\n\t\t\t// restore the last file back into memory\n\t\t\tList<File> files = FindFile.find(getName(), \"shouts.*.js\", false, false);\n\n\t\t\tfor (int i = 0; i < files.size(); ++i) {\n\t\t\t\tFile f = files.get(i);\n\t\t\t\tif (latest == null) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t\tif (f.lastModified() > latest.lastModified()) {\n\t\t\t\t\tlatest = f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (latest == null) {\n\t\t\t\tlog.info(\"no files found to restore\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tinfo(\"loading latest file %s\", latest);\n\n\t\t\tString json = String.format(\"[%s]\", FileIO.fileToString(latest.getAbsoluteFile()));\n\n\t\t\tShout[] saved = Encoder.fromJson(json, Shout[].class);\n\n\t\t\tfor (int i = 0; i < saved.length; ++i) {\n\t\t\t\tshouts.add(saved[i]);\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tLogging.logError(e);\n\t\t}\n\t}",
"@Override\n\tpublic void onLoaderReset(Loader<List<NewsEntry>> arg0)\n\t{\n\t\t\n\t}",
"public static void listen(HistoryListener hl) {\n\t\tlisteners.add(hl);\n\t}",
"load createload(String name)\n {\n load iLoad = iIncomingLobsFactory.createload(name);\n \n return initload(iLoad);\n }",
"public void load (){\n load(MAX_PREZ);\n }",
"public Instances load_arff() throws Exception {\n\t\tif (!arff_exists())\n\t\t\tthrow new Exception(taskdata_name + \".arff does not exist!\");\n\n\t\tBufferedReader reader = new BufferedReader(new FileReader(arff_path + \"\\\\\" + taskdata_name + \".arff\"));\n\t\tArffReader arff = new ArffReader(reader);\n\n\t\tif (enableDebug)\n\t\t\tSystem.out.println(\"[DEBUG] \" + arff_path + \"\\\\\" + taskdata_name + \".arff was loaded!\");\n\n\t\treturn arff.getData();\n\t}",
"void addCastToFilm() throws RemoteException;",
"public void addActor(){\n actorProfileList.add(new ActorProfile());\n }",
"@PostLoad\n void albumPostLoad(Album a) {\n eventSubject = a;\n Album.CALLBACK_LOG.add(new CallbackLogEntry(this, PostLoad.class));\n }",
"public void loadFlights(InputStream stream) throws StorageException {\r\n // Get the file contents\r\n String[] lines = readFile(stream);\r\n // Parse and save flights from lines found\r\n parseFlights(lines);\r\n }",
"private void loadHistory(VssProject vssProject) {\r\n if (!incrementalWarning)\r\n checkDirHistory(vssProject);\r\n\r\n for (Iterator i = vssProject.getFiles().iterator(); i.hasNext();) {\r\n VssFile file = (VssFile) i.next();\r\n loadHistory(file);\r\n }\r\n for (Iterator i = vssProject.getSubprojects().iterator(); i.hasNext();) {\r\n VssProject project = (VssProject) i.next();\r\n loadHistory(project);\r\n }\r\n }",
"void load();",
"void load();",
"public interface HistoryModel {\n\n void getData(String date, LoadListener listener);\n\n}",
"private void readHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mCanReadHistoricalData;\t Catch:{ all -> 0x0028 }\n if (r0 == 0) goto L_0x000b;\n L_0x0007:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x0028 }\n if (r0 != 0) goto L_0x000d;\n L_0x000b:\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n L_0x000c:\n return;\n L_0x000d:\n r0 = 0;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x0028 }\n r0 = 1;\n r4.mReadShareHistoryCalled = r0;\t Catch:{ all -> 0x0028 }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x0028 }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x0028 }\n if (r0 != 0) goto L_0x0026;\n L_0x001b:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x0028 }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryLoader;\t Catch:{ all -> 0x0028 }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x0028 }\n r0.execute(r2);\t Catch:{ all -> 0x0028 }\n L_0x0026:\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n goto L_0x000c;\n L_0x0028:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x0028 }\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.readHistoricalData():void\");\n }",
"@Override\r\n\tprotected void initLoad() {\n\r\n\t}",
"private void initHistoryMoods() {\n\n Mood superHappyMood = new Mood(R.color.banana_yellow);\n Mood happyMood = new Mood(R.color.light_sage);\n Mood normalMood = new Mood(R.color.cornflower_blue_65);\n Mood disappointedMood = new Mood(R.color.warm_grey);\n Mood sadMood = new Mood(R.color.faded_red);\n\n historyListMood.add(sadMood);\n historyListMood.add(disappointedMood);\n historyListMood.add(normalMood);\n historyListMood.add(happyMood);\n historyListMood.add(superHappyMood);\n\n }",
"public void loaded(){\n\t\tloaded=true;\n\t}",
"private void startLoader(){\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<Cursor> movieLoader = loaderManager.getLoader(MOVIE_LOADER);\n if(movieLoader == null)\n loaderManager.initLoader(MOVIE_LOADER, null, this);\n else\n loaderManager.restartLoader(MOVIE_LOADER, null, this);\n }",
"public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }",
"private static void load(){\n }",
"public void loadBook() {\n List<Book> books = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n Book book = new Book(\"Book-\" + i, \"Test book \" + i);\n books.add(book);\n }\n this.setBooks(books);\n }",
"private void loadCurrentRecord() {\n SharedPreferences recordPreferences = mContext.getSharedPreferences(RECORD_PREFERENCES, Context.MODE_PRIVATE);\n String currentRecordJson = recordPreferences.getString(CURRENT_RECORD_KEY, null);\n if (!TextUtils.isEmpty(currentRecordJson)) {\n mCurrentRecord = mGson.fromJson(currentRecordJson, Record.class);\n }\n }",
"@Override\n public void load(String state, ConversationData conversationData) {\n }",
"@Override\n public void run() {\n mProxyPrefs = new Preferences.ProxyPrefs(false, false, null, -1, null);\n mListFragment.loadNew(loaderState, mProxyPrefs.parcelableProxy);\n }"
] | [
"0.62162375",
"0.5513379",
"0.54949534",
"0.5353376",
"0.5349431",
"0.5344388",
"0.52954274",
"0.5275724",
"0.5269837",
"0.5233251",
"0.52081734",
"0.51844454",
"0.5161474",
"0.5159172",
"0.5133005",
"0.51090103",
"0.50922155",
"0.50675493",
"0.50584567",
"0.50581944",
"0.5042334",
"0.50418794",
"0.50322056",
"0.5020696",
"0.5015357",
"0.49927187",
"0.49911273",
"0.49818683",
"0.4962235",
"0.49593922",
"0.49472106",
"0.49463764",
"0.49371177",
"0.49371177",
"0.49320588",
"0.49320588",
"0.49320588",
"0.49159038",
"0.4915772",
"0.4885175",
"0.48705107",
"0.48639214",
"0.48639214",
"0.48286465",
"0.48266318",
"0.48237884",
"0.48225242",
"0.48067477",
"0.4805704",
"0.48003262",
"0.47971833",
"0.47894838",
"0.4773333",
"0.47583598",
"0.47566864",
"0.47468865",
"0.4746106",
"0.4742028",
"0.47295454",
"0.47236535",
"0.47233903",
"0.4721948",
"0.47179225",
"0.47169653",
"0.47155467",
"0.4714031",
"0.4713658",
"0.47111413",
"0.47066465",
"0.46966305",
"0.4696532",
"0.46965244",
"0.46823958",
"0.46811876",
"0.46799257",
"0.46622446",
"0.4645074",
"0.46395138",
"0.46387738",
"0.4629988",
"0.46218467",
"0.46209028",
"0.46191862",
"0.46144775",
"0.4610232",
"0.4607355",
"0.4600946",
"0.4600946",
"0.4600842",
"0.45952898",
"0.45928437",
"0.45914656",
"0.45900622",
"0.45893404",
"0.45877114",
"0.45871398",
"0.45853904",
"0.45840982",
"0.45801556",
"0.45741242"
] | 0.6676846 | 0 |
Serialize a forecaster out to a file | protected void saveForecaster(String name, TSForecaster forecaster,
Instances structure) {
File sFile = null;
boolean saveOK = true;
int returnVal = m_fileChooser.showSaveDialog(this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
sFile = m_fileChooser.getSelectedFile();
if (!sFile.getName().toLowerCase().endsWith(".model")) {
sFile = new File(sFile.getParent(), sFile.getName()
+ ".model");
}
if (m_log != null) {
m_log.statusMessage("Saving forecaster to file...");
}
try {
ObjectOutputStream oos =
new ObjectOutputStream(new FileOutputStream(sFile));
oos.writeObject(forecaster);
if (structure != null) {
oos.writeObject(new Instances(structure, 0));
}
oos.close();
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, ex, "Save Failed",
JOptionPane.ERROR_MESSAGE);
saveOK = false;
}
if (saveOK) {
if (m_log != null) {
m_log.logMessage("Saved model (" + name
+ " ) to file '" + sFile.getName() + "'");
m_log.statusMessage("OK");
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void serialize() {\n FileOutputStream fileOutput = null;\n ObjectOutputStream outStream = null;\n // attempts to write the object to a file\n try {\n clearFile();\n fileOutput = new FileOutputStream(data);\n outStream = new ObjectOutputStream(fileOutput);\n outStream.writeObject(this);\n } catch (Exception e) {\n } finally {\n try {\n if (outStream != null)\n outStream.close();\n } catch (Exception e) {\n }\n }\n }",
"private void serialize(String file_name) {\n\t\t//Saving of object in a file\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(file_name);\n\t\t\tObjectOutputStream out = new ObjectOutputStream(file);\n\t\t\t// Method for serialization of object\n\t\t\tout.writeObject(this.GA);\n\n\t\t\tout.close();\n\t\t\tfile.close();\n\n\t\t\tSystem.out.println(\"Object has benn serialized\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException is caught,Object didnt save.\");\n\t\t}\n\t}",
"public void saveAsSerialization() {\n try(ObjectOutputStream os = new ObjectOutputStream(new FileOutputStream(new File(\"saves/data.dat\")))){\n os.writeObject(this);\n } catch (FileNotFoundException e){\n System.out.println(\"Could not create file: \" + e.getMessage());\n } catch (IOException e){\n System.out.println(\"IO exception occurred: \" + e.getMessage());\n }\n\n }",
"void writeObject(OutputSerializer out) throws java.io.IOException;",
"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}",
"@Override\n\tpublic void save(String file_name) {\n\t\tserialize(file_name);\n\t}",
"public void saveToFile() {\n FileOutputStream fos = null;\n try {\n //write the object into file\n fos = new FileOutputStream(file);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(travelGUI.getTravelAgent());\n oos.flush();\n oos.close();\n }\n catch (IOException ioe) {\n System.out.println(ioe.getMessage());\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n return;\n }\n finally {\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }\n if (fos != null) {\n try {\n fos.close();\n }\n catch (IOException ioe2) {\n System.out.println(ioe2.getMessage());\n }\n }\n }",
"public abstract Object marshal(Object objO, File objF);",
"private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }",
"private static void LessonSerialization() {\n PersonDAO personDAO = new PersonDAOImpl();\n Person person = personDAO.getPersonById(1);\n\n // serialize to a text file\n try {\n FileOutputStream fileOut = new FileOutputStream(\"./newfile.txt\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(person);\n out.close();\n fileOut.close();\n System.out.println(\"Person Object serialized and written to file: newfile.txt\");\n System.out.println(\"Serialized Object: \" + person.ToString());\n } catch(IOException ioEx) {\n System.out.println(ioEx);\n }\n }",
"@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer\n protected static void serializeObject(Serializable object, Path outputFile) {\n try {\n try (Closer closer = Closer.create()) {\n OutputStream out = closer.register(Files.newOutputStream(outputFile));\n BufferedOutputStream bout = closer.register(new BufferedOutputStream(out));\n serializeToLz4Data(object, bout);\n }\n } catch (Exception e) {\n throw new BatfishException(\"Failed to serialize object to output file: \" + outputFile, e);\n }\n }",
"public static void main(String[] args) throws IOException {\nPerson p=new Person(101,\"reya\");\nFileOutputStream fo=new FileOutputStream(\"something.txt\");\nObjectOutputStream os=new ObjectOutputStream (fo);\nos.writeObject(p);\nSystem.out.println(\"Serialization Success\");//should implemet serializable concept\n\t}",
"public void writeToRestaurantFile()\r\n {\r\n\ttry(ObjectOutputStream toRestaurantFile = \r\n new ObjectOutputStream(new FileOutputStream(\"listfiles/restaurant.dta\")))\r\n\t{\r\n toRestaurantFile.writeObject(restaurant);\r\n\t}\r\n\tcatch(NotSerializableException nse)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Restaurant objektene er ikke \"\r\n + \"serialiserbare.\\nIngen registrering på fil!\"\r\n + nse.getMessage(), \"Feilmelding\", \r\n JOptionPane.ERROR_MESSAGE);\r\n\t}\r\n\tcatch(IOException ioe)\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"Det oppsto en feil ved skriving \"\r\n + \"til fil.\\n\" + ioe.getMessage());\r\n\t}\r\n }",
"@Override\r\n public void serializar() throws IOException {\n File fich=new File(\"datos.bin\");\r\n FileOutputStream fos = new FileOutputStream(fich);\r\n ObjectOutputStream oos = new ObjectOutputStream(fos);\r\n oos.writeObject(gestor);\r\n oos.close();\r\n }",
"private void writeToFile(String filename, Object object) {\n try {\n FileOutputStream fileOutputStream = openFileOutput(filename, MODE_PRIVATE);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(object);\n objectOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void serialize() {\n\t\t\n\t}",
"public void saveArchive() throws FileNotFoundException {\n jsonWriter.open();\n Archive archive = new Archive(cameraCollection, filmCollection);\n jsonWriter.write(archive);\n jsonWriter.close();\n }",
"@Override\n\tpublic void save(Object o, String file) {\n\t\t\n\t}",
"OutputStream serialize(OutputStream toSerialize);",
"public void toFile(String filename) {\n\t\tString serialized = Serializer.serializeLevelPack(this);\n\t\tSerializer.writeToFile(filename, serialized.getBytes());\n\t}",
"public void dump() throws IOException;",
"public abstract void saveToFile(PrintWriter out);",
"void serialize(OutputStream output, Object graph);",
"public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }",
"private byte[] serialize(RealDecisionTree object){\n try{\n // Serialize data object to a file\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"MyObject.ser\"));\n out.writeObject(object);\n out.close();\n\n // Serialize data object to a byte array\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n out = new ObjectOutputStream(bos) ;\n out.writeObject(object);\n out.close();\n\n // Get the bytes of the serialized object\n byte[] buf = bos.toByteArray();\n return buf;\n } catch (IOException e) {\n System.exit(1);\n }\n\n return null;\n }",
"public abstract <T> SerializationStream writeObject(T t);",
"public void writeDump(File f) {\n\n }",
"private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }",
"private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }",
"public void Serialization() {\n\t\tGitlet myGitlet = new Gitlet(1);\n\t\tmyGitlet.myBranch = this.myBranch;\n\t\tmyGitlet.myCommit = this.myCommit;\n\t\tmyGitlet.messageMap = this.messageMap;\n\t\tmyGitlet.myHead = this.myHead;\n\t\tmyGitlet.stagedFiles = this.stagedFiles;\n\t\tmyGitlet.tracked = this.tracked;\n\t\tmyGitlet.stagePath = this.stagePath;\n\t\tmyGitlet.ID = this.ID;\n\t\tmyGitlet.currentBranch = this.currentBranch;\n\t\tmyGitlet.untrackedFiles = this.untrackedFiles;\n\t\tmyGitlet.conflictState = this.conflictState;\n\t\ttry {\n\t\t\tFileOutputStream fileOut = new FileOutputStream(\n\t\t\t\t\t\".gitlet/Serialization.ser\");\n\t\t\tObjectOutputStream outStream = new ObjectOutputStream(fileOut);\n\t\t\toutStream.writeObject(myGitlet);\n\t\t\toutStream.close();\n\t\t\tfileOut.close();\n\n\t\t} catch (IOException i) {\n\t\t\ti.printStackTrace();\n\t\t}\n\n\t}",
"public void serialize(T t) throws IOException {\n FileOutputStream fileOutputStream = new FileOutputStream(this.mFile);\n BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(fileOutputStream);\n DataOutputStream dataOutputStream = new DataOutputStream(bufferedOutputStream);\n this.mCodec.serialize(t, dataOutputStream);\n dataOutputStream.flush();\n $closeResource(null, dataOutputStream);\n $closeResource(null, bufferedOutputStream);\n $closeResource(null, fileOutputStream);\n }",
"public void saveToFile(SubjectDataContainer container, Path file) throws IOException {\n MoreFiles.createDirectoriesIfNotExists(file.getParent());\n try (BufferedWriter writer = Files.newBufferedWriter(file, StandardCharsets.UTF_8)) {\n GsonProvider.prettyPrinting().toJson(container.serialize(), writer);\n writer.flush();\n }\n }",
"public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;",
"public void Save() {\n try {\n ObjectOutputStream objUt = new ObjectOutputStream(\n new FileOutputStream(\"sparfil.txt\"));\n objUt.writeObject(this);\n } catch(Exception e) {\n System.out.println(e);}\n }",
"String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;",
"private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }",
"public static File writeObjectToFileNoExceptions(Serializable o, String filename)\n/* */ {\n/* 47 */ file = null;\n/* 48 */ ObjectOutputStream oos = null;\n/* */ try {\n/* 50 */ file = new File(filename);\n/* */ \n/* 52 */ oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 53 */ oos.writeObject(o);\n/* 54 */ oos.close();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 65 */ return file;\n/* */ }\n/* */ catch (Exception e)\n/* */ {\n/* 56 */ e.printStackTrace();\n/* */ } finally {\n/* 58 */ if (oos != null) {\n/* */ try {\n/* 60 */ oos.close();\n/* */ }\n/* */ catch (Exception ioe) {}\n/* */ }\n/* */ }\n/* */ }",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"public void save(OutputStream out) throws IOException {\n\t\ttry (GZIPOutputStream zipOut = new GZIPOutputStream(out)) {\n\t\t\ttry (ObjectOutputStream objOut = new ObjectOutputStream(zipOut)) {\n\t\t\t\tobjOut.writeObject(this);\n\t\t\t}\n\t\t}\n\t}",
"public void save(File filename) throws IOException {\n FileOutputStream fos = new FileOutputStream(filename);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.close();\n }",
"public abstract void serialize(OutputStream stream, T object) throws IOException;",
"private void serializeToFile(File file) {\n\t\ttry {\n FileOutputStream outputStream = new FileOutputStream(file); // a file stream for writing the serialized objects two.\n ObjectOutputStream byteStream = new ObjectOutputStream(outputStream); // connect the byte stream to the file stream\n byteStream.writeObject(myProjects); // write objects to a byte stream for putting in a file\n byteStream.close(); \n outputStream.close();\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: file could not be read.\");\n\t\t}\n\t}",
"void serialize(Object obj, OutputStream stream) throws IOException;",
"void saveSklepToFile(String fileName) throws Exception {\r\n\t\tObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName));\r\n\t\tout.writeObject(listOfAccounts);\r\n\t\tout.close();\r\n\t}",
"private void serializeBG() {\r\n\t\tFileOutputStream fos;\r\n\t\ttry {\r\n\t\t\tfos = new FileOutputStream(\"serialization/background.ser\");\r\n\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(fos); // allows you to write to the output stream\r\n\r\n\t\t\toos.writeObject(bgdata);\r\n\r\n\t\t\toos.close();\r\n\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private static void serialize(Gitlet gitletAtt, String fileName)\n throws IOException {\n try {\n File gitletFile = new File(fileName);\n FileOutputStream fileOut = new FileOutputStream(gitletFile);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(gitletAtt);\n } catch (IOException e) {\n System.err.println(e);\n String msg = \"IOException while saving Gitlet.\";\n System.out.println(msg);\n }\n }",
"private void writeObject(ObjectOutputStream out) throws IOException {\n Set<PackageIdentifier> successfulPkgs = transitiveSuccessfulPkgs.toSet();\n out.writeInt(successfulPkgs.size());\n for (PackageIdentifier pkg : successfulPkgs) {\n out.writeObject(pkg);\n }\n\n out.writeObject(transitiveUnsuccessfulPkgs);\n // Deliberately do not write out transitiveTargets. There is a lot of those and they drive\n // serialization costs through the roof, both in terms of space and of time.\n // TODO(bazel-team): Deal with this properly once we have efficient serialization of NestedSets.\n out.writeObject(transitiveRootCauses);\n out.writeObject(errorLoadingTarget);\n }",
"public static void save(DSAGraph objToSave, String filename)\n {\n FileOutputStream fileStrm;\n ObjectOutputStream objStrm;\n\n try\n {\n fileStrm = new FileOutputStream(filename); //Underlying stream\n objStrm = new ObjectOutputStream(fileStrm); //Object serialization stream\n objStrm.writeObject(objToSave); //Serialize and save to filename\n objStrm.close();//Clean up\n }\n catch (Exception e)\n { //should do more here\n throw new IllegalArgumentException(\"Unable to save object to file: \" + e);\n }\n }",
"public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void writeObjectToDisk(Object obj, String name) throws IOException {\r\n\t\t// Create file output stream\r\n\t\tFileOutputStream fileOutStr = new FileOutputStream(name);\r\n\t\t// Create object output stream and write object\r\n\t\tObjectOutputStream objOutStr = new ObjectOutputStream(fileOutStr);\r\n\t\tobjOutStr.writeObject(obj);\r\n\t\t// Close all streams\r\n\t\tobjOutStr.close();\r\n\t\tfileOutStr.close();\r\n\t\tSystem.out.printf(\"Serialized data is saved in a file - \" + name); // Printing message and file name which is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// saved\r\n\t}",
"private void writeObject(String filePath, Object obj) throws IOException {\n OutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n output.writeObject(obj);\n output.close();\n }",
"public void Serializar(){\n try {\n FileOutputStream archivo = new FileOutputStream(\"SerializacionEdificios\");\n ObjectOutputStream salida = new ObjectOutputStream(archivo);\n salida.writeObject(edificios);\n archivo = new FileOutputStream(\"SerializacionEstudiantes\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(estudiantes);\n archivo = new FileOutputStream(\"SerializacionProfesores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(profesores);\n archivo = new FileOutputStream(\"SerializacionAdministradores\");\n salida = new ObjectOutputStream(archivo);\n salida.writeObject(administradores);\n salida.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected void loadForecaster() {\n File sFile = null;\n int returnVal = m_fileChooser.showOpenDialog(this);\n if (returnVal == m_fileChooser.APPROVE_OPTION) {\n sFile = m_fileChooser.getSelectedFile();\n \n if (m_log != null) {\n m_log.statusMessage(\"Loading forecaster...\");\n }\n \n Object f = null;\n Instances header = null;\n boolean loadOK = true;\n try {\n ObjectInputStream is = new ObjectInputStream(new FileInputStream(sFile));\n f = is.readObject();\n header = (Instances)is.readObject();\n is.close();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex, \"Load failed\",\n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (!loadOK) {\n if (m_log != null) {\n m_log.logMessage(\"Loading from file \" + sFile.getName() + \"' failed.\");\n m_log.statusMessage(\"OK\");\n }\n } else if (!(f instanceof WekaForecaster)) {\n JOptionPane.showMessageDialog(this, \n \"Loaded model is not a weka forecaster!\", \"Weka forecasting\", \n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (loadOK) {\n String name = (new SimpleDateFormat(\"HH:mm:ss - \")).format(new Date());\n StringBuffer outBuff = new StringBuffer();\n WekaForecaster wf = (WekaForecaster)f; \n \n String lagOptions = \"\";\n if (wf instanceof TSLagUser) {\n TSLagMaker lagMaker = ((TSLagUser)wf).getTSLagMaker();\n lagOptions = Utils.joinOptions(lagMaker.getOptions());\n }\n \n String fname = wf.getAlgorithmName();\n String algoName = fname.substring(0, fname.indexOf(' '));\n if (algoName.startsWith(\"weka.classifiers.\")) {\n name += algoName.substring(\"weka.classifiers.\".length());\n } else {\n name += algoName;\n }\n name += \" loaded from '\" + sFile.getName() + \"'\";\n \n outBuff.append(\"Scheme:\\n\\t\" + fname).append(\"\\n\");\n outBuff.append(\"loaded from '\" + sFile.getName() + \"'\\n\\n\");\n \n if (lagOptions.length() > 0) {\n outBuff.append(\"Lagged and derived variable options:\\n\\t\").\n append(lagOptions + \"\\n\\n\");\n }\n \n outBuff.append(wf.toString());\n \n m_history.addResult(name, outBuff);\n m_history.setSingle(name);\n \n List<Object> resultList = new ArrayList<Object>();\n resultList.add(wf); resultList.add(header);\n m_history.addObject(name, resultList);\n updateMainTabs(name); \n } \n }\n }",
"void serialize(OutputStream out) throws IOException {\n trie.serialize(out);\n }",
"private void saveGraph() {\n try(FileOutputStream fileOut = new FileOutputStream(graphPath + OVERLAY_GRAPH);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut))\n {\n objectOut.writeObject(graph);\n System.out.println(\"The overlay graph was successfully written to a file\");\n } catch (Exception ex) {\n System.out.println(\"Error writing the overlay graph\");\n ex.printStackTrace();\n }\n }",
"private void saveSupporters() {\n try {\n try (FileOutputStream fileOut = new FileOutputStream(graphPath + (kdTreeSupporterActived ? KDTREE_SUPPORTER_PATH : LINEAR_SUPPORTER));\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut)) {\n objectOut.writeObject(graph.getSupporters());\n }\n } catch (Exception ex) {\n System.out.println(\"Error writing the overlay graph's supporters\");\n ex.printStackTrace();\n }\n System.out.println(\"Overlay graph's supporters were successfully written to a file\");\n }",
"@Override\n public boolean save(String file) {\n /*\n Create a builder for the specific JSON format\n */\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setPrettyPrinting();\n JsonSerializer<DWGraph_DS> serializer = new JsonSerializer<DWGraph_DS>() {\n @Override\n public JsonElement serialize(DWGraph_DS dwGraph_ds, Type type, JsonSerializationContext jsonSerializationContext) {\n JsonObject jsonGraph = new JsonObject();\n jsonGraph.add(\"Nodes\", new JsonArray());\n jsonGraph.add(\"Edges\", new JsonArray());\n\n for (node_data node : G.getV()) {\n JsonObject jsonNodeObject = new JsonObject();\n\n StringBuilder pos = new StringBuilder();\n pos.append(node.getLocation().x());\n pos.append(',');\n pos.append(node.getLocation().y());\n pos.append(',');\n pos.append(node.getLocation().z());\n jsonNodeObject.addProperty(\"pos\", pos.toString());\n jsonNodeObject.addProperty(\"id\", node.getKey());\n jsonNodeObject.addProperty(\"info\", node.getInfo());\n jsonNodeObject.addProperty(\"tag\", node.getTag());\n jsonGraph.get(\"Nodes\").getAsJsonArray().add(jsonNodeObject);\n for (edge_data e : G.getE(node.getKey())) {\n JsonObject jsonEdgeObject = new JsonObject();\n jsonEdgeObject.addProperty(\"src\", e.getSrc());\n jsonEdgeObject.addProperty(\"w\", e.getWeight());\n jsonEdgeObject.addProperty(\"dest\", e.getDest());\n jsonEdgeObject.addProperty(\"info\", e.getInfo());\n jsonEdgeObject.addProperty(\"tag\", e.getTag());\n jsonGraph.get(\"Edges\").getAsJsonArray().add(jsonEdgeObject);\n }\n }\n return jsonGraph;\n }\n };\n gsonBuilder.registerTypeAdapter(DWGraph_DS.class, serializer);\n Gson graphGson = gsonBuilder.create();\n try {\n PrintWriter writer = new PrintWriter(new FileWriter(file));\n writer.write(graphGson.toJson(G));\n writer.flush();\n writer.close();\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }",
"@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}",
"private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }",
"@Override\r\n\tpublic void serializar() {\n\r\n\t}",
"private void saveToStorage() {\n FileOutputStream fos = null;\n try {\n fos = context.openFileOutput(\"GeoFences\", Context.MODE_PRIVATE);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(currentList);\n oos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public abstract String serialise();",
"@Override\n public boolean save(String file) {\n boolean ans = false;\n ObjectOutputStream oos;\n try {\n FileOutputStream fileOut = new FileOutputStream(file, true);\n oos = new ObjectOutputStream(fileOut);\n oos.writeObject(this);\n ans= true;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace(); }\n catch (IOException e) {e.printStackTrace();}\n return ans;\n }",
"@Override\n\tpublic boolean save(String file) {\n\t\n\t\tGson gson = new GsonBuilder().create();\n\t\tJsonArray arrEdges = new JsonArray();\n\t\tJsonArray arrNodes = new JsonArray();\n\t\tCollection<node_data> arrV = this.dwg.getV();\n\t\tfor(node_data vertex : arrV) {\n\t\t\tJsonObject nodesObj = new JsonObject();\n\t\t\tgeo_location gl = vertex.getLocation();\n\t\t\tnodesObj.addProperty(\"pos\",String.valueOf(gl.x())+\",\"+String.valueOf(gl.y())+\",\"+String.valueOf(gl.z()));\n\t\t\tnodesObj.addProperty(\"id\",vertex.getKey());\n\t\t\tarrNodes.add(nodesObj);\n\t\t\tCollection<edge_data> arrE = this.dwg.getE(vertex.getKey());\n\t\t\tfor(edge_data edge : arrE) {\n\t\t\t\tJsonObject edgesObj = new JsonObject();\n\t\t\t\tedgesObj.addProperty(\"src\",edge.getSrc());\n\t\t\t\tedgesObj.addProperty(\"w\",edge.getWeight());\n\t\t\t\tedgesObj.addProperty(\"dest\",edge.getDest());\n\t\t\t\tarrEdges.add(edgesObj);\n\t\t\t}\n\t\t}\n\t\tJsonObject graphObj = new JsonObject();\n\t\tgraphObj.add(\"Edges\",arrEdges);\n\t\tgraphObj.add(\"Nodes\",arrNodes);\n\t\tString ans = gson.toJson(graphObj);\n\n\t\ttry{\n\t\t\tPrintWriter pw = new PrintWriter(new File(file));\n\t\t\tpw.write(ans);\n\t\t\tpw.close();\n\t\t}\n\t\tcatch (FileNotFoundException e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void saveToFile(Map<String, T> data) throws IOException{\n\t\tOutputStream file = new FileOutputStream(filePath);\n OutputStream buffer = new BufferedOutputStream(file);\n ObjectOutput output = new ObjectOutputStream(buffer);\n\n // serialize the Map\n output.writeObject(data);\n output.close();\n\t}",
"private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }",
"public static File writeObjectToTempFile(Serializable o, String filename)\n/* */ throws IOException\n/* */ {\n/* 76 */ File file = File.createTempFile(filename, \".tmp\");\n/* 77 */ file.deleteOnExit();\n/* 78 */ ObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new GZIPOutputStream(new FileOutputStream(file))));\n/* 79 */ oos.writeObject(o);\n/* 80 */ oos.close();\n/* 81 */ return file;\n/* */ }",
"public boolean saveSaucers(){\r\n try{\r\n File file = new File(\"src/data/saucers.txt\");\r\n FileOutputStream fos = new FileOutputStream(file);\r\n ObjectOutputStream output = new ObjectOutputStream(fos);\r\n output.writeObject(new ArrayList<Saucer>(this.saucers));\r\n output.close();\r\n\r\n return true;\r\n } catch (Exception ex){\r\n ex.printStackTrace();\r\n\r\n return false;\r\n }\r\n }",
"public abstract Object toDexFile();",
"public void saveGame(String fileName){\n try {\n File file1 = new File(fileName);\n FileOutputStream fileOutputStream = new FileOutputStream(file1);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n objectOutputStream.writeObject(this);\n }catch (Exception e){\n System.err.println(\"Error when saving file\");\n }\n }",
"public void DesSerializar() throws FileNotFoundException {\n try {\n FileInputStream archivo = new FileInputStream(\"SerializacionEdificios\");\n ObjectInputStream entrada = new ObjectInputStream(archivo);\n ArrayList<Edificio> edificiosDes = (ArrayList<Edificio>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionEstudiantes\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Estudiante> estudiantesDes = (ArrayList<Estudiante>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionProfesores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Profesor> profesoresDes = (ArrayList<Profesor>) entrada.readObject();\n archivo = new FileInputStream(\"SerializacionAdministradores\");\n entrada = new ObjectInputStream(archivo);\n ArrayList<Administrador> administradoresDes = (ArrayList<Administrador>) entrada.readObject();\n edificios = edificiosDes;\n estudiantes = estudiantesDes;\n profesores = profesoresDes;\n administradores = administradoresDes;\n entrada.close();\n }\n catch (IOException e){\n e.printStackTrace();\n }\n catch (ClassNotFoundException e){\n e.printStackTrace();\n }\n\n\n }",
"public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }",
"@Override\n public void save(final String filename) throws IOException {\n Filer.getInstance().save(this, DGraphIOFactory.getInstance(), filename);\n }",
"public static void serialize(PhotoAlbumManager userdata) throws IOException {\n\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(storeDir + File.separator + storeFile));\n\t\toos.writeObject(userdata);\n\t\toos.close();\n\t}",
"public void mergeFileWrite(String filepath) throws IOException, ClassNotFoundException {\n File mergeFile = new File(filepath);\n // serialization\n FileOutputStream fous = new FileOutputStream(mergeFile);\n ObjectOutputStream oos = new ObjectOutputStream(fous);\n oos.writeObject(mergeData);\n fous.close();\n oos.close();\n\n // deserialization\n FileInputStream fin = new FileInputStream(mergeFile);\n ObjectInputStream oin = new ObjectInputStream(fin);\n oin.readObject();\n oin.close();\n fin.close();\n\n }",
"private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }",
"private void writeMapToFile() {\r\n\t\ttry {\r\n\t\t\tString dm = gson.toJson(daoMap);// gson.toJson(entity);\r\n\t\t\tFileWriter fileWriter = new FileWriter(path);\r\n\t\t\t\r\n\t\t\tfileWriter.write(dm);\r\n\t\t\tfileWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void serializeObject(String fileName, Automobile automobile) {\n try {\n String path = System.getProperty(\"user.dir\");\n String fileNameWithPath = path + File.separator + fileName;\n if(DEBUG) {\n System.out.printf(\" File Name with Path : %s\", fileNameWithPath);\n }\n FileOutputStream fileOut = new FileOutputStream(fileNameWithPath);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(automobile);\n out.close();\n fileOut.close();\n System.out.printf(\"Serialized data is saved in automotive.ser %s%n\", fileName);\n } catch (IOException i) {\n i.printStackTrace();\n }\n }",
"public String getSerializedObj() {\r\n String serializedObject = null;\r\n // serialize the object\r\n // format = file content,size,name\r\n File f = this.fileObject;\r\n serializedObject = f.getBody()+\",\"+f.getFileSize()+\",\"+f.getName();\r\n return serializedObject;\r\n }",
"public void saveToFile(File outputFile) throws IOException {\n PrintWriter writer = new PrintWriter(outputFile);\n\n writer.write(\"# Exported by FrogLord\" + Constants.NEWLINE);\n for (Tuple3<Float, Float, Float> vertex : this.vertices)\n writer.write(\"v \" + vertex.getA() + \" \" + vertex.getB() + \" \" + vertex.getC() + Constants.NEWLINE);\n\n for (Tuple2<Float, Float> normal : this.normals)\n writer.write(\"vt \" + normal.getA() + \" \" + normal.getB() + Constants.NEWLINE);\n\n writer.close();\n }",
"public static void save(final String filename, final Serializable object)\r\n throws IOException {\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n\r\n fos = new FileOutputStream(filename);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(object);\r\n out.close();\r\n }",
"private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}",
"public static void serialize(String filePath) throws IOException {\n if (filePath == null) {\n throw new IllegalArgumentException(\"Filepath cannot be null\");\n }\n\n List<Object> toSave = new ArrayList<>();\n toSave.add(models);\n if (userData != null) {\n toSave.add(userData);\n }\n\n try {\n FileOutputStream fos = new FileOutputStream(filePath, false);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(toSave);\n\n out.flush();\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static final void serializeToFile(Object object,String filename)\n\t{\n\t\t// Define local constants.\n\n\t\tString METHOD_NAME = \"serializeToFile\";\n\n\t\t// Check the parameters received and throw the appropriate\n\t\t// exception if necessary.\n\n\t\tif ((null == object) || (null == filename))\n\t\t{\n\t\t\tthrow new NullPointerException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.NULL_PARAMETER_MSG));\n\t\t}\n\n\t\tif (0 == filename.length())\n\t\t{\n\t\t\tthrow new IllegalArgumentException(Messages.buildErrorMessage(CLASS_NAME,\n\t\t\t METHOD_NAME,\n\t\t\t Messages.ZERO_LENGTH_PARAMETER_MSG));\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tObjectOutputStream objectOutputStream =\n\t\t\t\tnew ObjectOutputStream(new FileOutputStream(filename));\n\t\t\tobjectOutputStream.writeObject(object);\n\t\t\tobjectOutputStream.close();\n\t\t}\n\n\t\tcatch (IOException exception)\n\t\t{\n\t\t\tSystem.out.println(\"Caught: \" + exception);\n\t\t}\n\t}",
"synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }",
"public void saveToStream(OutputStream stream, Model model);",
"void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"void saveData() throws SerializerException;",
"public void writeVisits() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/visits.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(visits);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }",
"public void writeObject ();",
"public void saveOffers() {\n System.out.println(this.currentChild);\n // TODO [assignment_final] ulozeni aktualnich nabidek do souboru (vyberte si nazev souboru a format jaky uznate za vhodny - CSV nebo JSON)\n }",
"public static void main(String[] args) {\n\n Person [] people = {new Person (1, \"Tomas Tribusauskas\"), new Person (2, \"Justina Balse\"), new Person (3, \"Giedrius\")};\n\n\n try (ObjectOutputStream objectOutputStream =\n new ObjectOutputStream(new FileOutputStream(\"people.bin\"))) {\n//// FileOutputStream fileOutputStream = new FileOutputStream(\"people.bin\"); //sugeneruotas try/catch\n//// ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n// objectOutputStream.writeObject(person1);\n// objectOutputStream.writeObject(person2);\n\n//// objectOutputStream.writeInt(people.length);\n////\n//// for (Person person : people) {\n//// objectOutputStream.writeObject(person); //irasineja visa asmenu masyva, o ne atskiras personas\n//// }\n\n objectOutputStream.writeObject(people);\n\n//// objectOutputStream.close(); //uzdarymus ismetam per \"try with resourcers\"\n//// fileOutputStream.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"String serialize();",
"public void serialize(String fileName)\r\n\t{\r\n\t\ttry (ObjectOutputStream out = new ObjectOutputStream( new FileOutputStream(fileName));)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tout.writeObject(this);\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}",
"public static void writeAuToBIClassifier(String filename, AuToBIClassifier c) throws IOException {\n AuToBIUtils.log(\"writing model to: \" + filename);\n FileOutputStream fos;\n ObjectOutputStream out;\n fos = new FileOutputStream(filename);\n out = new ObjectOutputStream(fos);\n out.writeObject(c);\n out.close();\n\n }",
"void write(TraceList traceList,File file) throws IOException;",
"protected void saveData(File file) throws Exception{\n\t\t\n\n\t \n\t\t// Build the DataThing map from the resultReferencesMap\n\t\t// First convert map of references to objects into a map of real result objects\n\t\tMap<String, Object> resultMap = new HashMap<String, Object>();\n\t\tfor (Iterator<String> i = chosenReferences.keySet().iterator(); i.hasNext();) {\n\t\t\tString portName = (String) i.next();\n\t\t\tT2Reference reference = chosenReferences.get(portName);\n\t\t\tObject obj = convertReferencesToObjects(reference);\n\t\t\tresultMap.put(portName, obj);\n\t\t}\n\t\tMap<String, DataThing> dataThings = bakeDataThingMap(resultMap);\n\t\t\n\t\tfor (String portName : dataThings.keySet()) {\n\t\t\tDataThing thing = dataThings.get(portName);\n\t\t\tthing.writeToFileSystem(file, portName);\n\t\t}\n\t}",
"public void save() {\n JAXB.marshal(this, new File(fileName));\n }"
] | [
"0.6586123",
"0.6344652",
"0.60864204",
"0.6036489",
"0.6004235",
"0.5969633",
"0.5951988",
"0.5923388",
"0.5909829",
"0.5834531",
"0.5811376",
"0.5719602",
"0.5691843",
"0.5675943",
"0.56744444",
"0.5673868",
"0.56715643",
"0.5636538",
"0.56264156",
"0.5620242",
"0.55830663",
"0.55723983",
"0.55691886",
"0.5538554",
"0.5528078",
"0.5512366",
"0.5506845",
"0.55060536",
"0.5498319",
"0.54875743",
"0.54863054",
"0.5478278",
"0.5448013",
"0.5443944",
"0.5443827",
"0.54253167",
"0.5423524",
"0.5413378",
"0.5411992",
"0.5409914",
"0.5400689",
"0.5397212",
"0.53869927",
"0.538443",
"0.5373662",
"0.53680646",
"0.536165",
"0.5345999",
"0.53272235",
"0.5324779",
"0.5323051",
"0.5318843",
"0.5318605",
"0.53141797",
"0.53122485",
"0.5312037",
"0.5308937",
"0.53055453",
"0.52978927",
"0.52917105",
"0.52888215",
"0.528194",
"0.5279753",
"0.5278951",
"0.52718973",
"0.5271325",
"0.5266956",
"0.5266404",
"0.52652365",
"0.5262192",
"0.52563477",
"0.52496713",
"0.5247183",
"0.524581",
"0.52385163",
"0.5236564",
"0.5235316",
"0.52350134",
"0.52315664",
"0.5218519",
"0.519868",
"0.51931643",
"0.5189426",
"0.5184436",
"0.51764095",
"0.51726437",
"0.51718265",
"0.51697433",
"0.5158843",
"0.5152427",
"0.5142793",
"0.5141735",
"0.5140805",
"0.51385653",
"0.51344395",
"0.5131914",
"0.5129315",
"0.51226515",
"0.5121721",
"0.51174223"
] | 0.63215584 | 2 |
Updates the display with the results from the currently selected entry in the result history list | protected synchronized void updateComponentTabs(String name,
JTabbedPane outputPane) {
// remove any tabs that are not the text output
int numTabs = outputPane.getTabCount();
if (numTabs > 1) {
for (int i = numTabs - 1; i > 0; i--) {
outputPane.removeTabAt(i);
}
}
// see if there are any graphs associated with this name
List<Object> storedResults = (List<Object>)m_history.getNamedObject(name);
List<JPanel> graphList = null;
if (storedResults != null) {
for (Object o : storedResults) {
if (o instanceof List<?>) {
graphList = (List<JPanel>)o;
}
}
}
if (graphList != null && graphList.size() > 0) {
// add the graphs
for (JPanel p : graphList) {
outputPane.addTab(p.getToolTipText(), p);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void resultsUpdated() {\r\n\t\tmLayout.hideText();\r\n\t\t\r\n\t\tif(mModel.getResults().size() == 1){\r\n\t\t\tmModel.selectPerson(mModel.getResults().get(0));\r\n\t\t\tmController.getProfilePicture(mModel.getResults().get(0).sciper);\r\n\t\t\tmDialog = new PersonDetailsDialog(this, mModel.getSelectedPerson());\r\n\t\t\tmDialog.show();\r\n\t\t}else\r\n\t\t\tstartActivity(new Intent(getApplicationContext(), DirectoryResultListView.class));\r\n\t\t\r\n\t}",
"public void updateResults() {\n\t\t// Do not update when there is no amount entered\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\"\"))\n\t\t\treturn;\n\t\t\n\t\t// Transform .42 to 0.42\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\".\")) {\n\t\t\tamountEdit.setText(\"0.\");\n\t\t\tamountEdit.setSelection(amountEdit.getText().length());\n\t\t}\n\t\t\t\n\t\tint from = (int) fromSpinner.getSelectedItemId();\n\t\tint to = (int) toSpinner.getSelectedItemId();\n\t\tDouble amount = Double.parseDouble(amountEdit.getText().toString());\n\t\tDouble result = exchangeRates.convert(from, to, amount);\n\t\t\n\t\t// Build results string and update the view\n\t\tString text = \"\";\n\t\ttext += exchangeRates.getCurrency(from) + \" \";\n\t\ttext += amount + \"\\n\";\n\t\ttext += exchangeRates.getCurrency(to) + \" \";\n\t\ttext += result.toString();\n\t\tresultsText.setText(text);\n\t}",
"public void updateSearchResults(){\n\t\t//removeAll();\n\t\tPrinter currentPrinter;\n\t\tPrinterLabel tableHeader;\n\t\t\n\t\t// Create search results' table header\n\t\ttableHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\n\t\t// Add tool tips for long header categories before adding to GUI\n\t tableHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t \n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tsetBorder(BorderFactory.createLineBorder(Color.gray));\n\t\tadd(tableHeader);\n\t\ttableHeader.setBackground(Color.lightGray);\n\n\t\t// Populate search results with any printer matches\n\t\tfor(int i = outputList.size()-1; i >=0;i--)\n\t\t{\n\t\t\tcurrentPrinter = outputList.get(i);\n\t\t\tPrinterLabel temp = new PrinterLabel(i+1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\tcurrentPrinter.getPrinterName() + \"\",\n\t\t\t\t\tcurrentPrinter.getVendor()+ \"\",\n\t\t\t\t\tcurrentPrinter.getTension()+ \"\",\n\t\t\t\t\tcurrentPrinter.getCompression()+ \"\",\n\t\t\t\t\tcurrentPrinter.getImpact()+ \"\",\n\t\t\t\t\tcurrentPrinter.materialsString()+ \"\",\n\t\t\t\t\tcurrentPrinter.getTolerance()+ \"\",\n\t\t\t\t\tcurrentPrinter.getFinish()+ \"\", true);\n\t\t\ttemp = highlightMatch(temp, currentPrinter);\n\t\t\tadd(temp);\n\t\t}\n\t\tthis.revalidate();\n\t}",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tfinal WebHistory history=engine.getHistory();\r\n\t\t ObservableList<WebHistory.Entry> entryList=history.getEntries();\r\n\t\t int currentIndex=history.getCurrentIndex();\r\n//\t\t Out(\"currentIndex = \"+currentIndex);\r\n//\t\t Out(entryList.toString().replace(\"],\",\"]\\n\"));\r\n\t\t\t if(history.getCurrentIndex()<entryList.size()-1){\r\n\t\t\t \r\n\t\t Platform.runLater(new Runnable() { public void run() { history.go(1); } });\r\n\t\t System.out.println(entryList.get(currentIndex<entryList.size()-1?currentIndex+1:currentIndex).getUrl());\r\n\t\t\t}\r\n\t\t}",
"private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }",
"private void updateNumResults(int numResults)\n {\n String message = MessageFormat.format(\"Found {0} results\", numResults);\n resultInfo.setText(message);\n }",
"protected void resultPopup(final String name, int x, int y) {\n final String selectedName = name;\n JPopupMenu resultListMenu = new JPopupMenu();\n \n JMenuItem showMainBuff = new JMenuItem(\"View in main window\");\n if (selectedName != null) {\n showMainBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n m_history.setSingle(selectedName);\n updateMainTabs(selectedName);\n }\n });\n } else {\n showMainBuff.setEnabled(false);\n }\n resultListMenu.add(showMainBuff);\n \n JMenuItem showSepBuff = new JMenuItem(\"View in separate window\");\n if (selectedName != null) {\n showSepBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n openResultFrame(selectedName);\n }\n });\n } else {\n showSepBuff.setEnabled(false);\n }\n resultListMenu.add(showSepBuff); \n \n JMenuItem deleteResultBuff = new JMenuItem(\"Delete result\");\n if (selectedName != null && m_runThread == null) {\n deleteResultBuff.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n m_history.removeResult(selectedName);\n }\n });\n } else {\n deleteResultBuff.setEnabled(false);\n }\n\n \n resultListMenu.add(deleteResultBuff);\n \n resultListMenu.addSeparator();\n List<Object> resultList = null;\n if (selectedName != null) { \n resultList = (List<Object>)m_history.getNamedObject(name);\n }\n \n WekaForecaster saveForecaster = null;\n Instances saveForecasterStructure = null;\n if (resultList != null) {\n for (Object o : resultList) {\n if (o instanceof WekaForecaster){\n saveForecaster = (WekaForecaster)o;\n } else if (o instanceof Instances) {\n saveForecasterStructure = (Instances)o;\n }\n }\n }\n \n final WekaForecaster toSave = saveForecaster;\n final Instances structureToSave = saveForecasterStructure;\n JMenuItem saveForecasterMenuItem = new JMenuItem(\"Save forecasting model\");\n if (saveForecaster != null) {\n saveForecasterMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n saveForecaster(name, toSave, structureToSave); \n }\n });\n } else {\n saveForecasterMenuItem.setEnabled(false);\n }\n resultListMenu.add(saveForecasterMenuItem);\n \n JMenuItem loadForecasterMenuItem = new JMenuItem(\"Load forecasting model\");\n resultListMenu.add(loadForecasterMenuItem);\n loadForecasterMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n loadForecaster();\n }\n });\n \n if (m_isRunningAsPerspective) {\n JMenuItem copyToKFClipboardMenuItem = \n new JMenuItem(\"Copy model to Knowledge Flow clipboard\");\n resultListMenu.add(copyToKFClipboardMenuItem);\n copyToKFClipboardMenuItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n try {\n KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();\n String encoded = \n TimeSeriesForecasting.encodeForecasterToBase64(toSave, structureToSave);\n \n TimeSeriesForecasting component = new TimeSeriesForecasting();\n component.setEncodedForecaster(encoded); \n\n TimeSeriesForecastingKFPerspective.setClipboard(component);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n });\n }\n \n \n JMenuItem reevaluateModelItem = new JMenuItem(\"Re-evaluate model\");\n if (selectedName != null && m_runThread == null) {\n \n reevaluateModelItem.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n reevaluateForecaster(selectedName, toSave, structureToSave);\n }\n });\n \n reevaluateModelItem.\n setEnabled((m_advancedConfigPanel.m_trainingCheckBox.isSelected() ||\n m_advancedConfigPanel.m_holdoutCheckBox.isSelected()) &&\n m_instances != null);\n } else {\n reevaluateModelItem.setEnabled(false);\n } \n \n resultListMenu.add(reevaluateModelItem);\n \n resultListMenu.show(m_history.getList(), x, y);\n }",
"public static void display(String result){\n\t\tresults.setText(result);\n\t}",
"private void searchHistoryButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchHistoryButtonActionPerformed\n //this.setVisible(false);\n \n TableModel model1 = donationsTbl.getModel();\n int indexes[] = donationsTbl.getSelectedRows();\n Object[] column = new Object[4];\n HistoryUI history = new HistoryUI();\n \n if (donationsTbl.getSelectionModel().isSelectionEmpty()) {\n JOptionPane.showMessageDialog(this, \"Please select row(s). Use CTRL + CLICK to select multiple rows.\" , \"Try Again\", JOptionPane.INFORMATION_MESSAGE);\n } else {\n DefaultTableModel model2 = (DefaultTableModel)history.donationHistoryTbl.getModel();\n for(int i = 0; i < indexes.length; i++) {\n column[0] = model1.getValueAt(indexes[i], 3);\n column[1] = model1.getValueAt(indexes[i], 0);\n \n model2.insertRow(0, column);\n }\n history.setVisible(true);\n }\n }",
"private void showResult() {\n int i = 0;\n matchList.forEach(match -> match.proceed());\n for (Match match : matchList) {\n setTextInlabels(match.showTeamWithResult(), i);\n i++;\n }\n }",
"public void printResults() {\r\n System.out.printf(\"\\nHistory\\n\\n\");\r\n String format = \"%-25s %s from %s\\n\";\r\n Collections.sort(results);\r\n for(Data data : results) {\r\n System.out.printf(format, data.getName(),\r\n defaultFormatter.format(data.getDate()), data.getComputer());\r\n }\r\n }",
"private void displayResults(String firstLine, String secondLine)\n {\n listModel.clear();\n listModel.addElement(firstLine);\n listModel.addElement(secondLine);\n // Add the list model to the JList\n employeeJList.setModel(listModel);\n }",
"private void refreshListView() {\n model.updateAllFilteredLists(history.getPrevKeywords(), history.getPrevStartDate(),\n history.getPrevEndDate(), history.getPrevState(),\n history.getPrevSearches());\n }",
"public void updateSelection() {\n\t\t\n\t}",
"@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\tJList list = (JList) e.getSource();\n\t\t// System.out.println(list.getSelectedIndex() + \" \" +results.size() );\n\t\tif (results.size() < list.getSelectedIndex()\n\t\t\t\t|| list.getSelectedIndex() < 0) {\n\t\t\tupdateLabel(results.toArray(new String[0])[0]);\n\t\t} else\n\t\t\tupdateLabel(results.toArray(new String[0])[list.getSelectedIndex()]);\n\t}",
"public void onResultClick (View v){\n try {\n savekq kq = new savekq(expressionView.getText().toString(), Double.valueOf(resultView.getText().toString()));\n Writehistory(list, kq);\n calculate();\n expressionView.setText(resultView.getText());\n result = Double.valueOf(resultView.getText().toString());\n resultView.setText(\"\");\n } catch (Exception e) {\n resultView.setText(\"0\");\n expressionView.setText(\"Cannot Divide\");\n result = 0;\n }\n\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(results.isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tif(viewNumber.getText().trim().isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tnum = Integer.parseInt(viewNumber.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException nfe){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(num <= 0){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(num > results.size()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString collectionName = \toutputTypes_dropDown.getSelectedItem().equals(\"PackageDataSet\")? \"packageDataSets\" : \n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"PackageFamily\")? \"packageFamilies\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"File\")? \"files\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Package\")? \"packages\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"ParentFile\")? \"parentFiles\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Source\")? \"sources\" : \"\";\n\t\t\t\t\n\t\t\t\tnew Thread(new Printer(results.get(num - 1), client, dbname_txtfield.getText(), output_txtarea, collectionName)).start();\n\t\t\t\t\n\t\t\t}",
"private void populateResultsUI(){\n\n totalPayTextView.setText(Double.toString(totalPay));\n totalTipTextView.setText(Double.toString(totalTip));\n totalPerPersonTextView.setText(Double.toString(totalPerPerson));\n }",
"public void displayPreviousRecord(){\r\n\r\n // dec in recordNumber to display previous person info, already stored in personsList during search \r\n\trecordNumber--;\r\n\r\n\tif(recordNumber < 0 )\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"You have reached at begining of search results\"); \r\n\r\n\t\t/*if user has reached the begining of results, disable back button*/\r\n\t\tbForward.setEnabled(true);\r\n\t\tbBack.setEnabled(false);\r\n\r\n // inc by one to counter last dec\r\n recordNumber++;\r\n\t}\r\n\telse\r\n\t{\r\n\t\tbForward.setEnabled(true);\r\n\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\ttfName.setText(person.getName());\r\n\t\ttfAddress.setText(person.getAddress());\r\n\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\ttfEmail.setText(person.getEmail());\r\n\t}\r\n\r\n }",
"public void update(){\n label = tag.getSelectedItemPosition() == 0 ? \"all\" : mLabel[tag.getSelectedItemPosition()];\n Refresh();\n }",
"private void updateActualAndDisplayedResult() {\n\t\tresultTipValue = calculateTip( amountValue, percentValue, splitValue);\n\t\ttvResult.setText( \"Tip: $\" + String.format(\"%.2f\", resultTipValue) + \" per person.\" );\t\n\t}",
"public void processResults(){\n double latitude = Double.parseDouble(latText.getText().trim());\n double longitude = Double.parseDouble(longText.getText().trim());\n int year = Integer.parseInt(yearText.getText().trim());\n\n int observatoryId = MainController.observatoryID;\n\n Runnable task = new Runnable() {\n @Override\n public void run() {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n int id = ObservatoryData.getInstance().getDatabase().getLastGalamseyEntry() + 1;\n Galamsey newest = new Galamsey(id,observatoryId,longitude,latitude,year, Galamsey.vegColour.getColour(colourValue));\n ObservatoryData.getInstance().getGalamseyHashMap().add(id,newest);\n ObservatoryData.getInstance().getDatabase().insertIntoGalamseyDB(vegColour,colourValue, latitude,longitude,year,observatoryId);\n ObservatoryData.getInstance().buildObservatoryList();\n }\n });\n\n }\n };\n\n new Thread(task).start();\n }",
"protected void saveSelection ()\t{\n\t\t//\tAlready disposed\n\t\tif (m_table == null)\n\t\t\treturn;\n\n\t\tm_results.addAll(getSelectedRowKeys());\n\n\t\t//\tSave Settings of detail info screens\n//\t\tsaveSelectionDetail();\n\t\t\n\t}",
"protected void updateDisplay() {\r\n setValue(Integer.toString(value.getValue()));\r\n }",
"@Override\n public void onValueSelected(Entry e, Highlight h) {\n int i = objectIdList.indexOf((int)e.getX());\n String xTvStr = \"objectid: \" + String.valueOf(objectIdList.get(i));\n xTv.setText(xTvStr);\n String yTvStr = classifierTitle + \": \" + String.valueOf(classifiers.get(i));\n yTv.setText(yTvStr);\n String attributeStr = attributeTitle + \": \" + attributes.get(i);\n attrTv.setText(attributeStr);\n if (detailAllLoaded) {\n showJSONDetail(i);\n }\n }",
"private void refreshDisplay() {\n \t\tCursor cursor;\n \t\tif (node_id >= 0)\n \t\t\tcursor = appInst.getDB().getNodeChildren(node_id);\n \t\telse\n \t\t\tcursor = appInst.getDB().getFileCursor();\n \n \t\tstartManagingCursor(cursor);\n \t\tthis.outlineAdapter = new OutlineCursorAdapter(this, cursor, appInst.getDB());\n \t\tthis.setListAdapter(outlineAdapter);\n \n \t\tgetListView().setSelection(this.lastSelection);\n \t}",
"private void updateText()\n\t{\n\t\tlong longResult;\t\t//holds the value of result casted to type long\n\t\tif(result % 1 == 0)\n\t\t{\n\t\t\tlongResult = (long)result;\n\t\t\tupdateText += longResult;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateText += result;\n\t\t}\n\t\tentry.setText (\"\");\n\t\tentry.setText (updateText);\n\t\tupdateText = \"\";\n\t\tentry.grabFocus();\n\t}",
"private void nextHistoryEntry()\n {\n // get next history entry (into input text field)\n if (this.historyPos < this.history.size()) {\n this.historyPos++;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n // if last index => input text must be cleaned\n } else if (this.historyPos == this.history.size()) {\n this.textInput.setText(\"\"); //$NON-NLS-1$\n this.textInput.setSelection(0);\n }\n }",
"public void showResults(String results){\n\t\t\tMessage msg = MainUIHandler.obtainMessage(UI_SHOW_RESULTS);\n\t\t\tmsg.obj=results;\n\t\t\tMainUIHandler.sendMessage(msg);\t\n\t\t}",
"public void updateAllFilteredListToShowAllActiveEntries();",
"public void update() {\n\n\t\tdisplay();\n\t}",
"protected void updateDisplay() {\n BuildingAdapter adapter = new BuildingAdapter(this, R.layout.item_building, buildingList);\n setListAdapter(adapter);\n }",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);\r\n\t}",
"private void updateInformation(){\n view.getPrompt().setText(getPrompt());\n view.getScore().setText(getScore());\n }",
"@Override\n\tprotected void UpdateUI() {\n\t\tDisplayFuelData(AverageFuelRate, LatestFuelConsumed);\n\t\t\n\t\tif(bCursurIndex == false && ParentActivity.ScreenIndex == Home.SCREEN_STATE_MENU_MONITORING_FUELHISTORY_GENERALRECORD)\n\t\t\tCursurDisplay(CursurIndex);\n\t}",
"static void outputCurrentItem(ABCSelectionList list) {\n String cursor = (list.getCount() > 0) ? String.valueOf(list.getCursor() + 1) : \"0\"; //convert from 0 index to 1 for display\n String max = (list.getCount() > 0) ? String.valueOf(list.getCount()) : \"0\";\n\n String type = list.getTypeName();\n System.out.println(\"\\n\\n\" + type);\n System.out.println(\"Current Selection: \" + cursor + \" of \" + max);\n System.out.println(list.prettyCurrentItem());\n }",
"@Override // ohos.data.resultset.AbsResultSet\r\n public void notifyChange() {\r\n super.notifyChange();\r\n }",
"@Override\n\t\t\t\t\tpublic void valueChanged(ListSelectionEvent event) {\n\t\t\t\t\t\tif (event.getValueIsAdjusting()) {\n\t\t\t\t\t\t return; // wait for end of multiple events\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint row = tableErrorList.getSelectedRow();\n\t\t\t\t\t\tif (row > -1) {\n\n\t\t\t\t\t\t\tif (results.getCurrentTest() == null) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlogger.debug(\"Loading details for query\" + tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\t// QueryFailure f = results.getResults().get(results.getCurrentTest()).getFailures().get(tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\tQueryFailure f = null;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t // TODO swing worker? dialog?\n\t\t\t\t\t\t\t\tf = results.loadFailureDetails((String) tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\t} catch (ResultParsingException e) {\n\t\t\t\t\t\t\t\tUtils.showMessageDialog(rootFrame, Level.ERROR, e.getMessage(), e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t} catch (GUIException e) {\n\t\t\t\t\t\t\t\tUtils.showMessageDialog(rootFrame, Level.ERROR, e.getMessage(), e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (f == null) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"Internal error: Unable to find failure in the hashtable\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttextAreaActualRes.setText(f.getActualResult());\n\t\t\t\t\t\t\ttextAreaExpectedRest.setText(f.getExpectedResult());\n\t\t\t\t\t\t\ttxtQueryName.setText(f.getQuery());\n\t\t\t\t\t\t\ttxtErrorErrorError.setText(f.getCompareErrors().get(0));\n\t\t\t\t\t\t\t// tables\n\t\t\t\t\t\t\ttableActualResult.parseXML(f.getActualResult());\n\t\t\t\t\t\t\ttableExpectedResult.parseXML(f.getExpectedResult());\n\t\t\t\t\t\t\ttableActualResult.bindCells(tableExpectedResult);\n\t\t\t\t\t\t\tlogger.debug(\"Details loaded for query \" + tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttextAreaActualRes.setText(null);\n\t\t\t\t\t\t\ttextAreaExpectedRest.setText(null);\n\t\t\t\t\t\t\ttxtQueryName.setText(null);\n\t\t\t\t\t\t\ttxtErrorErrorError.setText(null);\n\t\t\t\t\t\t\t// tables\n\t\t\t\t\t\t\ttableActualResult.clearTable();\n\t\t\t\t\t\t\ttableExpectedResult.clearTable();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@Override\r\n\tpublic void QueryResultReceived(List<QueryResult> result) {\n\t\t\r\n\t\twhile (form == null);\r\n\t\tform.UpdateResult(result);\r\n\t}",
"public void refreshHistory() {\n whitesEaten = \"\";\n blacksEaten = \"\";\n whitePiecesEaten.setText(\"None\");\n blackPiecesEaten.setText(\"None\");\n\n moveHistory.clear();\n }",
"private void showResult(final String textToShow) {\n // Run on UI thread as we'll updating our app UI\n runOnUiThread(\n () -> {\n // Append the result to the UI.\n resultTextView.append(textToShow);\n\n // Clear the input text.\n inputEditText.getText().clear();\n\n // Scroll to the bottom to show latest entry's classification result.\n scrollView.post(() -> scrollView.fullScroll(View.FOCUS_DOWN));\n });\n }",
"@Override\n public void setHistoryItem(List<SubmissionRecorderHistories> historyList) {\n if (isAdded()) {\n TextView tv_date_one = item_one.findViewById(R.id.tv_timestamp);\n TextView tv_isReview_one = item_one.findViewById(R.id.tv_is_review);\n TextView tv_date_two = item_two.findViewById(R.id.tv_timestamp);\n TextView tv_isReview_two = item_two.findViewById(R.id.tv_is_review);\n\n if (historyList.size() <= 0) {\n //if history list <= 0 hide history items\n //show history empty text\n tvEmptyHistory.setVisibility(View.VISIBLE);\n item_one.setVisibility(View.INVISIBLE);\n item_two .setVisibility(View.INVISIBLE);\n } else {\n //if history list > 0 show items history\n //disable history empty text\n tvEmptyHistory.setVisibility(View.GONE);\n\n //Setting item one\n try {\n //set item one date and color\n tv_date_one.setText(utils.secondsToTimeStamp(historyList.get(0).getSubmissionTime()));\n\n //set item one is submitted\n if (historyList.get(0).isReviewed()) {\n tv_isReview_one.setText(getResources().getString(R.string.msg_reviewed));\n tv_isReview_one.setTextColor(ContextCompat.getColor(activity, R.color.pale_olive_green));\n } else {\n tv_isReview_one.setText(getResources().getString(R.string.msg_unreviewed));\n tv_isReview_one.setTextColor(ContextCompat.getColor(activity, R.color.wheat));\n }\n\n //show item one\n item_one.setVisibility(View.VISIBLE);\n } catch (IndexOutOfBoundsException e) {\n e.printStackTrace();\n //this is because there is no item one\n item_one.setVisibility(View.INVISIBLE);\n }\n\n //Setting item two\n try {\n //set item two date and color\n tv_date_two.setText(utils.secondsToTimeStamp(historyList.get(1).getSubmissionTime()));\n\n //set item two is submitted\n if (historyList.get(1).isReviewed()) {\n tv_isReview_two.setText(getResources().getString(R.string.msg_reviewed));\n tv_isReview_two.setTextColor(ContextCompat.getColor(activity, R.color.pale_olive_green));\n } else {\n tv_isReview_two.setText(getResources().getString(R.string.msg_unreviewed));\n tv_isReview_two.setTextColor(ContextCompat.getColor(activity, R.color.wheat));\n }\n\n //show item two\n item_two.setVisibility(View.VISIBLE);\n } catch (IndexOutOfBoundsException e) {\n e.printStackTrace();\n //this is because there is no item two\n item_two.setVisibility(View.INVISIBLE);\n }\n }\n }\n }",
"private void updateOverview() {\n\t\t\n\t\t//check if anything is selected\n\t\tif (!listView.getSelectionModel().isEmpty()) {\n\t\t\tItemBox itemBox = listView.getSelectionModel().getSelectedItem();\n\n\t\t\tnameLabel.setText(itemBox.getName());\n\t\t\tamountLabel.setText(String.valueOf(itemBox.getAmount()) + \"x\");\n\t\t\tgtinLabel.setText(itemBox.getGtin());\n\t\t\tcategoriesLabel.setText(itemBox.getCategoriesText(\"long\"));\n\t\t\tattributesLabel.setText(itemBox.getAttributes());\n\t\t\tlog.info(\"Overview set to \" + itemBox.getName());\n\t\t}\t\n\t}",
"private void displayResult(String result) {\n Gson gson = new Gson();\n CallResult ml = gson.fromJson(result, CallResult.class);\n // Fills aList, so we can fill the listView.\n aList.clear();\n/*\n if(!ml.messages[0].msgid.equals(globalid) && globalmsg != null) { //in case the server\n Log.i(LOG_TAG, \"not synced with server\"); //does not respond w/ updated data (unsynced)\n ListElement ael = new ListElement(); //show the new message among the others\n ael.textLabel = globalmsg + \" (Unsynced with server)\";\n aList.add(ael);\n unsyncedPost = 1;\n }\n*/\n for (int i = 0; i < ml.messages.length; i++) {\n if(i > 9) /*Prevents more than 10 messages from being posted*/\n break;\n if(i == 0 && unsyncedPost == 1) { //checks if an unsynced post was made & resets flag\n unsyncedPost = 0;\n continue;\n }\n //Message ael = new Message();\n //String date = ml.messages[i].ts.substring(0,10);\n //String time = ml.messages[i].ts.substring(11,19);\n //ael.textLabel = ml.messages[i].msg + \"\\n(GMT) Time: \" + time + \", Date: \" + date;\n //ael.buttonLabel = \"Click\";\n aList.add(ml.messages[i]);\n globalmsg = null;\n globalid = null;\n }\n aa.notifyDataSetChanged();\n stopSpinner();\n }",
"public void displaySearchQueryResult(ResultSet result) {\n try {\n // if there are no result\n if (!result.isBeforeFirst()) {\n displayNotificationMessage(\"No Result Found.\");\n resultPane.setContent(new GridPane());\n return;\n }\n\n // clear the userMessage area\n userMessage.setText(\"\");\n resultPane.setContent(createSearchResultArea(result));\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"public void displayNextRecord(){\r\n\r\n // inc in recordNumber to display next person info, already stored in personsList during search \r\n\trecordNumber++;\r\n\r\n\tif(recordNumber >= personsList.size())\r\n\t{\r\n JOptionPane.showMessageDialog(null, \"You have reached at end of search results\"); \r\n\r\n\t\t/*if user has reached the end of results, disable froward button*/\r\n\t\tbForward.setEnabled(false);\r\n\t\tbBack.setEnabled(true);\r\n\r\n // dec by one to counter last inc\r\n recordNumber -- ; \r\n\t}\r\n\telse\r\n\t{\r\n\t\tbBack.setEnabled(true);\r\n\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\ttfName.setText(person.getName());\r\n\t\ttfAddress.setText(person.getAddress());\r\n\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\ttfEmail.setText(person.getEmail());\r\n\t}\r\n}",
"@Subscribe\r\n\tpublic void onSelectBMDAnalysisResults(BMDAnalysisDataSelectedEvent event)\r\n\t{\r\n\t\tgetView().updateSelectionLabel(event.GetPayload().getName());\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n m_testGame.setTitle(searchGameText.getText());\n try {\n if(m_fileManager1.isGameInList(m_testGame)){ // if the game is in the file\n m_NewSearchResult = m_fileManager1.gamesSearchResult(m_testGame); //makes a new com.cs_group.objects.GameList with the search Result\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addAnotherGame) {\n listener.stateChanged(event);\n }\n }else { JOptionPane.showMessageDialog(null, \"GAME NOT FOUND\", \"ERROR\", JOptionPane.ERROR_MESSAGE);}\n } catch (IOException | ParseException ioException) {\n ioException.printStackTrace();\n }\n }",
"private void scrapResultsInCurrentResultPage() {\n List<WebElement> searchResults = getSearchResults();\n\n for (int i = 0; i < searchResults.size(); i++) {\n WebElement result = searchResults.get(i);\n WebElement quoteButton = result.findElement(By.xpath(\".//a[@class='gs_or_cit gs_nph']\"));\n quoteButton.click();\n\n waitForMillis(500);\n\n WebElement bibtexLink = driver.findElement(By.xpath(\"//div[@id='gs_citi']/a[1]\"));\n waitUntilClickable(bibtexLink);\n bibtexLink.click();\n\n WebElement publicationCitationInBibtex = driver.findElement(By.xpath(\"/html/body/pre\"));\n searchResultsAsBibtex.add(publicationCitationInBibtex.getText());\n\n driver.navigate().back();\n\n WebElement quoteDialogCancelButton = driver.findElement(By.xpath(\"//*[@id=\\\"gs_cit-x\\\"]\"));\n waitUntilClickable(quoteDialogCancelButton);\n quoteDialogCancelButton.click();\n\n // Reload the reference to the DOM elements: the search results.\n searchResults = getSearchResults();\n }\n }",
"protected void redisplay() {\n\t\tdisplay.setText(\"\" + calc.getDisplayValue());\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == searchbtn) {\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\t\tswitch (state) {\n\t\t\tcase 0:\n\t\t\t\tremove(resultlistScroll);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tremove(moviedisplay);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tremove(persondisplay);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tremove(companydisplay);\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tremove(randompanel);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmodel.clear();\n\t\t\tresultlist = new JList(model);\n\t\t\tresultlistScroll = new JScrollPane(resultlist);\n\t\t\tresultlistScroll.setPreferredSize(new Dimension(560, 370));\n\t\t\td = resultlistScroll.getPreferredSize();\n\t\t\tresultlistScroll.setBounds(insets.left + 50, insets.top + 75,\n\t\t\t\t\td.width, d.height);\n\t\t\tadd(resultlistScroll);\n\t\t\tsetPreferredSize(new Dimension(650, 490));\n\t\t\trepaint();\n\t\t\trevalidate();\n\t\t\tswitch (getState()) {\n\t\t\tcase 1: {\n\t\t\t\tmovielist = databasemanager\n\t\t\t\t\t\t.SimpleMovieSearch(getSearchCommand());\n\t\t\t\tpersonlist = new LinkedList();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2: {\n\t\t\t\tpersonlist = databasemanager\n\t\t\t\t\t\t.SimplePersonSearch(getSearchCommand());\n\t\t\t\tmovielist = new LinkedList();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 3: {\n\t\t\t\tmovielist = databasemanager\n\t\t\t\t\t\t.SimpleMovieSearch(getSearchCommand());\n\t\t\t\tpersonlist = databasemanager\n\t\t\t\t\t\t.SimplePersonSearch(getSearchCommand());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < movielist.size(); i++) {\n\t\t\t\tMovie movie = (Movie) movielist.get(i);\n\t\t\t\tmodel.add(i, movie.getName());\n\t\t\t}\n\t\t\tfor (int i = 0; i < personlist.size(); i++) {\n\t\t\t\tPerson person = (Person) personlist.get(i);\n\t\t\t\tmodel.add(movielist.size() + i, person.getName());\n\t\t\t}\n\t\t\t// add result scrollpane to panel\n\t\t\tstate = 0;\n\t\t\tupdateListener();\n\t\t\tsetCursor(null);\n\t\t}\n\t}",
"void updateDisplay()\r\n {\r\n\tCustomerNode temp = q.front();\r\n\tint i = 0;\r\n\r\n\tdisplayArea.setText(\"\");\r\n\t\r\n\tif (q.isEmpty())\r\n\t{\r\n displayArea.setText(\"Nobody waiting...\\n\");\r\n\t}\r\n\telse\r\n\t{\r\n do\r\n {\r\n displayArea.append(\"\" + ++i + \": \" + temp.getName()\r\n + \" \" + temp.getPhone() + \"\\n\");\r\n //temp = q.getNext(temp);\r\n temp = temp.getNext();\r\n }\r\n while (temp != null);\r\n\t}\r\n }",
"public searchResultsDisplay(User user) throws IOException, ParseException {\n\n //actionListener that lets the user returns the user to their list\n returntoUserPageButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : returntoUser) {\n listener.stateChanged(event);\n }\n }\n });\n //actionListener that adds the selected game to their list\n m_addGameButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent actionEvent) {\n try {\n m_fileManager = new FileManager();\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n m_row = m_gameTable.getSelectedRow(); //gets row of the game that the user wants to add\n String m_title = (String) m_gameTable.getValueAt(m_row, 0);\n String m_rating = scoreTextField.getText(); // gets the rating from the textbox\n\n\n\n for(Game g : (Iterable<Game>) m_searchResult){\n if(g.getTitle().equals(m_title)){\n if(!(m_rating.equals(\"\") || m_rating == null)){ // if the rating is not empty\n g.setRating(m_rating);\n }\n else{\n g.setRating(\"N/A\");\n }\n user.getGameLists().get(0).addGame(g); //adds the game to the user's list\n try {\n m_fileManager.saveUserData(user); //saves the data from the newly added game into the user's own list\n JOptionPane.showMessageDialog(null, \"Game Added!\", \"Success!\", JOptionPane.INFORMATION_MESSAGE);\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addGame) {\n listener.stateChanged(event);\n }\n break;\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }\n }\n }\n });\n\n //ActionListener on searchButton that searches the com.cs_group.objects.Game file again to find another game\n searchButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n //gets the title from the textbox\n m_testGame.setTitle(searchGameText.getText());\n try {\n if(m_fileManager1.isGameInList(m_testGame)){ // if the game is in the file\n m_NewSearchResult = m_fileManager1.gamesSearchResult(m_testGame); //makes a new com.cs_group.objects.GameList with the search Result\n ChangeEvent event = new ChangeEvent(this);\n for (ChangeListener listener : m_addAnotherGame) {\n listener.stateChanged(event);\n }\n }else { JOptionPane.showMessageDialog(null, \"GAME NOT FOUND\", \"ERROR\", JOptionPane.ERROR_MESSAGE);}\n } catch (IOException | ParseException ioException) {\n ioException.printStackTrace();\n }\n }\n });\n }",
"public void fillResultsBox(){\n\n //reset the text box and add the header\n resultList.setText(\"\");\n resultList.append(\"Item \\t Win \\t Loss \\t Tie \\n\");\n\n //generate a list of ranked results for the current user\n generateResultsList();\n\n //for each item in the unranked item list, print the highest ranked item and remove it from the ranked item list\n for (TestItem testItem: testItems){\n printAndDeleteHighestItem();\n }\n }",
"public void refreshPressed() {\n //refresh the content of the tableView\n ObservableList<String[]> data = PresentationCtrl.getInstance().getHistories();\n tableView.setItems(data);\n }",
"@Override\n public void onResults(Bundle results) {\n ArrayList<String> matches = results\n .getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n\n //displaying the first match\n if (matches != null)\n editText.setText(matches.get(0));\n\n }",
"public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand() == \"Submit selection\"){\n\t\t\tuserChoices.add(fpList.getFlightPlansList(modeLocal).get((int) flightPlanSpinner.getValue() - 1));\n\t\t\t// enter confirmation page if no return flight, otherwise call self?\n\t\t\tif(!isReturn && hasReturn){\n\t\t\t\tuserParams.SetReturnParams(userParams); // convert to return params\n\t\t\t\tnew SearchResultsGui(fpListArr, userChoices, true, 0, userParams);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew ConfirmationGui(userChoices);\n\t\t\t}\n\t\t\tdispose();\n\t\t}\n\t\telse if(arg0.getActionCommand() == \"Sort by Price\"){\n\t\t\tdispose();\n\t\t\tif(modeLocal == SORT_BY_PRICE_DESCENDING){\n\t\t\t\tmodeLocal = SORT_BY_PRICE_ASCENDING;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmodeLocal = SORT_BY_PRICE_DESCENDING;\n\t\t\t}\n\t\t\tnew SearchResultsGui(fpListArr, userChoices, isReturn, modeLocal, userParams);\n\t\t}\n\t\telse if(arg0.getActionCommand() == \"Sort by Time\"){\n\t\t\tif(modeLocal == SORT_BY_TIME_DESCENDING){\n\t\t\t\tmodeLocal = SORT_BY_TIME_ASCENDING;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmodeLocal = SORT_BY_TIME_DESCENDING;\n\t\t\t}\n\t\t\tnew SearchResultsGui(fpListArr, userChoices, isReturn, modeLocal, userParams);\n\t\t\tdispose();\n\t\t}\n\t}",
"public void displayResultScreen() {\n displayScreenAdminView = new Result();\n\n\n }",
"private void printEvaList(){\n\t\tEvaluatedlistModel = new DefaultListModel();\n\t\tEvaluatedList.setModel(EvaluatedlistModel);\n\t\t\n\t}",
"private void updateListViewLogWindow()\n {\n listViewMessageItems.clear();\n\n for(int i =0;i<= printResult.size() - 1;i++)\n {\n listViewMessageItems.add(printResult.get(i));\n }\n\n }",
"private void updateDisplay() \n\t{\n\t\t// updates the date in the TextView\n if(bir.hasFocus())\n {\n\t\tbir.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }else\n {\n\t\taniv.setText(\n\t\t\t\tnew StringBuilder()\n\t\t\t\t// Month is 0 based so add 1\n\t\t\t\t\n\t\t\t\t.append(mDay).append(\"-\")\n\t\t\t\t.append(mMonth + 1).append(\"-\")\n\t\t\t\t.append(mYear).append(\" \"));\n }\n\n\n\t}",
"@Override\n public void processResult(final List<MetricResult> resultList) {\n if (!SwingUtilities.isEventDispatchThread()) {\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n GUIFrontend.this.processResult(resultList);\n }\n });\n return;\n }\n tabbedResults.processResults(resultList);\n }",
"public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}",
"public void updateRecords(String query) {\n\t\tcurrentQuery = query;\n\t\tThread resultThread = new Thread(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tString workingOnQuery = currentQuery;\n\n\t\t\t\t// Ask for records\n\t\t\t\tfinal ArrayList<Record> records = dataHandler\n\t\t\t\t\t\t.getRecords(workingOnQuery);\n\n\t\t\t\t// Another search have already been made\n\t\t\t\tif (workingOnQuery != currentQuery)\n\t\t\t\t\treturn;\n\n\t\t\t\tif (records == null) {\n\t\t\t\t\t// First use of the app. TODO : Display something useful.\n\t\t\t\t} else {\n\t\t\t\t\trunOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tadapter.clear();\n\t\t\t\t\t\t\tfor (int i = Math.min(MAX_RECORDS,\n\t\t\t\t\t\t\t\t\trecords.size()) - 1; i >= 0; i--) {\n\t\t\t\t\t\t\t\tadapter.add(records.get(i));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Reset scrolling to top\n\t\t\t\t\t\t\tlistView.setSelectionAfterHeaderView();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tresultThread.start();\n\t}",
"public DisplayQueryResults(){\n super(\"Displaying Query Results\");\n\n //create ResultSetTableModel and display database table\n try {\n //create TableModel for results of query SELECT * FROM authors\n tableModel = new ResultSetTableModel(JDBC_DRIVER, DATABASE_URL, DEFAULT_QUERY);\n //setup JTextArea in which user types queries\n queryArea = new JTextArea(DEFAULT_QUERY, 3, 150);\n queryArea.setWrapStyleWord(true);\n queryArea.setLineWrap(true);\n\n JScrollPane scrollPane = new JScrollPane(queryArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants. HORIZONTAL_SCROLLBAR_NEVER);\n //setup JButton for submitting queries\n JButton submitButton = new JButton(\"Submit Query\");\n\n //create Box to manage placement of queryArea and submitButton in GUI\n Box box = Box.createHorizontalBox();\n box.add(scrollPane);\n box.add(submitButton);\n\n //create JTable delegate for tableModel\n JTable resultTable = new JTable(tableModel);\n\n //place GUI components on content pane\n Container c = getContentPane();\n c.add(box, BorderLayout.NORTH);\n c.add(new JScrollPane(resultTable), BorderLayout.CENTER);\n\n //create event listener for submitButton\n submitButton.addActionListener(new ActionListener() {\n //pass query to table model\n @Override\n public void actionPerformed(ActionEvent e) {\n //perform a new query\n try{\n tableModel.setQuery(queryArea.getText());\n }catch (SQLException sqlException){ //catch SQLException when performing a new query\n JOptionPane.showMessageDialog(null, sqlException.getMessage(), \"Database error\", JOptionPane.ERROR_MESSAGE);\n //try to recover from invalid user query by executing default query\n try{\n tableModel.setQuery(DEFAULT_QUERY);\n queryArea.setText(DEFAULT_QUERY);\n }catch (SQLException sqlException2){ //catch SQLException when performing default query\n JOptionPane.showMessageDialog(null, sqlException2.getMessage(), \"Database error\", JOptionPane.ERROR_MESSAGE);\n //ensure database connection is closed\n tableModel.disconnectFromDatabase();\n System.exit(1);\n }//end inner catch\n }//end outer catch\n }//end actionPerformed\n });//end call to addActionListener\n\n //set window size and display window\n setSize(500, 250);\n setVisible(true);\n }catch (ClassNotFoundException classNotFound){ //catch ClassNotFoundException thrown by ResultSetTableModel if database driver not found\n JOptionPane.showMessageDialog(null, \"Cloudscape driver not found\", \"Driver not found\", JOptionPane.ERROR_MESSAGE);\n tableModel.disconnectFromDatabase();\n System.exit(1);\n } catch (SQLException sqlException) { //catch SQLException thrown by ResultSetTableModel if problems occur while setting up database connection and querying database\n JOptionPane.showMessageDialog(null, sqlException.getMessage(), \"Database error\", JOptionPane.ERROR_MESSAGE);\n tableModel.disconnectFromDatabase();\n System.exit(1);\n }\n\n //dispose of window when user quits application (this overrides the default of HIDE_ON_CLOSE)\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\n //ensure database connection is closed when the user quits application\n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosed(WindowEvent e) {\n tableModel.disconnectFromDatabase();\n System.exit(0);\n }\n });\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tresults.addAll(resultDataList);\n\t\t\t\tresultAdapter.notifyDataSetChanged();\n\t\t\t\tswingBottomInAnimationAdapter.notifyDataSetChanged();\n\t\t\t}",
"public void showResults(String query) {\n\t\t//For prototype will replace with db operations\n\t\tString[] str = { \"Artowrk1\", \"Some other piece\", \"This art\", \"Mona Lisa\" };\n\t\tArrayAdapter<String> aa = new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line, str);\n\t\tmListView.setAdapter(aa);\n\t\t\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n }\n });\n\t\t\n\t}",
"@Override\n public void update() {\n jTextField1.setText(mCalculator.getDisplay());\n }",
"public void refreshSearchReviewList() {\n reviewSearchModel.clear();\n int index = gamesSearchList.getSelectedIndex();\n String gameName = gamesSearchListModel.getElementAt(index).toString();\n String gameID = dbMgr.getGameID(gameName);\n List<List<String>> userReviews = dbMgr.getReviewsByGame(gameID);\n\n // fill list with review for currently selected game\n for (int i = 0; i < userReviews.size(); i++) {\n reviewSearchModel.addElement(userReviews.get(i).get(0) + \", \" + userReviews.get(i).get(1) + \"/10\"); \n }\n\n reviewSearch.setModel(reviewSearchModel);\n }",
"public void presentAndStoreResults() {\n int index = trial - 1;\n String transcribedString = transcribed.getText().toString();\n\n StringBuilder result = new StringBuilder(\"Thank you!\\n\\n\");\n result.append(String.format(\"Presented...\\n %s\\n\", phrase));\n result.append(String.format(\"Transcribed...\\n %s\\n\", transcribedString));\n\n float t = (elapsedTime / 1000f);\n result.append(String.format(\"You took %.2f seconds\\n\", t));\n times[index] = t;\n\n float w = wpm(phrase, elapsedTime);\n result.append(String.format(Locale.CANADA, \"Entry speed: %.2f wpm\\n\", w));\n wpmScores[index] = w;\n\n MSD errors = new MSD(phrase, transcribedString);\n float e = (float)errors.getErrorRate();\n result.append(String.format(Locale.CANADA, \"Error rate: %.2f%%\\n\", e));\n errorRates[index] = e;\n\n showResultsDialog(result.toString());\n }",
"public void update()\n\t{\n\t\t//update the view's list of movies...\n\t\tthis.getRemoveButton().setEnabled((this.database.getNumberOfMovies()>0));\n\t\tthis.movieList.setListData(this.database.toList());\n\t}",
"public void Result (View v) {\n try {\n if (mIsTyping) {\n expressionView.setText(expressionView.getText() + \" \" + resultView.getText());\n calculate();\n mIsTyping = false;\n mIsCalculating = false;\n if (!mIsError) {\n savekq kq;\n kq = new savekq(expressionView.getText().toString(), Double.valueOf(resultView.getText().toString()));\n Writehistory(list, kq);\n }\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }",
"public void ExperimentResults() {\n\t\t/*\n\t\t * Creating a ScreenPresenter. To create other ResultsPresenter, the\n\t\t * better idea is to create a Factory.\n\t\t */\n\t\tResultPresenter presenter = new ScreenPresenter();\n\t\tpresenter.setText(evaluator.evalResults.resultsInText());\n\n\t}",
"public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }",
"public void setResults(List<Person> results){\n\t\tmResult = results;\n\t\tmListeners.resultListUpdated();\n\t\t\n\t}",
"private void historyButtonListener() {\n JButton historyButton = gui.getHistory_Button();\n\n ActionListener actionListener = (ActionEvent actionEvent) -> {\n gui.getHistory_TextArea().setText(\"\");\n gui.getFrame_History().setVisible(true);\n gui.getFrame_History().setSize(415, 250);\n gui.getHistory_TextArea().setEditable(false);\n for (int key : requestsAnswered.keySet()) {\n gui.getHistory_TextArea().append(requestsAnswered.get(key).getFormattedRequest());\n }\n for (int key : processingRequests.keySet()) {\n gui.getHistory_TextArea().append(processingRequests.get(key).getFormattedRequest());\n }\n };\n historyButton.addActionListener(actionListener);\n }",
"public void showResults(){\n customerCount = simulation.getCustomerCount();\n phoneCount = simulation.getPhoneCount();\n doorCount = simulation.getDoorCount();\n unhelpedCount = simulation.getUnhelped();\n totalCus.setText(\"Total number of Customers: \"+customerCount+\"\\t\\t\");\n doorCus.setText(\"Number of Door Customers: \"+doorCount+\"\\t\\t\");\n phoneCus.setText(\"Number of Phone Customers: \"+phoneCount+\"\\t\\t\");\n unhelped.setText(\"Number of Customers left unhelped at the end: \"+unhelpedCount);\n }",
"private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }",
"public void update() {\n if (Globals.prefs.getBoolean(JabRefPreferences.GRAY_OUT_NON_HITS)) {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FLOAT);\n } else {\n panel.getMainTable().getTableModel().updateGroupingState(MainTableDataModel.DisplayOption.FILTER);\n }\n panel.getMainTable().getTableModel().updateSortOrder();\n panel.getMainTable().getTableModel().updateGroupFilter();\n panel.getMainTable().scrollTo(0);\n\n frame.output(Localization.lang(\"Updated group selection\") + \".\");\n }",
"@Override\n public void actionPerformed(ActionEvent ae)\n {\n total++;\n String display = \"\";\n if(jt.getText().trim().equals(qs.getAnswer().trim()))\n {\n score++;\n display += \"Score : \"+score+ \" / \" +total;\n //myDialog.setTitle(\"ok \"+score+\" / \"+total);\n }else{\n display += \"Score : \"+score+ \" / \" +total;\n display += \" prev answer : \"+qs.getAnswer().trim();\n }\n scoreBoard.setText(display);\n addDataTolist();\n\n }",
"@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\r\n\t\t\t\tDeviceList();\r\n\t\t\t\tlist.setText(ResultMessage);\r\n\t\t\t\tcount = 1;\r\n\r\n\t\t\t}",
"public frmFanArtist() {\n setTitle(\"Fan Your Artist!\");\n initComponents();\n FanController.updateFormData(slctArtist, jTable1);\n jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n public void valueChanged(ListSelectionEvent event) {\n // do some actions here, for example\n // print first column value from selected row\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }\n });\n }",
"@Override\n public void valueChanged(ListSelectionEvent e) {\n if (e.getValueIsAdjusting()) {\n return;\n }\n jTextPaneSearch.setText(null);\n jLabelPostImage.setText(null);\n jLabelPostImage.setIcon(null);\n System.out.println(listSearchRemote.getSelectedIndex() + \" has been selected!\");\n// search_result search_result_index = search_resultArrayList.get(list_search.getSelectedIndex());\n\n // Instantiate the movie info which selected.\n SearchResultActor searchResultActorSelect = searchResultActors.get(0);\n try {\n searchResultActorSelect = searchResultActors.get(listSearchRemote.getSelectedIndex());\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n\n int searchResultActorId = searchResultActorSelect.iddeactor;\n String searchResultActorName = searchResultActorSelect.nomdeactor;\n List<Movie.movie_detail> searchResultMasterPeace = searchResultActorSelect.actorMasterPeaceList;\n\n // Use the movie id which we got to get movie info.\n Call<Actor.actor_detail> callActorDetail = apiInterface.get_actor_by_id(searchResultActorId, utils.API_KEY);\n\n callActorDetail.enqueue(new Callback<Actor.actor_detail>() {\n @Override\n public void onResponse(Call<Actor.actor_detail> call, Response<Actor.actor_detail> response) {\n Actor.actor_detail actor_detail = response.body();\n\n\n SimpleAttributeSet attributeSetTitle = new SimpleAttributeSet();\n StyleConstants.setBold(attributeSetTitle, true);\n StyleConstants.setFontSize(attributeSetTitle, 30);\n\n BufferedImage bufferedImageIcon = null;\n try {\n bufferedImageIcon = ImageIO.read(new URL(\"https://image.tmdb.org/t/p/w200\" + actor_detail.getProfile_path()));\n ImageIcon imageIcon = new ImageIcon(bufferedImageIcon);\n jLabelPostImage.setIcon(imageIcon);\n\n } catch (IOException ioException) {\n// ioException.printStackTrace();\n jLabelPostImage.setText(\"This actor has no post image\");\n }\n\n\n// Edit Search Text Pane\n\n\n try {\n styledDocumentTextpaneSearch.insertString(styledDocumentTextpaneSearch.getLength(), actor_detail.getName(), attributeSetTitle);\n styledDocumentTextpaneSearch.insertString(styledDocumentTextpaneSearch.getLength(), \"\\nBirthday: \" + actor_detail.getBirthday() + \" to \" + actor_detail.getDeathday(), null);\n styledDocumentTextpaneSearch.insertString(styledDocumentTextpaneSearch.getLength(), \"\\n\\nBiography: \" + actor_detail.getBiography(), null);\n styledDocumentTextpaneSearch.insertString(styledDocumentTextpaneSearch.getLength(), \"\\n\\nPlace of birth: \" + actor_detail.getPlace_of_birth(), null);\n styledDocumentTextpaneSearch.insertString(styledDocumentTextpaneSearch.getLength(), \"\\nPopularity: \" + actor_detail.getPopularity(), null);\n } catch (BadLocationException badLocationException) {\n badLocationException.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(Call<Actor.actor_detail> call, Throwable throwable) {\n JOptionPane.showMessageDialog(null, \"You must enter actor name!\", \"ERROR\", JOptionPane.PLAIN_MESSAGE);\n }\n });\n\n\n }",
"private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }",
"protected void updateSummary() {\n int index = tabbedPane.getSelectedIndex();\n int modGroesse = 0;\n int modEntfernung = 0;\n int modBewegung = 0;\n int modSicht = 0;\n int modModifikatoren = 0;\n int modGezielt = 0;\n int resultat = 0;\n \n if(index == 6) {\n modGroesse = berechneErschwerungGroesse();\n modEntfernung = berechneErschwerungEntfernung();\n modBewegung = berechneErschwerungBewegung();\n modSicht = berechneErschwerungSicht();\n modModifikatoren = berechneErschwerungModifikatoren();\n modGezielt = berechneErschwerungGezielterSchuss();\n \n resultat = modGroesse + modEntfernung + modBewegung + modSicht + modModifikatoren + modGezielt;\n erschwernis = resultat;\n }\n \n lblErschwernisZielgroesseValue.setText(String.valueOf(modGroesse));\n lblErschwernisEntfernungValue.setText(String.valueOf(modEntfernung));\n lblErschwernisBewegungValue.setText(String.valueOf(modBewegung));\n lblErschwernisSichtValue.setText(String.valueOf(modSicht));\n lblErschwernisModifikatorenValue.setText(String.valueOf(modModifikatoren));\n lblErschwernisGezielterSchussValue.setText(String.valueOf(modGezielt));\n \n lblKompletteErschwernisValue.setText(String.valueOf(resultat));\n }",
"public void handleResultShow(){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Make a selection\");\n\n //create the String[] to display the search result to user\n final CharSequence[] sArray = new CharSequence[searchResult.size()];\n for (int i = 0; i < searchResult.size(); i++){\n sArray[i] = searchResult.get(i).getSymbolwithName();\n }\n builder.setItems(sArray, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //add the selection stock to main page\n validateAdd(searchResult.get(which));\n updatePrice();\n }\n });\n\n builder.setNegativeButton(\"Nevermind\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }",
"public void releasesDisplay(){\r\n \tScahaDatabase db = (ScahaDatabase) ContextManager.getDatabase(\"ScahaDatabase\");\r\n \tList<Release> tempresult = new ArrayList<Release>();\r\n \t\r\n \ttry{\r\n\r\n \t\tif (db.setAutoCommit(false)) {\r\n \t\t\t\r\n\t\t\t\tCallableStatement cs = db.prepareCall(\"CALL scaha.getClubReleaseList(?)\");\r\n\t\t\t\tcs.setInt(\"clubid\", this.clubid);\r\n \t\t\trs = cs.executeQuery();\r\n \t\t\t\r\n \t\t\tif (rs != null){\r\n \t\t\t\t\r\n \t\t\t\twhile (rs.next()) {\r\n \t\t\t\t\tString idrelease = rs.getString(\"idrelease\");\r\n \t\t\t\tString stype = rs.getString(\"type\");\r\n \t\t\t\tString ssubmitdate = rs.getString(\"submitdate\");\r\n \t\t\t\tString sfirstname = rs.getString(\"fname\");\r\n \t\t\t\tString slastname = rs.getString(\"lname\");\r\n \t\t\t\tString svalidthru = rs.getString(\"validthru\");\r\n \t\t\t\tString sreleasingclub = rs.getString(\"releasingclub\");\r\n \t\t\t\tString sacceptingclub = rs.getString(\"acceptingclub\");\r\n \t\t\t\tString sreason = rs.getString(\"reason\");\r\n \t\t\t\tString sstatus = rs.getString(\"status\");\r\n \t\t\t\t\r\n \t\t\t\tRelease orelease = new Release();\r\n \t\t\t\torelease.setIdrelease(idrelease);\r\n \t\t\t\torelease.setType(stype);\r\n \t\t\t\torelease.setSubmitdate(ssubmitdate);\r\n \t\t\t\torelease.setFirstname(sfirstname);\r\n \t\t\t\torelease.setLastname(slastname);\r\n \t\t\t\torelease.setValidthru(svalidthru);\r\n \t\t\t\torelease.setReleasingclub(sreleasingclub);\r\n \t\t\t\torelease.setAcceptingclub(sacceptingclub);\r\n \t\t\t\torelease.setReason(sreason);\r\n \t\t\t\torelease.setStatus(sstatus);\r\n \t\t\t\ttempresult.add(orelease);\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\tLOGGER.info(\"We have results for release list\");\r\n \t\t\t\t\r\n \t\t\t}\r\n \t\t\t\t\r\n \t\t\tdb.cleanup();\r\n \t\t} else {\r\n\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e) {\r\n \t\t// TODO Auto-generated catch block\r\n \t\tLOGGER.info(\"ERROR IN Searching FOR releases\");\r\n \t\te.printStackTrace();\r\n \t\tdb.rollback();\r\n \t} finally {\r\n \t\t//\r\n \t\t// always clean up after yourself..\r\n \t\t//\r\n \t\tdb.free();\r\n \t}\r\n \t\r\n \t\r\n \tsetReleases(tempresult);\r\n \tReleaseDataModel = new ReleaseDataModel(releases);\r\n }",
"public abstract void displayResult(Result result);",
"public results() {\n initComponents();\n loginlbl.setText(user.username);\n conn=mysqlconnect.ConnectDB();\n String sql=\"select idea_subject from final_results\";\n \n try{\n pat=conn.prepareStatement(sql);\n \n rs=pat.executeQuery();\n while(rs.next()){\n ideacb.addItem(rs.getString(1));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n \n }\n }",
"public void displaySelections() {\n List<VendingItem> listOfItems = service.getAllItemsNonZero(); //<-- uses lambda\n view.displaySelections(listOfItems);\n }",
"@Override\n\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\tif (e.getValueIsAdjusting()) {\n\t\t\t\tJList list = (JList) e.getSource();\n\t\t\t\tint index = list.getSelectedIndex();\n\t\t\t\tSystem.out.println(\"selected: \" + list.getSelectedValue());\n\t\t\t\tint userSelect = list.getSelectedIndex();\n\t\t\t\tplayingDBThread = null;\n\t\t\t\taudioDBThread = null;\n\t\t\t\tload_DB_video(resultListRankedNames.get(userSelect));\n\t\t\t\tupdateSimilarFrame();\n\t\t\t\tslider.setValue(0);\n\t\t\t}\n\t\t}",
"private void refreshDetails() {\r\n\t\tdetailsLabel.setText( getSummary() );\r\n\t\tdetailsLabel.repaint();\r\n\t}",
"public void Result_land (View v){\n try{\n savekq kq = new savekq(expressionView.getText().toString(), Double.valueOf(resultView.getText().toString()));\n Writehistory(list, kq);\n calculate();\n expressionView.setText(resultView.getText());\n result=Double.valueOf(resultView.getText().toString());\n resultView.setText(\"\");\n }catch (Exception e){\n resultView.setText(\"0\");\n expressionView.setText(\"Error to calculate\");\n result=0;\n }\n }",
"private void helperDisplayResults ()\r\n\t{\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\t//---- Check if the project is empty or not\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint indexImage = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\tif (indexImage >= 0 && indexImage < tableSize)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tint samplesCount = DataController.getTable().getElement(indexImage).getChannelCount();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < Math.min(samplesCount, FormMainPanelRight.TABLE_SIZE); i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//---- ABSOLUTE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tint featureCount = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellCount();\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCount, 0, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLength = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLength, 1, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensity = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsolutePixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensity, 2, i + 1);\r\n\r\n\t\t\t\t\t\t//---- RELATIVE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tdouble featureCountR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellCount() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCountR, 3, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLengthR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLengthR, 4, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensityR = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellPixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensityR, 5, i + 1);\r\n\r\n\t\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\t\tSensitivity sampleSensitivity = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getSensitivity();\r\n\r\n\t\t\t\t\t\tswitch (sampleSensitivity)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase RESISTANT: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"R\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase SENSITIVE: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"S\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase UNKNOWN: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"U\", 6, i + 1); break;\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\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor (int i = 0; i < FormMainPanelRight.TABLE_SIZE; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//---- ABSOLUTE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 0, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 1, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 2, i + 1);\r\n\r\n\t\t\t\t\t//---- RELATIVE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 3, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 4, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 5, i + 1);\r\n\r\n\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 6, i + 1);\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}",
"@Override\n public void onResults(List<LocationClass> results) {\n searchView.swapSuggestions(results);\n\n //let the users know that the background\n //process has completed\n }",
"void displayResults(int maxResultsToDisplay, double elapsedTime) {\n displayInfoText(String.format(\"Found %d matching document(s) in %.3f seconds\", results.size(), elapsedTime));\n box = new JCheckBox[maxResultsToDisplay];\n int i;\n for (i = 0; i < results.size() && i < maxResultsToDisplay; i++) {\n String description = i + \". \" + displayableFileName(engine.index.docNames.get(results.get(i).docID));\n if (queryType == QueryType.RANKED_QUERY) {\n description += \" \" + String.format(\"%.5f\", results.get(i).score);\n }\n box[i] = new JCheckBox();\n box[i].setSelected(false);\n\n JPanel result = new JPanel();\n result.setAlignmentX(Component.LEFT_ALIGNMENT);\n result.setLayout(new BoxLayout(result, BoxLayout.X_AXIS));\n\n JLabel label = new JLabel(description);\n label.setFont(resultFont);\n\n MouseAdapter showDocument = new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n String fileName = ((JLabel) e.getSource()).getText().split(\" \")[1];\n String contents = \"Displaying contents of \" + fileName + \"\\n\" + MARKER + \"\\n\";\n String line;\n\n Queue<String> fqueue = new LinkedList<>();\n\n for (int j = 0, sz = engine.dirNames.size(); j < sz; j++) {\n File curDir = new File(engine.dirNames.get(j));\n // System.err.println(curDir);\n fqueue.offer(curDir.toString());\n\n String[] directories = curDir.list(new FilenameFilter() {\n @Override\n public boolean accept(File current, String name) {\n return new File(current, name).isDirectory();\n }\n });\n // System.err.println(directories);\n\n for (String dir : directories) {\n\n fqueue.offer(new File(curDir.toString(), dir).toString());\n }\n }\n\n boolean foundFile = false;\n while (!fqueue.isEmpty()) {\n String dirName = fqueue.poll();\n File file = new File(dirName, fileName);\n\n try (BufferedReader br = new BufferedReader(new FileReader(file))) {\n while ((line = br.readLine()) != null) {\n contents += line.trim() + \"\\n\";\n }\n foundFile = true;\n break;\n } catch (FileNotFoundException exc) {\n } catch (IOException exc) {\n } catch (NullPointerException exc) {\n }\n }\n\n if (!foundFile) {\n contents += \"No file found\\n\";\n }\n\n docTextView.setText(contents);\n docTextView.setCaretPosition(0);\n }\n };\n label.addMouseListener(showDocument);\n result.add(box[i]);\n result.add(label);\n\n resultWindow.add(result);\n }\n // If there were many results, give the user an option to see all of them.\n if (i < results.size()) {\n JPanel actionButtons = new JPanel();\n actionButtons.setLayout(new BoxLayout(actionButtons, BoxLayout.X_AXIS));\n actionButtons.setAlignmentX(Component.LEFT_ALIGNMENT);\n\n JButton display10MoreBut = new JButton(\"Display 10 more results\");\n display10MoreBut.setFont(resultFont);\n actionButtons.add(display10MoreBut);\n Action display10More = new AbstractAction() {\n public void actionPerformed(ActionEvent e) {\n displayResults((int) this.getValue(\"resCurSize\") + 10, elapsedTime);\n }\n };\n display10More.putValue(\"resCurSize\", i);\n display10MoreBut.addActionListener(display10More);\n\n actionButtons.add(Box.createRigidArea(new Dimension(5, 0)));\n\n JButton displayAllBut = new JButton(\"Display all \" + results.size() + \" results\");\n displayAllBut.setFont(resultFont);\n actionButtons.add(displayAllBut);\n Action displayAll = new AbstractAction() {\n public void actionPerformed(ActionEvent e) {\n displayResults(results.size(), elapsedTime);\n }\n };\n displayAllBut.addActionListener(displayAll);\n\n resultWindow.add(actionButtons);\n }\n revalidate();\n repaint();\n }",
"public void valueChanged(ListSelectionEvent event) {\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }",
"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 /*synchronized*/ void addSelectionResultLog(long start, long end, int resultSize){\n\t\tQUERY_COUNT++;\n\t\tLOG.appendln(\"Query \" + QUERY_COUNT + \": \" + resultSize + \" trajectories in \" + (end-start) + \" ms.\");\n\t\tLOG.appendln(\"Query ends at: \" + end + \" ms.\");\n\t}",
"public void refreshReviewList() {\n reviewListModel.clear();\n int index = gamesList.getSelectedIndex();\n String gameName = gamesListModel.getElementAt(index).toString();\n String gameID = dbMgr.getGameID(gameName);\n List<List<String>> userReviews = dbMgr.getReviewsByGame(gameID);\n\n // fill list with review for currently selected game\n for (int i = 0; i < userReviews.size(); i++) {\n reviewListModel.addElement(userReviews.get(i).get(0) + \", \" + userReviews.get(i).get(1) + \"/10\"); \n }\n\n reviewList.setModel(reviewListModel);\n }"
] | [
"0.69534415",
"0.6212199",
"0.61848724",
"0.6137206",
"0.6122751",
"0.60618186",
"0.604656",
"0.6041361",
"0.60197586",
"0.5977221",
"0.5971299",
"0.5894363",
"0.5880117",
"0.5879362",
"0.5859228",
"0.58432597",
"0.58400124",
"0.5832458",
"0.5786397",
"0.57464296",
"0.574424",
"0.5732182",
"0.5726628",
"0.5720748",
"0.57167023",
"0.57131165",
"0.5675395",
"0.5671726",
"0.56540996",
"0.5641609",
"0.5639008",
"0.56135255",
"0.56105494",
"0.560771",
"0.5599862",
"0.55954653",
"0.55913305",
"0.5588234",
"0.55871755",
"0.5575536",
"0.55722207",
"0.55660355",
"0.5565661",
"0.55618316",
"0.55539674",
"0.55367166",
"0.5520095",
"0.5516446",
"0.55144274",
"0.5511357",
"0.55105937",
"0.5487245",
"0.54870105",
"0.54803294",
"0.5476618",
"0.54747903",
"0.5472708",
"0.54664373",
"0.5463716",
"0.54555887",
"0.5450366",
"0.5444276",
"0.5442534",
"0.5438295",
"0.54284865",
"0.54274035",
"0.5426367",
"0.54205453",
"0.5417676",
"0.54167926",
"0.5408932",
"0.54088384",
"0.54087377",
"0.5405744",
"0.5391736",
"0.53857595",
"0.5382612",
"0.53762406",
"0.53714776",
"0.53690434",
"0.53642",
"0.53607696",
"0.53422344",
"0.5339043",
"0.53378606",
"0.53338593",
"0.5328136",
"0.53243315",
"0.5324217",
"0.53192866",
"0.5308614",
"0.5305046",
"0.53032386",
"0.53017616",
"0.5298679",
"0.52976656",
"0.5295337",
"0.52938575",
"0.5291546",
"0.52881885",
"0.52829033"
] | 0.0 | -1 |
Updates the tabs in the main display. | protected synchronized void updateMainTabs(String entryName) {
String name = m_history.getSelectedName();
if (!name.equals(entryName)) {
return;
}
updateComponentTabs(name, m_outputPane);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void updateTabState();",
"private void updateTabButtons() {\n\t\tif (currentTab == null || currentTab.equals(\"history\")) {\n\t\t\thistory.setDisable(true);\n\t\t\tlanguage.setDisable(false);\n\t\t} else if (currentTab == null || currentTab.equals(\"language\")) {\n\t\t\tlanguage.setDisable(true);\n\t\t\thistory.setDisable(false);\n\t\t}\n\t}",
"private void initTabs()\n {\n updateDayTab();\n\n // Set initial time on time tab\n updateTimeTab();\n }",
"private void refreshUI(boolean updateAll) {\n if (updateAll) {\n refreshAutoTab();\n refreshManualTab();\n } else {\n if (TAB_AUTO == mTabIndex) {\n refreshAutoTab();\n } else if (TAB_MANUAL == mTabIndex) {\n refreshManualTab();\n } else {\n myAssert(false, \"No such tab!\");\n }\n }\n }",
"public void updateAllTabs(final boolean force) {\r\n\t\tupdateAllTabs(force, true);\r\n\t}",
"private void setupTabs() {\n }",
"public void tabChange() {\r\n\t}",
"private void layoutTabs() {\n\tJTabbedPane tabs = new JTabbedPane();\n\ttabs.add(\"MAIN MENU\", mainMenu);\n\ttabs.add(\"LEVEL EDITOR\", levelEditor);\n\tthis.getContentPane().add(tabs);\n }",
"public void applyTab();",
"public void updateTab(int tabId) {\r\n\t\tselectedTab = tabs.get(tabId);\r\n\t\t\r\n\t\tif (selectedTab != null) {\r\n\t\t\tselectedTab.updateContent();\r\n\t\t}\r\n\t}",
"private void configure_tabs() {\n Objects.requireNonNull(tabs.getTabAt(0)).setIcon(R.drawable.baseline_map_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(0)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(1)).setIcon(R.drawable.baseline_view_list_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(1)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(2)).setIcon(R.drawable.baseline_people_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(2)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n swipeRefreshLayout.setEnabled(false);\n\n // Set on Tab selected listener\n tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n // Change color of the tab -> orange\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 }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n\n // if the searchView is opened, close it\n if(mToolbar_navig_utils !=null) {\n if (mToolbar_navig_utils.getSearchView() != null) {\n if (!mToolbar_navig_utils.getSearchView().isIconified()) {\n mToolbar_navig_utils.getSearchView().setIconified(true);\n\n // Recover the previous list of places nearby generated\n switch (current_page) {\n case 0:\n getPageAdapter().getMapsFragment().recover_previous_state();\n break;\n case 1:\n getPageAdapter().getListRestoFragment().recover_previous_state();\n break;\n }\n }\n }\n }\n\n // Change color of the tab -> black\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n }\n });\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}",
"public void tabChanged()\n {\n super.tabChanged();\n }",
"public void update() {\n\n\t\tdisplay();\n\t}",
"protected void updateButtons() {\n int currentIndex = tabbedPane.getSelectedIndex();\n if( currentIndex == 0) {\n backButton.setEnabled(false);\n forwardButton.setText(\"weiter\");\n }\n if(currentIndex > 0) {\n backButton.setEnabled(true);\n forwardButton.setText(\"weiter\");\n }\n \n if(currentIndex == 6) {\n forwardButton.setText(\"würfeln\");\n }\n \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}",
"public void initializeTabs() {\n\n\t\tTabHost.TabSpec spec;\n\n\t\tspec = mTabHost.newTabSpec(Const.EVENTS);\n\t\tmTabHost.setCurrentTab(0);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_events_selector));\n\t\tmTabHost.addTab(spec);\n\n\t\tmTabHost.setCurrentTab(1);\n\t\tspec = mTabHost.newTabSpec(Const.FEED);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_feed_selector));\n\t\tmTabHost.addTab(spec);\n\n\t\tmTabHost.setCurrentTab(2);\n\t\tspec = mTabHost.newTabSpec(Const.INFO);\n\t\tspec.setContent(new TabHost.TabContentFactory() {\n\t\t\tpublic View createTabContent(String tag) {\n\t\t\t\treturn findViewById(R.id.realtabcontent);\n\t\t\t}\n\t\t});\n\t\tspec.setIndicator(createTabView(R.drawable.tab_info_selector));\n\t\tmTabHost.addTab(spec);\n\n\t}",
"public void updateDigitalWindowChilds() {\r\n\t\tif (this.digitalTabItem != null && !this.digitalTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.digitalTabItem.updateChilds();\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.digitalTabItem.updateChilds();\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 void updateAnalogWindowChilds() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.updateChilds();\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.analogTabItem.updateChilds();\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}",
"protected synchronized void updateComponentTabs(String name, \n JTabbedPane outputPane) {\n // remove any tabs that are not the text output\n int numTabs = outputPane.getTabCount();\n if (numTabs > 1) {\n for (int i = numTabs - 1; i > 0; i--) {\n outputPane.removeTabAt(i);\n }\n }\n\n // see if there are any graphs associated with this name\n List<Object> storedResults = (List<Object>)m_history.getNamedObject(name);\n List<JPanel> graphList = null;\n if (storedResults != null) {\n for (Object o : storedResults) {\n if (o instanceof List<?>) {\n graphList = (List<JPanel>)o;\n }\n }\n }\n \n if (graphList != null && graphList.size() > 0) { \n // add the graphs\n for (JPanel p : graphList) {\n outputPane.addTab(p.getToolTipText(), p);\n }\n }\n }",
"public void updateAllTabs(final boolean force, final boolean redrawCurveSelector) {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tthis.updateGraphicsWindow(redrawCurveSelector);\r\n\t\t\tthis.updateStatisticsData(true);\r\n\t\t\tif (force) {\r\n\t\t\t\tthis.updateDigitalWindow();\r\n\t\t\t\tthis.updateAnalogWindow();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.updateDigitalWindowChilds();\r\n\t\t\t\tthis.updateAnalogWindowChilds();\r\n\t\t\t}\r\n\t\t\tthis.updateCellVoltageWindow();\r\n\t\t\tthis.updateFileCommentWindow();\r\n\t\t\tif (this.getActiveRecordSet() != null) {\r\n\t\t\t\tthis.updateDataTable(this.getActiveRecordSet().getName(), force);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tDataExplorer.this.updateDataTable(GDE.STRING_EMPTY, force);\r\n\t\t\t}\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.updateGraphicsWindow(redrawCurveSelector);\r\n\t\t\t\t\tDataExplorer.this.updateStatisticsData(true);\r\n\t\t\t\t\tif (force) {\r\n\t\t\t\t\t\tDataExplorer.this.updateDigitalWindow();\r\n\t\t\t\t\t\tDataExplorer.this.updateAnalogWindow();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tDataExplorer.this.updateDigitalWindowChilds();\r\n\t\t\t\t\t\tDataExplorer.this.updateAnalogWindowChilds();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tDataExplorer.this.updateCellVoltageWindow();\r\n\t\t\t\t\tDataExplorer.this.updateFileCommentWindow();\r\n\t\t\t\t\tif (DataExplorer.this.getActiveRecordSet() != null) {\r\n\t\t\t\t\t\tDataExplorer.this.updateDataTable(DataExplorer.this.getActiveRecordSet().getName(), force);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tDataExplorer.this.updateDataTable(GDE.STRING_EMPTY, force);\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 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 }",
"private void updateUi() {\n this.tabDetail.setDisable(false);\n this.lblDisplayName.setText(this.currentChild.getDisplayName());\n this.lblPersonalId.setText(String.format(\"(%s)\", this.currentChild.getPersonalId()));\n this.lblPrice.setText(String.format(\"%.2f\", this.currentChild.getPrice()));\n this.lblAge.setText(String.valueOf(this.currentChild.getAge()));\n this.dtBirthDate.setValue(this.currentChild\n .getBirthDate()\n .toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate());\n this.lblWeight.setText(String.format(\"%.1f kg\", this.currentChild.getWeight()));\n this.sldWeight.setValue(this.currentChild.getWeight());\n this.checkboxTrueRace.setSelected(!this.currentChild.isRace());\n this.imgChildProfile.setImage(this.currentChild.getAvatar());\n if (this.currentChild.getGender().equals(GenderType.MALE)){\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/boy.png\"));\n this.lblSex.setText(\"Male\");\n }\n else {\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/girl.png\"));\n this.lblSex.setText(\"Female\");\n }\n if (this.currentChild.isVirginity()){\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/virgin.png\"));\n this.lblVirginity.setText(\"Virgin\");\n }\n else {\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/not-virgin.png\"));\n this.lblVirginity.setText(\"Not Virgin\");\n }\n\n // TODO [assignment2] nastavit obrazek/avatar ditete v karte detailu\n // TODO [assignment2] nastavit spravny obrazek pohlavi v karte detailu\n // TODO [assignment2] nastavit spravny obrazek virginity atribut v v karte detailu\n }",
"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}",
"private void initTab()\n {\n \n }",
"void updateControls();",
"public void updateDigitalWindow() {\r\n\t\tif (this.digitalTabItem != null && !this.digitalTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.digitalTabItem.update(true);\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.digitalTabItem.update(true);\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 setTabLayout() {\n View view = LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n TextView title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n ImageView imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.MOVIES);\n imgIcon.setImageResource(R.mipmap.ic_home);\n mTabLayout.getTabAt(0).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n count = (TextView) view.findViewById(R.id.item_tablayout_count_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.FAVOURITE);\n imgIcon.setImageResource(R.mipmap.ic_favorite);\n count.setVisibility(View.VISIBLE);\n mTabLayout.getTabAt(1).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.SETTINGS);\n imgIcon.setImageResource(R.mipmap.ic_settings);\n mTabLayout.getTabAt(2).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.ABOUT);\n imgIcon.setImageResource(R.mipmap.ic_info);\n mTabLayout.getTabAt(3).setCustomView(view);\n }",
"public void updateHistoTabs(int recordOrdinal, boolean isWithUi) {\r\n\t\tDataExplorer.this.histoSet.getTrailRecordSet().setPoints(recordOrdinal);\r\n\t\tDataExplorer.this.updateHistoTabs(RebuildStep.F_FILE_CHECK, isWithUi); // ET rebuilds the graphics only if new files have been found\r\n\t\tthis.updateHistoGraphicsWindow(false); // ET redraws once again in the rare case if new files have been found \r\n\t}",
"private void ini_TabMainView()\r\n\t{\r\n\r\n\t\tif (splashEndTime > System.currentTimeMillis()) return;\r\n\r\n\t\tLogger.DEBUG(\"ini_TabMainView\");\r\n\t\tGL.that.removeRenderView(this);\r\n\t\t((GdxGame) GL.that).switchToMainView();\r\n\r\n\t\tGL.setIsInitial();\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 }",
"public void refreshLayout(){\n JSONObject obj;\n JSONArray pokedex;\n Thread thread;\n TextView stats,overview, article;\n Boolean directory;\n\n\n File f = new File(getFilesDir() +\n \"/pokedex/\" + gen+\".txt\");\n try{\n Scanner scan = new Scanner(f,\"UTF-8\").useDelimiter(\"/n\");\n if(scan.hasNext()){\n obj = new JSONObject(scan.nextLine());\n pokedex = obj.getJSONArray(\"pokemon\");\n setupDirectory(pokedex.getJSONObject(index).getString(\"name\"));\n\n }\n } catch(FileNotFoundException | JSONException e){\n e.printStackTrace();\n }\n\n tablayout2 = (TabLayout) findViewById(R.id.format);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n\n setupFormat(tablayout2);\n //update the overview and article tabs; tab2 and tab3 respectively\n updateTabs();\n\n\n\n\n\n }",
"public void reloadAll() {\n\t\tfor (int i=0; i<jtp.getTabCount()-1; i++) {\n\t\t\t((XCDisplay)jtp.getComponent(i)).reloadDocument();\n\t\t}\n\t}",
"public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }",
"private void createTabs() {\r\n\t\ttabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\t//changes title and status bar \r\n\t\ttabbedPane.addChangeListener((l) -> { \r\n\t\t\tint index = tabbedPane.getSelectedIndex();\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tcurrentFile = \"-\";\r\n\t\t\t} else {\r\n\t\t\t\tcurrentFile = tabbedPane.getToolTipTextAt(index);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (currentFile.isEmpty()) {\t//file not yet saved\r\n\t\t\t\tcurrentFile = tabbedPane.getTitleAt(tabbedPane.getSelectedIndex());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsetTitle(currentFile + \" - JNotepad++\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJTextArea current = getSelectedTextArea();\r\n\t\t\tif (current == null) return;\r\n\t\t\tCaretListener[] listeners = current.getCaretListeners();\r\n\t\t\tlisteners[0].caretUpdate(new CaretEvent(current) {\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Serial UID.\r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getMark() {\r\n\t\t\t\t\treturn 0;\t//not used\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getDot() {\r\n\t\t\t\t\treturn current.getCaretPosition();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t\tcreateSingleTab(null, null);\r\n\t\tgetContentPane().add(tabbedPane, BorderLayout.CENTER);\t\r\n\t}",
"public void updateAbilityHotbar() {\n controller.getUIController().refreshAbilityHotbar();\n }",
"private void updatePanels() // updatePanels method start\n\t{\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tlogOutput.setText(log.logReport());\n\t\tATBOutput.setText(log.adjustedTrialBalance());\n\t\tISOutput.setText(log.incomeStatement());\n\t\tRESOutput.setText(log.retainedEarningsStatement());\n\t\tBSOutput.setText(log.balanceSheet());\n\t}",
"public void initTab(ArrayList<CircuitUsageModel> modelList) {\n\t\ttabHost = getTabHost();\n\t\tResources res = getResources();\n\n\t\t// energy\n\t\tenergySpec = tabHost.newTabSpec(\"energy\");\n\t\tenergySpec.setIndicator(getString(R.string.energy),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_energy));\n\t\t// power\n\t\tpowerSpec = tabHost.newTabSpec(\"power\");\n\t\tpowerSpec.setIndicator(getString(R.string.power),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_power));\n\t\t// credit\n\t\tcreditSpec = tabHost.newTabSpec(\"credit\");\n\t\tcreditSpec.setIndicator(getString(R.string.credit),\n\t\t\t\tres.getDrawable(R.drawable.ic_tab_credit));\n\n\t\t// set tab content\n\t\tsetTabContent(modelList);\n\t\t\n\t\t// auto refresh\n\t\tautoRefresh();\n\t}",
"@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}",
"private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }",
"public void updateStatisticsData() {\r\n\t\tif (this.statisticsTabItem != null && !this.statisticsTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.statisticsTabItem.updateStatisticsData(true);\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.statisticsTabItem.updateStatisticsData(true);\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 void update(int index) {\n\n for (int i=0; i<tabs.length; i++) {\n if (i == index) {\n int img = getResources().getIdentifier(\"bt_menu_bottom_\" + (i+1) +\"_on\", \"drawable\", getPackageName());\n tabs[i].setTextColor(Color.parseColor(\"#5b5b5f\"));\n tabs[i].setCompoundDrawablesWithIntrinsicBounds(0, img, 0, 0);\n tabs[i].setBackgroundColor(Color.parseColor(\"#edeef0\"));\n } else {\n int img = getResources().getIdentifier(\"bt_menu_bottom_\" + (i+1) +\"_off\", \"drawable\", getPackageName());\n tabs[i].setTextColor(Color.parseColor(\"#FFFFFF\"));\n tabs[i].setCompoundDrawablesWithIntrinsicBounds(0, img, 0, 0);\n tabs[i].setBackgroundColor(Color.parseColor(\"#cd506c\"));\n }\n }\n\n FragmentManager manager = getSupportFragmentManager();\n SectionFragment section;\n if (index == 0) {\n section = PromoFragment.newInstance(HomeActivity.this);\n } else if (index == 1) {\n section = StoreFragment.newInstance(HomeActivity.this);\n } else if (index == 2) {\n section = ActivityFragment.newInstance(HomeActivity.this);\n } else {\n section = ProfileFragment.newInstance(HomeActivity.this);\n }\n\n FragmentTransaction transition = manager.beginTransaction();\n //transition.setCustomAnimations(R.anim.fade_in, R.anim.fade_out);\n transition.replace(R.id.fl_tabs, section).commit();\n\n }",
"protected static void update() {\n\t\tstepsTable.update();\n\t\tactive.update();\n\t\tmeals.update();\n\t\t\n\t}",
"void updateScreen() {\n\t\tZone possibleNewZone = currentZone.getSpace(playerY, playerX).getNextZone();\n\t\tif (possibleNewZone != null) {\n\t\t\tString oldBGMusic = currentZone.getBackgroundMusic();\n\t\t\tcurrentZone = possibleNewZone;\n\t\t\tcurrentZone.enableZoneWarpSpaces();\n\t\t\tplayerX = currentZone.getPlayerStartX();\n\t\t\tplayerY = currentZone.getPlayerStartY();\n\t\t\t\n\n\t\t\tif (!oldBGMusic.equals(currentZone.getBackgroundMusic())) {\n\t\t\t\tmusicPlayer.stop();\n\t\t\t\tmusicPlayer.play(currentZone.getBackgroundMusic(), 100);\n\t\t\t}\n\t\t}\n\n\t\t// Update Panel Colors\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\t\t\t\tpanels[i][a].setBackground(currentZone.getSpace(i, a).getColor());\n\t\t\t}\n\t\t}\n\n\t\t// Update Labels\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int a = 0; a < 10; a++) {\n\n\t\t\t\tlabels[i][a].setIcon(currentZone.getSpace(i, a).getPic());\n\t\t\t}\n\t\t}\n\t\t// Shows player in the new space\n\t\tlabels[playerY][playerX].setIcon(playerPic);\n\n\t\t// Shows enemy in the new space\n\t\t// labels[enemyY][enemyX].setIcon(enemyPic);\n\t}",
"public void updateCellVoltageChilds() {\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.updateChilds();\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.updateChilds();\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 eric_function()\n\t{\n \ttabHost = (TabHost) findViewById(R.id.mytab1);\n \ttabHost.setup();\n \t \n \t//tabHost.setBackgroundColor(Color.argb(150, 20, 80, 150));\n \ttabHost.setBackgroundResource(R.drawable.ic_launcher);\n \t\n \t\n \t//\n \tTabSpec tabSpec;\n \t// 1\n \ttabSpec = tabHost.newTabSpec(tab_list[0]);\n \ttabSpec.setIndicator(\"a.1\");\n \ttabSpec.setContent(R.id.widget_layout_blue2);\n \ttabHost.addTab(tabSpec);\n \t// 2\n \ttabSpec = tabHost.newTabSpec(tab_list[1]);\n \ttabSpec.setIndicator(\"a2\");\n \ttabSpec.setContent(R.id.widget_layout_green2);\n \ttabHost.addTab(tabSpec); \t\n \t// 3\n \ttabSpec = tabHost.newTabSpec(tab_list[2]);\n \ttabSpec.setIndicator(\"a3\");\n \ttabSpec.setContent(R.id.widget_layout_red2);\n \ttabHost.addTab(tabSpec); \t\n \t//\n\t\ttabHost.setOnTabChangedListener(listener1);\n \t//\n\t\t\n\t\t\n\t\t\n\t\t\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}",
"private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }",
"public MainUiPanel() {\n initComponents();\n// initializeTable();\n ArrayList<Client> loc = LocationAction.getLocationList();\n for(Client cl: loc){\n// column.add(cl.getClientName());\n// }\n \n jTabbedPane1.addTab(\"OrderList for \"+cl.getClientName(), new OrderNotificationUi(cl.getClientId()));\n// jTabbedPane1.addTab(\"OrderList for \"+cl.getClientName(), new OrderNotificationUi());\n }\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 updateUI(){}",
"public void updateAnalogWindow() {\r\n\t\tif (this.analogTabItem != null && !this.analogTabItem.isDisposed()) {\r\n\t\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\t\tthis.analogTabItem.update(true);\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.analogTabItem.update(true);\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}",
"Out (FoilBoard target) { \n app = target;\n\n // layout = new CardLayout();\n // setLayout(layout);\n\n probe = new Probe(app);\n geometry = new Geometry(app);\n data = new Data(app);\n \n // TODO: regen this on update (if active)\n // perfweb = new PerfWeb(app);\n addTab(\"Summary\", null, perfweb, \"Shape and Performance Summary\");\n addTab(\"Geometry\", null, geometry, \"Hydrofoil components geometry,\\nfoil/profile geometry tables or links\");\n addTab(\"Data\", null, data, \"Hydrofoil components data,\\nincluding size, shape etc\");\n addTab(\"Probe\", null, probe, \"Fluid Flow Probe Display\");\n // old: addTab(\"Plot\", null, pp, \"Show Plot\");\n\n\n // phazing out this.... (still works). instead, copy&past \"summary\" tab into\n // html tool such as https://html-online.com/editor/ and done!\n //\n // perfwebsrc = new PerfWebSrc(app);\n // addTab(\"<h1>Summary...\", null, perfwebsrc, \"Shape and Performance Summary,\\n html codes for embedding\");\n\n //setSelectedComponent(perfweb);\n\n // adding actions to tabs: following \"whoa\" ideas from stackoverflow work but I use\n // overloaded paint() instead, seem simple.\n\n // JLabel label = new JLabel(\"XXX\");\n // label.addMouseListener(new java.awt.event.MouseAdapter() {\n // public void mouseClicked(MouseEvent e) {\n // System.out.println(\"woah! \");\n // setSelectedIndex(0);\n // }});\n // \n // setTabComponentAt(0, label);\n\n //setModel(new javax.swing.DefaultSingleSelectionModel() {\n //\n // @Override\n // public void setSelectedIndex(int index) {\n // System.out.println(\"woah! \" + index);\n // setSelectedIndex(index);\n // }\n // });\n\n // can be used to attach aux logic here..\n this.addChangeListener(new javax.swing.event.ChangeListener() {\n @Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n // e.getSource();\n // System.out.println(\"-- e: \" + e);\n //System.out.println(\"Selected paneNo : \" + .getSelectedIndex());\n } });\n }",
"private void updateDisplay() {\n\t\tif (!Display.isActive()) {\n\t\t\twKeyDown = false;\n\t\t\taKeyDown = false;\n\t\t\tsKeyDown = false;\n\t\t\tdKeyDown = false;\n\t\t\tmouseDown = false;\n\t\t}\n\t\t\n\t\tDisplay.update();\n\t\tDisplay.sync(fps);\n\t\t\n\t\tif (Display.isCloseRequested()) {\n\t\t\tDisplay.destroy();\n\t\t\tAL.destroy();\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"protected void refreshShell() {\n shell.layout();\n }",
"public void updateContent(){\r\n\t\tthis.initRecords();\r\n\t\tlist.show(records);\r\n\t}",
"public void updateStatsPanel() {\n\t\t//update versus table\n\t\tuser1 = Login.getInstance().getUserOne();\n\t\tuser2 = Login.getInstance().getUserTwo();\n\t\t\n\t\tif(isVersusTableInitialized==true) {\n\t\t\tmainPanel.remove(versusTable);\n\t\t}\n\t\t\n\t\tversusTable = generateVersusTable();\n\t\tmainPanel.add(versusTable);\n\t\tisVersusTableInitialized=true;\n\t\tversusTable.setBounds(600, 160, 150, 45);\n\t\tversusTable.setBackground(Color.LIGHT_GRAY);\n\t\tversusTable.setEnabled(false);\n\t\ttitle.setForeground(Color.WHITE);\n\t\t\n\t\t//update top ten table\n\t\tif(isTopTenTableInitialized==true) {\n\t\t\tmainPanel.remove(topTenTable);\n\t\t}\n\t\t\n\t\ttopTenTable=generateTopTenTable();\n\t\tmainPanel.add(topTenTable);\n\t\tisTopTenTableInitialized=true;\n\t\ttopTenTable.setBounds(150, 160, 150, 175);\n\t\ttopTenTable.setBackground(Color.LIGHT_GRAY);\n\t\ttopTenTable.setEnabled(false);\n\t\ttitle.setForeground(Color.WHITE);\n\t}",
"private void updateListViewData(boolean updateAll) {\n if (updateAll) {\n updateListViewItem(mAutoItemArray);\n updateListViewItem(mManualItemArray);\n } else {\n if (TAB_AUTO == mTabIndex) {\n updateListViewItem(mAutoItemArray);\n } else if (TAB_MANUAL == mTabIndex) {\n updateListViewItem(mManualItemArray);\n } else {\n myAssert(false, \"No such tab!\");\n }\n }\n }",
"private void enableTabPages() {\n // Disables all tabs except the first (the common for all Net Objects)\n for (int i = jTabbedPane1.getTabCount() - 1; i > 0; i--) {\n int tabIndex = i;\n // Enables specific Net Object tab\n if (!IntStream.of(currentTabIndices).anyMatch(x -> x == tabIndex)) {\n this.jTabbedPane1.remove(i);\n }\n }\n }",
"public void switchToHistory() {\r\n\t\thistoryPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"historyPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"private void updateUi() {\n int index = mCurrentPage.getIndex();\n int pageCount = mPdfRenderer.getPageCount();\n mButtonPrevious.setEnabled(0 != index);\n mButtonNext.setEnabled(index + 1 < pageCount);\n getActivity().setTitle(getString(R.string.app_name_with_index, index + 1, pageCount));\n }",
"Lab refresh();",
"private void refreshScreen() {\n app.getMainMenu().getTextField().clear();\n for (int key = 0; key < 96; key++) {\n app.getWorkSpace().getGridCell(key).unhighlightGridCell();\n app.getWorkSpace().getGridCell(key).updateState(app);\n }\n Storage.getInstance().writeObject(\"workspace\", app.getWorkSpace().getWorkSpaceMap());\n app.show();\n }",
"private void initPlayersTab() throws IOException {\n // THESE ARE THE CONTROLS FOR THE BASIC SCHEDULE PAGE HEADER INFO\n // WE'LL ARRANGE THEM IN A VBox\n playerTab = new Tab();\n playerWorkspacePane = new VBox();\n playerWorkspacePane.getStyleClass().add(CLASS_DRAFT_PANE);\n \n // PAGE LABEL & BUTTON\n Label playersHeading = new Label();\n playersHeading = initChildLabel(playerWorkspacePane, DraftKit_PropertyType.PLAYER_HEADING_LABEL, CLASS_HEADING_LABEL);\n \n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(DraftKit_PropertyType.PLAYER_ICON);\n Image buttonImage = new Image(imagePath);\n playerTab.setGraphic(new ImageView(buttonImage));\n \n // SEARCH AREA\n HBox search = new HBox();\n addPlayer = initHBoxButton(search, DraftKit_PropertyType.ADD_ICON, DraftKit_PropertyType.ADD_PLAYER_TOOLTIP, false);\n removePlayer = initHBoxButton(search, DraftKit_PropertyType.MINUS_ICON, DraftKit_PropertyType.REMOVE_PLAYER_TOOLTIP, false);\n initHBoxLabel(search, DraftKit_PropertyType.SEARCH_LABEL, CLASS_PROMPT_LABEL);\n searchText = initHBoxTextField(search, \"\", true);\n \n // RADIO BUTTONS AREA FUNESS\n group = new ToggleGroup();\n all = new RadioButton(\"All\");\n all.setToggleGroup(group);\n c = new RadioButton(\"C\");\n c.setToggleGroup(group);\n oneB = new RadioButton(\"1B\");\n oneB.setToggleGroup(group);\n ci = new RadioButton(\"CI\");\n ci.setToggleGroup(group);\n threeB = new RadioButton(\"3B\");\n threeB.setToggleGroup(group);\n twoB = new RadioButton(\"2B\");\n twoB.setToggleGroup(group);\n mi = new RadioButton(\"MI\");\n mi.setToggleGroup(group);\n ss = new RadioButton(\"SS\");\n ss.setToggleGroup(group);\n of = new RadioButton(\"OF\");\n of.setToggleGroup(group);\n u = new RadioButton(\"U\");\n u.setToggleGroup(group);\n p = new RadioButton(\"P\");\n p.setToggleGroup(group);\n \n ToolBar radioTool = new ToolBar(\n all, c, oneB, ci, threeB, twoB, mi, ss, of, u, p\n );\n \n // CREATE TABLE FOR PLAYER PAGE\n playerTable = new TableView<>();\n \n first = new TableColumn<>(\"First\");\n first.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n last = new TableColumn<>(\"Last\");\n last.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n proTeam = new TableColumn<>(\"Pro Team\");\n proTeam.setCellValueFactory(new PropertyValueFactory<>(\"MLBTeam\"));\n positions = new TableColumn<>(\"Positions\");\n positions.setCellValueFactory(new PropertyValueFactory<>(\"position\"));\n yob = new TableColumn<>(\"Year of Birth\");\n yob.setCellValueFactory(new PropertyValueFactory<>(\"YearOfBirth\"));\n rw = new TableColumn<>(\"R/W\");\n rw.setCellValueFactory(new PropertyValueFactory<>(\"RW\"));\n hrsv = new TableColumn<>(\"HR/SV\");\n hrsv.setCellValueFactory(new PropertyValueFactory<>(\"HRSV\"));\n rbik = new TableColumn<>(\"RBI/K\");\n rbik.setCellValueFactory(new PropertyValueFactory<>(\"RBIK\"));\n sbera = new TableColumn<>(\"SB/ERA\");\n sbera.setCellValueFactory(new PropertyValueFactory<>(\"SBERA\"));\n bawhip = new TableColumn<>(\"BA/WHIP\");\n bawhip.setCellValueFactory(new PropertyValueFactory<>(\"BAWHIP\"));\n estimatedValue = new TableColumn<>(\"Estimated Value\");\n estimatedValue.setCellValueFactory(new PropertyValueFactory<>(\"EValue\"));\n // MAKE SURE TO CHANGE ESTIMATED VALUE TO MATCH GETTERS/ SETTERS\n notes = new TableColumn<>(\"Notes\");\n notes.setCellValueFactory(new PropertyValueFactory<>(\"notes\"));\n notes.setCellFactory(TextFieldTableCell.forTableColumn());\n playerTable.setEditable(true);\n notes.setOnEditCommit((CellEditEvent<Player, String> event) -> {\n ((Player) event.getTableView().getItems().get(event.getTablePosition().getRow())).setNotes(event.getNewValue());\n });\n \n // ADD ALL THE COLUMNS TO THE TABLE\n playerTable.getColumns().setAll(first, last, proTeam, positions, yob, rw, hrsv, rbik, sbera, bawhip, estimatedValue, notes);\n \n // SET TOOLTIP\n Tooltip t = new Tooltip(\"Available Players Page\");\n playerTab.setTooltip(t);\n \n // PUT IN TAB PANE\n playerWorkspacePane.getChildren().add(search);\n playerWorkspacePane.getChildren().add(radioTool);\n playerWorkspacePane.getChildren().add(playerTable);\n playerTab.setContent(playerWorkspacePane);\n mainWorkspacePane.getTabs().add(playerTab);\n \n playerTable = resetTable(dataManager.getDraft().getPlayerPool());\n }",
"public void updateHistoTabs(RebuildStep rebuildStep, boolean isWithUi) {\r\n\t\tif (Thread.currentThread().getId() == DataExplorer.application.getThreadId()) {\r\n\t\t\tif ((!this.histoGraphicsTabItem.isDisposed() && this.histoGraphicsTabItem.isVisible()) //\r\n\t\t\t\t\t|| (!this.histoTableTabItem.isDisposed() && this.histoTableTabItem.isVisible())) {\r\n\t\t\t\tThread rebuilThread = new Thread((Runnable) () -> rebuildHisto(rebuildStep, isWithUi), \"rebuild4Screening\"); //$NON-NLS-1$\r\n\t\t\t\ttry {\r\n\t\t\t\t\trebuilThread.start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (RuntimeException e) {\r\n\t\t\t\t\tlog.log(Level.WARNING, e.getMessage(), e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tGDE.display.asyncExec((Runnable) () -> {\r\n\t\t\t\tif ((!DataExplorer.this.histoGraphicsTabItem.isDisposed() && DataExplorer.this.histoGraphicsTabItem.isVisible()) //\r\n\t\t\t\t\t\t|| (!DataExplorer.this.histoTableTabItem.isDisposed() && DataExplorer.this.histoTableTabItem.isVisible())) {\r\n\t\t\t\t\tThread rebuilThread = new Thread((Runnable) () -> rebuildHisto(rebuildStep, isWithUi), \"rebuild4Screening\"); //$NON-NLS-1$\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\trebuilThread.start();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch (RuntimeException e) {\r\n\t\t\t\t\t\tlog.log(Level.WARNING, e.getMessage(), e);\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 adminOperations() {\n adminOps = new JFrame(\"Administrator Frame\");\n adminOps.getRootPane().setBorder(BorderFactory.createEmptyBorder(10,10,10,10));\n JTabbedPane adminPane = new JTabbedPane();\n adminPane.addTab(\"Withdraw $\", withdrawMoney());\n adminPane.addTab(\"Update Inventory\", updateInventoryPanel());\n adminOps.getContentPane().add(adminPane);\n adminOps.setVisible(true);\n adminOps.pack();\n }",
"public void updateDisplay() {\n\t\t\n\t\tif (!this.isAdded()) return;\n\t\t\n\t\tthis.layout.removeAllViews();\n\t\t\n\t\t/* Set the background parameters. */\n\t\tthis.layout.setBackgroundColor(this.appearance.getBackColour());\n\t\tif(this.appearance.getBackImage() != null)\n\t\t\tthis.layout.setBackground(this.appearance.getBackImage());\n\t\t\n\t\tif (url != null) {\n\t\t\tthis.webView.loadUrl(url);\n\t\t} else {\n\t\t\tthis.webView.loadData(html, \"text/html; charset=utf-8\", null);\n\n\t\t}\t\t\n\t\t\n\t\tthis.layout.addView(webView);\n\t\tthis.getActivity().setTitle(title);\n\t\t\t\t\n\t}",
"private void refreshHomePanel() {\n // Set Player Name Text\n view.getHomePanel().getNameLabel().setText(model.getPlayer().getFullname().toUpperCase());\n\n // Update Highscore Table\n view.getHomePanel().getTableModel().setRowCount(0);\n updateHighscores(model.getHighscores());\n }",
"@Override\n public void updateContent() {\n lmDriver.getTournaments();\n\n // Show all tournaments in the scene\n table.createTable();\n\n // Disable buttons\n btnJoin.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n btnWithdraw.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n btnShowInfo.disableProperty().bind(Bindings.isEmpty(tblTournaments.getSelectionModel().getSelectedItems()));\n\n // Clear list\n listLeaderboard.getItems().clear();\n\n // Update global leaderboard\n ArrayList<String> leaderboard = lmDriver.getGlobalLeaderboard();\n\n if (leaderboard.size() == 0) {\n listLeaderboard.getItems().add(\"There are no values yet.\");\n } else {\n listLeaderboard.getItems().add(\"Position Score Player\");\n for (String row : leaderboard) {\n listLeaderboard.getItems().add(row);\n }\n }\n }",
"@Override\n public void onTabChanged(String tabId) {\n FragmentManager fragmentManager = TabMainActivity.this.getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n int position = fragmentTabHost.getCurrentTab();\n for (int i = 0; i < list.size(); i++) {\n if (position == i) {\n transaction.show(list.get(i));\n } else {\n transaction.hide(list.get(i));\n }\n }\n transaction.commit();\n//\t viewPage.setCurrentItem(position);\n }",
"public void update()\n {\n reinit(viewer.getScene().getActors());\n\n list.invalidate();\n invalidate();\n repaint();\n }",
"private void addTabs() {\n TabsPagerAdapter tabsAdapter = new TabsPagerAdapter(getSupportFragmentManager());\n viewPager = (ViewPager) findViewById(R.id.pager);\n viewPager.setAdapter(tabsAdapter);\n\n TabLayout tabLayout = (TabLayout) findViewById(R.id.tabLayout);\n tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);\n tabLayout.setupWithViewPager(viewPager);\n\n tabLayout.getTabAt(0).setIcon(R.drawable.connect);\n tabLayout.getTabAt(1).setIcon(R.drawable.speak);\n tabLayout.getTabAt(2).setIcon(R.drawable.walk);\n tabLayout.getTabAt(3).setIcon(R.drawable.camera);\n tabLayout.getTabAt(4).setIcon(R.drawable.moves);\n }",
"public void update() {\r\n\t\tremoveAll();\r\n\t\tdrawGrid();\r\n\t\tplotDecades();\r\n\t\tgetEntries();\r\n\t}",
"private void makeCenter() {\r\n // JTabbedPane border.center\r\n // JScrollPane\r\n // JTable\r\n final JTabbedPane tabPane = new JTabbedPane();\r\n\r\n List<String[]> columnNamesList = connectToDB();\r\n\r\n // = {{\"Title\", \"Artist\", \"Genre\"}, \r\n // {\"Title\", \"Year\"}, \r\n // {\"Title\", \"Author\"}, \r\n // {\"Title\"}};\r\n\r\n final Object[][][] data = {\r\n {\r\n {\"Blue\", \"Third Eye Blind\", \"Pop-Punk\"}, {\"Ten\", \"Pearl Jam\", \"Grunge\"}\r\n }, {\r\n {\"Pacific Rim\", \"2013\"}\r\n }, {\r\n {\"Core Java\", \"Horstmann\"}\r\n }, {\r\n {\"DDR Revolution\"}\r\n }\r\n };\r\n\r\n final List<JTable> tables = new ArrayList<JTable>();\r\n for (int i = 0; i < columnNamesList.size(); i++) {\r\n String[] columnNamesArray = columnNamesList.get(i);\r\n @SuppressWarnings(\"serial\")\r\n final DefaultTableModel tableModel = \r\n new DefaultTableModel(data[i], columnNamesArray) {\r\n @Override\r\n public boolean isCellEditable(final int theRow, final int theColumn) {\r\n //all cells false\r\n return false;\r\n }\r\n };\r\n final JTable table = new JTable(tableModel);\r\n table.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\r\n @Override\r\n public void valueChanged(final ListSelectionEvent theEvent) {\r\n // do some actions here, for example\r\n // print first column value from selected row\r\n final StringBuilder string = new StringBuilder();\r\n for (int i = 0; i < table.getColumnCount(); i++) {\r\n string.append(table.getValueAt(table.getSelectedRow(), i).\r\n toString().\r\n replaceAll(\"\\\\s+\", \"\"));\r\n }\r\n System.out.println(string.toString());\r\n }\r\n });\r\n tables.add(table);\r\n }\r\n\r\n for (int i = 0; i < TAB_NAMES.length; i++) {\r\n final JScrollPane scrollPane = new JScrollPane(tables.get(i));\r\n tabPane.addTab(TAB_NAMES[i], null, scrollPane,\r\n \"Does nothing\");\r\n final int ascii = (int) TAB_NAMES[i].charAt(0);\r\n tabPane.setMnemonicAt(0, ascii);\r\n }\r\n myFrame.add(tabPane, BorderLayout.NORTH);\r\n }",
"public void manageJFrames(int button){\t\t\n\t\tif(button == 1){\t\t\t\n\t\t\tviewCompanyPanel.setVisible(false);\n\t\t\tviewCompanyGraph.setVisible(false);\n\t\t\thomePanel.setVisible(false);\n\t\t\teditExistingCompany.setVisible(false);\n\t\t\tnewCompanyPanel.setVisible(true);\n\t\t\tcontentPane.revalidate();\t\t\t\n\t\t}else if(button == 2){\n\t\t\tnewCompanyPanel.setVisible(false);\t\n\t\t\tviewCompanyPanel.setVisible(false);\n\t\t\tviewCompanyGraph.setVisible(false);\n\t\t\teditExistingCompany.setVisible(false);\n\t\t\thomePanel.setVisible(true);\n\t\t\tcontentPane.revalidate();\n\t\t}else if(button == 3){\n\t\t\tnewCompanyPanel.setVisible(false);\n\t\t\thomePanel.setVisible(false);\n\t\t\teditExistingCompany.setVisible(false);\n\t\t\tviewCompanyPanel.setVisible(true);\n\t\t\tviewCompanyGraph.setVisible(true);\t\t\t\n\t\t\tcontentPane.revalidate();\n\t\t}else if(button == 4){\n\t\t\tnewCompanyPanel.setVisible(false);\n\t\t\thomePanel.setVisible(false);;\n\t\t\tviewCompanyPanel.setVisible(false);\n\t\t\tviewCompanyGraph.setVisible(false);\n\t\t\teditExistingCompany.setVisible(true);\n\t\t\tcontentPane.revalidate();\n\t\t}\n\t}",
"private void initMainWorkspace() throws IOException {\n // THE TOP WORKSPACE PANE WILL ONLY DIRECTLY HOLD 2 THINGS, A LABEL\n // AND A SPLIT PANE, WHICH WILL HOLD 2 ADDITIONAL GROUPS OF CONTROLS\n mainWorkspacePane = new TabPane();\n mainWorkspacePane.setSide(Side.BOTTOM);\n mainWorkspacePane.setTabClosingPolicy(UNAVAILABLE);\n \n initTeamsTab();\n initPlayersTab();\n initStandingTab();\n initDraftTab();\n initMLBTeamTab();\n }",
"public void updateUI() {\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}",
"public void update()\r\n {\r\n for (int i = 0; i < _menubar.length; i++)\r\n {\r\n _menubar[i].draw();\r\n }\r\n _ausgewahlt.draw();\r\n }",
"public void test_manageActive() throws Exception {\n TabLayoutPanelInfo container =\n parseJavaInfo(\n \"public class Test extends TabLayoutPanel {\",\n \" public Test() {\",\n \" super(1.5, Unit.EM);\",\n \" {\",\n \" Button button_1 = new Button();\",\n \" add(button_1, 'A', false);\",\n \" }\",\n \" {\",\n \" Button button_2 = new Button();\",\n \" add(button_2, 'B', false);\",\n \" }\",\n \" }\",\n \"}\");\n container.refresh();\n WidgetInfo button_1 = getJavaInfoByName(\"button_1\");\n WidgetInfo button_2 = getJavaInfoByName(\"button_2\");\n // initially \"button_1\" is active\n assertActiveWidget(container, button_1);\n // notify about \"button_2\"\n {\n boolean shouldRefresh = notifySelecting(button_2);\n assertTrue(shouldRefresh);\n container.refresh();\n // now \"button_2\" is active\n assertActiveWidget(container, button_2);\n }\n // second notification about \"button_2\" does not cause refresh()\n {\n boolean shouldRefresh = notifySelecting(button_2);\n assertFalse(shouldRefresh);\n }\n }",
"public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}",
"@Override\r\n public void updateUI() {\r\n }",
"public void update(){\n\t\tthis.setVisible(true);\n\t}",
"@Override\n\tpublic void onTabChange() {\n\t}",
"@Override\n\tpublic void processUpdate(ITabActivity act) {\n\t\t\n\t}",
"public void update() {\n\t\tremoveAll();\n\t\tdrawGraph();\n\t\tplotEntries();\n\t}",
"@ThreadConfined(type = ThreadConfined.ThreadType.AWT)\n private void resetTabsStatus() {\n for (Component comp : jTabbedPane1.getComponents()) {\n if (comp instanceof DomainArtifactsTabPanel) {\n ((DomainArtifactsTabPanel) comp).setStatus(DomainArtifactsTabPanel.ArtifactRetrievalStatus.UNPOPULATED);\n } else if (comp instanceof MiniTimelinePanel) {\n ((MiniTimelinePanel) comp).setStatus(DomainArtifactsTabPanel.ArtifactRetrievalStatus.UNPOPULATED, domain);\n }\n }\n }",
"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 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 }",
"public void updateDisplay() {\n imageCutLevels.updateDisplay();\n }",
"public void updateGraphicsCaptions() {\r\n\t\tif (this.graphicsTabItem != null) this.graphicsTabItem.updateCaptions();\r\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 SalesSystemUI(SalesDomainController domainController) {\n this.domainController = domainController;\n this.model = new SalesSystemModel(domainController);\n \n // Create singleton instances of the tab classes\n historyTab = new HistoryTab(model);\n stockTab = new StockTab(model);\n purchaseTab = new PurchaseTab(domainController, model);\n \n setTitle(\"Sales system\");\n \n // set L&F to the nice Windows style\n try {\n UIManager.setLookAndFeel(new WindowsLookAndFeel());\n \n } catch (UnsupportedLookAndFeelException e1) {\n log.warn(e1.getMessage());\n }\n \n drawWidgets();\n \n // size & location\n int width = 600;\n int height = 400;\n setSize(width, height);\n Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();\n setLocation((screen.width - width) / 2, (screen.height - height) / 2);\n \n addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }\n });\n }",
"public void updateMenus() {\n\t\tSystem.out.println(\"BarGraphDisplayer.updateMenus\");\n\t\tCommandRegistrar.gRegistrar.checkAction(\"barGraph\");\n\t\tCommandRegistrar.gRegistrar.enableAction(\"viewOptions\");\n\t}",
"public void updateUI(final Color foreground) {\n\t\tsetUI(new BasicTabbedPaneUI() {\n\t\t\t@Override\n\t\t\tprotected boolean shouldRotateTabRuns(int i) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void installDefaults() {\n\t\t\t\tsuper.installDefaults();\n\t\t\t\thighlight = foreground;\n\t\t\t\tlightHighlight = foreground;\n\t\t\t\tshadow = foreground;\n\t\t\t\tdarkShadow = foreground;\n\t\t\t\tfocus = foreground;\n\n\t\t\t\t// Nice 3 pixel border, although it uses ugly blue ):\n\t\t\t\tthis.contentBorderInsets.top = 3;\n\t\t\t\tthis.contentBorderInsets.left = 3;\n\t\t\t\tthis.contentBorderInsets.right = 3;\n\t\t\t\tthis.contentBorderInsets.bottom = 3;\n\t\t\t\t\n\t\t\t\tthis.selectedTabPadInsets.bottom = 0;\n\t\t\t}\n\n\t\t\tBasicStroke underLineStroke = new BasicStroke(2);\n\n\t\t\t@Override\n\t\t\tprotected void paintTabBorder(Graphics g, int tabPlacement, int tabIndex, int x, int y, int w, int h,\n\t\t\t\t\tboolean isSelected) {\n\t\t\t\tsuper.paintTabBorder(g, tabPlacement, tabIndex, x, y, w, h, isSelected);\n\t\t\t\t\n\t\t\t\tif (isSelected) {\n\t\t\t\t\tGraphics2D g2d = (Graphics2D) g.create();\n\t\t\t\t\tsuper.paintTabBorder(g2d, tabPlacement, tabIndex, x, y, w, h, isSelected);\n\t\t\t\t\tg2d.setStroke(underLineStroke);\n\t\t\t\t\tg2d.drawLine(x + 1, y + h - 1, x + w - 1, y + h - 1);\n\t\t\t\t\tg2d.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}",
"static void setCurrentSettingTab(int currentIdx) {\n currentSettingTab = currentIdx;\n }",
"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 void onModuleLoad() {\n\t\tTabLayoutPanel tabPanel = new TabLayoutPanel(2.5, Unit.EM);\n\t\tFlexTable ft3 = new FlexTable();\n\t\tFlexCellFormatter cf3 = ft3.getFlexCellFormatter();\n\t\tDecoratorPanel dp3 = new DecoratorPanel();\n\t\tHorizontalPanel hp = new HorizontalPanel();\n\t\tButton plusButton = new Button(\"+\");\n\t\tButton minusButton = new Button(\"-\");\n\t\tButton devideButton = new Button(\"/\");\n\t\tButton multiplyButton = new Button(\"*\");\n\t\thp.add(plusButton);\n\t\thp.add(minusButton);\n\t\thp.add(devideButton);\n\t\thp.add(multiplyButton);\n\t\tfinal TextBox l1 = new TextBox();\n\t\tfinal TextBox l2 = new TextBox();\n\t\tfinal Label wynik = new Label();\n\t\tft3.setHTML(0,0,\"Podaj pierwsza liczbe:\");\n\t\tft3.setWidget(0,1, l1);\n\t\tft3.setHTML(1,0, \"Podaj druga liczbe:\");\n\t\tft3.setWidget(1,1,l2);\n\t\tft3.setHTML(2,0, \"Wybierz operacje:\");\n\t\tft3.setWidget(2, 1, hp);\n\t\tft3.setHTML(3,0, \"Wynik\");\n\t\tft3.setWidget(3,1, wynik);\n\t\tdp3.add(ft3);\n\t\t//RootPanel.get(\"mainContainer\").add(hp);\n\t\t//pan1.add(hp);\n\t\ttabPanel.add(dp3, new HTML(\"Prosty kalkulator\"));\n\t\tfinal TextBox t1 = new TextBox();\n\t\tfinal ListBox list = new ListBox();\n\t\tlist.addItem(\"2\");\n\t\tlist.addItem(\"4\");\n\t\tlist.addItem(\"8\");\n\t\tlist.addItem(\"16\");\n\t\tfinal Label wynik10 = new Label();\n\t\tFlexTable ft = new FlexTable();\n\t\tButton przeliczButton = new Button(\"Przelicz\");\n\t\tft.setHTML(0, 0, \"Podaj liczbe w systemie 10:\");\n\t\tft.setWidget(0, 1, t1);\n\t\tft.setHTML(1, 0, \"Podaj docelowy system liczbowy:\");\n\t\tft.setWidget(1, 1, list);\n\t\tft.setHTML(2, 0, \"Wynik:\");\n\t\tft.setWidget(2, 1, wynik10);\n\t\tft.setWidget(3, 0, przeliczButton);\n\t\tFlexCellFormatter cf = ft.getFlexCellFormatter();\n\t\tDecoratorPanel dp = new DecoratorPanel();\n\t\tcf.setColSpan(3,0,2);\n\t\tcf.setHorizontalAlignment(3,0,HasHorizontalAlignment.ALIGN_CENTER);\n\t\tdp.setWidget(ft);\n\t\ttabPanel.add(dp, new HTML(\"Przeliczanie z 10 na inne\"));\n\t\tFlexTable ft2 = new FlexTable();\n\t\tFlexCellFormatter cf2 = ft2.getFlexCellFormatter();\n\t\tDecoratorPanel dp2 = new DecoratorPanel();\n\t\tfinal TextBox t2 = new TextBox();\n\t\tfinal ListBox list2 = new ListBox();\n\t\tlist2.addItem(\"2\");\n\t\tlist2.addItem(\"4\");\n\t\tlist2.addItem(\"8\");\n\t\tlist2.addItem(\"16\");\n\t\tButton przelicztoButton = new Button(\"Przelicz\");\n\t\tfinal Label wynik20 = new Label();\n\t\tft2.setHTML(0, 0, \"Podaj system w jakim zapisana jest liczba:\");\n\t\tft2.setWidget(0, 1, list2);\n\t\tft2.setHTML(1, 0, \"Podaj liczbe:\");\n\t\tft2.setWidget(1, 1, t2);\n\t\tft2.setHTML(2, 0, \"Wynik:\");\n\t\tft2.setWidget(2, 1, wynik20);\n\t\tft2.setWidget(3, 0, przelicztoButton);\n\t\tcf2.setColSpan(3,0,2);\n\t\tcf2.setHorizontalAlignment(3,0,HasHorizontalAlignment.ALIGN_CENTER);\n\t\tdp2.setWidget(ft2);\n\t\t//RootPanel.get(\"mainContainer\").add(tabPanel);\n\t\ttabPanel.add(dp2, new HTML(\"Przeliczanie do systemu 10\"));\n\t\tRootLayoutPanel.get().add(tabPanel);\n\t\tprzelicztoButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.przeliczto10(t2.getText(), Integer.parseInt(list.getItemText(list.getSelectedIndex())), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik20.setText(\" \" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprzeliczButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.przelicz10(Integer.parseInt(t1.getText()), Integer.parseInt(list.getItemText(list.getSelectedIndex())), new AsyncCallback<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\twynik10.setText(\" \" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tplusButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.dodaj(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tminusButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.odejmij(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tdevideButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.dziel(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Double>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Double result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmultiplyButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.mnoz(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Double>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Double result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"public void iniciaGUISesion() {\n\t\ttabbed.removeTabAt(1);\n\t\ttabbed.removeTabAt(1);\n\t\ttabbed.insertTab(\"Evolución bolsa\", null, getPanelControl(), \"Control de los usuarios\", 1);\n\t\ttabbed.insertTab(\"Eventos\", null, getPanelEventos(), \"Control de los eventos\", 2);\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 }",
"public static void handleTabs() {\n ArrayList<String> allTabs = new ArrayList<String>(driver.getWindowHandles());\n // There will always be 2 tabs.\n driver.switchTo().window(allTabs.get(1));\n driver.close();\n driver.switchTo().window(allTabs.get(0));\n }"
] | [
"0.74738693",
"0.6629211",
"0.6620609",
"0.64234465",
"0.6369335",
"0.63432133",
"0.6291333",
"0.6258903",
"0.61900747",
"0.61768526",
"0.61672807",
"0.6163168",
"0.6091528",
"0.60662943",
"0.60645956",
"0.6058313",
"0.6038355",
"0.60297567",
"0.6024504",
"0.6004876",
"0.5939399",
"0.5912616",
"0.5906716",
"0.5905881",
"0.59054404",
"0.58878183",
"0.5878969",
"0.5863264",
"0.5851981",
"0.5823905",
"0.5823557",
"0.5802015",
"0.579235",
"0.57748413",
"0.57567036",
"0.57565475",
"0.57420933",
"0.57403564",
"0.57326657",
"0.5728915",
"0.57260245",
"0.5723347",
"0.57210046",
"0.57158554",
"0.5705055",
"0.57047486",
"0.5703369",
"0.5700959",
"0.5694687",
"0.5692607",
"0.5685662",
"0.5676564",
"0.5650101",
"0.5646335",
"0.5645999",
"0.5643343",
"0.5633813",
"0.56334877",
"0.5631716",
"0.5631375",
"0.5630878",
"0.5617656",
"0.56135833",
"0.5602924",
"0.56020796",
"0.5594933",
"0.55938965",
"0.55838656",
"0.55831444",
"0.55726075",
"0.55706584",
"0.5568009",
"0.55595475",
"0.55562645",
"0.55497384",
"0.5549318",
"0.55476636",
"0.55464077",
"0.554623",
"0.554217",
"0.55384576",
"0.55292916",
"0.5527146",
"0.5524072",
"0.55127263",
"0.5512626",
"0.55043215",
"0.5501477",
"0.5492972",
"0.5492319",
"0.5492246",
"0.5491658",
"0.54915154",
"0.5489977",
"0.54839",
"0.5474243",
"0.5461177",
"0.5458554",
"0.5454879",
"0.54519725"
] | 0.6905175 | 1 |
Set the log to use | public void setLog(Logger log) {
if (log instanceof JComponent) {
if (m_log != null) {
remove((JComponent)m_log);
}
m_log = log;
add((JComponent)m_log, BorderLayout.SOUTH);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLog (Logger log) {\n this.log = log;\n }",
"public void setLOG(Logger newLog)\r\n\t{\r\n\t\tlog = newLog;\r\n\t}",
"void setLogFile(File log);",
"public void setLog(Log log) {\r\n this.delegate.setLog(log);\r\n }",
"public void setLog(String logName) {\r\n this.delegate.setLog(logName);\r\n }",
"public void setLog(boolean log)\n {\n this.log = log;\n }",
"public void log(boolean log) {\n this.log = log;\n }",
"public void setLog(Logger newLog) {\r\n\t\tm_Log = newLog;\r\n\t}",
"public void setLog(boolean log) {\n this.log = log;\n }",
"public static void setLog(Log log) {\n DatasourceProxy.log = log;\n }",
"public void setLogFile(String logFile) {\n agentConfig.setLogFile(logFile);\n logConfigChanged();\n }",
"public static void setLogTarget(final String logTarget)\n {\n BaseBoot.getConfiguration().setConfigProperty (LOGTARGET, logTarget);\n }",
"public void configLog()\n\t{\n\t\tlogConfigurator.setFileName(Environment.getExternalStorageDirectory() + File.separator + dataFileName);\n\t\t// Set the root log level\n\t\t//writerConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\t///writerConfigurator.setMaxFileSize(1024 * 1024 * 500);\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 1024);\n\t\t// Set log level of a specific logger\n\t\t//writerConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setImmediateFlush(true);\n\t\t//writerConfigurator.configure();\n\t\tlogConfigurator.configure();\n\n\t\t//gLogger = Logger.getLogger(this.getClass());\n\t\t//gWriter = \n\t\tgLogger = Logger.getLogger(\"vdian\");\n\t}",
"public void setLogObject(Log logObject_) {\n\t\tlogObject = logObject_;\n\t\tlog( \"deviceId \" + deviceId, Log.Level.Information );\n\t\tlog( \"location \" + location, Log.Level.Information );\n\t}",
"public void setLogFile(String logFile)\r\n\t{\r\n\t\tm_logFile = logFile;\r\n\t}",
"public void setLog(LogService log) {\n\tthis.log = log;\n }",
"public void setLogging(boolean logging);",
"public void set_log_options(LogOptions opt) {\r\n set_log_level(opt.get_log_level());\r\n set_log_stream(opt.get_log_stream());\r\n }",
"public void setLogFile(String logFile) {\n this.logFile = logFile;\n }",
"private void initLogConfig() {\n\t\t logConfigurator = new LogConfigurator();\n\t\t// Setting append log coudn't cover by a new log.\n\t\tlogConfigurator.setUseFileAppender(true);\n\t\t// Define a file path for output log.\n\t\tString filename = StorageUtils.getLogFile();\n\t\tLog.i(\"info\", filename);\n\t\t// Setting log output\n\t\tlogConfigurator.setFileName(filename);\n\t\t// Setting log's level\n\t\tlogConfigurator.setRootLevel(Level.DEBUG);\n\t\tlogConfigurator.setLevel(\"org.apache\", Level.ERROR);\n\t\tlogConfigurator.setFilePattern(\"%d %-5p [%c{2}]-[%L] %m%n\");\n\t\tlogConfigurator.setMaxFileSize(1024 * 1024 * 5);\n\t\t// Set up to use the cache first and then output to a file for a period\n\t\t// of time\n\t\tlogConfigurator.setImmediateFlush(false);\n\t\tlogConfigurator.setUseLogCatAppender(true);\n\t\t// logConfigurator.setResetConfiguration(true);\n\t\tlogConfigurator.configure();\n\t}",
"public void setLogUtilities(LogUtilities log) { this.log = log; }",
"public void setLogFile(String filename) throws IOException {\n\t\tlogger.setLogfilePrefix(filename);\n\t}",
"public void setLogfile( String logfilename )\n {\n // guard\n {\n if( this.isopen() )\n {\n log.warn( \"Changing logfilename while logfile has already been opened.\" );\n }\n }\n\n this.logfilename = logfilename;\n }",
"public void setupLogging() {\n\t\ttry {\n\t\t\t_logger = Logger.getLogger(QoSModel.class);\n\t\t\tSimpleLayout layout = new SimpleLayout();\n\t\t\t_appender = new FileAppender(layout,_logFileName+\".txt\",false);\n\t\t\t_logger.addAppender(_appender);\n\t\t\t_logger.setLevel(Level.ALL);\n\t\t\tSystem.setOut(createLoggingProxy(System.out));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void setLogging(boolean logging){\n this.logging=logging;\n }",
"@Override\n public void setLogTracer(LogTracer log) {\n\n }",
"public void setLog(XLog log) {\n\n\t}",
"public void setLogFormat(String logFormat) {\n this.logFormat = logFormat;\n }",
"public void setLogService(LogService logService) {\r\n this.logService = logService;\r\n }",
"public static void setLogNode(LogNode node) {\n mLogNode = node;\n }",
"private static void defineLogger() {\n HTMLLayout layout = new HTMLLayout();\n DailyRollingFileAppender appender = null;\n try {\n appender = new DailyRollingFileAppender(layout, \"/Server_Log/log\", \"yyyy-MM-dd\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n logger.addAppender(appender);\n logger.setLevel(Level.DEBUG);\n }",
"void initializeLogging();",
"public void setLogger(Logger logger)\n {\n this.logger = logger;\n }",
"public void setLogWriter(java.io.PrintWriter pwLogWriter) {\n SecurityManager sec = System.getSecurityManager();\n if (sec != null) {\n sec.checkPermission(new SQLPermission(\"setLog\"));\n }\n \n\tif (tracer == null) {\n tracer = new JdbcOdbcTracer();\n }\n\ttracer.setWriter(pwLogWriter);\n }",
"void setLoggerConfigFileName(String fileName);",
"public void setLog(String log)\r\n\t{\r\n\t\tcombatLog = log;\r\n\t}",
"final public static void setLogDestination(LogDestination logDestination) {\n\t\tlogger.setLogDestinationImpl(logDestination);\n\t}",
"private void setupLogging() {\n\t\t// Ensure all JDK log messages are deferred until a target is registered\n\t\tLogger rootLogger = Logger.getLogger(\"\");\n\t\tHandlerUtils.wrapWithDeferredLogHandler(rootLogger, Level.SEVERE);\n\n\t\t// Set a suitable priority level on Spring Framework log messages\n\t\tLogger sfwLogger = Logger.getLogger(\"org.springframework\");\n\t\tsfwLogger.setLevel(Level.WARNING);\n\n\t\t// Set a suitable priority level on Roo log messages\n\t\t// (see ROO-539 and HandlerUtils.getLogger(Class))\n\t\tLogger rooLogger = Logger.getLogger(\"org.springframework.shell\");\n\t\trooLogger.setLevel(Level.FINE);\n\t}",
"public void setLogTime(boolean logTime) {\n this.logTime = logTime;\n }",
"public void setLogger(@Nullable final LogSession session) {\n\t\tthis.mLogSession = session;\n\t}",
"public static void set(ServerLoggingConfiguration config) {\r\n LogImplServer.config = config;\r\n }",
"public void set_log_stream(Writer strm) {\r\n stream = strm;\r\n }",
"public void setLogger(Logger logger) {\n this.logger = logger;\n }",
"public void setLogtime(Date logtime)\r\n {\r\n this.logtime = logtime;\r\n }",
"@Override\n\tpublic void setLogFileName(String logFileName) {\n\t\tmodel.setLogFileName(logFileName);\n\t}",
"public void configLogger() {\n Logger.addLogAdapter(new AndroidLogAdapter());\n }",
"public void setLogging(boolean logging) {\n\t\tthis.isLogging = logging;\n\t}",
"private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }",
"public static void setLogStream(PrintStream log) {\n out = log;\n }",
"public void enableLogging();",
"public void enableSDKLog() {\r\n\t\tString path = null;\r\n\t\tpath = Environment.getExternalStorageDirectory().toString() + \"/IcatchWifiCamera_SDK_Log\";\r\n\t\tEnvironment.getExternalStorageDirectory();\r\n\t\tICatchWificamLog.getInstance().setFileLogPath(path);\r\n\t\tLog.d(\"AppStart\", \"path: \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tFile file = new File(path);\r\n\t\t\tif (!file.exists()) {\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t}\r\n\t\t}\r\n\t\tICatchWificamLog.getInstance().setSystemLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setFileLogOutput(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setPtpLog(true);\r\n\t\tICatchWificamLog.getInstance().setRtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t\tICatchWificamLog.getInstance().setPtpLogLevel(ICatchLogLevel.ICH_LOG_LEVEL_INFO);\r\n\t}",
"protected void initLogger() {\n initLogger(\"DEBUG\");\n }",
"private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}",
"public void setLoggingToFile(boolean loggingToFile) {\n loggingToFileChecked = true;\n this.loggingToFile = loggingToFile;\n }",
"@Inject\n private void setLogger(Logger log) {\n logger = log;\n }",
"protected void setLogLevel(int logLevel) \n\t{\n\t\tthis.logLevel = logLevel;\n\t}",
"public static void setVTKLogFile(String fileName)\n { \n vtkFileOutputWindow output = new vtkFileOutputWindow();\n output.SetFileName(fileName);\n new vtkOutputWindow().SetInstance(output);\n }",
"private void configureLogging() throws FileNotFoundException, IOException {\n\t\tConfigurationSource source = new ConfigurationSource(new FileInputStream(CONFIG_LOG_LOCATION));\r\n\t\tConfigurator.initialize(null, source);\r\n\t\tlog = LogManager.getLogger(SekaiClient.class);\r\n\t}",
"public void setLogStream(OutputStream stream) {\n\t\tcloseLogHandler();\n\t\tlogHandler = new StreamHandler(stream, L2pLogger.getGlobalConsoleFormatter());\n\t\tlogHandler.setLevel(Level.ALL);\n\t\tlogger.addHandler(logHandler);\n\t}",
"public final void setLogger(final Logger logger) {\r\n this.logger = logger;\r\n }",
"private static void setupLogger() {\n\t\tLogManager.getLogManager().reset();\n\t\t// set the level of logging.\n\t\tlogger.setLevel(Level.ALL);\n\t\t// Create a new Handler for console.\n\t\tConsoleHandler consHandler = new ConsoleHandler();\n\t\tconsHandler.setLevel(Level.SEVERE);\n\t\tlogger.addHandler(consHandler);\n\n\t\ttry {\n\t\t\t// Create a new Handler for file.\n\t\t\tFileHandler fHandler = new FileHandler(\"HQlogger.log\");\n\t\t\tfHandler.setFormatter(new SimpleFormatter());\n\t\t\t// set level of logging\n\t\t\tfHandler.setLevel(Level.FINEST);\n\t\t\tlogger.addHandler(fHandler);\n\t\t}catch(IOException e) {\n\t\t\tlogger.log(Level.SEVERE, \"File logger not working! \", e);\n\t\t}\n\t}",
"public void setLog(Log log) throws SQLException {\n this.log = log;\n\n commentField.setText(log.getComment());\n timeField.setText(String.valueOf(log.getTime()));\n }",
"public void setClLog(String clLog) {\r\n this.clLog = clLog;\r\n }",
"public static void setLevel(int level){\n\tlogLevel = level;\n }",
"public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"public void setDataLogging (boolean dataLogging) {\n this.dataLogging = dataLogging;\n }",
"private Logger configureLogging() {\r\n\t Logger rootLogger = Logger.getLogger(\"\");\r\n\t rootLogger.setLevel(Level.FINEST);\r\n\r\n\t // By default there is one handler: the console\r\n\t Handler[] defaultHandlers = Logger.getLogger(\"\").getHandlers();\r\n\t defaultHandlers[0].setLevel(Level.CONFIG);\r\n\r\n\t // Add our logger\r\n\t Logger ourLogger = Logger.getLogger(serviceLocator.getAPP_NAME());\r\n\t ourLogger.setLevel(Level.FINEST);\r\n\t \r\n\t // Add a file handler, putting the rotating files in the tmp directory \r\n\t // \"%u\" a unique number to resolve conflicts, \"%g\" the generation number to distinguish rotated logs \r\n\t try {\r\n\t Handler logHandler = new FileHandler(\"/%h\"+serviceLocator.getAPP_NAME() + \"_%u\" + \"_%g\" + \".log\",\r\n\t 1000000, 3);\r\n\t logHandler.setLevel(Level.FINEST);\r\n\t ourLogger.addHandler(logHandler);\r\n\t logHandler.setFormatter(new Formatter() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String format(LogRecord record) {\r\n\t\t\t\t\t\tString result=\"\";\r\n\t\t\t\t\t\tif(record.getLevel().intValue() >= Level.WARNING.intValue()){\r\n\t\t\t\t\t\t\tresult += \"ATTENTION!: \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd-MMM-yyyy HH:mm:ss\");\r\n\t\t\t\t\t\tDate d = new Date(record.getMillis());\r\n\t\t\t\t\t\tresult += df.format(d)+\" \";\r\n\t\t\t\t\t\tresult += \"[\"+record.getLevel()+\"] \";\r\n\t\t\t\t\t\tresult += this.formatMessage(record);\r\n\t\t\t\t\t\tresult += \"\\r\\n\";\r\n\t\t\t\t\t\treturn result;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t } catch (Exception e) { // If we are unable to create log files\r\n\t throw new RuntimeException(\"Unable to initialize log files: \"\r\n\t + e.toString());\r\n\t }\r\n\r\n\t return ourLogger;\r\n\t }",
"public void customLogger() {\n KOOM.getInstance().setLogger(new KLog.KLogger() {\n @Override\n public void i(String TAG, String msg) {\n //get the log of info level\n }\n\n @Override\n public void d(String TAG, String msg) {\n //get the log of debug level\n }\n\n @Override\n public void e(String TAG, String msg) {\n //get the log of error level\n }\n });\n }",
"public void setLogLevel(Level logLevel) {\n\t\tthis.logLevel = logLevel;\n\t}",
"public void setLogDiskSpaceLimit(int logDiskSpaceLimit) {\n agentConfig.setLogDiskSpaceLimit(logDiskSpaceLimit);\n logConfigChanged();\n }",
"public void enableLogging(Logger logger) {\n m_logger = logger;\n }",
"void setupFileLogging();",
"public void setLogFileSizeLimit(int logFileSizeLimit) {\n agentConfig.setLogFileSizeLimit(logFileSizeLimit);\n logConfigChanged();\n }",
"abstract void initiateLog();",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"public void setLogEvents(boolean logEvents) {\n mLogEvents = logEvents;\n }",
"public void enableLogging( final Logger logger )\n {\n m_logger = logger;\n }",
"@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file delete is not important here.\")\n private void initLogWriter() throws org.apache.geode.admin.AdminException {\n loggingSession.createSession(this);\n\n final LogConfig logConfig = agentConfig.createLogConfig();\n\n // LOG: create logWriterAppender here\n loggingSession.startSession();\n\n // LOG: look in AgentConfigImpl for existing LogWriter to use\n InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();\n if (existingLogWriter != null) {\n logWriter = existingLogWriter;\n } else {\n // LOG: create LogWriterLogger\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n // Set this log writer in AgentConfigImpl\n agentConfig.setInternalLogWriter(logWriter);\n }\n\n // LOG: create logWriter here\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n\n // Set this log writer in AgentConfig\n agentConfig.setInternalLogWriter(logWriter);\n\n // LOG:CONFIG: changed next three statements from config to info\n logger.info(LogMarker.CONFIG_MARKER,\n String.format(\"Agent config property file name: %s\",\n AgentConfigImpl.retrievePropertyFile()));\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());\n }",
"public void setAlgorithmLogger(LoggingHandler logger) {\n\t\talgorithm.setLogger(logger);\n\t}",
"public static void setJXTALogger(JXTA_LOG_LEVEL logLevel) {\n\t\tswitch (logLevel) {\n\t\tcase FINEST:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.FINEST.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.FINEST.name());\n\t\t\tbreak;\n\t\tcase FINER:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.FINER.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.FINER.name());\n\t\t\tbreak;\n\t\tcase FINE:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.FINE.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.FINE.name());\n\t\t\tbreak;\n\t\tcase INFO:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.INFO.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.INFO.name());\n\t\t\tbreak;\n\t\tcase WARNING:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.WARNING.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.WARNING.name());\n\t\t\tbreak;\n\t\tcase SEVERE:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.SEVERE.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.SEVERE.name());\n\t\t\tbreak;\n\t\tcase OFF:\n\t\t\tremoveJavaStdLoggerHandlers();\n\t\t\tSystem.setProperty(\"net.jxta.logging.Logging\",\n\t\t\t\t\tJXTA_LOG_LEVEL.OFF.name());\n\t\t\tSystem.setProperty(\"net.jxta.level\", JXTA_LOG_LEVEL.OFF.name());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public void setPoolLog(String poolLog) { this.poolLog = poolLog; }",
"public void setLogLevel(int logLevel) {\n\t\tif(logLevel > 5 || logLevel < 0) \n\t\t\tthrow new IllegalArgumentException(\"invalid parameter logLevel, please use Logger's static level constant.\");\n\t\tmLogLevel = logLevel;\n\t}",
"public void setLogGroup(String value)\n {\n logGroup = value;\n }",
"private static LogView setLogView(final String[] astrArgs) {\n final LogView logView = new LogView();\n Args args;\n\n try {\n args = ArgDef.ARGDEF_LOGGING_LEVEL.get(astrArgs);\n if (args == null && DEFAULT_LOG_LEVEL != null) {\n args = ArgDef.ARGDEF_LOGGING_LEVEL.get(new String[] {\n '-' + ArgDef.ARGDEF_LOGGING_LEVEL.getKey(),\n DEFAULT_LOG_LEVEL });\n }\n } catch (Exception me) {\n args = null;\n } // end try\n Verbose.set(args, astrArgs, logView);\n\n return logView;\n }",
"public void setLogLevel(int level) {\n logLevel = level;\n }",
"public static void configureLog(final String logfile) {\n\t\tLoggerContext context = (LoggerContext) LoggerFactory\n\t\t\t\t.getILoggerFactory();\n\n\t\ttry {\n\t\t\tJoranConfigurator configurator = new JoranConfigurator();\n\t\t\tconfigurator.setContext(context);\n\t\t\t// Call context.reset() to clear any previous configuration, e.g.\n\t\t\t// default\n\t\t\t// configuration. For multi-step configuration, omit calling\n\t\t\t// context.reset().\n\t\t\tcontext.reset();\n\t\t\tconfigurator.doConfigure(logfile);\n\t\t} catch (JoranException je) {\n\t\t\tStatusPrinter.printInCaseOfErrorsOrWarnings(context);\n\t\t}\n\t}",
"@Override\n public void log()\n {\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"public void setLoggerLevel(TraceLevel level) {\n\t\t//Topology.STREAMS_LOGGER.setLevel(level);\t\t\n\t\t//Topology.TOPOLOGY_LOGGER.setLevel(level); \n\t\tgetConfig().put(ContextProperties.TRACING_LEVEL, java.util.logging.Level.FINE);\t\t\n\t\tSystem.out.println(\"Streams topology logger level: \" + Topology.TOPOLOGY_LOGGER.getLevel());\n\t\t\n\t}",
"public void setLogLevel(String logLevel) {\n agentConfig.setLogLevel(logLevel);\n logConfigChanged();\n }",
"@Reference\n public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"@Reference\n public void setLoggingService(final LoggingService logging)\n {\n m_Logging = logging;\n }",
"@Override\n public int getLogMode() {\n return QRomLogBaseConfig.LOG_BOTH;\n }",
"public void setLogStr(String logStr) {\n\t\tthis.logStr = logStr;\n\t}",
"@Override\n\tpublic void setLogServer(emLogServerSettings logServer) throws emException,\n\t\t\tTException {\n\n\t}",
"public void setLogFilesUrls() {\n String s = \"\";\n s = s + makeLink(\"NODE-\" + getNodeName() + \"-out.log\");\n s = s + \"<br>\" + makeLink(\"NODE-\" + getNodeName() + \"-err.log\");\n s = s + \"<br>\" + makeLink(\"log-\" + getNodeName() + \".html\");\n logFilesUrls = s;\n }",
"private void configureLogging() throws FileNotFoundException, IOException {\r\n\t\t// Set configuration file for log4j2\r\n\t\tConfigurationSource source = new ConfigurationSource(new FileInputStream(CONFIG_LOG_LOCATION));\r\n\t\tConfigurator.initialize(null, source);\r\n\t\tlog = LogManager.getLogger(SBIWebServer.class);\r\n\t}",
"public void fulshLog() {\n\t\tif (logConfigurator!=null) {\n\t\t\tlogConfigurator.setImmediateFlush(true);\n\t\t\tlogConfigurator.setImmediateFlush(false);\n\t\t\tlogConfigurator.configure();\n\t\t}\n\t}",
"public void setLogModel(LogModel[] param) {\n validateLogModel(param);\n\n localLogModelTracker = true;\n\n this.localLogModel = param;\n }",
"private void repetitiveWork(){\n\t PropertyConfigurator.configure(\"log4j.properties\");\n\t log = Logger.getLogger(BackupRestore.class.getName());\n }"
] | [
"0.775041",
"0.749579",
"0.7459221",
"0.7406854",
"0.7387114",
"0.7208518",
"0.720592",
"0.7179701",
"0.71588403",
"0.71109796",
"0.70941985",
"0.7052414",
"0.7037837",
"0.6976175",
"0.6966206",
"0.6894244",
"0.6852857",
"0.685144",
"0.6821555",
"0.67647326",
"0.669783",
"0.66850245",
"0.6666239",
"0.6644507",
"0.6644007",
"0.6632385",
"0.65857846",
"0.65371794",
"0.6487621",
"0.6472709",
"0.64689493",
"0.6445114",
"0.6435588",
"0.64188516",
"0.64159745",
"0.64017576",
"0.63864744",
"0.63860327",
"0.6375992",
"0.637241",
"0.636592",
"0.6363576",
"0.63632435",
"0.6356173",
"0.6321286",
"0.63152146",
"0.6308343",
"0.63065225",
"0.6291039",
"0.6271239",
"0.6249525",
"0.6235128",
"0.62323403",
"0.62237734",
"0.62213826",
"0.62013596",
"0.6195696",
"0.6189985",
"0.6185718",
"0.61728996",
"0.6161686",
"0.61597544",
"0.6156187",
"0.6150772",
"0.61426884",
"0.61371535",
"0.6133076",
"0.6123282",
"0.6120004",
"0.60993934",
"0.60916734",
"0.60890436",
"0.6088135",
"0.6071876",
"0.60652864",
"0.6058745",
"0.605361",
"0.60494965",
"0.60483956",
"0.6046325",
"0.6043461",
"0.60381025",
"0.60353917",
"0.6028614",
"0.60239494",
"0.6020479",
"0.6020292",
"0.6016402",
"0.6006557",
"0.59996617",
"0.5989362",
"0.5989362",
"0.59865314",
"0.5984053",
"0.59838396",
"0.59621096",
"0.5961297",
"0.5952362",
"0.594753",
"0.59224033"
] | 0.62977034 | 48 |
Set the training instances to use | public void setInstances(Instances insts) throws Exception {
// if this is the first set of instances seen then
// install a listener on the simple config target panel's
// table model so that we can enable/disable the start
// button
m_sortedCheck = false;
boolean first =
(m_simpleConfigPanel.m_targetPanel.getTableModel() == null);
m_instances = new Instances(insts);
m_simpleConfigPanel.setInstances(insts);
m_advancedConfigPanel.setInstances(insts);
if (first) {
TableModel model = m_simpleConfigPanel.m_targetPanel.getTableModel();
model.addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
int[] selected = m_simpleConfigPanel.m_targetPanel.getSelectedAttributes();
if (selected != null && selected.length > 0) {
m_startBut.setEnabled(true);
} else {
m_startBut.setEnabled(false);
}
m_advancedConfigPanel.updatePanel();
}
});
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void setDataset(final Instances instances) {\n\n\t}",
"public InstanceGenerator(Instances training, Instances testing)\n {\n mTraining = training;\n mTesting = testing;\n }",
"@Override\n\tpublic void setInstances(Instances insts) {\n\t\t\n\t}",
"public void train() {\r\n // For each epoch, call setInputValue on input nodes\r\n for (int i = 0; i < maxEpoch; i++) {\r\n Collections.shuffle(trainingSet, random);\r\n\r\n // get each training instance\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n\r\n Instance instance = trainingSet.get(k);\r\n\r\n // set the input value in the input nodes from the training instance\r\n for (int j = 0; j < instance.attributes.size(); j++) {\r\n inputNodes.get(j).setInput(instance.attributes.get(j));\r\n }\r\n\r\n //set the target value in output nodes\r\n for (int j = 0; j < instance.classValues.size(); j++) {\r\n outputNodes.get(j).setTargetValue((double) instance.classValues.get(j));\r\n }\r\n\r\n // calculate values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n // for each hidden node\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateOutput();\r\n }\r\n\r\n //calculate values for output nodes\r\n double sumOfExponents = 0.0;\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n // for each output node\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateOutput();\r\n sumOfExponents += outputNode.getOutput();\r\n }\r\n\r\n //update output values of output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateOutputValue(sumOfExponents);\r\n }\r\n\r\n // calculate delta values for output nodes\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.calculateDelta();\r\n }\r\n\r\n // calculate delta values for hidden nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.calculateDelta();\r\n hiddenNode.resetSumOfPartialDelta();\r\n }\r\n\r\n // update weights going from input layer to hidden layer\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n hiddenNode.updateWeight(learningRate);\r\n }\r\n\r\n // update weights going from hidden layer to output layer\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n outputNode.updateWeight(learningRate);\r\n }\r\n\r\n /*if (k == 0 && i==0) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n\r\n if (k == 0 && i == 0) {\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n Node hiddenNode = hiddenNodes.get(j);\r\n if (hiddenNode.parents != null) {\r\n for (NodeWeightPair pair : hiddenNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }\r\n }*/\r\n }\r\n\r\n /* if (i==29) {\r\n for (int j = 0; j < outputNodes.size(); j++) {\r\n Node outputNode = outputNodes.get(j);\r\n for (NodeWeightPair pair : outputNode.parents) {\r\n System.out.println(pair.weight);\r\n }\r\n }\r\n }*/\r\n\r\n double totalLoss = 0.0;\r\n // Calculate loss and sum for each training instance, and then take average\r\n for (int k = 0; k < trainingSet.size(); k++) {\r\n Instance instance = trainingSet.get(k);\r\n totalLoss += loss(instance);\r\n }\r\n totalLoss /= trainingSet.size();\r\n System.out.println(\"Epoch: \" + i + \", \" + \"Loss: \" + String.format(\"%.3e\", totalLoss));\r\n }\r\n }",
"public void setInstances(List<double[]> features) {\n\t\tthis.instances = features;\n\t}",
"@Override\n\tpublic void trainOnline(TLongList timestamps, Collection<Instance> instances) {\n\t\ttrainOnline(instances);\n\t}",
"public void addInstances (InstanceList training)\n\t{\n\t\tSystem.out.println(\"LabeledLDA Model : Adding training instances ..%\");\n\t\t//Data Alphabet\n\t\talphabet = training.getDataAlphabet();\n\t\tnumTypes = alphabet.size();\n\t\tbetaSum = beta * numTypes;\n\t\t\n\t\t// We have one topic for every possible label.\n\t\tlabelAlphabet = training.getTargetAlphabet();\n\t\tnumTopics = labelAlphabet.size();\n\t\toneDocTopicCounts = new int[numTopics];\n\t\ttokensPerTopic = new int[numTopics];\n\t\ttypeTopicCounts = new int[numTypes][numTopics];\n\n\t\t//topicAlphabet = AlphabetFactory.labelAlphabetOfSize(numTopics); //generate d0,d1 [3shan target string w hwa 3wzo label]\n topicAlphabet = new LabelAlphabet();\n\t\tfor (int i = 0; i < numTopics; i++) {\n\t\t\tString target = labelAlphabet.lookupObject(i).toString();\n topicAlphabet.lookupLabel(target);\n\t\t}\n //System.out.println(topicAlphabet);\n\n for (Instance instance : training)\n\t\t{\n\t\t\tFeatureSequence tokens = (FeatureSequence) instance.getData(); //read data featureSequence\n\t\t\tLabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n FeatureVector labels = (FeatureVector) instance.getTarget(); //read target featurevector\n\n\t\t\tint[] topics = topicSequence.getFeatures();\n\t\t\tfor (int position = 0; position < tokens.size(); position++)\n\t\t\t{\n\t\t\t\tint topic = labels.indexAtLocation(random.nextInt(labels.numLocations()));\n\t\t\t\ttopics[position] = topic;\n\t\t\t\ttokensPerTopic[topic]++;\n\t\t\t\tint type = tokens.getIndexAtPosition(position);\n\t\t\t\ttypeTopicCounts[type][topic]++;\n\t\t\t}\n\t\t\tTopicAssignment t = new TopicAssignment(instance, topicSequence);\n\t\t\tdata.add(t);\n\t\t}\n\t\t/*\n for (Instance instance : training)\n {\n FeatureSequence tokens = (FeatureSequence) instance.getData();\n LabelSequence topicSequence = new LabelSequence(topicAlphabet, new int[ tokens.size() ]);\n\n int[] topics = topicSequence.getFeatures();\n for (int position = 0; position < topics.length; position++) {\n int topic = random.nextInt(numTopics);\n topics[position] = topic;\n }\n TopicAssignment t = new TopicAssignment(instance, topicSequence);\n data.add(t);\n }\n\n buildInitialTypeTopicCounts();\n initializeHistograms();\n\t\t */\n\t\tSystem.out.println(\"Data loaded.\");\n\t}",
"public void train(){\n recoApp.training(idsToTest);\n }",
"public void setInstances(Instances inst) {\r\n\r\n\t\tm_Instances = inst;\r\n\r\n\t\tm_ignoreKeyModel.removeAllElements();\r\n\r\n\t\tString[] attribNames = new String[m_Instances.numAttributes()];\r\n\t\tfor (int i = 0; i < m_Instances.numAttributes(); i++) {\r\n\t\t\tString name = m_Instances.attribute(i).name();\r\n\t\t\tm_ignoreKeyModel.addElement(name);\r\n\r\n\t\t\tString type = \"\";\r\n\t\t\tswitch (m_Instances.attribute(i).type()) {\r\n\t\t\tcase Attribute.NOMINAL:\r\n\t\t\t\ttype = \"(Nom) \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.NUMERIC:\r\n\t\t\t\ttype = \"(Num) \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.STRING:\r\n\t\t\t\ttype = \"(Str) \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.DATE:\r\n\t\t\t\ttype = \"(Dat) \";\r\n\t\t\t\tbreak;\r\n\t\t\tcase Attribute.RELATIONAL:\r\n\t\t\t\ttype = \"(Rel) \";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\ttype = \"(???) \";\r\n\t\t\t}\r\n\t\t\tString attnm = m_Instances.attribute(i).name();\r\n\r\n\t\t\tattribNames[i] = type + attnm;\r\n\t\t}\r\n\r\n\t\tm_StartBut.setEnabled(m_RunThread == null);\r\n\t\tm_StopBut.setEnabled(m_RunThread != null);\r\n\t\tm_ignoreBut.setEnabled(true);\r\n\t\tm_ClassCombo.setModel(new DefaultComboBoxModel(attribNames));\r\n\t\tif (inst.classIndex() == -1)\r\n\t\t\tm_ClassCombo.setSelectedIndex(attribNames.length - 1);\r\n\t\telse\r\n\t\t\tm_ClassCombo.setSelectedIndex(inst.classIndex());\r\n\t\t//TODO KernelPanel\r\n\r\n\t}",
"public void train() {\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tif (ins.scorePmi_E1E2 > largestPMI)\n\t\t\t\tlargestPMI = ins.scorePmi_E1E2;\n\t\t}\n\t\tSystem.out.println(\"Largest PMI: \" + largestPMI);\n\n\t\tfor (Instance ins : arrTrainInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tfor (Instance ins : arrTestInstances) {\n\t\t\tins.scorePmi_E1E2 = ins.scorePmi_E1E2 / largestPMI;\n\t\t}\n\n\t\tint sizeD0 = arrD0.size();\n\t\tint sizeD1 = arrD1.size();\n\t\tint sizeD2 = arrD2.size();\n\t\tint sizeD3 = arrD3.size();\n\n\t\tint sizeMin = Math.min(sizeD0, Math.min(sizeD1, Math\n\t\t\t\t.min(sizeD2, sizeD3)));\n\t\tSystem.out.println(\"sizeMin=\" + sizeMin);\n\n\t\tint n = instanceNums.length;\n\n\t\tboolean flag = false;\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tint k = instanceNums[i];\n\n\t\t\tif (k > sizeMin) {\n\t\t\t\tk = sizeMin;\n\t\t\t\tinstanceNums[i] = k;\n\t\t\t\tflag = true;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"\\nk=\" + k);\n\n\t\t\tArrayList<Instance> arrSub0 = getInstances(arrD0, k);\n\t\t\tArrayList<Instance> arrSub1 = getInstances(arrD1, k);\n\t\t\tArrayList<Instance> arrSub2 = getInstances(arrD2, k);\n\t\t\tArrayList<Instance> arrSub3 = getInstances(arrD3, k);\n\n\t\t\tArrayList<Instance> arrTrains = new ArrayList<Instance>();\n\t\t\tarrTrains.addAll(arrSub0);\n\t\t\tarrTrains.addAll(arrSub1);\n\t\t\tarrTrains.addAll(arrSub2);\n\t\t\tarrTrains.addAll(arrSub3);\n\t\t\tCollections.shuffle(arrTrains);\n\n\t\t\tSystem.out.println(\"Training size: \" + arrTrains.size());\n\n\t\t\ttrain(arrTrains);\n\n\t\t\tdouble acc = test();\n\t\t\tacc = test();\n\n\t\t\taccuracies[i] = acc;\n\n\t\t\tcount++;\n\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tSystem.out.print(\" | \" + \"K=\" + instanceNums[i]);\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < count; i++) {\n\n\t\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\n\t\t\tString res = df.format(accuracies[i]);\n\t\t\tSystem.out.print(\" | \" + res);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void startTrainingMode() {\n\t\t\r\n\t}",
"public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}",
"public Instance selectTrainingInstance(int index) {\n\t\tInstance trainingInstance = new Instance(RF_trainingInstances.instance(index)); \n\n\t\t// Specify that the instance belong to the training set \n\t\t// in order to inherit from the set description \n\t\ttrainingInstance.setDataset(RF_trainingInstances);\n\t\t//System.out.println(\"-processing instance # \" + index + \" in training set: \" + trainingInstance.toString() );\n\n\t\treturn trainingInstance;\n\t}",
"private void trainNetwork(long iterations) {\n\t\ttrainer.startTraining(network, iterations);\r\n\r\n\t}",
"public void trainOnInstance(Instance inst) {\n\t\t\t\t\t\t\n\t\t\ttry{\t\t\t\t\n\t\t\t\tinstancesSeen++;\n\t\t\t\tupdateStats(inst);\n\t\t\t\t\n\t\t\t\tDoubleVector normaliezedExtendedInstance = PrepareExtendedFeatureVector(inst) ;\n\t\t\t\tdouble normaliezedTargetValue= NormalizeTarget(inst) ;\n\t\t\t\tResultSummary resultSummary = getMemberships (normaliezedExtendedInstance,normaliezedTargetValue) ;\n\t\t\t\t\n\t\t\t\tdouble error = resultSummary.getNormaliezedTargetValue() - resultSummary.getFinalPrediction() ;\n\t\t\t\tthis.CurModSSE += Math.pow(error, 2) ;\n\t\t\t\t\n\t\t\t\t// checking a possible drift\n//\t\t\t\tboolean drift =checkChangeDetection() ;\n//\t\t\t\tif (drift)\n//\t\t\t\t\tthis.countChangeDetected++ ;\n\t\t\t\tboolean drift = false ;\n\t\t\t\tif ((this.instancesSeen % graceperiod)==0){\n\t\t\t\t\tdrift =checkChangeDetection() ;\n\t\t\t\t\tif (drift){\n\t\t\t\t\t\tthis.countChangeDetected++ ;\n//\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\tSystem.out.println(\"########After a drift################\");\n\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n// \t\tVarianceRationREduction\n\t\t\t\tif (learningCriteriaOption.getChosenIndex()==1) {\n\t\t\t\t\t// checking a possible extension\n//\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\tif (!drift ) {\n\t\t\t\t\t\tboolean systemChanged = false ;\n\t\t\t\t\t\tVector <RuleVR> removeRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tVector <RuleVR> newRules= new Vector<RuleVR>() ;\n\t\t\t\t\t\tfor (FuzzyRule rule : rs){\n\t\t\t\t\t\t\tVector <RuleVR> expansions = ((RuleVR)rule).tryToExpand(confidence, tau) ;\n\t\t\t\t\t\t\tif (expansions != null) {\n\t\t\t\t\t\t\t\tsystemChanged = true ;\n\t\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\t\t\t\t\tif (expansions.get(0).getInitialMerit() > expansions.get(1).getInitialMerit()) {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(0)) ;\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\tnewRules.add(expansions.get(1)) ;\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (rule !=defaultRule)\n\t\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tremoveRules.add((RuleVR)rule) ;\n\t\t\t\t\t\t\t\t\tnewRules.addAll(expansions) ;\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\tif (systemChanged) {\n\t\t\t\t\t\t\trs.removeAll(removeRules) ;\n\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\tSystem.out.println(\"########################\");\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}//RMSEReduction\n\t\t\t\telse{\n\t\t\t\t\t// checking a possible extension\n\t\t\t\t\tif (this.instancesSeen > graceperiod && !drift ) {\n\t\t\t\t\t\tExtendedCandidateErrR bestExtension = this.checkValidExpansion();\n\t\t\t\t\t\tif ((bestExtension != null)) {\n\t\t\t\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()!=defaultRule)\n\t\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\tWe must choose the best candidate here!\n\t\t\t\t\t\t\t\tdouble [] SSESingleExtenstions = bestExtension.getMeanSSESingleExension() ;\n\t\t\t\t\t\t\t\tif (SSESingleExtenstions[0]<SSESingleExtenstions[1])\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(0)) ;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\trs.add(newRules.get(1)) ;\t\n\t\t\t\t\t\t\t\t\t\n\t\t//\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tif (bestExtension.getParentRule()==defaultRule)\n\t\t\t\t\t\t\t\t\tdefaultRule.buildExtendedCandidates(bestExtension.getAttributeIndex());\n\t\t\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tExtendedCandidateErrR cbestExtension = this.checkValidExpansion();\n\n\t\t\t\t\t\t\t\tVector<RuleErrR> newRules = bestExtension.CreateRuleFromExtension() ;\n\t\t\t\t\t\t\t\trs.remove(bestExtension.getParentRule()) ;\n\t\t\t\t\t\t\t\trs.addAll(newRules) ;\n\t\t\t\t\t\t\t\tthis.clearAllStats();\n\t\t\t\t\t\t\t\tthis.currentValidCandidates.clear() ;\n\t\t\t\t\t\t\t\tthis.currentNonReadyCandidates.clear() ;\n\t\t\t\t\t\t\t\tcurrentSystemVersion++ ;\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t\tSystem.out.println(this);\n\t\t\t\t\t\t\t\tSystem.out.println(\"########################\");\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\tif (chooseSingleRuleOption.isSet()) {\n\t\t\t\t\tdouble maxMembership = 0 ;\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t\tmaxMembership = Math.max(maxMembership, resultPair.getMembership()) ;\n\t\t\t\t\t}\n\t\t\t\t\tif (maxMembership < max_Membership_For_Choosing_Single_Rule)\n\t\t\t\t\t\tdefaultRule.trainOnInstance(resultSummary, resultSummary.getResultPairDefaultRule()) ;\n\t\t\t\t}else{\n\t\t\t\t\tfor (ResultSummary.ResultPair resultPair: resultSummary.getResultPairs()) {\n\t\t\t\t\t\tresultPair.getRule().trainOnInstance(resultSummary, resultPair);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch (Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}",
"public void train()\n\t{\n\t\tdbiterator = DBInstanceIterator.getInstance();\n System.out.println(\"Start Training ..\");\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Training Text %..\");\n\t\t\ttrainText();\n\n\t\t\tSystem.out.println(\"Training Complex %..\");\n\t\t\ttrainCombined();\n\n\t\t\tSystem.out.println(\"Training Feature %..\");\n\t\t\ttrainFeatures();\n\n\t\t\tSystem.out.println(\"Training Lexicon %..\");\n\t\t\t//trainLexicon();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"void setTrainData(DataModel trainData);",
"public ArrayList<Instance> getTrainInstances() {\n ArrayList<Instance> training = new ArrayList<>();\n training.addAll(instances.subList(0, targetsize));\n return training;\n }",
"public void train(SieveDocuments trainingInfo) {\r\n\t\t// no training\r\n\t}",
"public void setFollowingInstances(Set<FlowNodeInstance> followingInstances) {\n\t\tthis.followingInstances = followingInstances;\n\t}",
"public void setNumberOfInstances(int numberOfInstances) {\n\t\tthis.numberOfInstances = numberOfInstances;\n\t}",
"public void train(){\r\n\t\tdouble output = 0.0;\r\n\t\tList<Integer> teacher = null;\r\n\t\tdouble adjustedWeight = 0.0;\r\n\t\tdouble error = 0.0;\r\n\t\tdouble deltaK = 0.0;\r\n\r\n\t\tfor(int counter = 0; counter < maxEpoch; counter++){\r\n\t\t\tfor(Instance inst : trainingSet){\r\n\t\t\t\tcalculateOutputForInstance(inst);\r\n\t\t\t\tteacher = inst.classValues;\r\n\t\t\t\t//jk weight\r\n\t\t\t\tfor(int i = 0; i < outputNodes.size(); i++){\r\n\t\t\t\t\tNode kNode = outputNodes.get(i);\r\n\t\t\t\t\toutput = kNode.getOutput();\r\n\t\t\t\t\terror = teacher.get(i) - output;\r\n\t\t\t\t\tdeltaK = error*getReLU(kNode.getSum());\r\n\t\t\t\t\tfor(int j = 0; j < kNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair jkWeight = kNode.parents.get(j);\r\n\t\t\t\t\t\tNode jNode = jkWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getJK(jNode, deltaK);\r\n\t\t\t\t\t\tjkWeight.weight += adjustedWeight;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//ij weight\r\n\t\t\t\tfor(int i = 0; i < hiddenNodes.size(); i++){\r\n\t\t\t\t\tNode jNode = hiddenNodes.get(i);\r\n\t\t\t\t\tif(jNode.parents == null) continue;\r\n\t\t\t\t\tfor(int j = 0; j < jNode.parents.size(); j++){\r\n\t\t\t\t\t\tNodeWeightPair ijWeight = jNode.parents.get(j);\r\n\t\t\t\t\t\tNode iNode = ijWeight.node;\r\n\t\t\t\t\t\tadjustedWeight = getIJ(iNode, jNode, teacher, i);\r\n\t\t\t\t\t\tijWeight.weight += adjustedWeight;\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 void train()\r\n\t{\r\n\t\tfor(int i=0; i < this.maxEpoch; i++)\r\n\t\t{\r\n\t\t\tfor(Instance temp_example: this.trainingSet)\r\n\t\t\t{\r\n\t\t\t\tdouble O = calculateOutputForInstance(temp_example);\r\n\t\t\t\tdouble T = temp_example.output;\r\n\t\t\t\tdouble err = T - O;\r\n\r\n\t\t\t\t//w_jk (hidden to output)\r\n\t\t\t\tdouble g_p_out = (outputNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(this.learningRate*\r\n\t\t\t\t\t\t\thiddenNode.node.getOutput()*err*g_p_out);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//w_ij (input to hidden)\r\n\t\t\t\tint hid_count =0;\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tdouble g_p_hid = (hiddenNode.getSum() <= 0) ? 0 : 1;\r\n\t\t\t\t\tif(hiddenNode.getType()==2)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tdouble a_i = inputNode.node.getOutput();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq\r\n\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\tthis.learningRate*\r\n\t\t\t\t\t\t\t\t\ta_i*g_p_hid*(err*\r\n\t\t\t\t\t\t\t\t\toutputNode.parents.get(hid_count).weight*\r\n\t\t\t\t\t\t\t\t\tg_p_out)\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\thid_count++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// for all w_pq, update weights\r\n\t\t\t\tfor(Node hiddenNode: hiddenNodes){\r\n\t\t\t\t\tif(hiddenNode.getType()==2){\r\n\t\t\t\t\t\tfor(NodeWeightPair inputNode: hiddenNode.parents){\r\n\t\t\t\t\t\t\tinputNode.weight += inputNode.get_deltaw_pq();\r\n\t\t\t\t\t\t\tinputNode.set_deltaw_pq(new Double (0.00));\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\tfor(NodeWeightPair hiddenNode: outputNode.parents)\r\n\t\t\t\t{\r\n\t\t\t\t\thiddenNode.weight += hiddenNode.get_deltaw_pq();\r\n\t\t\t\t\thiddenNode.set_deltaw_pq(new Double (0.00));\r\n\t\t\t\t}\r\n\r\n\t\t\t} // end of an instance \r\n\t\t} // end of an epoch\r\n\t}",
"public void InitializeMaxNumInstances(int num) {\n }",
"public InstanceGenerator(InstanceGenerator generator)\n {\n mTraining = new Instances(generator.mTraining);\n mTesting = new Instances(generator.mTesting);\n }",
"public Instances getTraining()\n {\n return new Instances(mTraining);\n }",
"public void setInstancesPerType(int instancesPerType)\n {\n this.instancesPerType = instancesPerType;\n }",
"public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}",
"public static void avaliador(Classifier classifier, Instances instances) throws Exception {\n FilteredClassifier tmp = aplicaFiltros(classifier, instances);\n\n int vezes = 10; // numero de vezes que vai ser realizado o teste\n ArrayList<Thread> threads = new ArrayList<>();\n for (int i = 1; i <= vezes; i++) {\n int finalI = i;\n threads.add(\n // Foi criada a Thread para poder executar mais de um teste ao mesmo tempo, reduzindo o tempo de espera\n new Thread(() -> {\n try {\n System.out.println(\"====== Inicio - Seed: \" + finalI + \" - \" + tmp.getClassifier().toString() + \" ======\");\n Evaluation eval = new Evaluation(instances);\n // A cada teste o Random seed soma + 1\n eval.crossValidateModel(tmp, instances, 10, new Debug.Random(finalI));\n System.out.println(\"====== \" + tmp.getClassifier().toString() + \" ======\");\n System.out.println(\"Seed \" + finalI + \":\" + String.valueOf(eval.pctCorrect()).replace('.', ','));\n Optional<Thread> first = threads.stream().filter(e -> e.getState() == Thread.State.NEW).findFirst();\n first.get().start();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }));\n }\n // Inicia o teste, executa 3 testes por vez\n threads.get(0).start();\n threads.get(1).start();\n threads.get(2).start();\n }",
"public KNN() {\r\n\t\tallowRun = true;\r\n\t}",
"public final Instances getTrainingFromParams(String params)\n {\n if(params.equals(\"default\"))\n return getTraining();\n return _getTrainingFromParams(params);\n }",
"private void setTrainingData() throws IOException {\r\n\t\ttrainIdBodyMap = readInIdBodiesMap(new File(TRAIN_BODIES_CSV_LOCATION));\r\n\t\ttrainStances = readStances(new File(TRAIN_STANCES_CSV_LOCATION));\r\n\r\n\t}",
"public static void setInstance(GameObjectList gameObjects) {\n _instance = gameObjects;\n }",
"public void start() throws Exception {\n String datasetPath = \"dataset\\\\arcene_train.arff\";\n\n Instances dataset = new Instances(fileSystemUtil.readDataSet(datasetPath));\n dataset.setClassIndex(dataset.numAttributes() - 1);\n\n // Creating instances of feature selection models\n List<FeatureSelectionModel> featureSelectionModels = new ArrayList<>();\n featureSelectionModels.add(new CorellationFeatureSelectionModel());\n featureSelectionModels.add(new InfoGainFeatureSelectionModel());\n featureSelectionModels.add(new WrapperAttributeFeatureSelectionModel());\n\n List<List<Integer>> listOfRankedLists = calculateRankedLists(dataset, featureSelectionModels);\n\n // Creating instances of classifiers\n List<AbstractClassifier> classifiers = createClassifiers();\n Instances datasetBackup = new Instances(dataset);\n\n int modelCounter = 0;\n for (FeatureSelectionModel model : featureSelectionModels) {\n System.out.println(\"============================================================================\");\n System.out.println(String.format(\"Classification, step #%d. %s.\", ++modelCounter, model));\n System.out.println(\"============================================================================\");\n\n // Ranking attributes\n List<Integer> attrRankList = listOfRankedLists.get(modelCounter - 1);\n\n for (int attrIndex = (int)(attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION - 1) + 1, removedCounter = 0;\n attrIndex >= attrRankList.size() * BEST_ATTRIBUTES_NUMBER_PROPORTION;\n attrIndex--, removedCounter++) {\n if (datasetBackup.numAttributes() == attrRankList.size()\n && attrIndex == 0) {\n continue;\n }\n// for (int attrIndex = attrRankList.size() * BEST_ATTRIBUTES_NUMBER_PROPORTION, removedCounter = 0;\n// attrIndex <= (attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION - 1);\n// attrIndex++, removedCounter++) {\n// if (datasetBackup.numAttributes() == attrRankList.size()\n// && attrIndex == attrRankList.size() - 1) {\n// continue;\n// }\n dataset = new Instances(datasetBackup);\n // Do not remove for first iteration\n if (removedCounter > 0) {\n // Selecting features (removing attributes one-by-one starting from worst)\n List<Integer> attrToRemoveList = attrRankList.subList(attrIndex,\n (int)(attrRankList.size() * WORST_ATTRIBUTES_NUMBER_PROPORTION));\n Collections.sort(attrToRemoveList);\n for (int i = attrToRemoveList.size() - 1; i >= 0; i--) {\n dataset.deleteAttributeAt(attrToRemoveList.get(i));\n }\n// for (Integer attr : attrToRemoveList) {\n// dataset.deleteAttributeAt(attr);\n// }\n System.out.println(\"\\n\\n-------------- \" + (removedCounter) + \" attribute(s) removed (of \" +\n (datasetBackup.numAttributes() - 1) + \") --------------\\n\");\n } else {\n System.out.println(\"\\n\\n-------------- First iteration - without feature selection --------------\\n\");\n }\n\n classify(classifiers, dataset);\n }\n }\n }",
"private void trainFeatures() throws Exception\n\t{\n\t\tdbiterator.setDataSource(DBInstanceIterator.DBSource.FEATURE);\n\t\tSystem.out.println(\"Starting reading Feature Trainingset ..\");\n\t\tPipe serialpipe = getFeaturePipe();\n\t\tInstanceList feature_instances = new InstanceList(serialpipe);\n\t\tSystem.out.println(\"Preprocessing on Feature Trainingset ..\");\n\t\tfeature_instances.addThruPipe(dbiterator);\n\t\tSystem.out.println(\"Feature Training set : \" + feature_instances.size());\n\t\tSystem.out.println(\"Saving preprocessed data ..\");\n\t\tsaveinstances(feature_instances, Train + \"F.bin\");\n\t\tSystem.out.println(\"Saving Features data ..\");\n\t\tfeature_instances.getDataAlphabet().dump(new PrintWriter(new File(Attributes + \"feature.dat\")));\n\t\tClassifierTrainer trainer = new NaiveBayesTrainer();\n\t\tSystem.out.println(\"NaiveBayes Starts Training on Feature training set ..\");\n\t\tClassifier classifier = trainer.train(feature_instances);\n\t\tSystem.out.println(\"Targets labels : \\t\"+classifier.getLabelAlphabet());\n\t\tSystem.out.println(\"Saving Naive Bayes Classifier ..\");\n\t\tsaveModel(classifier, Feature_Train);\n\t\tSystem.out.println(\"Feature classifier saved to : \" + Feature_Train);\n\t}",
"@Override\n\tpublic void train(Instance[] trainingData, int v) {\n\n\t\t// For all the words in the documents, count the number of occurrences. Save in\n\t\t// HashMap\n\t\t// e.g.\n\t\t// m_map[0].get(\"catch\") should return the number of \"catch\" es, in the\n\t\t// documents labeled sports\n\t\t// Hint: m_map[0].get(\"asdasd\") would return null, when the word has not\n\t\t// appeared before.\n\t\t// Use m_map[0].put(word,1) to put the first count in.\n\t\t// Use m_map[0].replace(word, count+1) to update the value\n\t\tm_trainingData = trainingData;\n\t\tm_v = v;\n\t\tm_map[0] = new HashMap<>();\n\t\tm_map[1] = new HashMap<>();\n\n\t\t// iterate the instances (i.e., articles) in the training data\n\t\tfor (int i = 0; i < m_trainingData.length; i++) {\n\t\t\tInstance article = m_trainingData[i];\n\t\t\t// if this article belongs to sports\n\t\t\tif (article.label.equals(Label.SPORTS)) {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the sports hashmap\n\t\t\t\t\tif (m_map[0].containsKey(word)) {\n\t\t\t\t\t\tm_map[0].replace(word, m_map[0].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[0].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if this article belongs to business (i.e., non-sports)\n\t\t\telse {\n\t\t\t\t// iterate each word in this article\n\t\t\t\tfor (int j = 0; j < article.words.length; j++) {\n\t\t\t\t\tString word = article.words[j];\n\t\t\t\t\t// if this word exists in the business hashmap\n\t\t\t\t\tif (m_map[1].containsKey(word)) {\n\t\t\t\t\t\tm_map[1].replace(word, m_map[1].get(word).intValue() + 1);\n\t\t\t\t\t}\n\t\t\t\t\t// if this word is a new word in the sports hashmap\n\t\t\t\t\telse {\n\t\t\t\t\t\tm_map[1].put(word, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// |V| is the size of the total vocabulary we assume we will encounter (i.e.,\n\t\t// the dictionary size) from training data and test data\n\t\t// The value |V| will be passed to the train method of your classifier as the\n\t\t// argument int v.\n\n\t\t// To obtain the number of word type\n\t\tSet<String> all = new HashSet<String>();\n\t\tfor (int j = 0; j < m_trainingData.length; j++) {\n\t\t\tfor (int k = 0; k < m_trainingData[j].words.length; k++) {\n\t\t\t\tall.add(m_trainingData[j].words[k]);\n\t\t\t}\n\t\t}\n\n\t\t// To obtain the total number of words for each class(label)\n\t\tsumV[0] = 0.0;\n\t\tsumV[1] = 0.0;\n\t\tfor (String w : all) {\n\t\t\tif (m_map[0].get(w) != null) {\n\t\t\t\tsumV[0] += m_map[0].get(w);\n\t\t\t}\n\t\t\tif (m_map[1].get(w) != null) {\n\t\t\t\tsumV[1] += m_map[1].get(w);\n\t\t\t}\n\t\t}\n\t}",
"public abstract void setTrainParams(ClassificationMethod method,URL model,Map<String,Object> args) throws ClassificationException;",
"public void actionTrain(Train t) {\n\t\t\t t.setVitesseScalaire(vitesse);\n\t\t}",
"public knnImpute(String fileParam) {\r\n\t\tconfig_read(fileParam);\r\n\t\tIS = new InstanceSet();\r\n\t\tIStest = new InstanceSet();\r\n\t}",
"public void train(Collection<TrainingEntry<Login>> trainingDataSet) throws TrainingException {\n if (trainingDataSet.isEmpty()) return;\n try {\n final DataSet dataSet = toDataSet(trainingDataSet);\n normalizer = new NormalizerStandardize();\n normalizer.fit(dataSet);\n normalizer.transform(dataSet);\n final DataSetIterator dataSetIterator = new ExistingDataSetIterator(dataSet);\n final MultiLayerConfiguration configuration = new NeuralNetConfiguration.Builder()\n .seed(6)\n .iterations(1)\n .activation(\"tanh\")\n .weightInit(WeightInit.XAVIER)\n .learningRate(0.1)\n .regularization(true).l2(1e-4)\n .list()\n .layer(0, new DenseLayer.Builder()\n .nIn(getNumberOfInputFeatures(trainingDataSet))\n .nOut(9)\n .build())\n .layer(1, new DenseLayer.Builder()\n .nIn(9)\n .nOut(9)\n .build())\n .layer(2, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .activation(\"softmax\")\n .nIn(9)\n .nOut(NUM_CATEGORIES).build())\n .backprop(true).pretrain(false)\n .build();\n network = new MultiLayerNetwork(configuration);\n final EarlyStoppingConfiguration esConf = new EarlyStoppingConfiguration.Builder()\n .epochTerminationConditions(new MaxEpochsTerminationCondition(20))\n .iterationTerminationConditions(new MaxTimeIterationTerminationCondition(20, TimeUnit.MINUTES))\n .scoreCalculator(new DataSetLossCalculator(dataSetIterator, true))\n .evaluateEveryNEpochs(1)\n .modelSaver(new InMemoryModelSaver())\n .build();\n final EarlyStoppingTrainer trainer = new EarlyStoppingTrainer(esConf, network, dataSetIterator);\n final EarlyStoppingResult<MultiLayerNetwork> result = trainer.fit();\n network = result.getBestModel();\n } catch (final Exception e) {\n throw new TrainingException(e);\n }\n }",
"public synchronized void setFeatureInstances(final Set<? extends FeatureType> newValues) {\n featureInstances = copySet(newValues, featureInstances, FeatureType.class);\n }",
"public static void trainingFile(String trainFile, List<Attribute> attributes, List<Instance>instances) {\n\t\tScanner fileScanner = null;\r\n\t\ttry {\r\n\t\t\tfileScanner = new Scanner(new File(trainFile));\r\n\t\t} catch(FileNotFoundException e) {\r\n\t\t\tSystem.err.println(\"Could not find file '\" + trainFile + \r\n\t\t\t\t\t\"'.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\t// Iterate through each line in the file.\r\n\t\tint numOfAtts = -1;\r\n\t\twhile(fileScanner.hasNext()) {\r\n\t\t\tString line = fileScanner.nextLine().trim();\r\n\r\n\t\t\t// Skip blank lines.\r\n\t\t\tif(line.length() == 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t// Use another scanner to parse each word from the line\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\tif (!line.contains(\"//\")) {\r\n\t\t\t\tnumOfAtts = Integer.parseInt(lineScanner.next());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tlineScanner.close();\r\n\t\t}\r\n\t\tString line = null;\r\n\t\twhile(fileScanner.hasNext()) {\r\n\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\tif(line.length() == 0) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (!line.contains(\"//\")) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tint count = 0;\r\n\t\t//while(fileScanner.hasNext()) {\r\n\t\twhile (count < numOfAtts) {\r\n\t\t\tif (line.contains(\"//\") || line.length() == 0) {\r\n\t\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\tList<String> values = new ArrayList<String>();\r\n\t\t\tString attName = lineScanner.next();\r\n\t\t\twhile (lineScanner.hasNext()) {\r\n\t\t\t\tString value = lineScanner.next();\r\n\t\t\t\tif(!value.equals(\"-\")) {\r\n\t\t\t\t\tvalues.add(value);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\tAttribute att = new Attribute(attName,values);\r\n\t\t\tattributes.add(att);\r\n\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\tlineScanner.close();\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\twhile(fileScanner.hasNext()) {\r\n\t\t\tif (line.contains(\"//\") || line.length() == 0) {\r\n\t\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tbreak;\r\n\t\t\t//line = fileScanner.nextLine().trim();\r\n\t\t}\r\n\t\tList<String> values = new ArrayList<String>();\r\n\t\twhile(fileScanner.hasNext()) {\r\n\t\t\tif (line.contains(\"//\"))\r\n\t\t\t\tbreak;\r\n\t\t\tif(line.length() == 0) {\r\n\t\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\tString label = lineScanner.next();\r\n\t\t\tvalues.add(label);\r\n\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\tlineScanner.close();\r\n\t\t}\r\n\t\tAttribute label = new Attribute (\"label\", values);\r\n\t\tattributes.add(label);\r\n\t\tint numOfInstances = -1;\r\n\t\twhile(fileScanner.hasNext()) {\r\n\t\t\tif(line.length() == 0) {\r\n\t\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\tif (!line.contains(\"//\")) {\r\n\t\t\t\tnumOfInstances = Integer.parseInt(lineScanner.next());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\tlineScanner.close();\r\n\t\t}\r\n\t\tint i = 0;\r\n\t\twhile(fileScanner.hasNext() && i < numOfInstances) {\r\n\t\t\tline = fileScanner.nextLine().trim();\r\n\t\t\tif(line.length() == 0 || line.contains(\"//\")) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tScanner lineScanner = new Scanner(line);\r\n\t\t\tList<String> features = new ArrayList<String>();\r\n\t\t\tString tmp = lineScanner.next();\r\n\t\t\tString instLabel = lineScanner.next();\r\n\t\t\twhile (lineScanner.hasNext()) {\r\n\t\t\t\tfeatures.add(lineScanner.next());\r\n\t\t\t}\r\n\t\t\tfeatures.add(instLabel);\r\n\t\t\tInstance instance = new Instance(numOfAtts,features);\r\n\t\t\tinstances.add(instance);\r\n\t\t\ti++;\r\n\t\t\tlineScanner.close();\r\n\t\t}\r\n\t\tfileScanner.close();\r\n\r\n\t}",
"public Train(List<Car> tab)\n\t{\n\t\tthis.cars = new CopyOnWriteArrayList<Car>();\n\t\tfor (Car car : tab)\n\t\t{\n\t\t\tthis.cars.add(car);\n\t\t\tcar.setTrain(this);\n\t\t} \n\t}",
"private void instantiateAux(InstanceSet instanceSet,\r\n\t\t\tPreprocessorParameters parameters)\r\n\tthrows Exception {\r\n\t\tclusterBasedUtils = new ClusterBasedUtils(instanceSet);\r\n\t\tint preprocessorID = parameters.getPreprocessorID();\r\n\t\t\r\n\t\tswitch (preprocessorID) {\r\n\t\t\t/* Original */\r\n\t\t\tcase PreprocessorIDs.ORIGINAL:\r\n\t\t\t\toriginal = new Original(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(original.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(original);\r\n\t\t\t\tbreak;\r\n\t\r\n\t\t\t/* Oversampling */\r\n\t\t\tcase PreprocessorIDs.OVERSAMPLING:\r\n\t\t\t\toversampling = new RandomOversampling(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(oversampling.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(oversampling);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Simplesampling */\r\n\t\t\tcase PreprocessorIDs.SIMPLESAMPLING:\r\n\t\t\t\tsimplesampling = new Simplesampling(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(simplesampling.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(simplesampling);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Smote */\r\n\t\t\tcase PreprocessorIDs.SMOTE:\r\n\t\t\t\tsmote = new Smote(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(smote.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(smote);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cluster Based Oversampling */\r\n\t\t\tcase PreprocessorIDs.CLUSTER_BASED_OVERSAMPLING:\r\n\t\t\t\tcbo = new ClusterBasedOversampling(clusterBasedUtils,\r\n\t\t\t\t\t\tinstanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(cbo.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cbo);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cluster Based Smote */\r\n\t\t\tcase PreprocessorIDs.CLUSTER_BASED_SMOTE:\r\n\t\t\t\tcbs = new ClusterBasedSmote(clusterBasedUtils, instanceSet,\r\n\t\t\t\t\t\tparameters);\r\n\t\t\t\tnumBatchIterations.add(cbs.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cbs);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Cclear */\r\n\t\t\tcase PreprocessorIDs.CCLEAR:\r\n\t\t\t\tcClear = new Cclear(clusterBasedUtils, instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(cClear.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(cClear);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t/* Baseline */\r\n\t\t\tcase PreprocessorIDs.BASELINE:\r\n\t\t\t\tbaseline = new Baseline(instanceSet, parameters);\r\n\t\t\t\tnumBatchIterations.add(baseline.getNumBatchIterations());\r\n\t\t\t\tpreprocessorList.add(baseline);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public Instance selectTestInstance() {\n\t\tInstance testInstance = new Instance(RF_testInstances.lastInstance());\n\t\t////System.out.println(\"-selecting last instance in test set RF_testInstances, done\");\n\n\t\t// Specify that the instance belong to the training set \n\t\t// in order to inherit from the set description \n\t\ttestInstance.setDataset(RF_trainingInstances);\n\t\t//System.out.println(\"-selected last instance in test set: \" + testInstance.toString() );\n\n\t\treturn testInstance;\n\t}",
"public void runExperiment() {\n\t\tevaluator = new Evaluator(trainingSet);\n\t\tevaluator.evaluateClassifiers(classifiers);\n\t}",
"public void fit(ArrayList trainData) {\n this.trainingData = trainData;\n }",
"@NonNull\n public Builder instances(@IntRange(from = 1, to = 32767) int instanceCount) {\n nBuilderInstances(mNativeBuilder, instanceCount);\n return this;\n }",
"public void setInstance(int index, double[] feature) {\n\t\tinstances.set(index,feature);\n\t}",
"protected void startClusterer() {\r\n\t\tif (m_RunThread == null) {\r\n\t\t\tm_StartBut.setEnabled(false);\r\n\t\t\tm_timer.setEnabled(false);\r\n\t\t\tm_StopBut.setEnabled(true);\r\n\t\t\tm_ignoreBut.setEnabled(false);\r\n\t\t\tm_RunThread = new Thread() {\r\n\t\t\t\tInstances trainInst = null;\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tboolean errors = false;\r\n\t\t\t\t\tlong start,end;\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\t// Copy the current state of things\r\n\t\t\t\t\t\tm_Log.statusMessage(\"Setting up...\");\r\n\t\t\t\t\t\tInstances inst = new Instances(m_Instances);\r\n\t\t\t\t\t\tinst.setClassIndex(-1);\r\n\t\r\n\t\t\t\t\t\tint[] ignoredAtts = null;\r\n\t\t\t\t\t\ttrainInst = new Instances(inst);\r\n\t\r\n\t\t\t\t\t\tif (m_EnableClassesToClusters.isSelected()) {\r\n\t\t\t\t\t\t\ttrainInst.setClassIndex(m_ClassCombo.getSelectedIndex());\r\n\t\t\t\t\t\t\tinst.setClassIndex(m_ClassCombo.getSelectedIndex());\r\n\t\t\t\t\t\t\tif (inst.classAttribute().isNumeric()) {\r\n\t\t\t\t\t\t\t\tthrow new Exception(\"Class must be nominal for class based evaluation!\");\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\tif (!m_ignoreKeyList.isSelectionEmpty()) {\r\n\t\t\t\t\t\t\ttrainInst = removeIgnoreCols(trainInst);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!m_ignoreKeyList.isSelectionEmpty()) {\r\n\t\t\t\t\t\t\tignoredAtts = m_ignoreKeyList.getSelectedIndices();\r\n\t\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t\tif (m_EnableClassesToClusters.isSelected()) {\r\n\t\t\t\t\t\t\t// add class to ignored list\r\n\t\t\t\t\t\t\tif (ignoredAtts == null) {\r\n\t\t\t\t\t\t\t\tignoredAtts = new int[1];\r\n\t\t\t\t\t\t\t\tignoredAtts[0] = m_ClassCombo.getSelectedIndex();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tint[] newIgnoredAtts = new int[ignoredAtts.length + 1];\r\n\t\t\t\t\t\t\t\tSystem.arraycopy(ignoredAtts, 0,\r\n\t\t\t\t\t\t\t\t\t\tnewIgnoredAtts, 0, ignoredAtts.length);\r\n\t\t\t\t\t\t\t\tnewIgnoredAtts[ignoredAtts.length] = m_ClassCombo\r\n\t\t\t\t\t\t\t\t\t\t.getSelectedIndex();\r\n\t\t\t\t\t\t\t\tignoredAtts = newIgnoredAtts;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tint clustering_amount = 1;\r\n\t\t\t\t\t\tif(m_BracketingBut.isEnabled()){\r\n\t\t\t\t\t\t\tclustering_amount = m_bracketingPanel.getNumberClusterings();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t//add tasks\r\n\t\t\t\t\t\tfor (int i = 0; i < clustering_amount; i++) {\r\n\t\t\t\t\t\t\tif (m_Log instanceof TaskLogger) {\r\n\t\t\t\t\t\t\t\t((TaskLogger) m_Log).taskStarted();\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\tfor (int i = 0; i < clustering_amount ; i++) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tSerializedObject so = new SerializedObject((SubspaceClusterer) m_ClustererEditor.getValue());\r\n\t\t\t\t\t\t\tSubspaceClusterer clusterer = (SubspaceClusterer) so.getObject();\r\n\t\t\t\t\t\t\tif(m_BracketingBut.isEnabled()){\r\n\t\t\t\t\t\t\t\tm_bracketingPanel.setBracketingParameter(clusterer, i);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tString name = (new SimpleDateFormat(\"HH:mm:ss - \")).format(new Date());\r\n\t\t\t\t\t\t\tString cname = clusterer.getClass().getName();\r\n\t\t\t\t\t\t\tif (cname.startsWith(\"weka.subspaceClusterer.\")) {\r\n\t\t\t\t\t\t\t\tname += cname.substring(\"weka.subspaceClusterer.\".length());\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tname += cname;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tString parameter_name = \"\";\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(m_BracketingBut.isEnabled()){\r\n\t\t\t\t\t\t\t\tparameter_name+= m_bracketingPanel.getParameterString(clusterer,i);\r\n\t\t\t\t\t\t\t\tname+=parameter_name;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tString cmd = clusterer.getClass().getName();\r\n\t\t\t\t\t\t\tif (m_ClustererEditor.getValue() instanceof OptionHandler)\r\n\t\t\t\t\t\t\t\tcmd += \" \" + Utils.joinOptions(((OptionHandler)clusterer).getOptions());\r\n\r\n\t\t\t\t\t\t\t//add measure options to command line\r\n\t\t\t\t\t\t\tif(m_EnableEvaluation.isSelected()){\r\n\t\t\t\t\t\t\t\tArrayList<ClusterQualityMeasure> cmdMeasureList = m_evaluationPanel.getSelectedMeasures();\r\n\t\t\t\t\t\t\t\tif(cmdMeasureList.size() > 0) cmd+= \" -M \";\r\n\t\t\t\t\t\t\t\tfor (int c = 0; c < cmdMeasureList.size(); c++) {\r\n\t\t\t\t\t\t\t\t\tString c_name = cmdMeasureList.get(c).getClass().getName();\r\n\t\t\t\t\t\t\t\t\tif (c_name.startsWith(\"weka.clusterquality.\")) {\r\n\t\t\t\t\t\t\t\t\t\tcmd+= c_name.substring(\"weka.clusterquality.\".length());\r\n\t\t\t\t\t\t\t\t\t\tif(c < cmdMeasureList.size()-1) cmd+= \":\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(\"Started \" + cname);\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(\"Command: \" + cmd);\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(\"Clustering: Started\");\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Build the model and output it.\r\n\t\t\t\t\t\t\t\tm_Log.statusMessage(\"Clusterer running...\");\r\n\t\r\n\t\t\t\t\t\t\t\tStringBuffer outBuffer = new StringBuffer();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// remove the class attribute (if set) and build the clusterer\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tBuildSubspaceClustererThread clusterthread = new BuildSubspaceClustererThread(clusterer,removeClass(trainInst));\r\n\t\t\t\t\t\t\t\tstart = System.currentTimeMillis();\r\n\r\n\t\t\t\t\t\t\t\tclusterthread.start();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tint timer = Integer.parseInt(m_timer.getText());\r\n\t\t\t\t\t\t\t\tif(!m_EnableTimer.isSelected() || timer <= 0 || timer > 1000000000){\r\n\t\t\t\t\t\t\t\t\ttimer = 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tclusterthread.join(timer*60*1000);\r\n\t\t\t\t\t\t\t\tend = System.currentTimeMillis();\r\n\t\t\t\t\t\t\t\tif(clusterthread.isAlive()) {\r\n\t\t\t\t\t\t\t\t\tclusterthread.interrupt();\r\n\t\t\t\t\t\t\t\t\tclusterthread.stop();\r\n\t\t\t\t\t\t\t\t\tthrow new Exception(\"Timeout after \"+timer+\" minutes\");\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tclusterthread.join();\r\n\t\t\t\t\t\t\t\tif(clusterthread.getException()!=null) {\r\n\t\t\t\t\t\t\t\t\tthrow clusterthread.getException();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\toutBuffer.append(getClusterInformation(clusterer,inst,end-start));\r\n\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\tm_Log.logMessage(\"Clustering: done\");\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Evaluation stuff, catch Exceptions, most likely out of memory\r\n\t\t\t\t\t\t\t\tif(m_EnableEvaluation.isSelected()){\r\n\t\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t\tif(inst.classIndex() >= 0){\r\n\t\t\t\t\t\t\t\t\t\t\tm_Log.statusMessage(\"Evaluation running...\");\r\n\t\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Evaluation: Start\");\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tArrayList<ClusterQualityMeasure> measures = m_evaluationPanel.getSelectedMeasures();\r\n\t\t\t\t\t\t\t\t\t\t\tArrayList<Cluster> m_TrueClusters = m_evaluationPanel.getTrueClusters();\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t//Run evaluation\r\n\t\t\t\t\t\t\t\t\t\t\tstart = System.currentTimeMillis();\r\n\t\t\t\t\t\t\t\t\t\t\tStringBuffer qualBuffer = SubspaceClusterEvaluation.evaluateClustersQuality(clusterer, inst, measures, m_TrueClusters, m_evaluationPanel.getTrueClusterFile());\r\n\t\t\t\t\t\t\t\t\t\t\tend = System.currentTimeMillis();\r\n\t\t\t\t\t\t\t\t\t\t\toutBuffer.append(qualBuffer);\r\n\t\t\t\t\t\t\t\t\t\t\toutBuffer.append(\"\\n\\nCalculating Evaluation took: \"+formatTimeString(end-start)+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Evaluation: Finished\");\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(e.getMessage());\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Problem evaluating clustering (number of clusters: \"+clusterer.getSubspaceClustering().size()+\")\");\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}catch (OutOfMemoryError e) {\r\n\t\t\t\t\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Out of memory\");\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(e.getMessage());\r\n\t\t\t\t\t\t\t\t\t\tm_Log.statusMessage(\"See error log\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t//Visual stuff, catch Exceptions, most likely out of memory\r\n\t\t\t\t\t\t\t\tm_CurrentVis = new SubspaceVisualData();\r\n\t\t\t\t\t\t\t\tif (!isInterrupted() && m_EnableStoreVisual.isSelected()) {\r\n\t\t\t\t\t\t\t\t\ttry{\r\n\t\t\t\t\t\t\t\t\t\tm_Log.statusMessage(\"Calculating visualization...\");\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Calculate visualization: Start\");\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t//calculate visual stuff\r\n\t\t\t\t\t\t\t\t\t\tstart = System.currentTimeMillis();\r\n\t\t\t\t\t\t\t\t\t\tm_CurrentVis.calculateVisual((ArrayList<Cluster>)clusterer.getSubspaceClustering(), removeClass(trainInst));\r\n\t\t\t\t\t\t\t\t\t\tend = System.currentTimeMillis();\r\n\t\t\t\t\t\t\t\t\t\t//where is the name being used???\r\n\t\t\t\t\t\t\t\t\t\tm_CurrentVis.setName(name + \" (\" + inst.relationName()+ \")\");\r\n\t\t\t\t\t\t\t\t\t\tm_CurrentVis.setHistoryName(parameter_name);\r\n\t\t\t\t\t\t\t\t\t\toutBuffer.append(\"Calculating visualization took: \"+formatTimeString(end-start)+\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Calculate visualization: Finished\");\r\n\t\t\t\t\t\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(e.getMessage());\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Problem calculating visualization (number of clusters: \"+clusterer.getSubspaceClustering().size()+\")\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcatch(OutOfMemoryError e){\r\n\t\t\t\t\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Out of memory\");\r\n\t\t\t\t\t\t\t\t\t\tm_Log.logMessage(e.getMessage());\r\n\t\t\t\t\t\t\t\t\t\tm_Log.statusMessage(\"See error log\");\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\t//put buffer into cluster so it can be safed with the cluster\r\n\t\t\t\t\t\t\t\tclusterer.setConsole(outBuffer);\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(\"Finished \" + cmd);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tm_History.addResult(name, outBuffer);\r\n\t\t\t\t\t\t\t\tm_History.setSingle(name);\r\n\t\t\t\t\t\t\t\tm_History.updateResult(name);\r\n\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(ex.getMessage());\r\n\t\t\t\t\t\t\t\tm_Log.statusMessage(\"Problem evaluating clusterer\");\r\n\t\t\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch(OutOfMemoryError e){\r\n\t\t\t\t\t\t\t\tm_Log.logMessage(e.getMessage());\r\n\t\t\t\t\t\t\t\tm_Log.statusMessage(\"See error log\");\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Out of memory\");\r\n\t\t\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\tFastVector vv = new FastVector();\r\n\t\t\t\t\t\t\t\tvv.addElement(clusterer);\r\n\t\t\t\t\t\t\t\tInstances trainHeader = new Instances(m_Instances, 0);\r\n\t\t\t\t\t\t\t\tvv.addElement(trainHeader);\r\n\t\t\t\t\t\t\t\tif (ignoredAtts != null)\r\n\t\t\t\t\t\t\t\t\tvv.addElement(ignoredAtts);\r\n\t\t\t\t\t\t\t\tvv.addElement(m_CurrentVis);\r\n\t\r\n\t\t\t\t\t\t\t\tm_History.addObject(name, vv);\r\n\t\t\t\t\t\t\t\tif (isInterrupted()) {\r\n\t\t\t\t\t\t\t\t\tm_Log.logMessage(\"Bracketing interrupted:\" + cname);\r\n\t\t\t\t\t\t\t\t\tm_Log.statusMessage(\"See error log\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (m_Log instanceof TaskLogger) {\r\n\t\t\t\t\t\t\t\t\t((TaskLogger) m_Log).taskFinished();\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} catch (Exception ex) {\r\n\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t\t\tm_Log.logMessage(ex.getMessage());\r\n\t\t\t\t\t\tm_Log.statusMessage(\"Problem setting up clusterer\");\r\n\t\t\t\t\t} catch (OutOfMemoryError ex) {\r\n\t\t\t\t\t\terrors = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Out of memory\");\r\n\t\t\t\t\t\tm_Log.logMessage(ex.getMessage());\r\n\t\t\t\t\t\tm_Log.statusMessage(\"See error log\");\r\n\t\t\t\t\t} \r\n\t\t\t\t\tfinally {\r\n\r\n\t\t\t\t\t\tm_RunThread = null;\r\n\t\t\t\t\t\tm_StartBut.setEnabled(true);\r\n\t\t\t\t\t\tm_StopBut.setEnabled(false);\r\n\t\t\t\t\t\tm_ignoreBut.setEnabled(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//kill all other tasks in the logger so the poor bird can stop running\r\n\t\t\t\t\t\t//belongs somewhere else, but doesnt work in finally after for-bracketing anymore \r\n\t\t\t\t\t\tint clustering_amount = 1;\r\n\t\t\t\t\t\tif(m_BracketingBut.isEnabled()){\r\n\t\t\t\t\t\t\tclustering_amount = m_bracketingPanel.getNumberClusterings();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfor (int j = 0; j < clustering_amount; j++) {\r\n\t\t\t\t\t\t\tif (m_Log instanceof TaskLogger) {\r\n\t\t\t\t\t\t\t\t((TaskLogger) m_Log).taskFinished();\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\tif(errors){ \r\n\t\t\t\t\t\t\tm_Log.statusMessage(\"Errors accured, see error logs\");\r\n\t\t\t\t\t\t\tJOptionPane\r\n\t\t\t\t\t\t\t\t.showMessageDialog(SubspaceClustererPanel.this,\r\n\t\t\t\t\t\t\t\t\"Problems occured during clusterig, check error log for more details\",\r\n\t\t\t\t\t\t\t\t\"Evaluate clusterer\",\r\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{ \r\n\t\t\t\t\t\t\tm_Log.statusMessage(\"OK\");\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\tm_RunThread.setPriority(Thread.MIN_PRIORITY);\r\n\t\t\tm_RunThread.start();\r\n\t\t}\r\n\t}",
"public void nextBatch(boolean training) {\n if (training) {\n trainSet = train.next();\n } else {\n testSet = test.next();\n }\n }",
"public void saveTrainingDataToFileUpSamplingWithSMOTE() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\"));\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n// if (crimeArticlesCount == 50) {\r\n// break;\r\n// }\r\n }\r\n\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n// if (otherArticlesCount == 100) {\r\n// break;\r\n// }\r\n }\r\n//// if (otherArticlesCount == 100) {\r\n//// break;\r\n//// }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n /**\r\n * Resamples a dataset by applying the Synthetic Minority Oversampling\r\n * TEchnique (SMOTE)\r\n * http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume16/chawla02a-html/node6.html\r\n * http://weka.sourceforge.net/doc.packages/SMOTE/weka/filters/supervised/instance/SMOTE.html \r\n *\r\n */\r\n SMOTE s = new SMOTE();\r\n s.setInputFormat(dataFiltered);\r\n // Specifies percentage of SMOTE instances to create.\r\n s.setPercentage(464.0);\r\n Instances dataBalanced = Filter.useFilter(dataFiltered, s);\r\n\r\n Random r = new Random();\r\n dataBalanced.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataBalanced);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSSMOTE464Random.arff\"));\r\n saver.writeBatch();\r\n }",
"public Train(Car... cars) {\n\t\tthis.cars = new CopyOnWriteArrayList<Car>();\n\t\tfor (Car car : cars)\n\t\t{\n\t\t\tthis.cars.add(car);\n\t\t\tcar.setTrain(this);\n\t\t}\n\t}",
"public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}",
"public abstract Instances _getTrainingFromParams(String params);",
"@Override\n public Builder epochs(int numEpochs) {\n super.epochs(numEpochs);\n return this;\n }",
"public void train ()\t{\t}",
"public void train(Corpus[] trainingData) {\n\t\tSet<String> vocabulary = super.mergeVocabulary(trainingData);\n\t\ttrainingData[0].setVocabulary(vocabulary);\n\t\ttrainingData[1].setVocabulary(vocabulary);\n\t\tposMatrix = new TransitionMatrix(trainingData[0]);\n\t\tnegMatrix = new TransitionMatrix(trainingData[1]);\n\t}",
"public void setLabeledInstance(Instance inst){\n\t\tthis._labeledInstance = inst;\n\t}",
"@Override\n public void train() {\n actual = observations.toArray();\n min_val_error = Double.MAX_VALUE;\n if (findDecayConstant)\n for (float alpha = 0f; alpha <= 1f; alpha += 0.01f)\n initializeAndTrainModel(alpha);\n else\n initializeAndTrainModel(optAlpha);\n }",
"public static void avaliador(Classifier classifier, Instances instances, int seed) throws Exception {\n FilteredClassifier tmp = aplicaFiltros(classifier, instances);\n\n new Thread(() -> {\n try {\n System.out.println(\"====== Inicio - Seed: \" + seed + \" - \" + tmp.getClassifier().toString() + \" ======\");\n Evaluation eval = new Evaluation(instances);\n // A cada teste o Random seed soma + 1\n eval.crossValidateModel(tmp, instances, 10, new Debug.Random(seed));\n System.out.println(\"====== \" + tmp.getClassifier().toString() + \" ======\");\n System.out.println(\"Seed \" + seed + \":\" + String.valueOf(eval.pctCorrect()).replace('.', ','));\n double[][] confusionMatrix = eval.confusionMatrix();\n System.out.println(confusionMatrix[0][0] + \" - \" + confusionMatrix[0][1] + \" - \" + confusionMatrix[0][2]);\n System.out.println(confusionMatrix[1][0] + \" - \" + confusionMatrix[1][1] + \" - \" + confusionMatrix[1][2]);\n System.out.println(confusionMatrix[2][0] + \" - \" + confusionMatrix[2][1] + \" - \" + confusionMatrix[2][2]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }).start();\n }",
"public void updateGroundInstances(Theory theory)\n {\n for (int i=0; i<explainers.size(); i++)\n {\n Explainer explainer = (Explainer)explainers.elementAt(i);\n if (use_ground_instances)\n setGroundInstancesAsAxioms(explainer, theory.concepts);\n }\n }",
"@Override\n public void initialize() {\n drivetrain.enable();\n }",
"public void setTrainingszeiten(Trainingszeit[] trainingszeiten) {\n this.trainingszeiten = trainingszeiten;\n }",
"public void setSelectedTrain(Train train){\n\n this.selectedTrain = train;\n }",
"public void saveTrainingDataToFileUpSampling() throws Exception {\r\n //set tokenizer - we can specify n-grams for classification\r\n NGramTokenizer tokenizer = new NGramTokenizer();\r\n tokenizer.setNGramMinSize(1);\r\n tokenizer.setNGramMaxSize(1);\r\n tokenizer.setDelimiters(\"\\\\W\");\r\n\r\n //set stemmer - set english stemmer\r\n SnowballStemmer stemmer = new SnowballStemmer();\r\n stemmer.setStemmer(\"english\");\r\n\r\n //set lemmatizer\r\n StanfordCoreNLPLemmatizer scnlpl = new StanfordCoreNLPLemmatizer();\r\n\r\n //create new filter for vector transformation\r\n StringToWordVector filter = new StringToWordVector();\r\n filter.setLowerCaseTokens(true);\r\n filter.setOutputWordCounts(true);\r\n filter.setTFTransform(true);\r\n filter.setIDFTransform(true);\r\n filter.setStopwords(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\StopWordsR2.txt\")); // stop word removal given in research paper\r\n filter.setTokenizer(tokenizer);\r\n filter.setStemmer(scnlpl);\r\n\r\n System.out.println(\"Stemmer Name- \" + filter.getStemmer());\r\n\r\n InstanceQuery query = new InstanceQuery();\r\n query.setUsername(\"root\");\r\n query.setPassword(\"\");\r\n\r\n int numberOfPapers = 5;\r\n\r\n Instances[] otherArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'other'\");\r\n otherArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='other'\");\r\n otherArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='other'\");\r\n otherArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'other'\");\r\n otherArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'other'\");\r\n otherArticles[4] = query.retrieveInstances();\r\n\r\n Instances[] crimeArticles = new Instances[numberOfPapers];\r\n query.setQuery(\"SELECT content, label FROM article_ceylon_today_2013 where `label` = 'crime'\");\r\n crimeArticles[0] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2012 where `label` ='crime'\");\r\n crimeArticles[1] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_daily_mirror_2013 where `label` ='crime'\");\r\n crimeArticles[2] = query.retrieveInstances();\r\n\r\n //SELECT content, label FROM article_the_island_2012 where `label` IS NOT NULL\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2012 where `label` = 'crime'\");\r\n crimeArticles[3] = query.retrieveInstances();\r\n\r\n query.setQuery(\"SELECT content, label FROM article_the_island_2013 where `label` = 'crime'\");\r\n crimeArticles[4] = query.retrieveInstances();\r\n\r\n FastVector attributeList = new FastVector(2);\r\n Attribute a1 = new Attribute(\"text\", (FastVector) null);\r\n FastVector classVal = new FastVector();\r\n classVal.addElement(\"crime\");\r\n classVal.addElement(\"other\");\r\n Attribute c = new Attribute(\"@@class@@\", classVal);\r\n //add class attribute and news text\r\n attributeList.addElement(a1);\r\n attributeList.addElement(c);\r\n Instances trainingData = new Instances(\"TrainingNews\", attributeList, 0);\r\n trainingData.setClassIndex(1);\r\n\r\n int crimeArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < crimeArticles[i].numInstances(); j++) {\r\n for (int k = 0; k < 5; k++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, crimeArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, crimeArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n crimeArticlesCount++;\r\n }\r\n }\r\n }\r\n System.out.println(\"Total Number of Crime Instances: \" + crimeArticlesCount);\r\n\r\n int otherArticlesCount = 0;\r\n for (int i = 0; i < numberOfPapers; i++) {\r\n for (int j = 0; j < otherArticles[i].numInstances(); j++) {\r\n Instance inst = new Instance(trainingData.numAttributes());\r\n inst.setValue(a1, otherArticles[i].instance(j).stringValue(0));\r\n inst.setValue(c, otherArticles[i].instance(j).stringValue(1));\r\n inst.setDataset(trainingData);\r\n\r\n\r\n System.out.println(inst);\r\n trainingData.add(inst);\r\n otherArticlesCount++;\r\n\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n if (otherArticlesCount == crimeArticlesCount) {\r\n break;\r\n }\r\n }\r\n System.out.println(\"Total Number of Other Instances: \" + otherArticlesCount);\r\n System.out.println(\"Total num of instances= \" + trainingData.numInstances());\r\n\r\n // apply the StringToWordVector filter\r\n filter.setInputFormat(trainingData);\r\n Instances dataFiltered = Filter.useFilter(trainingData, filter);\r\n System.out.println(\"Number of Attributes after stop words removal- \" + dataFiltered.numAttributes());\r\n System.out.println(\"\\n\\nFiltered data:\\n\\n\" + dataFiltered);\r\n\r\n Random r = new Random();\r\n dataFiltered.randomize(r);\r\n\r\n ArffSaver saver = new ArffSaver();\r\n saver.setInstances(dataFiltered);\r\n saver.setFile(new File(\"C:\\\\Users\\\\hp\\\\Desktop\\\\SVM implementation\\\\arffData\\\\balancedTrainingDataUSRandom.arff\"));\r\n saver.writeBatch();\r\n }",
"private void update(Instance instance) throws Exception {\n\n if (instance.classIsMissing()) {\n return;\n }\n\n instance.replaceMissingValues(m_MissingVector);\n m_Train.add(instance);\n\n /* Update the minimum and maximum for all the attributes */\n updateMinMax(instance);\n\n /* update the mutual information datas */\n updateMI(instance);\n\n /* Nearest Exemplar */\n Exemplar nearest = nearestExemplar(instance);\n\t\n /* Adjust */\n if(nearest == null){\n Exemplar newEx = new Exemplar(this, m_Train, 10, instance.classValue());\n newEx.generalise(instance);\n initWeight(newEx);\n addExemplar(newEx);\n return;\n }\n adjust(instance, nearest);\n\n /* Generalise */\n generalise(instance);\n }",
"private void setWeight() {\n \tthis.trainWeight = (this.trainCars*TRAIN_WEIGHT) + (this.crew + this.numPassengers) * AVE_PASSENGER_WEIGHT;\n }",
"@Override\r\n public void buildClassifier(Instances instances) throws Exception {\n getCapabilities().testWithFail(instances);\r\n\r\n // remove instances with missing class\r\n instances = new Instances(instances);\r\n instances.deleteWithMissingClass();\r\n\r\n // ensure we have a data set with discrete variables only and with no\r\n // missing values\r\n instances = normalizeDataSet(instances);\r\n\r\n // copy instances to local field\r\n// m_Instances = new Instances(instances);\r\n m_Instances = instances;\r\n\r\n // initialize arrays\r\n int numClasses = m_Instances.classAttribute().numValues();\r\n m_Structures = new BayesNet[numClasses];\r\n m_cInstances = new Instances[numClasses];\r\n // m_cEstimator = new DiscreteEstimatorBayes(numClasses, m_fAlpha);\r\n\r\n for (int iClass = 0; iClass < numClasses; iClass++) {\r\n splitInstances(iClass);\r\n }\r\n\r\n // update probabilty of class label, using Bayesian network associated\r\n // with the class attribute only\r\n Remove rFilter = new Remove();\r\n rFilter.setAttributeIndices(\"\" + (m_Instances.classIndex() + 1));\r\n rFilter.setInvertSelection(true);\r\n rFilter.setInputFormat(m_Instances);\r\n Instances classInstances = new Instances(m_Instances);\r\n classInstances = Filter.useFilter(classInstances, rFilter);\r\n\r\n m_cEstimator = new BayesNet();\r\n SimpleEstimator classEstimator = new SimpleEstimator();\r\n classEstimator.setAlpha(m_fAlpha);\r\n m_cEstimator.setEstimator(classEstimator);\r\n m_cEstimator.buildClassifier(classInstances);\r\n\r\n /*combiner = new LibSVM(); \r\n FastVector classFv = new FastVector(2);\r\n classFv.addElement(CNTL);\r\n classFv.addElement(CASE);\r\n Attribute classAt = new Attribute(m_Instances.classAttribute().name(), \r\n classFv);\r\n attributesFv = new FastVector(m_Structures.length);\r\n attributesFv.addElement(classAt);\r\n for (int i = 0; i < m_Instances.classAttribute().numValues(); i++){\r\n if (!m_Instances.classAttribute().value(i).equals(CNTL))\r\n attributesFv.addElement(new Attribute(m_Instances.classAttribute\r\n ().value(i)));\r\n }\r\n combinerTrain = new Instances(\"combinertrain\", attributesFv, \r\n m_Instances.numInstances());\r\n combinerTrain.setClassIndex(0);\r\n for (int i = 0; i < m_Instances.numInstances(); i++){\r\n double[] probs = super.distributionForInstance(m_Instances.instance(i));\r\n Instance result = new Instance(attributesFv.size()); \r\n if (!m_Instances.classAttribute().value(m_Instances.instance(i).\r\n classIndex()).equals(CNTL))\r\n result.setValue(classAt, CASE);\r\n else\r\n result.setValue(classAt, CNTL);\r\n for (int j = 0; j < attributesFv.size(); j++){\r\n if (!attributesFv.elementAt(j).equals(classAt)){\r\n Attribute current = (Attribute) attributesFv.elementAt(j);\r\n result.setValue(current, \r\n probs[m_Instances.classAttribute().indexOfValue\r\n (current.name())]);\r\n }\r\n }\r\n combinerTrain.add(result);\r\n }\r\n combinerTrain = discretize(combinerTrain);\r\n combiner.buildClassifier(combinerTrain);*/\r\n }",
"public static Instances formTrainSet(String trainFile)\n\t\t\tthrows FileNotFoundException {\n\t\tHashMap<Integer, Query> queries = new LinkedHashMap<Integer, Query>();\n\t\tScanner scanner = new Scanner(new File(trainFile));\n\t\tString line;\n\t\t// read query doc pairs and form training set\n\t\twhile (scanner.hasNextLine()) {\n\t\t\tline = scanner.nextLine();\n\t\t\tString tokens[] = line.split(\" \");\n\t\t\tint relevance = Integer.parseInt(tokens[0]);\n\t\t\tString toks[] = tokens[1].split(\":\");\n\t\t\tint queryId = Integer.parseInt(toks[1]);\n\t\t\tQuery query;\n\t\t\tif (queries.containsKey(queryId)) {\n\t\t\t\tquery = queries.get(queryId);\n\t\t\t} else {\n\t\t\t\tquery = new Query(numFeature);\n\t\t\t\tqueries.put(queryId, query);\n\t\t\t}\n\t\t\tInstance instance = new Instance(relevance, numFeature);\n\t\t\t//read features\n\t\t\tfor (int i = 2; i < tokens.length; i++) {\n\t\t\t\tif (tokens[i].startsWith(\"#\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString pair[] = tokens[i].split(\":\");\n\t\t\t\tinstance.addFeature(Integer.parseInt(pair[0]) - 1,\n\t\t\t\t\t\tDouble.parseDouble(pair[1]));\n\t\t\t}\n\t\t\tinstance.addCustomFeature();\n\t\t\tif (relevance == 0) {\n\t\t\t\tquery.addIrelDoc(instance);\n\t\t\t} else\n\t\t\t\tquery.addRelDoc(instance);\n\t\t}\n\t\tList<Instance> instances = new ArrayList<Instance>();\n\n\t\tfor (int qid : queries.keySet()) {\n//\t\t\tSystem.out.println(qid);\n\t\t\tQuery query = queries.get(qid);\n\t\t\tquery.normalize();\n\t\t\tfor (Instance instance : query.formTrainSet()) {\n\t\t\t\tinstances.add(instance);\n\t\t\t}\n\t\t}\n\t\tInstances trainingSet = new Instances(instances, numFeature, 2);\n\t\treturn trainingSet;\n\t}",
"@Override\n\tpublic void trainLocal() throws Exception {\n\t\tdouble [][] input = parameters.getInput();\n\t\tdouble [][] result = ann.getResults(parameters);\n\t\tif (state == preTraining) {//in this case, it is running in the pre-training mode.\n\t\t\tinput = newInput;\n\t\t\tresult = newInput;\n\t\t}\n\t\terr = 0; \n\t\tfor (int i = 0; i < mb; i++) {\t\n\t\t\tif (pos > input.length - 1) {\n\t\t\t\tpos = 0;\n\t\t\t}\n\t\t\terr = err + ann.runEpoch(input[pos], pos, result[pos], parameters);\n\t\t\tpos++;\n\t\t}\n\t}",
"public void reload(boolean training) {\n if (training) {\n this.train = getTrainingIterator();\n } else {\n this.test = getTestingIterator();\n }\n }",
"public Series setInstance(java.util.List<SeriesInstance> theValue) {\n\t\tmyInstance = theValue;\n\t\treturn this;\n\t}",
"void pretrain(DataSetIterator iterator);",
"void reset() {\n synchronized (instances) {\n instances.clear();\n }\n }",
"private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"TrainingTest createTrainingTest();",
"public void setTrainingData(TrainingData trainingData) {\n\t\t// normalise the input and outputs\n\t\tthis.X = m.normalise(trainingData.getTrainingInput(), trainingData.getMaxInput());\n\t\tthis.y = m.normalise(trainingData.getTrainingOutput(), trainingData.getMaxOutput());\n\t}",
"void trainingBatch(GenerateRandom rnd);",
"public void setupComputerPlayers() {\r\n\t\tif(models == null) models = new ModelFactory(this, options);\r\n\t\tCPUFactory factory = new CPUFactory(this);\r\n\t\tint cpuIndex = 0;\r\n\t\tfor(int i = 0; i < getNumPlayers(); i++) {\r\n\t\t\tboolean isCPU = i >= getNumPlayers() - getNumNPC();\r\n\t\t\tif(isCPU) {\r\n\t\t\t\tPlayer current = players.get(i);\r\n\t\t\t\tcurrent.setComputerPlayer(factory.getComputerPlayer(current, cpuTypes.get(cpuIndex++)));\r\n\t\t\t}\r\n\t\t} \r\n\t}",
"public void train (String trainingCollection) throws IOException {\n\t\tDocumentCollection trainCol = new DocumentCollection(trainingCollection);\n\t\ttrainCol.open();\n\t\tfor (int i=0; i<trainCol.size(); i++) {\n\t\t\tExternalDocument doc = trainCol.get(i);\n\t\t\ttrain (doc);\n\t\t}\n\t}",
"static void setWekaClassAttribute(Instances instances, String class_attribute) {\n if (class_attribute != null) {\n int i = 0;\n boolean set = false;\n while (i < instances.numAttributes() && !set) {\n Attribute attr = instances.attribute(i);\n if (class_attribute.equals(attr.name())) {\n instances.setClassIndex(i);\n set = true;\n }\n ++i;\n }\n if (!set) {\n instances.setClassIndex(instances.numAttributes() - 1);\n }\n } else {\n instances.setClassIndex(instances.numAttributes() - 1);\n }\n }",
"public static void mixedRecommend(final int nFolds, EngineParameter eparams, final String inPath) {\n\t\tList<String> trainingFiles;\n\t\tString trainPath, testPath;\n\t\t\n\t\tfor (int i = 0; i < nFolds; i++) {\n \t\ttrainPath = inPath+\"train_\"+i+\".csv\";\n \t\ttestPath = inPath+\"test_\"+i+\".csv\";\n\n org.apache.mahout.cf.taste.model.DataModel trainModel;\n org.apache.mahout.cf.taste.model.DataModel testModel;\n try {\n trainModel = new FileDataModel(new File(trainPath));\n testModel = new FileDataModel(new File(testPath));\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n\n\t\t\ttrainingFiles = new ArrayList<String>();\n\t\t\ttrainingFiles.add(trainPath);\n \t\tDataSourceParams dsp = eparams.getDataSouceParams();\n \t\teparams.setDataSource(trainingFiles, dsp.getEnclosure(), \"\t\", false, false);\n \t\teparams.setEngineName(\"EngineFold\"+i);\n \t\teparams.setTestFile(testPath);\n \t\teparams.setServing(\"br.ufsc.lapesd.orbs.example.crossvalidation.ServingToFile\");\n\n \t\tEngine engine;\n \t\tswitch (eparams.getEngineType()) {\n \t\tcase \"br.ufsc.lapesd.orbs.example.ucfclassic.UCFClassicEngine\": \n \t\t\tengine = new UCFClassicEngine(eparams);\n \t\t\tbreak;\n \t\tcase \"br.ufsc.lapesd.orbs.example.ucfmultiattribute.UCFMultiAttributeEngine\": \n \t\t\tengine = new UCFMultiAttributeEngine(eparams);\n \t\t\tbreak;\t\t\t\n \t\tcase \"br.ufsc.lapesd.orbs.core.ProposalEngine\":\n \t\t\tengine = new UCFProposalEngine(eparams);\n \t\t\tbreak;\t\t\t\t\n \t\tdefault:\n \t\t\tSystem.out.println(\"Declared engine no expected. Using ClassicNeighborhoodAnalyzerEngine instead.\");\n \t\t\tengine = new UCFClassicEngine(eparams);\n \t\t\tbreak;\t\t\n \t\t}\n \t\tSystem.out.println(\"EngineFold \"+ i +\" is start training.\");\n \t\tengine.train();\n\n \t\tSystem.out.println(\"EngineFold \"+ i +\" is receiving queries.\");\n \t\tLongPrimitiveIterator users;\n \t\ttry {\n \t\t\tusers = testModel.getUserIDs();\n while (users.hasNext()) {\n long u = users.nextLong();\n \tengine.query(new Query(String.valueOf(u), trainModel.getNumItems(), null, null, null));\n }\n } catch (TasteException e) {\n e.printStackTrace();\n }\n }\n }",
"public void trainingPreprocessing() {\n neuralNetAndDataSet = new NeuralNetAndDataSet(neuralNetwork, trainingSet);\n trainingController = new TrainingController(neuralNetAndDataSet);\n neuralNetwork.getLearningRule().addListener(this);\n trainingController.setLmsParams(0.7, 0.01, 0);\n LMS learningRule = (LMS) this.neuralNetAndDataSet.getNetwork().getLearningRule();\n if (learningRule instanceof MomentumBackpropagation) {\n ((MomentumBackpropagation) learningRule).setMomentum(0.2);\n }\n }",
"public WeightedInstances(Instances paraInstances) {\n\t\tsuper(paraInstances);\n\t\tsetClassIndex(numAttributes() - 1);\n\n\t\t// Initialize weights\n\t\tweights = new double[numInstances()];\n\t\tdouble tempAverage = 1.0 / numInstances();\n\t\tfor (int i = 0; i < weights.length; i++) {\n\t\t\tCommon.runSteps ++;\n\t\t\tweights[i] = tempAverage;\n\t\t} // Of for i\n\t\tSimpleTools.variableTrackingOutput(\"Instances weights are: \" + Arrays.toString(weights));\n\t}",
"public static void setAvailableProcessors(int availableProcessors) {\n/* 87 */ holder.setAvailableProcessors(availableProcessors);\n/* */ }",
"public List<DataInstance> augmentTrainingData(List<DataInstance> origTrainInstances) {\n Map<String, List<DataInstance>> docInstanceMap = new HashMap<>();\n Set<Attribute> possibleAttributes = new HashSet<>();\n Attribute analyzedN = null;\n Attribute outcomeValue = null;\n for (DataInstance instance : origTrainInstances) {\n String docName = instance.getX().getDocNames().iterator().next();\n List<DataInstance> docDataInstances = docInstanceMap.computeIfAbsent(docName, k -> new ArrayList<>());\n docDataInstances.add(instance);\n if (analyzedN == null || outcomeValue == null) {\n for (ArmifiedAttributeValuePair avp : instance.getX().getAllPairs()) {\n if (avp.getAttribute().getName().equals(\"Individual-level analysed\")) {\n analyzedN = avp.getAttribute();\n }\n }\n outcomeValue = instance.getY().getAttribute();\n }\n }\n if (analyzedN == null || outcomeValue == null) throw new RuntimeException(); // we don't want this to happen\n // loop over documents\n List<DataInstance> retInstances = new ArrayList<>();\n for (Map.Entry<String, List<DataInstance>> docInstancesEntry : docInstanceMap.entrySet()) {\n // not the case always but we'll take the smallest outcome to be our 'control'\n final List<DataInstance> instances = docInstancesEntry.getValue();\n int minInd = -1;\n double minValue = 1000.0;\n for (int i = 0; i < instances.size(); i++) {\n if (instances.get(i).getYNumeric() < minValue) {\n minInd = i;\n minValue = instances.get(i).getYNumeric();\n }\n }\n // control values\n final DataInstance controlInstance = instances.get(minInd);\n retInstances.add(controlInstance);\n final double controlOutcomeValue = controlInstance.getYNumeric() / 100; // convert from percentage\n int controlN = checkNumberParticipants(controlInstance, analyzedN);\n final double controlEvents = controlOutcomeValue * controlN;\n for (int i = 0; i < instances.size(); i++) {\n if (i == minInd)\n continue;\n final DataInstance experimentalInstance = instances.get(i);\n retInstances.add(experimentalInstance);\n final double experimentalOutcomeValue = experimentalInstance.getYNumeric() / 100; // convert from percentage\n int experimentalN = checkNumberParticipants(experimentalInstance, analyzedN);\n if (controlN == -1) {\n if (experimentalN == -1) {\n // if we find no number of participants, skip\n continue;\n } else {\n // if only missing control participants, assume same as experimental\n controlN = experimentalN;\n }\n } else {\n if (experimentalN == -1) {\n // if only missing experimental participants, assume same as contorl\n experimentalN = controlN;\n }\n }\n final double experimentalEvents = experimentalOutcomeValue * experimentalN;\n if (controlEvents < 1 && experimentalEvents < 1) { // probably means problem in annotation\n continue;\n }\n final double stdError = Math.sqrt(controlEvents * (controlN - controlEvents) / Math.pow(controlN, 3) +\n experimentalEvents * (experimentalN - experimentalEvents) / Math.pow(experimentalN, 3));\n final double stdDev = stdError / Math.sqrt(1.0 / controlN + 1.0 / experimentalN);\n final NormalDistribution experimentalDistribution = new NormalDistribution(experimentalOutcomeValue, stdDev);\n int sampleSize = (int) Math.ceil(Math.sqrt(experimentalN)); // try different functions for good sample size\n for (int j = 0; j < sampleSize; j++) {\n final double sample = experimentalDistribution.sample() * 100; // convert to percentage\n if (sample < 0 || sample > 100) continue;\n final ArmifiedAttributeValuePair y = experimentalInstance.getY();\n final DataInstance sampleInstance = new DataInstance(experimentalInstance.getX(), new ArmifiedAttributeValuePair(y.getAttribute(), \"\" + sample, y.getDocName(), y.getArm(), y.getContext(), y.getPageNumber()));\n retInstances.add(sampleInstance);\n }\n }\n }\n System.out.println(\"Original # insts: \" + origTrainInstances.size() + \" new # insts: \" + retInstances.size());\n return retInstances;\n }",
"public void setClients(final List<RunDataClient> clients) {\r\n\t\tthis.clients=clients;\r\n\t\tcount=clients.size();\r\n\t}",
"public ImagingStudy setNumberOfInstances( int theInteger) {\n\t\tmyNumberOfInstances = new IntegerDt(theInteger); \n\t\treturn this; \n\t}",
"public void addInstantiadedConfigurations(Object... instances) {\n this.configClassInstances.addAll(Arrays.asList(instances));\n }",
"private void postProcess() {\n for (ClusterData cd : clusters) {\n for (String serverName : cd.serverRefs) {\n if (instanceName.equals(serverName)) {\n cluster = cd;\n return;\n }\n }\n }\n // if we get here that means the instance either \n // does not exist or it is stand-alone\n cluster = new ClusterData();\n cluster.configRef = serverConfigRef;\n cluster.serverRefs.add(instanceName);\n }",
"public Drivetrain() {\n leftFrontMotor.getPIDController().setP(leftkP);\n leftFrontMotor.getPIDController().setI(leftkI);\n leftFrontMotor.getPIDController().setD(leftkD);\n leftFrontMotor.getPIDController().setFF(leftkFF);\n\n leftBackMotor.getPIDController().setP(leftkP);\n leftBackMotor.getPIDController().setI(leftkI);\n leftBackMotor.getPIDController().setD(leftkD);\n leftBackMotor.getPIDController().setFF(leftkFF);\n\n rightFrontMotor.getPIDController().setP(rightkP);\n rightFrontMotor.getPIDController().setI(rightkI);\n rightFrontMotor.getPIDController().setD(rightkD);\n rightFrontMotor.getPIDController().setFF(rightkFF);\n\n rightBackMotor.getPIDController().setP(rightkP);\n rightBackMotor.getPIDController().setI(rightkI);\n rightBackMotor.getPIDController().setD(rightkD);\n rightBackMotor.getPIDController().setFF(rightkFF);\n }",
"public void setLearningRate(double rate);",
"@Override\n public Iterator<Instance> call(Iterator<FoldMaker> foldMakerIterator)\n throws DistributedWekaException {\n\n if (foldMakerIterator.hasNext()) {\n int count = 0;\n while (foldMakerIterator.hasNext()) {\n if (count > 1) {\n throw new DistributedWekaException(\n \"We seem to have more than one \"\n + \"FoldMaker in this partition!\");\n }\n FoldMaker current = foldMakerIterator.next();\n Instances training = current.getTrainingFold(foldNumber);\n m_trainingInstancesForFold = new ArrayList<>(training.size());\n for (int i = 0; i < training.numInstances(); i++) {\n m_trainingInstancesForFold.add(training.get(i));\n }\n\n count++;\n }\n }\n\n return m_trainingInstancesForFold.iterator();\n }",
"@Override\r\n\tpublic void train(Documents trainingDocs) {\r\n\t\t// Convert the training documents to data.\r\n\t\tdata = convertDocumentsToData(trainingDocs);\r\n\t\t// Also add the words from the source domains into the featureIndexer.\r\n\t\tfor (String featureStr : knowledge.wordCountInPerClass\r\n\t\t\t\t.keySet()) {\r\n\t\t\tfeatureIndexerAllDomains\r\n\t\t\t\t\t.addFeatureStrIfNotExistStartingFrom0(featureStr);\r\n\t\t}\r\n\r\n\t\t// Initialize array from data.\r\n\t\tclassInstanceCount = new double[2];\r\n\t\tclassInstanceCount[0] = trainingDocs.getNoOfPositiveLabels();\r\n\t\tclassInstanceCount[1] = trainingDocs.getNoOfNegativeLabels();\r\n\t\t// Initialize array from knowledge.\r\n\t\tV = featureIndexerAllDomains.size();\r\n\t\tx = new double[V][];\r\n\t\tfor (int v = 0; v < V; ++v) {\r\n\t\t\tString featureStr = featureIndexerAllDomains\r\n\t\t\t\t\t.getFeatureStrGivenFeatureId(v);\r\n\t\t\tif (knowledge.wordCountInPerClass\r\n\t\t\t\t\t.containsKey(featureStr)) {\r\n\t\t\t\tx[v] = knowledge.wordCountInPerClass\r\n\t\t\t\t\t\t.get(featureStr);\r\n\t\t\t} else {\r\n\t\t\t\t// The word only appears in the target domain.\r\n\t\t\t\tx[v] = new double[] { 0.0, 0.0 };\r\n\t\t\t}\r\n\t\t}\r\n\t\tsum_x = knowledge.countTotalWordsInPerClass;\r\n\r\n\t\tif (param.convergenceDifference != Double.MAX_VALUE) {\r\n\t\t\t// Stochastic gradient descent.\r\n\t\t\tSGDEntry();\r\n\t\t}\r\n\r\n\t\t// Check if any value in x is nan or infinity.\r\n\t\tfor (int i = 0; i < x.length; ++i) {\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][0]), \"Is Nan\");\r\n\t\t\tExceptionUtility\r\n\t\t\t\t\t.assertAsException(!Double.isNaN(x[i][1]), \"Is Nan\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][0]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t\tExceptionUtility.assertAsException(!Double.isInfinite(x[i][1]),\r\n\t\t\t\t\t\"Is Infinite\");\r\n\t\t}\r\n\r\n\t\t// Update classification knowledge.\r\n\t\tknowledge = new ClassificationKnowledge();\r\n\t\t// knowledge.countDocsInPerClass = mCaseCounts;\r\n\t\t// knowledge.wordCountInPerClass =\r\n\t\t// mFeatureStrToCountsMap;\r\n\t\t// knowledge.countTotalWordsInPerClass =\r\n\t\t// mTotalCountsPerCategory;\r\n\t}",
"protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }",
"public Series setNumberOfInstances( int theInteger) {\n\t\tmyNumberOfInstances = new IntegerDt(theInteger); \n\t\treturn this; \n\t}",
"@Test(timeout = 4000)\n public void test74() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double[] doubleArray0 = new double[0];\n SparseInstance sparseInstance0 = new SparseInstance(0.0, doubleArray0);\n try { \n naiveBayesMultinomialText0.updateClassifier(sparseInstance0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"public void setUpEcosystem() {\n Pool skookumchuk = setUpSkookumchuk();\n Pool rutherford = setUpRutherford();\n Pool gamelin = setUpGamelin();\n\n ecosystem.addPool(skookumchuk);\n ecosystem.addPool(rutherford);\n ecosystem.addPool(gamelin);\n\n ecosystem.addStream(new Stream(skookumchuk, rutherford));\n ecosystem.addStream(new Stream(rutherford, gamelin));\n }",
"public Series setNumberOfInstances(IntegerDt theValue) {\n\t\tmyNumberOfInstances = theValue;\n\t\treturn this;\n\t}"
] | [
"0.66439515",
"0.66014993",
"0.6464587",
"0.64414746",
"0.63867855",
"0.6385683",
"0.61884916",
"0.61291534",
"0.6113696",
"0.6075539",
"0.6050825",
"0.59568286",
"0.59561443",
"0.59365225",
"0.5906458",
"0.5865738",
"0.58541584",
"0.5807938",
"0.5800142",
"0.57869524",
"0.57744175",
"0.5756696",
"0.57525533",
"0.5717519",
"0.56889355",
"0.5660129",
"0.5655285",
"0.56448096",
"0.5633227",
"0.5548077",
"0.5547822",
"0.5530935",
"0.55073404",
"0.55065227",
"0.54863906",
"0.54487294",
"0.5441184",
"0.54401696",
"0.543936",
"0.54306597",
"0.54270333",
"0.5423928",
"0.5404112",
"0.5390805",
"0.53744787",
"0.53636646",
"0.5361582",
"0.5351313",
"0.5319804",
"0.5307459",
"0.53057134",
"0.5301665",
"0.53005254",
"0.5288003",
"0.5267178",
"0.5256364",
"0.52378756",
"0.5232213",
"0.52269506",
"0.5225208",
"0.52032006",
"0.51985794",
"0.51893455",
"0.5162046",
"0.51584613",
"0.5150558",
"0.5144143",
"0.51381046",
"0.5137078",
"0.51222265",
"0.51180196",
"0.51014745",
"0.5095639",
"0.50949484",
"0.5075809",
"0.5070892",
"0.50690764",
"0.5065212",
"0.50567913",
"0.5050396",
"0.503946",
"0.5027909",
"0.50269353",
"0.50252885",
"0.5024611",
"0.5022895",
"0.50201136",
"0.5018661",
"0.5015894",
"0.50158554",
"0.50110966",
"0.5002334",
"0.50003177",
"0.49947083",
"0.49867082",
"0.49857044",
"0.49786583",
"0.49773043",
"0.49731204",
"0.4971244"
] | 0.6115032 | 8 |
Check to see if the data is sorted in order of the date time stamp (if present) | protected void sortCheck() {
if (m_instances == null) {
return;
}
if (m_simpleConfigPanel.isUsingANativeTimeStamp()) {
String timeStampF = m_simpleConfigPanel.getSelectedTimeStampField();
Attribute timeStampAtt = m_instances.attribute(timeStampF);
if (timeStampAtt != null) {
double lastNonMissing = Utils.missingValue();
boolean ok = true;
boolean hasMissing = false;
for (int i = 0; i < m_instances.numInstances(); i++) {
Instance current = m_instances.instance(i);
if (Utils.isMissingValue(lastNonMissing)) {
if (!current.isMissing(timeStampAtt)) {
lastNonMissing = current.value(timeStampAtt);
} else {
hasMissing = true;
}
} else {
if (!current.isMissing(timeStampAtt)) {
if (current.value(timeStampAtt) - lastNonMissing < 0) {
ok = false;
break;
}
lastNonMissing = current.value(timeStampAtt);
} else {
hasMissing = true;
}
}
}
if (!ok && !hasMissing) {
// ask if we should sort
int result = JOptionPane.showConfirmDialog(ForecastingPanel.this,
"The data does not appear to be in sorted order of \""
+ timeStampF + "\". Do you want to sort the data?",
"Forecasting", JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
if (m_log != null) {
m_log.statusMessage("Sorting data...");
}
m_instances.sort(timeStampAtt);
m_sortedCheck = true;
}
}
if (!ok && hasMissing) {
// we can't really proceed in this situation. We can't sort by the timestamp
// because instances with missing values will be put at the end of the data.
// The only thing we can do is to remove the instances with missing time
// stamps but this is likely to screw up the periodicity and majorly impact
// on results.
int result = JOptionPane.showConfirmDialog(ForecastingPanel.this,
"The data does not appear to be in sorted order of \""
+ timeStampF + "\". \nFurthermore, there are rows with\n" +
"missing timestamp values. We can remove these\n" +
"rows and then sort the data but this is likely to\n" +
"result in degraded performance. It is strongly\n" +
"recommended that you fix these issues in the data\n" +
"before continuing. Do you want the system to proceed\n" +
"anyway by removing rows with missing timestamps and\n" +
"then sorting the data?",
"Forecasting", JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
if (m_log != null) {
m_log.statusMessage("Removing rows with missing time stamps and sorting data...");
}
m_instances.deleteWithMissing(timeStampAtt);
m_instances.sort(timeStampAtt);
m_sortedCheck = true;
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSorted(){\n\tfor (int i = 0; i < (_size - 2); i++){\n\t if (_data[i].compareTo(_data[i + 1]) > 0){\n\t\treturn false;\n\t }\n\t}\n\treturn true;\n }",
"boolean hasOrderByDay();",
"boolean areSorted();",
"private static boolean isInOrderTimestamp(\n long timestamp,\n long prevTimestamp)\n {\n long timestampDiff = timestamp - prevTimestamp;\n\n // Assume that a diff this big must be due to reordering. Don't update\n // with reordered samples.\n return (timestampDiff < 0x80000000L);\n }",
"boolean hasSortNo();",
"boolean hasOrderByDataItem();",
"boolean isSortResult();",
"public boolean inOrder(Data other){\n\t\treturn data.compareTo(other.getData()) <= 0; \n\t}",
"@Test(priority = 7)\n\tpublic void validateSortingByDate() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(0, locator);\n\t\theroImg.validateDate(1, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(1, locator);\n\t\theroImg.validateDate(2, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"boolean isSortAscending();",
"@Test\n public void sortByCreationDateASC_ReturnTrue() {\n // Set SharedPreferences (Sort by Creation Date, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_CREATION_DATE)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (3) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TITLE)))));\n// onView(withId(R.id.fragment_note_text_textview))\n// .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TEXT)))));\n }",
"public boolean isSorted() {\n\t\tif (front == null) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\twhile (front.next != null) {\n\t\t\t\tListNode duplicate = front.next; // taking the next data from \"front' LinkedList (one index ahead)\n\t\t\t\tif (front.data > duplicate.data) { // comparing \"data[i]\" vs \"data[i+1]\"\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tfront = duplicate; // accumulator, similar to i++\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Then(\"the results should be sorted by most recent date\")\n public void the_results_should_be_sorted_by_most_recent_date() {\n int value= (new AccountActivityPage().dates.get(new AccountActivityPage().dates.size() - 1)).getText().compareTo((new AccountActivityPage().dates.get(0)).getText());\n\n Assert.assertTrue(value<0);\n\n }",
"@Test(dependsOnMethods = \"verifyInvoiceSortTest\")\r\n\tpublic void verifySchedDateSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\tAssert.assertTrue(firstRowData.size() > 0, \"No data rows found when sorting by date\");\r\n\t\t// click LoadID Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickschdateColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// compare to the database when sorted by given column-Descending\r\n\t\t// if (carrierschedulepayment.getRowCount() > 1)\r\n\t\t// Assert.assertNotEquals(firstRowData, lastRowData,\r\n\t\t// \"First Row Data: \\n\" + firstRowData + \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"boolean isOrdered();",
"boolean isOrdered();",
"boolean isIsOrdered();",
"public boolean hasOrderByDay() {\n return orderByDay_ != null;\n }",
"boolean hasOrderDate();",
"public static boolean isSorted(List<Review> reviewList) {\n boolean isSorted = true;\n \n if(reviewList.size() > 1) {\n GregorianCalendar lastDate = CalendarToolKit.iso8601ToCalendar(reviewList.get(0).getReviewDate());\n \n int i = 1;\n while(i < reviewList.size() && isSorted) {\n GregorianCalendar rdate = CalendarToolKit.iso8601ToCalendar(reviewList.get(0).getReviewDate());\n \n if(rdate.before(lastDate)) isSorted = false;\n \n lastDate = rdate;\n i++;\n }\n }\n \n return isSorted;\n }",
"private void checkSorting()\n {\n long parentChangeCounter = this.parent.getChangeCount();\n if (this.sortedRecords == null || this.changeCounter != parentChangeCounter)\n {\n long start = System.currentTimeMillis();\n \n // perform sort\n this.sortedRecords = this.parent.cloneRecordList();\n Collections.sort(this.sortedRecords, this);\n \n // recalculate selected index\n recalculateSelectedIndex();\n\n this.changeCounter = parentChangeCounter;\n \n if (logger.isDebugEnabled())\n logger.debug(this.recordCount()+\" records sorted in \"+(System.currentTimeMillis()-start)+ \"ms (selectedIndex=\"+getSelectedRecordIndex()+\")\");\n }\n }",
"public boolean checkSorting()\n {\n if(head == null)\n {\n return true;\n }\n else\n {\n Node current = head;\n \n while(current.next != head)\n {\n if(current.data.compareTo(current.next.data) > 0)\n {\n return false;\n }\n \n current = current.next;\n }\n }\n \n return true;\n }",
"@objid (\"fcf73d01-d406-41e9-9490-067237966153\")\n boolean isIsOrdered();",
"public String verifyDateInAscendingWithOutPagination(String object, String data) {\n\t\ttry {\n\n\t\t\tlogger.debug(\"Entered into verifyDateInAscendingWithOutPagination()\");\n\t\t\tList<String> actual = new ArrayList<String>();\n\t\t\tList<String> real = new ArrayList<String>();\n\t\t\t\n\t\t\t\tList<WebElement> expected = explictWaitForElementList(object);\n\t\t\t\t\n\t\t\t\t\texpected = explictWaitForElementList(object);\n\t\t\t\t\tfor (int i = 0; i < expected.size(); i++) {\n\t\t\t\t\t\tif (expected.get(i).getText().trim().length() != 0) {\n\t\t\t\t\t\t\tactual.add(expected.get(i).getText().trim());\n\t\t\t\t\t\t\treal.add(expected.get(i).getText().trim());\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tfinal DateFormat df = new SimpleDateFormat(data.trim());\n\t\t\tCollections.sort(actual, new Comparator<String>() {\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn df.parse(o1).compareTo(df.parse(o2));\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tlogger.debug(\"actual is as follows-- \" + actual);\n\t\t\tlogger.debug(\"real is as follows-- \" + real);\n\t\t\tif (real.equals(actual)) {\n\t\t\t\treturn Constants.KEYWORD_PASS + \" -- Dates are sorted\";\n\t\t\t} else\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Dates are not sorted\";\n\t\t} \ncatch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + e.getMessage();\n\t\t}\n\t}",
"public boolean isSorted() throws IOException{\n file.seek(0);\n int prev = file.readInt();\n for(int i = 0; i < totalNumbers-1; i++){\n int cur = file.readInt();\n if(prev < cur){\n return false;\n }\n prev = cur;\n }\n return true;\n }",
"boolean hasMoveSortNo();",
"private static <T extends Comparable <? super T>> boolean isSorted (List <T> list){\r\n\t\tT prev = list.get(0); // 1\r\n\t\tfor (T item : list){ //n\r\n\t\t\tif (item.compareTo(prev) < 0) return false;\r\n\t\t\tprev = item;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"boolean getSortNoNull();",
"public void checkDataOrder(Double[] times) {\n Double[] longitudes;\n Double[] latitudes;\n try {\n longitudes = getSampleLongitudes();\n latitudes = getSampleLatitudes();\n } catch ( Exception ex ) {\n // Messages about problems getting the longitudes or latitudes should already have been generated\n return;\n }\n TreeSet<DataLocation> orderedSet = new TreeSet<DataLocation>();\n for (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n if ( times[rowIdx] != null ) {\n DataLocation dataLoc = new DataLocation();\n // Messages about missing longitude, latitude, or times should already have been generated\n if ( (times[rowIdx] == null) || (longitudes[rowIdx] == null) || (latitudes[rowIdx] == null) )\n continue;\n dataLoc.setDataDate(new Date(Math.round(times[rowIdx] * 1000.0)));\n dataLoc.setLongitude(longitudes[rowIdx]);\n dataLoc.setLatitude(latitudes[rowIdx]);\n dataLoc.setRowNumber(rowIdx + 1);\n if ( !orderedSet.add(dataLoc) )\n throw new RuntimeException(\"Unexpected duplicate data location with row number\");\n }\n }\n\n // TODO: needs a better method of figuring out which rows are actually misordered\n // the following works okay if there is only one block of misordered data\n // or if multiple blocks are consistent in the \"direction\" they are misordered.\n\n double[] maxSpeeds = DashboardConfigStore.getMaxCalcSpeedsKnots();\n double[] maxTimeGaps = DashboardConfigStore.getMaxTimeGapsDays();\n\n // The following will say:\n // 4,5,6 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 1,2 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> forwardErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> forwardSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> forwardTimeGapMsgs = new ArrayList<ADCMessage>();\n int lastRowNum = 0;\n int expectedRowNum = 1;\n for (DataLocation dataLoc : orderedSet) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum < actualRowNum ) {\n forwardErrs.add(expectedRowNum);\n expectedRowNum += 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[actualRowNum - 1],\n latitudes[actualRowNum - 1], longitudes[lastRowNum - 1], latitudes[lastRowNum - 1]);\n double hourdelta = (times[actualRowNum - 1] - times[lastRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n forwardTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n forwardTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum += 1;\n }\n }\n // The following will say:\n // 7,8,9 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 3,4 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> reverseErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> reverseSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> reverseTimeGapMsgs = new ArrayList<ADCMessage>();\n lastRowNum = 0;\n expectedRowNum = numSamples;\n for (DataLocation dataLoc : orderedSet.descendingSet()) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum > actualRowNum ) {\n reverseErrs.add(expectedRowNum);\n expectedRowNum -= 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[lastRowNum - 1],\n latitudes[lastRowNum - 1], longitudes[actualRowNum - 1], latitudes[actualRowNum - 1]);\n double hourdelta = (times[lastRowNum - 1] - times[actualRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n reverseTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n reverseTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum -= 1;\n }\n }\n // Guess that the set with fewer errors is the correct one\n TreeSet<Integer> errorRowsNums;\n ArrayList<ADCMessage> speedMsgs;\n ArrayList<ADCMessage> timeGapMsgs;\n if ( (forwardErrs.size() + forwardSpeedMsgs.size() + forwardTimeGapMsgs.size())\n <= (reverseErrs.size() + reverseSpeedMsgs.size() + reverseTimeGapMsgs.size()) ) {\n errorRowsNums = forwardErrs;\n speedMsgs = forwardSpeedMsgs;\n timeGapMsgs = forwardTimeGapMsgs;\n }\n else {\n errorRowsNums = reverseErrs;\n speedMsgs = reverseSpeedMsgs;\n timeGapMsgs = reverseTimeGapMsgs;\n }\n for (Integer rowNum : errorRowsNums) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(rowNum);\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n String comment = \"time-misordered data row\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage spdmsg : speedMsgs) {\n // Speed problems could be in longitude ...\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or latitude ...\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or time\n for (Integer colIdx : indicesForTime) {\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage tgmsg : timeGapMsgs) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(tgmsg.getSeverity());\n msg.setRowNumber(tgmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(tgmsg.getGeneralComment());\n msg.setDetailedComment(tgmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n }",
"public boolean wasSorted()\n {\n return sorted;\n }",
"private static boolean isSorted() {\n for (int i=0; i<stack.size()-1; i++)\n if (stack.get(i)<stack.get(i+1)) return false;\n\n return true;\n }",
"public static boolean checkValid(List<Integer> data) {\n for (int i = 1; i != data.size(); ++i) {\n int previous = data.get(i - 1);\n int current = data.get(i);\n if (previous > current)\n // invalid sort\n return false;\n }\n return true;\n }",
"private static boolean isSorted(Comparable[] a) {\n for (int i = 1; i < a.length; i++)\n if (less(a[i], a[i-1])) return false;\n return true;\n }",
"public boolean isSorted()\n\t{\t\n\t\tfor (int index = 0; index < arraySize - 1; index++)\n\t\t{\n\t\t\tif (array[index] > array[index + 1])\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t}",
"public static boolean dIsSorted(double [] a) {\n\n for(int i = 0; i < a.length-1; i ++) { \n if (a[i] >= a[i+1]) {\n return false; \n }\n }\n return true;\n }",
"private void sortByDate(List<Entry> entries) {\n\t\t\n\t\tCollections.sort(entries, new Comparator<Entry>() {\n\t\t\tpublic int compare(Entry o1, Entry o2) {\n\t\t\t if (o1.getTimestamp() == null || o2.getTimestamp() == null)\n\t\t\t return 0;\n\t\t\t return o1.getTimestamp().compareTo(o2.getTimestamp());\n\t\t\t }\n\t\t\t});\n\t}",
"public boolean hasSortNo() {\n return sortNo_ != null;\n }",
"@Test\n public void testShipment_Sorted_By_Date() {\n List<Widget> widgets = shipment.getWidgetsSortedByDate();\n assertNotNull(widgets);\n assertTrue(widgets.size() == 10);\n Widget widget1 = (Widget) widgets.get(0);\n Widget widget2 = (Widget) widgets.get(1);\n assertTrue(widget1.getColor().compareTo(widget2.getColor()) <= 0);\n }",
"private void sortByDateOpen() {\r\n\t\tfor ( int i = 0; i < size-1; i++ ) {\r\n\t\t\tint minIndex = i; \r\n\t\t\tfor ( int j = i + 1; j < size; j++) { \r\n\t\t\t\t//returns -1 if the date is less than\r\n\t\t\t\tif ( accounts[j].getDateOpen().compareTo(accounts[minIndex].getDateOpen()) == -1 ) {\r\n\t\t\t\t\tminIndex = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tAccount temp = accounts[minIndex];\r\n\t\t\taccounts[minIndex] = accounts[i];\r\n\t\t\taccounts[i] = temp;\r\n\t\t}\r\n\t\treturn;\r\n\t}",
"public boolean isSorted() {\n for (int i = 1; i < n; i++)\n if (arr[i].compareTo(arr[i - 1]) < 0)\n return false;\n return true;\n }",
"private void sortByDateOpen() { // sort in ascending order\n\t\tint numAccounts = size;\n\t\tDate firstDateOpen;\n\t\tDate secondDateOpen;\n\t\t\n\t\tfor (int i = 0; i < numAccounts-1; i++) {\n\t\t\t\n\t\t\t\n\t\t\tint min_idx = i;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = i+1; j < numAccounts; j++) {\n\t\t\t\t\n\t\t\t\t// Retrieve last name of two that you are comparing\n\t\t\t\tfirstDateOpen = accounts[j].getDateOpen();\n\t\t\t\tsecondDateOpen = accounts[min_idx].getDateOpen();\n\t\t\t\t\n\t\t\t\tif (firstDateOpen.compareTo(secondDateOpen) < 0) {\n\t\t\t\t\tmin_idx = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAccount temp = accounts[min_idx];\n\t\t\taccounts[min_idx] = accounts[i];\n\t\t\taccounts[i] = temp;\n\t\t}\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic int compare(StatisticsItemData o1, StatisticsItemData o2) {\n\t\t\t\t\treturn o2.getDate().compareTo(o1.getDate());\n\t\t\t\t}",
"public boolean isLower(DateTime dt) {\n return Long.parseLong(this.vStamp) < Long.parseLong(dt.getStamp());\r\n }",
"public static <T extends Comparable<T>> boolean isSorted(T[] ts) {\n for (int i = 1; i < ts.length; i++) if (ts[i - 1].compareTo(ts[i]) > 0) return false;\n return true;\n }",
"private static <T> boolean isSorted(Comparable<T>[] a) {\n\t\tfor(int i=1; i<a.length; i++) {\r\n\t\t\tif(less(a[i],a[i-1]))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public boolean hasOrderByDay() {\n return orderByDayBuilder_ != null || orderByDay_ != null;\n }",
"private static boolean isSorted(String[] a) {\n for (int i = 1; i < a.length; i++) {\n if (a[i].compareTo(a[i-1]) < 0) {\n \treturn false;\n }\n }\n return true;\n }",
"public void validateListIsSorted(LinkedList<String> tableData2, String order) {\n\n\t\tLinkedList<String> sortedData = new LinkedList<>(tableData2);\n\t\tLinkedList<String> sortedData1 = new LinkedList<>(tableData2);\n\t\tif (order.equalsIgnoreCase(\"asc\"))\n\t\t{\n\t\t\tCollections.sort(sortedData);\n\t\t\tlogger.info(\"List data in ascending order :- \"+sortedData);\n\t\t}\n\t\telse if (order.equalsIgnoreCase(\"desc\")) {\n\t\t\tCollections.sort(sortedData1);\n\t\t\tsortedData.clear();\n\t\t\tfor (int yy = sortedData1.size() - 1; yy >= 0; yy--) {\n\t\t\t\tsortedData.add(sortedData1.get(yy).toString());\n\t\t\t}\n\t\t\tlogger.info(\"List data in descending order :- \"+sortedData);\n\t\t}\n\t\tfor (int i = 0; i < tableData2.size(); i++) {\n\t\t\tVerify.verifyEquals(sortedData.get(i), tableData2.get(i));\n\t\t}\n\n\t}",
"private void sortByDateOpen() {\n //selection sort\n for (int i = 0; i < size - 1; i++) {\n int earliestDateIndex = i;\n for (int j = i + 1; j < size; j++)\n if (accounts[j].getDateOpen().compareTo(accounts[earliestDateIndex].getDateOpen()) < 0) {\n earliestDateIndex = j;\n }\n Account acc = accounts[earliestDateIndex];\n accounts[earliestDateIndex] = accounts[i];\n accounts[i] = acc;\n }\n }",
"boolean getOrderByDayNull();",
"@Override\n public int compareTo(Date that) {\n if (this.year < that.year) return -1;\n if (this.year > that.year) return 1;\n if (this.month < that.month) return -1;\n if (this.month > that.month) return 1;\n if (this.day < that.day) return -1;\n if (this.day > that.day) return 1;\n return 0;\n }",
"public boolean hasOrderDate() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"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 }",
"boolean isOrderCertain();",
"public boolean hasOrderDate() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"private static ArrayList<Quest> sortAfterTimestamp(ArrayList<Quest> questListToSort) {\n\t\tfor (int i = 0; i < questListToSort.size() - 1; i++) {\n\t\t\tint index = i;\n\t\t\tfor (int j = i + 1; j < questListToSort.size(); j++) {\n\t\t\t\tif (questListToSort.get(j).getTimestamp() > questListToSort.get(index).getTimestamp()) {\n\t\t\t\t\tindex = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tCollections.swap(questListToSort, index, i);\n\t\t}\n\t\treturn questListToSort;\n\t}",
"static boolean isSorted(int[] array) {\n for (int i = 0; i < array.length - 1; i++) {\n if (array[i] > array[i + 1])\n return false;\n }\n return true;\n }",
"public boolean hasSortNo() {\n return sortNoBuilder_ != null || sortNo_ != null;\n }",
"@Test\n void sortByDate() {\n }",
"public static boolean isSorted(Integer[] list){\n\t\tfor (int i = 0; i < list.length - 1; i++)\n\t\t\tif (list[i] > list[i+1]) return false;\n\t\treturn true;\n\t}",
"private boolean isSortOrderAscending() {\n \t\tString sortOrder = (String) arguments.get(SORT_ORDER);\n \t\treturn !DESCENDING.equals(sortOrder);\n \t}",
"public static boolean isSorted(double[] list){\n\t\tif (list.length==1) \n\t\t\treturn true;\n\t\telse\n\t\t{\n\t\t\tfor( int i = 0; i <list.length-1; i++){\n\t\t\t\tif(list[i] >list[i+1]){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn true; // return true after you search a\n\t\t\n\t}",
"static boolean doubleArraySorted(double[] darray) {\n\t\tfor (int i = 0; i + 1 < darray.length; i++) {\n\t\t\t if (darray[i] > darray[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"boolean isEntriesFirst();",
"@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }",
"boolean isAscending();",
"double getSortTime();",
"public boolean isSorted(){\n return isSorted(root);\n }",
"public boolean isDate(Date date){\r\n if((new Date()).getTime() < date.getTime()) return false;\r\n return true;\r\n }",
"public boolean isBefore(Group3Date b) {\n\t\t\treturn compareTo(b) < 0;\n\t\t}",
"@Override\n public int compareTo(Date date) {\n if (this.year > date.year) {\n return 1;\n } else if (this.year < date.year) {\n return -1;\n } else if (this.year == date.year) {\n if (this.month > date.month) {\n return 1;\n } else if (this.month < date.month) {\n return -1;\n } else if (this.month == date.month) {\n if (this.day > date.day) {\n return 1;\n } else if (this.day < date.day) {\n return -1;\n } else if (this.day == date.day) {\n return 0;\n }\n }\n }\n return 0;\n }",
"public static boolean isSorted(int[] arr){\n\t\tfor(int i = 0; i < arr.length-1;i++)\n\t\t\tif(arr[i] > arr[i+1])\n\t\t\t\treturn false;\n\t\treturn true;\n\t}",
"private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }",
"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 }",
"private static boolean getSorted(JobConf conf) {\n return conf.getBoolean(INPUT_SORT, false);\n }",
"@Test\n public void compareTo() {\n assertTrue(DATE_A.compareTo(DATE_A) == 0);\n\n // testing recess week and reading week.\n assertTrue(DATE_READING.compareTo(DATE_AFTER_READING) == -1);\n assertTrue(DATE_RECESS.compareTo(DATE_AFTER_RECESS) == -1);\n }",
"public static boolean isSorted(int[] array)\n {\n for (int i=1; i<array.length; i++)\n if (array[i] < array[i-1])\n return false;\n return true;\n }",
"@Test\n public void testSort() {\n topScreenModel.setSortFieldAndFields(Field.LOCALITY, fields);\n\n FieldValue previous = null;\n\n // Test for ascending sort\n topScreenModel.refreshMetricsData();\n\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) < 0);\n }\n previous = current;\n }\n\n // Test for descending sort\n topScreenModel.switchSortOrder();\n topScreenModel.refreshMetricsData();\n\n previous = null;\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) > 0);\n }\n previous = current;\n }\n }",
"public static interface DataSorting {\n\t\t/**\n\t\t * The method which checks the line and determines whether or not it should be added or removed from the array. \n\t\t * <br />\n\t\t * Note that the <code>sort()</code> method will remove the line upon false, whereas <code>assort()</code> will remove it upon true.\n\t\t * \n\t\t * @param input\n\t\t * One line of the data array\n\t\t */\n\t\tpublic Boolean test(String input);\n\t}",
"public int compareTo(Group3Date that) {\n\t\t\tif (this.year < that.year) return -1;\n\t\t\tif (this.year > that.year) return +1;\n\t\t\tif (this.month < that.month) return -1;\n\t\t\tif (this.month > that.month) return +1;\n\t\t\tif (this.day < that.day) return -1;\n\t\t\tif (this.day > that.day) return +1;\n\t\t\treturn 0;\n\t\t}",
"public static void sortEvents(){\n if(events.size()>0){\n Comparator<Event> comp = new Comparator<Event>(){\n public int compare(Event e1, Event e2){\n if(e1.getEventStartTime().before(e2.getEventStartTime())){\n return -1;\n }\n else if(e1.getEventStartTime().after(e2.getEventStartTime())){\n return 1;\n }\n else{\n return 0;\n }\n }\n \n };\n Collections.sort(events, comp);\n \n }}",
"@Override\n public int compareTo(EmailVO emailVO) {\n int result = 0;\n if (data!=null) {\n if (emailVO.getData()!=null) {\n if (this.data.getTime() > emailVO.getData().getTime()) {\n result = 1;\n }\n }\n }\n return result;\n }",
"@Override\n public void onSortByDate() {\n mSorter.sortLocationsByDate(mListLocations);\n mAdapter.notifyDataSetChanged();\n }",
"public static boolean isSorted(int[] a) {\n for(int i = 0; i < a.length-1; i ++) { \n if (a[i] > a[i+1]) {\n return false; \n }\n }\n return true;\n }",
"public void dateHashMapSorted() {\n\t\t//array used to store the key values of the unsorted HashMap\n\t\tLocalDate[] unsortedArr = new LocalDate[SORTINGDATES_SIZE];\n\t\n\t\t//adding all the keys to unsortedArr\n\t\tint i = 0;\n\t\tfor (LocalDate key : map.keySet()) {\n\t\t\t\tunsortedArr[i++] = key;\n\t\t\t}\n\t\t\n\t\tfor (int currIndex = 1; currIndex < unsortedArr.length; currIndex++) {\n\t\t\tLocalDate date = unsortedArr[currIndex];\n\t\t\tint k = currIndex - 1;\n\t\t\t\t\n\t\t\t/*\n\t\t\t * while the index for the array stays above 0 and the element in the previous\n\t\t\t * index is greater than the element at the currentIndex\n\t\t\t */\n\t\t\twhile ((k >= 0) && (unsortedArr[k].isAfter(date))) {\n\t\t\t\t//shifting the elements to the right\n\t\t\t\tunsortedArr[k + 1] = unsortedArr[k];\n\t\t\t\t//decrement x to move the other elements over\n\t\t\t\tk--;\t\n\t\t\t}\n\t\t\tunsortedArr[k + 1] = date;\n\t\t}\n\n\t\tfor (i = 0; i < unsortedArr.length; ++i) {\n\t\t\tSystem.out.println(unsortedArr[i]);\n\t\t}\n\t}",
"@Override\n public int compareTo(ChildData data) {\n if (this.childDOBDate == null && data.childDOBDate == null)\n return 0;\n if (this.childDOBDate != null && data.childDOBDate == null)\n return -1;\n if (this.childDOBDate == null && data.childDOBDate != null)\n return 1;\n return this.childDOBDate.compareTo(data.childDOBDate);\n }",
"public static boolean isSorted(int[] a) {\n\t\tfor (int i = 1; i < a.length; i++)\n\t\t\tif (a[i] < a[i - 1])\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"boolean wasSooner (int[] date1, int[] date2) {\n\n// loops through year, then month, then day if previous value is the same\n for (int i = 2; i > -1; i--) {\n if (date1[i] > date2[i])\n return false;\n if (date1[i] < date2[i])\n return true;\n }\n return true;\n }",
"public static boolean isSorted(Comparable[] a) {\n for (int i = 1; i < a.length; i++)\n if (less(a[i], a[i-1]))\n return false;\n \n return true;\n }",
"public boolean hasMoveSortNo() {\n return moveSortNo_ != null;\n }",
"public static boolean isSorted(int[] arr) {\n int prev = 0;\n \n for (int i = 0; i < arr.length; i++) {\n if (prev > arr[i]) return false;\n prev = arr[i];\n }\n\n return true;\n }",
"private GeofenceInfoContent[] sortByDate(GeofenceInfoContent[] geofenceInfoContents){\n GeofenceInfoContent infoContent = null;\n for(int j = 0; j < geofenceInfoContents.length; j++) {\n for (int i = 0; i < geofenceInfoContents.length; i++) {\n infoContent = geofenceInfoContents[i];\n if (i < geofenceInfoContents.length - 1) {\n String year1 = infoContent.getYear();\n String year2 = geofenceInfoContents[i + 1].getYear();\n int year1Int = Integer.parseInt(year1);\n int year2Int = Integer.parseInt(year2);\n if (year1Int < year2Int) {\n geofenceInfoContents[i] = geofenceInfoContents[i + 1];\n geofenceInfoContents[i + 1] = infoContent;\n }\n }\n }\n }\n return geofenceInfoContents;\n }",
"@Override\n\tpublic int compareTo(ParsedURLInfo o) {\n\t\treturn this.seqTime.compareTo(o.getSeqTime());\n\t}",
"public static <T extends Comparable<T>> void checkSorted(T[] ts) {\n if (!isSorted(ts))\n throw new RuntimeException(\"array is not sorted\");\n }",
"private List<Date> checkOrderOfDateTimes(List<Date> dateTimes) {\n\t\tif (dateTimes != null && dateTimes.size() == 2) {\n\t\t\tDate startDate = dateTimes.get(0);\n\t\t\tDate endDate = dateTimes.get(1);\n\t\t\tif (endDate.compareTo(startDate) < 0) {\n\t\t\t\tCalendar startCal = Calendar.getInstance();\n\t\t\t\tstartCal.setTime(startDate);\n\t\t\t\tstartCal.set(Calendar.HOUR_OF_DAY, 0);\n\t\t\t\tCalendar endCal = Calendar.getInstance();\n\t\t\t\tendCal.setTime(endDate);\n\t\t\t\tendCal.set(Calendar.HOUR_OF_DAY, 0);\n\n\t\t\t\tif (endCal.compareTo(startCal) == 0) {\n\t\t\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\t\tc.setTime(endDate);\n\t\t\t\t\tc.add(Calendar.DATE, 1);\n\t\t\t\t\tendDate = c.getTime();\n\t\t\t\t\tdateTimes.set(1, endDate);\n\t\t\t\t} else {\n\t\t\t\t\tdateTimes.set(0, endDate);\n\t\t\t\t\tdateTimes.set(1, startDate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dateTimes;\n\t}",
"boolean hasOrderByAnnotation();",
"@Test(priority = 6)\n\tpublic void validateSortingFunctionality() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.clickCustomerReviews(locator);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}",
"private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }",
"boolean isOrderable();",
"static boolean isSorted(int arr[]) {\n\t\tif(arr.length==1) {\n\t\t\treturn true;\n\t\t}\n\t\tif(arr[0]>arr[1]) {\n\t\t\treturn false;\n\t\t}\n\t\tint paritialArray [] = new int[arr.length-1];\n\t\tfor(int i=0; i<paritialArray.length; i++) {\n\t\t\tparitialArray[i] = arr[i+1];\n\t\t}\n\t\tboolean result = isSorted(paritialArray);\n\t\treturn result;\n\t\t\n\t\t\n\t}"
] | [
"0.67725754",
"0.6720331",
"0.65522736",
"0.65505326",
"0.63987",
"0.6281803",
"0.61534375",
"0.6145648",
"0.6121534",
"0.6111012",
"0.60559356",
"0.6054158",
"0.60358423",
"0.6019825",
"0.5982893",
"0.5982893",
"0.5980489",
"0.5976513",
"0.5957519",
"0.5956309",
"0.59483993",
"0.59475595",
"0.59291404",
"0.5878421",
"0.58640575",
"0.5860547",
"0.5856528",
"0.58452076",
"0.5838875",
"0.58152115",
"0.5814228",
"0.57903224",
"0.5786685",
"0.5783405",
"0.5780846",
"0.5765683",
"0.5764375",
"0.5756163",
"0.5744656",
"0.5742578",
"0.57142824",
"0.57105374",
"0.57093775",
"0.5708907",
"0.57059413",
"0.5689548",
"0.5688175",
"0.5686382",
"0.56829005",
"0.5641677",
"0.5632749",
"0.56303865",
"0.56272215",
"0.5613032",
"0.55996996",
"0.55922025",
"0.5578829",
"0.55583346",
"0.5535315",
"0.55256623",
"0.550906",
"0.5496716",
"0.54899853",
"0.54657453",
"0.54617757",
"0.5452781",
"0.5451983",
"0.5436704",
"0.5434291",
"0.54129636",
"0.54082394",
"0.5403001",
"0.5402345",
"0.53989583",
"0.53986",
"0.5392272",
"0.5388958",
"0.5375192",
"0.536894",
"0.5368901",
"0.53575194",
"0.5345887",
"0.53250563",
"0.5321275",
"0.53211856",
"0.53171945",
"0.5309598",
"0.52927774",
"0.529114",
"0.5289459",
"0.5282245",
"0.5279091",
"0.52623695",
"0.5261248",
"0.5259574",
"0.52527225",
"0.52510774",
"0.5250004",
"0.5249007",
"0.5244541"
] | 0.64897496 | 4 |
Stop the currently running thread | protected void stopForecaster() {
if (m_runThread != null) {
m_runThread.interrupt();
m_runThread.stop();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stop()\n {\n if ( this.threadRunning.get() )\n {\n this.threadRunning.set(false);\n }\n }",
"public void stop() {\n if (this.thread != null) {\n Thread thre = this.thread;\n this.thread = null;\n thre.interrupt();\n }\n }",
"public void stop() {\n thread.interrupt();\n }",
"public void stop() {\n thread.interrupt();\n }",
"public void stop() {\n thread = null;\n }",
"public void Stop() {\r\n\t\t\r\n\t\tthread = null;\r\n\t}",
"public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public void stop() {\n stopped.set(true);\n if (this.currentThread != null) {\n this.currentThread.interrupt();\n this.currentThread = null;\n }\n }",
"public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"public synchronized void stop() {\n try {\n if (isRunning) {\n isRunning = false;\n thread.join();\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n System.exit(0);\n }",
"public static void ThreadStop()\r\n\t{\r\n\t\tthread_running=false;\r\n\t}",
"@Override\n public void stopThread() {\n Log.d(TAG, \"Stopping \" + getName() + \" thread!\");\n running = false;\n doStopAction();\n boolean retry = true;\n while (retry) {\n try {\n join();\n retry = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"private void stopThread()\n {\n if (workerThread != null && workerThread.isAlive())\n {\n workerThread.stopLoop();\n }\n stopSelf();\n }",
"private void stop(){\n isRunning = false;\n try{\n thread.join();\n }\n catch(InterruptedException e){\n e.printStackTrace();\n }\n }",
"public void stop(Thread arg0) {\n\t\t\n\t}",
"public void stopThread() \n {\n \tthis.exit = true;\n \t//ctr.getMemory().programmcounter = 65536;\n }",
"public void stop() {\n\t\t//If we have already stopped, or are not running, we don't have to do anything.\n\t\tif (thread == null || stop || done) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthis.stop = true;\n\t\t\n\t\t//If we are RUNNING, we are now STOPPING\n\t\tif (isRunning()) {\n\t\t\tstateProperty.set(GameState.STOPPING);\n\t\t}\n\t}",
"public void stop()\n\t{\n\t\tif (m_thread != null)\n\t\t{\n\t\t\tm_thread.stop();\n\t\t\tm_thread = null;\n\t\t}\n\n\t\t// TODO: Place additional applet stop code here\n\t}",
"boolean stopThread();",
"public synchronized void stop() {\n this.running = false;\n }",
"public synchronized void stop() {\n\t\tif(!isRunning) return; //If the game is stopped, exit method\n\t\tisRunning = false; //Set boolean to false to show that the game is no longer running\n\t\t//Attempt to join thread (close the threads, prevent memory leaks)\n\t\ttry {\n\t\t\tthread.join();\n\t\t}\n\t\t//If there is an error, print the stack trace for debugging\n\t\tcatch(InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void stopPlayThread() {\n ms.stop();\n }",
"public void stop() {\n if (started && thread != null) {\n stopRequested = true;\n thread.interrupt();\n if (audio != null) {\n audio.stop();\n }\n }\n }",
"private void stopThreadByInterrupt() {\n if (customThread != null) {\n try {\n customThread.join();\n customThread.interrupt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public void stop()\n\t{\n\t\trunning = false;\n\t}",
"@Override\n protected void onStop() {\n \tsuper.onStop();\n \tthread.setThreadExit(true);\n \tthread = null;\n \t\n }",
"private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}",
"public void stop() {\n _running = false;\n }",
"public void stop() {\n clockThread = null;\n }",
"public void stop() {\n mSelf.stop();\n }",
"public void stop() {\r\n running = false;\r\n }",
"public static void stop() {\n if (isRunning()) {\n _thd.stop();\n _thd = null;\n }\n }",
"private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }",
"public void stopRunnerThread() {\r\n\t\ttry {\r\n\t\t\tif (runnerThread != null)\r\n\t\t\t\trunnerThread.join();\r\n\t\t} catch (InterruptedException ex) {\r\n\t\t\tassert(false) : \"Unit stopRunnerThread was interrupted\";\r\n\t\t}\r\n\t\t\r\n\t}",
"public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.stop();\r\n\t}",
"public void stop() {\n running = false;\n }",
"public void stop()\n {\n running = false;\n }",
"public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}",
"public void stopThread(View view) {\n //stopThreadByInterrupt();\n //stopThreadByBoolean();\n stopThreadByRunnable();\n\n\n }",
"public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }",
"public final void stop() {\n running = false;\n \n \n\n }",
"public void stop() {\n cancelCallback();\n mStartTimeMillis = 0;\n mCurrentLoopNumber = -1;\n mListener.get().onStop();\n }",
"private void stopThreadByBoolean() {\n if (customThread != null) {\n customThread.stopThread();\n }\n }",
"void stop()\n {\n log.info(\"Begin stop(), instance = '\" + instance + \"'\");\n\n if (isAlive())\n {\n processor.stop();\n try { t.join(); } catch (InterruptedException e) {}\n running = false;\n }\n\n log.info(\"End stop(), instance = '\" + instance + \"'\");\n }",
"public void stop()\n\t{\n\t\tsynchronized(m_vecThreads)\n\t\t{\n\t\t\tThread thread;\n\t\t\tif (m_vecThreads.size() > 0)\n\t\t\t{\n\t\t\t\tthread = (Thread)m_vecThreads.elementAt(0);\n\t\t\t\twhile (thread.isAlive())\n\t\t\t\t{\n\t\t\t\t\tthread.interrupt();\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t\tm_vecThreads.wait(250);\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\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}",
"public void stop() {\n\t\t//start the processor thread\n\t\t//logger.debug(processorName+\" stopping processor thread\");\n\t\tprocessorThread.interrupt();\n\t\t\n\t\t//logger.debug(processorName+\" stopped\");\n\t}",
"public synchronized void stop() {\n\t\tif (!isStart) {\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t\tfor (LoopThread l : thread) {\n\t\t\tl.finnish();\n\t\t}\n\t\tint activeCount;\n\t\tdo{\n\t\t\tactiveCount = 0;\n\t\t\tfor(LoopThread l : thread){\n\t\t\t\tif(l.isAlive()){\n\t\t\t\t\tactiveCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t} while (activeCount > 0);\n\t\t\n\t}",
"public void stop(){\n running = false;\n }",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop();",
"public void stop() {\n\t\trunflag.set(false);\n\n\t\twhile (worker.isAlive()) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(10); // Wait until it stops\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"protected void stopThread() {\n\t\t_running = false;\n\t\t\n\t\tfor (ClientHandler client : _connectedClients) {\n\t\t\tif (client != null && client.isAlive()) {\n\t\t\t\tclient.stopThread();\n\t\t\t\ttry {\n\t\t\t\t\tclient.join();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tSystem.out.println(\"Client listener: Error while stopping client.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void stop() {}",
"public void stop() {\n\t\tthis.stopTime = System.nanoTime();\n\t\tthis.running = false;\n\t}",
"public void stop(){\r\n\t\tmyTask.cancel();\r\n\t\ttimer.cancel();\r\n\t}",
"private void stopThreadByRunnable() {\n if (customRunnable != null) {\n customRunnable.killRunnable();\n }\n }",
"public synchronized void stop() {\n // handlerThread must not be null, else the stop impl will throw\n handlerThread = new HandlerThread(\"nothing\");\n super.stop();\n }",
"protected void stopBackgroundThread() {\n mBackgroundThread.quitSafely();\n try {\n mBackgroundThread.join();\n mBackgroundThread = null;\n mBackgroundHandler = null;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"private void workerStop() {\r\n\r\n\t\tif (_workerThread == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tsynchronized (_workerLock) {\r\n\r\n\t\t\t_workerCancelled = true;\r\n\t\t\t_workerStopped = true;\r\n\r\n\t\t\t_workerLock.notifyAll();\r\n\t\t}\r\n\r\n\t\twhile (_workerThread != null) {\r\n\t\t\tif (!_display.readAndDispatch()) {\r\n\t\t\t\t_display.sleep();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void stop() {\n\t\tthread.requestStop = true;\n\t\tlong start = System.currentTimeMillis()+timeout;\n\t\twhile( start > System.currentTimeMillis() && thread.running )\n\t\t\tThread.yield();\n\n\t\tdevice.stopDepth();\n\t\tdevice.stopVideo();\n\t\tdevice.close();\n\t}",
"public void stop() {\n\t\tthis.timer.cancel();\n\t}",
"public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }",
"public final void stopRunning() {\n\t\t_running = false;\n\t}",
"public void stop() {\r\n\t\t//If the program has an error this will stop the program\r\n\t\ttry {\r\n\t\t\trunning = false;\r\n\t\t\tg.dispose();\r\n\t\t\tthread.join();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public synchronized void stop(){\n\t\tif (tickHandle != null){\n\t\t\ttickHandle.cancel(false);\n\t\t\ttickHandle = null;\n\t\t}\n\t}",
"public boolean stop();",
"public synchronized void stop() {\n if(running) {\n this.running = false;\n try {\n this.soundThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"public void stop() {\n\t\t_timer.cancel();\n\t}",
"synchronized public void stopDevice() {\n mStopThread = true;\n }",
"public void stop() {\n executor.shutdownNow();\n rescanThread.interrupt();\n }",
"public void stop() {\n\t\tthis.close(this.btcomm);\n\t}",
"public void stop()\n\t{\n\t\t//get the time information as first part for better precision\n\t\tlong systemMs = SystemClock.elapsedRealtime();\n\n\t\t//if it was already stopped or did not even run, do nothing\n\t\tif (!m_running)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tm_elapsedMs += (systemMs - m_lastMs);\n\n\t\tm_running = false;\n\t}",
"public void stop() {\n\t\tthis.controller.terminate();\n\t}",
"public void stop() {\n executor.shutdown();\n }",
"public void stopThread() {\n\t\talive = false;\n\t\t\n\t\ttry {\n\t\t\tif(oos != null) {\n\t\t\t\toos.close();\n\t\t\t}\n\t\t\tif(ois != null) {\n\t\t\t\tois.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// Why the hell is that being thrown here? Doesn't matter.\n\t\t}\n\t}",
"public void stop() {\n }",
"public void stop() {\n }",
"public void stop() {\n \n // first interrupt the server engine thread\n if (m_runner != null) {\n m_runner.interrupt();\n }\n\n // close server socket\n if (m_serverSocket != null) {\n try {\n m_serverSocket.close();\n }\n catch(IOException ex){\n }\n m_serverSocket = null;\n } \n \n // release server resources\n if (m_ftpConfig != null) {\n m_ftpConfig.dispose();\n m_ftpConfig = null;\n }\n\n // wait for the runner thread to terminate\n if( (m_runner != null) && m_runner.isAlive() ) {\n try {\n m_runner.join();\n }\n catch(InterruptedException ex) {\n }\n m_runner = null;\n }\n }",
"public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public synchronized void stop(){\n if(!jogoAtivo) return;\n jogoAtivo = false;\n try {\n thread.join();\n } catch (InterruptedException e ){\n e.printStackTrace();\n }\n }",
"private void stop() {\n timer.cancel();\n timer = null;\n }",
"public void stopTask() {\n if(canRunTaskThread != null)\n canRunTaskThread.set(false);\n }",
"public void stopRequest()\r\n\t{\r\n\t\tnoStopRequested = false;\r\n\t\tinternalThread.interrupt();\r\n\t}",
"public void stop ()\n\t{\n\t\tif (core.hasLock (frame))\n\t\t{\n\t\t\tif (model != null) model.stop();\n\t\t\tstop = true;\n\t\t}\n\t}",
"public void cancel(){\r\n\t\t\r\n\t\ttry{\t\t\t\r\n\t\t\t// Stop the runnable job\r\n\t\t\trunning = false;\r\n\t\t\tjoin(1000);\r\n\t\t\t\r\n\t\t\t// Close socket\r\n\t\t\toSocket.close();\r\n\t\t\t\r\n\t\t}catch(InterruptedException e1){\r\n\t\t\tLog.e(TAG, \"terminating tread failed\", e1);\r\n\t\t}catch (IOException e2) {\r\n\t\t\tLog.e(TAG, \"cancel(), closing socket failed\", e2);\r\n\t\t}\t\r\n\t}",
"public void cancel() {\n stopThread = true;\n\t\ttry {\n\t\t\tmmSocket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}"
] | [
"0.8615728",
"0.844838",
"0.8385642",
"0.83531785",
"0.8269198",
"0.8265412",
"0.82089096",
"0.8153947",
"0.8126142",
"0.8089367",
"0.8077967",
"0.80659795",
"0.79772824",
"0.7911992",
"0.7892529",
"0.77011967",
"0.76983476",
"0.76854515",
"0.7614345",
"0.7611413",
"0.7579938",
"0.7577638",
"0.7503782",
"0.7490275",
"0.74842596",
"0.74724054",
"0.7468404",
"0.74499005",
"0.7444561",
"0.74083704",
"0.73826957",
"0.73727834",
"0.73723936",
"0.735833",
"0.7355034",
"0.73516965",
"0.734331",
"0.73273504",
"0.7324322",
"0.731404",
"0.73135316",
"0.7301699",
"0.73012954",
"0.7283947",
"0.7258395",
"0.72510093",
"0.7247933",
"0.72464454",
"0.72431266",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.72360194",
"0.7225967",
"0.72173953",
"0.72152925",
"0.72134054",
"0.71812505",
"0.71779925",
"0.71441054",
"0.71413356",
"0.71267366",
"0.71179783",
"0.71001965",
"0.70966774",
"0.70799553",
"0.70752114",
"0.7065497",
"0.7059453",
"0.70213604",
"0.70175683",
"0.70025325",
"0.6974191",
"0.6968498",
"0.69571334",
"0.69545764",
"0.69542503",
"0.6945625",
"0.69414973",
"0.69414973",
"0.69375134",
"0.6934915",
"0.69344515",
"0.69318616",
"0.6924494",
"0.6922275",
"0.6884791",
"0.6884705",
"0.6882515"
] | 0.6940469 | 91 |
Log to the status area. Logs to the log area if the string begins with "WARNING" or "ERROR" | private void logStatusMessage(String string) {
if (m_log != null) {
m_log.statusMessage(string);
if (string.contains("WARNING") || string.contains("ERROR")) {
m_log.logMessage(string);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract void logWarn(String warning);",
"abstract void errorLogWarn(String warning);",
"protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\n }",
"private void logWarning(String msgText) {\n System.out.println (\"[WARNING] \" + msgText);\n \n }",
"public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}",
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"protected final void warning(String warning) {\r\n //System.err.format(\"[\" + name + \"] @%4.9f: WARNING: %s\", Harness.getTime().getFracSeconds(), warning);\r\n //System.err.println();\r\n Harness.log(name, \"WARNING: \" + warning);\r\n warningCount++;\r\n }",
"protected void statusMessage(String message) {\n \n m_Log.statusMessage(message);\n }",
"void logTiMessages(final String msg);",
"void printLog(String str, int level)\n { if (log!=null) log.println(\"CommandLineUA: \"+str, UserAgent.LOG_OFFSET+level);\n }",
"public static void logWarning(String message)\n {\n log(IStatus.WARNING, message);\n }",
"public void logImportant(String str) {\n\t\tSystem.out.println(str);\n\t}",
"public static void w(String str) {\n if (Log.isLoggable(TAG, Log.WARN)) {\n Log.w(TAG, str);\n }\n }",
"private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }",
"public void appendStatusText(String msg) {\n status.append(msg);\n }",
"String getLogHandled();",
"@Override\r\n\t\t\tpublic void onStallWarning(StallWarning arg0) {\n\t\t\t\tSystem.out.println(\"Stalling\" + arg0.toString());\r\n\r\n\t\t\t}",
"@Override\n public void updateLog(String msg) {\n\n setText2Log(msg);\n }",
"protected void checkLog() {\n String keyword = \"Connected controllable Agent to the Introscope Enterprise Manager\";\n LogUtils util = utilities.createLogUtils(umAgentConfig.getLogPath(), keyword);\n assertTrue(util.isKeywordInLog());\n\t}",
"private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }",
"abstract void consoleWarn(String warning);",
"@Override\n public void onWarn(String s, MLTtsWarn mlTtsWarn) {\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }",
"public void add_to_log(String s){\n }",
"public void log(String text) {\n }",
"public void m16920a(String str) {\n this.f14943b.putString(\"err_log_filter\", str);\n }",
"public void addWarning(String warning);",
"private void logError(String msgText) {\n System.out.println (\"[ERROR] \" + msgText);\n \n }",
"public void log(String txt);",
"abstract protected void logInternal(int level, String message);",
"private void dispPrinterWarnings(PrinterStatusInfo status) {\n String warningsMsg = \"\";\n\n if (status == null) {\n return;\n }\n\n if (status.getPaper() == Printer.PAPER_NEAR_END) {\n warningsMsg += getString(R.string.handlingmsg_warn_receipt_near_end);\n }\n\n if (status.getBatteryLevel() == Printer.BATTERY_LEVEL_1) {\n warningsMsg += getString(R.string.handlingmsg_warn_battery_near_end);\n }\n\n// edtWarnings.setText(\"Warning\");\n }",
"public void println(String string) {\n // make sure that the global weka log picks it up\n System.out.println(string); \n logStatusMessage(string);\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"public void appendWarning(String err) {\n warnMessages.append(err);\n }",
"public void warning(String msg) {\n log(WARNING, msg);\n }",
"protected void logList(List<String> log) {\n\t\tfor (String string : log) {\n\t\t\tlogMsg(string);\t\n\t\t\tif (string.startsWith(\"error \")) {\n\t\t\t\talert(string.replaceFirst(\"^error \", \"\"));\n\t\t\t}\n\t\t}\n\t}",
"public void log(String msg) {\n if(Debug.isEnabled()){ \n filterConfig.getServletContext().log(msg); //Shows in the Tomcat logs \n Debug.println(msg);\n }\n }",
"@Override\n protected void process(List<String> chunks) {\n for (String message : chunks) {\n LOG.info(message);\n StatusDisplayer.getDefault().setStatusText(message);\n }\n\n }",
"public void logWarnings(boolean logWarnings)\r\n {\r\n if (logWarnings != warningLevelHandler.getBoolean())\r\n {\r\n warningLevelHandler.setBoolean(logWarnings);\r\n fireConfigUpdated();\r\n }\r\n }",
"private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}",
"public void showStatus( String s ) {\n // do nothing\n }",
"public static void warn( String message ) {\n\tSystem.err.println( \"Logic: \" + message );\n\terrorCount = errorCount + 1;\n }",
"protected void logEntry(String logString) {\n\t\tReporter.log(logString, true);\n\t}",
"@Override\n public void warn(String message) {\n if (Level.WARN.getPriority() <= level.getPriority()) {\n print(\"WARNING: \" + message);\n }\n }",
"private void Log(String action) {\r\n\t}",
"@SuppressLint(\"NewApi\")\r\n\tpublic static void log(String string, LoggerLevel level) {\r\n\t\t\r\n\t\tif (string == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(level) {\r\n\t\tcase DEBUG:\r\n\t\t\tLog.d(APPNAME, string);\r\n\t\t\tbreak;\r\n\t\tcase ERROR:\r\n\t\t\tLog.e(APPNAME, string);\r\n\t\t\tbreak;\r\n\t\tcase INFO:\r\n\t\t\tLog.i(APPNAME, string);\r\n\t\t\tbreak;\r\n\t\tcase VERBOSE:\r\n\t\t\tLog.v(APPNAME, string);\r\n\t\t\tbreak;\r\n\t\tcase WARNING:\r\n\t\t\tLog.w(APPNAME, string);\r\n\t\t\tbreak;\r\n\t\tcase WTF:\r\n\t\t\tif (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\r\n\t\t\t\tLog.e(APPNAME, string);\r\n\t\t\t} else {\r\n\t\t\t\tLog.wtf(APPNAME, string);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif (logToFile) {\r\n\t\t\t\r\n\t\t\tString storageState = Environment.getExternalStorageState();\r\n\t\t\tif (storageState.equals(Environment.MEDIA_MOUNTED)) {\r\n\t\t\t\tlock.lock();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tFile root = Environment.getExternalStorageDirectory();\r\n\t\t\t\t\tFile downloads = new File(root, APPNAME);\r\n\t\t\t\t\tdownloads.mkdirs();\r\n\t\t\t\t\tFile logFile = new File(downloads, APPNAME + \".log\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (!logFile.exists()) {\r\n\t\t\t\t\t\tlogFile.createNewFile();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(logFile, true);\r\n\t\t\t\t\tfos.write(new String(new Date() + \" --> \" + string + \"\\n\").getBytes());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tlock.unlock();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public final void toLogFile() {\n\t\tRetroTectorEngine.toLogFile(\"Error message from \" + THESTRINGS[0] + \":\");\n\t\tfor (int i=1; i<THESTRINGS.length; i++) {\n\t\t\tRetroTectorEngine.toLogFile(THESTRINGS[i]);\n\t\t}\n\t}",
"private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}",
"public void warning(String msg) {\n log(Level.WARNING, msg, null);\n }",
"public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }",
"protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}",
"public boolean logWarnings()\r\n {\r\n return warningLevelHandler.getBoolean();\r\n }",
"public void publishTiancheWarn(String errorMsg) {\n }",
"public void writeWarning(String message){\n final String output = getTimeString() + \" WARNING: \" + message+ ENTER;\n switch (PreferencesHelper.getConsolePopupLevel()) {\n case ALL:\n popConsoleView();\n break;\n default:\n break;\n }\n UIBundlingThread.getInstance().addRunnable(new Runnable() {\n\n public void run() {\n if(warningStream == null){\n warningStream = console.newOutputStream();\n warningStream.setColor(CustomMediaFactory.getInstance().getColor(\n CustomMediaFactory.COLOR_ORANGE));\n }\n writeToConsole(warningStream, output);\n }\n });\n\n }",
"private void log(String s) {\n RlogEx.i(TAG, s);\n }",
"public void printWarning(){\n if (hasWarning()){\n System.err.println(\"Warning in line \"+filterLineNumber);\n }\n }",
"private void setWarning(String message)\n\t{\n\t\tstatus.setTextFill(RED);\n\t\tstatus.setText(message);\n\t}",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"public void logMonitor(String strLog)\r\n\t{\r\n\t\tlogMonitor(strLog, false);\r\n\t}",
"private void logInfo(String msgText) {\n System.out.println (\"[INFO] \" + msgText);\n \n }",
"public final void Log2(String s) {\n //System.err.println(s);\n //if (win != null)\n // win.Log(s); // For detailed debug purposes\n }",
"private void logAndToast(String msg) {\n Log.d(TAG, msg);\n if (logToast != null) {\n logToast.cancel();\n }\n logToast = Toast.makeText(this, msg, Toast.LENGTH_LONG);\n logToast.show();\n }",
"private void printLog(String str, int level)\n { if (log!=null) log.println(\"AudioApp: \"+str, LoopbackMediaApp.LOG_OFFSET+level);\n if (level<=Log.LEVEL_HIGH) System.out.println(\"AudioApp: \"+str);\n }",
"public void testLogAccuracy() {\r\n // log the message\r\n Exception cause = new Exception(\"some error\");\r\n String message = \"some message\";\r\n log.log(Level.ALL, cause, message);\r\n\r\n // check the result\r\n String result = AccuracyTestsHelper.getFileContent(FILE);\r\n assertTrue(result.indexOf(\"some message\") >= 0);\r\n assertTrue(result.indexOf(\"some error\") >= 0);\r\n }",
"public static void warningln(Object message) {\n\t\tSystem.out.println(\"WARNING: \" + message);\n\t}",
"public void print(String string){\n // make sure that the global weka log picks it up\n System.out.print(string);\n logStatusMessage(string); \n }",
"@Override\r\n public void status(String strVar)\r\n {\r\n System.out.println(strVar);\r\n }",
"private static void systemlog(LogType t, String msg) {\n if (syslog != null) {\n switch (t) {\n case TRACE:\n syslog.trace(msg);\n break;\n case DEBUG:\n syslog.debug(msg);\n break;\n case INFO:\n syslog.info(msg);\n break;\n case WARN:\n syslog.warn(msg);\n break;\n case ERROR:\n syslog.error(msg);\n }\n return;\n }\n logHold.add(new LogMsg(t, msg));\n }",
"public void log(String message, int loglevel) {\n if (managingPc != null) {\n managingPc.log(message, loglevel);\n } else {\n (loglevel > Project.MSG_WARN ? System.out : System.err).println(message);\n }\n }",
"public void log(String msg) {\n\n\t}",
"@Override\n public void log(String text) {\n jTextAreaLog.append(text+\"\\n\");\n }",
"public void onStallWarning(StallWarning warning) {\n \t\t\t}",
"public static void warn(String arg0) {\n MDC.put(classNameProp, \"\");\n debugLogger.warn(MessageCodes.GENERAL_WARNING, arg0);\n }",
"@Override\r\n\tpublic void update(int warning) \r\n\t{\r\n\t\tif(warning == 1)\r\n\t\t\tSystem.out.println(\"Knight: Helps everyone get home safe\");\r\n\t\telse if(warning ==2)\r\n\t\t\tSystem.out.println(\"Knight: Prepares for battle\");\r\n\t\t\r\n\t}",
"private void log(String pMessage) {\n\t\tif (logging)\n\t\t\tSystem.out.println(pMessage);\n\t}",
"public void test_getLogMessage_1() {\n String logMessage = instance.getLogMessage();\n\n assertTrue(\"'getLogMessage' should be correct.\",\n logMessage.indexOf(\"type: type id: 1 operator:operator - message\") != -1);\n assertTrue(\"'getLogMessage' should be correct.\", logMessage.indexOf(\"java.lang.Exception\") != -1);\n }",
"private void checkLogLevel() {\n config.getString(\"log_level\");\n }",
"public void logDebug(String str) {\n }",
"void warn(String tag, String msg);",
"void log(Level level, String message);",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"abstract void warn(String warning);",
"@Override\n public void onWarning(String debugMessage) {\n }",
"void log(String string);",
"private void logInvalidMessage(String msg){\n \tif (null != utilLog){\n \t\tutilLog.error(msg);\n \t}\n \telse{\n \t\tSystem.out.println(msg);\n \t}\n }",
"public void logDiagnostic(String str) {\n if (isDiagnosticsEnabled()) {\n LogFactory.logRawDiagnostic(new StringBuffer().append(this.diagnosticPrefix).append(str).toString());\n }\n }",
"private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }",
"public static void printWarning(String message) {\n\t\t// if not in production, then print log on console\n\t\tif (!isProductionMode) Log.w(\"AppDebug : \", \" Warning Debug:\" + message);\n\n\t}",
"@Override\r\n public void handleEvent(SyslogEvent se, Object o) {\n String failedRecordString = se.getMessage();\r\n String ipAddress = StringUtils.substringBetween(failedRecordString, \"[Source: \", \"]\");\r\n if (failedRecordString.contains(\"Login Authentication Failed\")) {\r\n System.out.println(\"Failed login attempt from \" + ipAddress);\r\n try {\r\n this.router.getLoginManager().addFailedRecord(ipAddress);\r\n } catch (LoginManagerException ex) {\r\n System.out.println(\"Failed to handle login event \" + ex.getMessage());\r\n }\r\n }\r\n }",
"private void log(String s) {\n Rlog.i(TAG, s);\n }",
"public void warn(String msg) {\n\t\tif (this.logLevel <= BackupLogger.WARN) {\n\t\t\twrite(\"WARN \" + msg);\n\t\t\tSystem.out.println(\"WARN \" + msg);\n\t\t}\n\t}",
"public static void logMessage(String s)\n\t{\n\t\tSystem.out.println(s);\n\t\tlog += s + \"\\n\\n\";\n\t\toutputArea.setText(log);\n\t}",
"static boolean logConsole(int type, String info, String data) {\n\t\tlogger.info(\"\" + info + data);\n\t\tif (type > 0) /* errorInfo always active */\n\t\t{\n\t\t\tif ((type & logMasking) == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\tif (info != null)\n\t\t\tSystem.out.println(new Date() + \" \" + info);\n\t\tif (data != null)\n\t\t\tSystem.out.println(data);\n\t\treturn true;\n\t}",
"public void sendStatusNotification(String msg){\n this.sendNotification(2, \"Lawnmower Status\", msg, R.drawable.logomarkerr);\n }",
"void log(String line);",
"public void showStatus(String paramString) {\n/* 258 */ getAppletContext().showStatus(paramString);\n/* */ }",
"protected void logMsg(String message) {\n\t\tlogTextArea.appendText(message + \"\\n\");\n\t}",
"protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }",
"@Override\n public void log(String message) {\n }"
] | [
"0.63180035",
"0.6316209",
"0.6047187",
"0.6046506",
"0.58261913",
"0.5727774",
"0.5705151",
"0.5665437",
"0.56489605",
"0.564359",
"0.5610276",
"0.5579834",
"0.5478774",
"0.5475032",
"0.5408738",
"0.53926945",
"0.5382894",
"0.53825927",
"0.53807616",
"0.5366575",
"0.5356315",
"0.5350145",
"0.5346544",
"0.53316194",
"0.53280073",
"0.5317608",
"0.5316569",
"0.5313687",
"0.5304655",
"0.52898043",
"0.5289763",
"0.5274543",
"0.52652746",
"0.5260866",
"0.52568775",
"0.52525896",
"0.5236838",
"0.5212924",
"0.52118224",
"0.5211129",
"0.5196795",
"0.51929283",
"0.5185688",
"0.51827484",
"0.5182679",
"0.51764584",
"0.51741314",
"0.51722777",
"0.51720184",
"0.51678264",
"0.51595527",
"0.51552904",
"0.515406",
"0.5153267",
"0.5150889",
"0.5133628",
"0.5133053",
"0.51247764",
"0.5121295",
"0.5118473",
"0.511482",
"0.5103734",
"0.51012605",
"0.50984263",
"0.5089619",
"0.5088037",
"0.5085697",
"0.5083028",
"0.5082858",
"0.5076935",
"0.50711757",
"0.5068319",
"0.50670135",
"0.506088",
"0.50582856",
"0.5057469",
"0.5057405",
"0.5057138",
"0.5053766",
"0.5047614",
"0.504723",
"0.50458074",
"0.5042381",
"0.50410104",
"0.5039009",
"0.50270855",
"0.50265366",
"0.5025659",
"0.50160533",
"0.50145894",
"0.5004472",
"0.49995983",
"0.4998483",
"0.49983162",
"0.49950746",
"0.49945697",
"0.49924767",
"0.4992232",
"0.4985167",
"0.4982069"
] | 0.7284537 | 0 |
Log to the status area | public void println(String string) {
// make sure that the global weka log picks it up
System.out.println(string);
logStatusMessage(string);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"public void viewLogs() {\n\t}",
"private void logKeytabStatus() throws IOException {\n // Check the UGI for the \"current user\"\n UserGroupInformation newUgi = UserGroupInformation.getCurrentUser();\n\n logKeytabStatus(newUgi);\n }",
"@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"private void logUser() {\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}",
"public void printStatus();",
"@Override\n public void onLoging() {\n }",
"private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}",
"protected void trackLoginStatus(String ipAddress, String username, int status) {\n\t\tJdbcTemplate template = new JdbcTemplate( dataSource);\n\t\tString sql = \"INSERT INTO login_track_tbl (ip_address, login_status, username) VALUES (?,?,?)\";\n\t\t\n\t\ttemplate.update(sql, new Object[] { ipAddress, status, username });\n\t}",
"public StatusLogger getStatusLogger();",
"@Override\n public void log()\n {\n }",
"public static void idle(){\n Logger.getGlobal().log(Level.INFO,\" Waiting....\");\n }",
"protected void statusMessage(String message) {\n \n m_Log.statusMessage(message);\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }",
"public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }",
"public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}",
"@Override\n public void logs() {\n \n }",
"private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\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\n public void onLogon(SessionID sessionID) {\n LOG.info(\"Server: onLogon of \" + sessionID);\n }",
"private void logKeytabStatus(UserGroupInformation ugi) throws IOException {\n // These two methods to not indicate whether the Kerberos authentication is currently valid.\n // However, they do inidicate a pre-requisite for being able to Re-Login via keytab.\n logger.info(\"new UGI is configured to login from keytab? \" + ugi.isFromKeytab());\n logger.info(\"new UGI has Kerberos Credentials? \" + ugi.hasKerberosCredentials());\n\n // Log the (latest) Last Login time\n User user = ugi.getSubject().getPrincipals(User.class).iterator().next();\n logger.info(\"Latest Login: \" + user.getLastLogin());\n }",
"@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }",
"void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }",
"public static void log(IStatus status) {\n getDefault().getLog().log(status);\n switch (status.getCode()) {\n case IStatus.ERROR:\n IvyDEMessage.error(status.getMessage(), status.getException());\n break;\n case IStatus.CANCEL:\n case IStatus.WARNING:\n IvyDEMessage.warn(status.getMessage(), status.getException());\n break;\n case IStatus.OK:\n case IStatus.INFO:\n IvyDEMessage.info(status.getMessage(), status.getException());\n break;\n }\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"void log();",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), \"Successfully logged out.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}",
"@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}",
"@FXML\n\tpublic void logDebugLevel() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Debug Level : \" + debugValue.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t\tlogDetails1.getEngine().executeScript(\"window.scrollTo(0, document.body.scrollHeight);\");\n\t}",
"private void logToFile() {\n }",
"private void Log(String action) {\r\n\t}",
"public void threadStatusLog() {\n LogUtils.logger(TAG, \"All Run Thread Size : \" + threadControl.size() +\n \"\\nAll Run Thread : \" + threadControl);\n\n }",
"void completeCurrentLog() throws IOException;",
"protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}",
"public static void makeLogged() {\n\t\tMemberSessionFacade.setAttribute(ConfigKeys.LOGGED, \"1\");\n//\t\tControllerUtils.addCookie(ConfigKeys.LOGGED, \"1\");\n\t}",
"public void logData(){\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }",
"static void logInPanelHelpAcknowledged() {\n RecordUserAction.record(\"ContextualSearch.logInPanelHelpAcknowledged\");\n }",
"public static void logEvent(boolean status, String PassDescription, String FailDescription) {\n\n\t\tif (status) {\n\t\t\tReports.logEvent(\"Pass\", PassDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + PassDescription + \" <<>>\");\n\n\t\t} else {\n\t\t\tReports.logEvent(\"Fail\", FailDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + FailDescription + \" <<>>\");\n\n\t\t}\n\n\t}",
"public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }",
"public String showStatus();",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }",
"abstract void initiateLog();",
"public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }",
"@Override\n\tpublic void svnLogFinish() {\n\t\tsendMailLogInfo();\n\t}",
"void onStatusUpdate(int status);",
"public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}",
"private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}",
"private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }",
"protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}",
"public void status(View view) {\n\n // Getting the unique id\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"EasyExpense\",0);\n unique_id = sharedPreferences.getString(\"unique_id\",null);\n\n getBills GetBills = new getBills(afterLogin.this);\n GetBills.execute(unique_id);\n }",
"void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }",
"public TrayHandler() {\n this.statusImages[0] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/active.png\");\n this.statusImages[1] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/inactive.png\");\n \n this.statusText[0] = \"Apache is running\";\n this.statusText[1] = \"Apache is not running\";\n \n this.systemtray = SystemTray.getSystemTray();\n }",
"void completeLogs() throws IOException;",
"private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agent\");\r\n\t\tif (userAgent == null) {\r\n\t\t\tuserAgent = \"<unknown>\";\r\n\t\t}\r\n\r\n\t\tString binding = getCallContext().getBinding();\r\n\r\n\t\tLOG.info(\"Operation: {}, Repository ID: {}, Binding: {}, User Agent: {}\", operation, repositoryId, binding,\r\n\t\t\t\tuserAgent);\r\n\t\t\r\n\t\t// also dump to console for testing\r\n\t\tString result =\r\n\t\tString.format(\"Operation: %s, Repository ID: %s, Binding: %s, User Agent: %s\", \r\n\t\t\t\toperation, repositoryId, binding, userAgent);\r\n\t\tSystem.out.println(result);\r\n\t}",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"private void openTomopitchLog() {\n String logFileName = DatasetFiles.getTomopitchLogFileName(manager, axisID);\n TextPageWindow logFileWindow = new TextPageWindow();\n logFileWindow.setVisible(logFileWindow.setFile(manager.getPropertyUserDir()\n + File.separator + logFileName));\n }",
"public void logSensorData () {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public void run() {\n for (int j = 0; j < mLogLevelActions.length; j++) {\n Action a = mLogLevelActions[j];\n if (a == this) {\n a.setChecked(true);\n\n // set the log level\n mLogPanel.setCurrentFilterLogLevel(j + 2);\n } else {\n a.setChecked(false);\n }\n }\n }",
"@Override\n public void logOut() {\n }",
"public void writeToControllerGameLog(String message) {\n controller.getUIController().writeToLogBox(message);\n }",
"@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}",
"public void syncLogsAccordingly( ){\n Log.d(TAG, \"Syncing Logs to Log panel\");\n\n try{\n Log.d(TAG , \"STATUS : \"+AppInfoManager.getAppStatusEncode());\n APPORIOLOGS.appStateLog(AppInfoManager.getAppStatusEncode());}catch (Exception e){}\n AndroidNetworking.post(\"\"+ AtsApplication.EndPoint_add_logs)\n .addBodyParameter(\"timezone\", TimeZone.getDefault().getID())\n .addBodyParameter(\"key\", AtsApplication.getGson().toJson(HyperLog.getDeviceLogs(false)))\n .setTag(\"log_sync\")\n .setPriority(Priority.HIGH)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject response) {\n try{\n ModelResultChecker modelResultChecker = AtsApplication.getGson().fromJson(\"\"+response,ModelResultChecker.class);\n if(modelResultChecker.getResult() == 1 ){\n Log.i(TAG, \"Logs Synced Successfully \");\n HyperLog.deleteLogs();\n onSync.onSyncSuccess(\"\"+AtsConstants.SYNC_EXISTING_LOGS);\n }else{\n Log.e(TAG, \"Logs Not synced from server got message \"+modelResultChecker.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }catch (Exception e){\n Log.e(TAG, \"Logs Not synced with error code: \"+e.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }\n @Override\n public void onError(ANError error) {\n Log.e(TAG, \"Logs Not synced with error code: \"+error.getErrorCode());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n });\n }",
"private void indicateUserLoginStatusChanged() {\n raise(new UserLoginStatusChangedEvent(null));\n }",
"@Override\n public void addStatusEvent(Status status) {\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }",
"public void traceStatus() {\n logger.trace(\"jvmThread: {}, jvmMethod: {}\", jvmThread, jvmMethod);\n logger.trace(\"localVariables: {}\", localVariables);\n logger.trace(\"operandStacks: {}\", operandStacks);\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}",
"private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}",
"public void recordOverallStatus(int status) {\n mOverallStatusHistogram.put(status, mOverallStatusHistogram.get(status) + 1);\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"Response<Void> logCustomStat(int index);",
"public void info(StatusTask t, String msg){\n\t\tt.setStaus(msg);\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }"
] | [
"0.7206895",
"0.6726409",
"0.65164864",
"0.6413613",
"0.6388692",
"0.63260645",
"0.62803644",
"0.6273684",
"0.62419516",
"0.622637",
"0.61432666",
"0.610612",
"0.60836273",
"0.6035046",
"0.6011565",
"0.5997451",
"0.5962452",
"0.5949854",
"0.59490806",
"0.59422964",
"0.5887037",
"0.5865071",
"0.5851956",
"0.584268",
"0.584268",
"0.584268",
"0.58263344",
"0.5806172",
"0.5803588",
"0.57965136",
"0.57934517",
"0.57871914",
"0.57845634",
"0.57777226",
"0.5776329",
"0.57752603",
"0.57669574",
"0.57667553",
"0.5753145",
"0.575263",
"0.573826",
"0.57378757",
"0.57233",
"0.57223874",
"0.57174563",
"0.5703539",
"0.57017905",
"0.5700298",
"0.56944466",
"0.56930894",
"0.56888026",
"0.56839496",
"0.5682071",
"0.5678876",
"0.56788373",
"0.5678386",
"0.5670598",
"0.56547433",
"0.5638789",
"0.5605967",
"0.5604674",
"0.5589502",
"0.55832773",
"0.557789",
"0.557324",
"0.5557369",
"0.55509293",
"0.5533875",
"0.55324954",
"0.5529761",
"0.55159396",
"0.5515771",
"0.5513811",
"0.55122274",
"0.55067897",
"0.55006856",
"0.54977214",
"0.5497532",
"0.5492935",
"0.54877704",
"0.5481474",
"0.54758984",
"0.54720795",
"0.5467263",
"0.54589707",
"0.5457134",
"0.5422646",
"0.5416909",
"0.54087293",
"0.5400458",
"0.53923786",
"0.53921086",
"0.5386535",
"0.53850037",
"0.53845316",
"0.53816646",
"0.5378875",
"0.5377704",
"0.5376776",
"0.53702945",
"0.5366562"
] | 0.0 | -1 |
Log to the status area | public void println(Object obj) {
println(obj.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"public void viewLogs() {\n\t}",
"private void logKeytabStatus() throws IOException {\n // Check the UGI for the \"current user\"\n UserGroupInformation newUgi = UserGroupInformation.getCurrentUser();\n\n logKeytabStatus(newUgi);\n }",
"@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"private void logUser() {\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}",
"public void printStatus();",
"@Override\n public void onLoging() {\n }",
"private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}",
"protected void trackLoginStatus(String ipAddress, String username, int status) {\n\t\tJdbcTemplate template = new JdbcTemplate( dataSource);\n\t\tString sql = \"INSERT INTO login_track_tbl (ip_address, login_status, username) VALUES (?,?,?)\";\n\t\t\n\t\ttemplate.update(sql, new Object[] { ipAddress, status, username });\n\t}",
"public StatusLogger getStatusLogger();",
"@Override\n public void log()\n {\n }",
"public static void idle(){\n Logger.getGlobal().log(Level.INFO,\" Waiting....\");\n }",
"protected void statusMessage(String message) {\n \n m_Log.statusMessage(message);\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }",
"public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }",
"public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}",
"@Override\n public void logs() {\n \n }",
"private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\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\n public void onLogon(SessionID sessionID) {\n LOG.info(\"Server: onLogon of \" + sessionID);\n }",
"private void logKeytabStatus(UserGroupInformation ugi) throws IOException {\n // These two methods to not indicate whether the Kerberos authentication is currently valid.\n // However, they do inidicate a pre-requisite for being able to Re-Login via keytab.\n logger.info(\"new UGI is configured to login from keytab? \" + ugi.isFromKeytab());\n logger.info(\"new UGI has Kerberos Credentials? \" + ugi.hasKerberosCredentials());\n\n // Log the (latest) Last Login time\n User user = ugi.getSubject().getPrincipals(User.class).iterator().next();\n logger.info(\"Latest Login: \" + user.getLastLogin());\n }",
"@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }",
"void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }",
"public static void log(IStatus status) {\n getDefault().getLog().log(status);\n switch (status.getCode()) {\n case IStatus.ERROR:\n IvyDEMessage.error(status.getMessage(), status.getException());\n break;\n case IStatus.CANCEL:\n case IStatus.WARNING:\n IvyDEMessage.warn(status.getMessage(), status.getException());\n break;\n case IStatus.OK:\n case IStatus.INFO:\n IvyDEMessage.info(status.getMessage(), status.getException());\n break;\n }\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"void log();",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), \"Successfully logged out.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}",
"@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}",
"@FXML\n\tpublic void logDebugLevel() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Debug Level : \" + debugValue.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t\tlogDetails1.getEngine().executeScript(\"window.scrollTo(0, document.body.scrollHeight);\");\n\t}",
"private void logToFile() {\n }",
"private void Log(String action) {\r\n\t}",
"public void threadStatusLog() {\n LogUtils.logger(TAG, \"All Run Thread Size : \" + threadControl.size() +\n \"\\nAll Run Thread : \" + threadControl);\n\n }",
"void completeCurrentLog() throws IOException;",
"protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}",
"public static void makeLogged() {\n\t\tMemberSessionFacade.setAttribute(ConfigKeys.LOGGED, \"1\");\n//\t\tControllerUtils.addCookie(ConfigKeys.LOGGED, \"1\");\n\t}",
"public void logData(){\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }",
"static void logInPanelHelpAcknowledged() {\n RecordUserAction.record(\"ContextualSearch.logInPanelHelpAcknowledged\");\n }",
"public static void logEvent(boolean status, String PassDescription, String FailDescription) {\n\n\t\tif (status) {\n\t\t\tReports.logEvent(\"Pass\", PassDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + PassDescription + \" <<>>\");\n\n\t\t} else {\n\t\t\tReports.logEvent(\"Fail\", FailDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + FailDescription + \" <<>>\");\n\n\t\t}\n\n\t}",
"public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }",
"public String showStatus();",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }",
"abstract void initiateLog();",
"public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }",
"@Override\n\tpublic void svnLogFinish() {\n\t\tsendMailLogInfo();\n\t}",
"void onStatusUpdate(int status);",
"public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}",
"private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}",
"private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }",
"protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}",
"public void status(View view) {\n\n // Getting the unique id\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"EasyExpense\",0);\n unique_id = sharedPreferences.getString(\"unique_id\",null);\n\n getBills GetBills = new getBills(afterLogin.this);\n GetBills.execute(unique_id);\n }",
"void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }",
"public TrayHandler() {\n this.statusImages[0] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/active.png\");\n this.statusImages[1] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/inactive.png\");\n \n this.statusText[0] = \"Apache is running\";\n this.statusText[1] = \"Apache is not running\";\n \n this.systemtray = SystemTray.getSystemTray();\n }",
"void completeLogs() throws IOException;",
"private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agent\");\r\n\t\tif (userAgent == null) {\r\n\t\t\tuserAgent = \"<unknown>\";\r\n\t\t}\r\n\r\n\t\tString binding = getCallContext().getBinding();\r\n\r\n\t\tLOG.info(\"Operation: {}, Repository ID: {}, Binding: {}, User Agent: {}\", operation, repositoryId, binding,\r\n\t\t\t\tuserAgent);\r\n\t\t\r\n\t\t// also dump to console for testing\r\n\t\tString result =\r\n\t\tString.format(\"Operation: %s, Repository ID: %s, Binding: %s, User Agent: %s\", \r\n\t\t\t\toperation, repositoryId, binding, userAgent);\r\n\t\tSystem.out.println(result);\r\n\t}",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"private void openTomopitchLog() {\n String logFileName = DatasetFiles.getTomopitchLogFileName(manager, axisID);\n TextPageWindow logFileWindow = new TextPageWindow();\n logFileWindow.setVisible(logFileWindow.setFile(manager.getPropertyUserDir()\n + File.separator + logFileName));\n }",
"public void logSensorData () {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public void run() {\n for (int j = 0; j < mLogLevelActions.length; j++) {\n Action a = mLogLevelActions[j];\n if (a == this) {\n a.setChecked(true);\n\n // set the log level\n mLogPanel.setCurrentFilterLogLevel(j + 2);\n } else {\n a.setChecked(false);\n }\n }\n }",
"@Override\n public void logOut() {\n }",
"public void writeToControllerGameLog(String message) {\n controller.getUIController().writeToLogBox(message);\n }",
"@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}",
"public void syncLogsAccordingly( ){\n Log.d(TAG, \"Syncing Logs to Log panel\");\n\n try{\n Log.d(TAG , \"STATUS : \"+AppInfoManager.getAppStatusEncode());\n APPORIOLOGS.appStateLog(AppInfoManager.getAppStatusEncode());}catch (Exception e){}\n AndroidNetworking.post(\"\"+ AtsApplication.EndPoint_add_logs)\n .addBodyParameter(\"timezone\", TimeZone.getDefault().getID())\n .addBodyParameter(\"key\", AtsApplication.getGson().toJson(HyperLog.getDeviceLogs(false)))\n .setTag(\"log_sync\")\n .setPriority(Priority.HIGH)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject response) {\n try{\n ModelResultChecker modelResultChecker = AtsApplication.getGson().fromJson(\"\"+response,ModelResultChecker.class);\n if(modelResultChecker.getResult() == 1 ){\n Log.i(TAG, \"Logs Synced Successfully \");\n HyperLog.deleteLogs();\n onSync.onSyncSuccess(\"\"+AtsConstants.SYNC_EXISTING_LOGS);\n }else{\n Log.e(TAG, \"Logs Not synced from server got message \"+modelResultChecker.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }catch (Exception e){\n Log.e(TAG, \"Logs Not synced with error code: \"+e.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }\n @Override\n public void onError(ANError error) {\n Log.e(TAG, \"Logs Not synced with error code: \"+error.getErrorCode());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n });\n }",
"private void indicateUserLoginStatusChanged() {\n raise(new UserLoginStatusChangedEvent(null));\n }",
"@Override\n public void addStatusEvent(Status status) {\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }",
"public void traceStatus() {\n logger.trace(\"jvmThread: {}, jvmMethod: {}\", jvmThread, jvmMethod);\n logger.trace(\"localVariables: {}\", localVariables);\n logger.trace(\"operandStacks: {}\", operandStacks);\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}",
"private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}",
"public void recordOverallStatus(int status) {\n mOverallStatusHistogram.put(status, mOverallStatusHistogram.get(status) + 1);\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"Response<Void> logCustomStat(int index);",
"public void info(StatusTask t, String msg){\n\t\tt.setStaus(msg);\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }"
] | [
"0.7206895",
"0.6726409",
"0.65164864",
"0.6413613",
"0.6388692",
"0.63260645",
"0.62803644",
"0.6273684",
"0.62419516",
"0.622637",
"0.61432666",
"0.610612",
"0.60836273",
"0.6035046",
"0.6011565",
"0.5997451",
"0.5962452",
"0.5949854",
"0.59490806",
"0.59422964",
"0.5887037",
"0.5865071",
"0.5851956",
"0.584268",
"0.584268",
"0.584268",
"0.58263344",
"0.5806172",
"0.5803588",
"0.57965136",
"0.57934517",
"0.57871914",
"0.57845634",
"0.57777226",
"0.5776329",
"0.57752603",
"0.57669574",
"0.57667553",
"0.5753145",
"0.575263",
"0.573826",
"0.57378757",
"0.57233",
"0.57223874",
"0.57174563",
"0.5703539",
"0.57017905",
"0.5700298",
"0.56944466",
"0.56930894",
"0.56888026",
"0.56839496",
"0.5682071",
"0.5678876",
"0.56788373",
"0.5678386",
"0.5670598",
"0.56547433",
"0.5638789",
"0.5605967",
"0.5604674",
"0.5589502",
"0.55832773",
"0.557789",
"0.557324",
"0.5557369",
"0.55509293",
"0.5533875",
"0.55324954",
"0.5529761",
"0.55159396",
"0.5515771",
"0.5513811",
"0.55122274",
"0.55067897",
"0.55006856",
"0.54977214",
"0.5497532",
"0.5492935",
"0.54877704",
"0.5481474",
"0.54758984",
"0.54720795",
"0.5467263",
"0.54589707",
"0.5457134",
"0.5422646",
"0.5416909",
"0.54087293",
"0.5400458",
"0.53923786",
"0.53921086",
"0.5386535",
"0.53850037",
"0.53845316",
"0.53816646",
"0.5378875",
"0.5377704",
"0.5376776",
"0.53702945",
"0.5366562"
] | 0.0 | -1 |
Log to the status area | public void print(String string){
// make sure that the global weka log picks it up
System.out.print(string);
logStatusMessage(string);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"public void viewLogs() {\n\t}",
"private void logKeytabStatus() throws IOException {\n // Check the UGI for the \"current user\"\n UserGroupInformation newUgi = UserGroupInformation.getCurrentUser();\n\n logKeytabStatus(newUgi);\n }",
"@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"private void logUser() {\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}",
"public void printStatus();",
"@Override\n public void onLoging() {\n }",
"private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}",
"protected void trackLoginStatus(String ipAddress, String username, int status) {\n\t\tJdbcTemplate template = new JdbcTemplate( dataSource);\n\t\tString sql = \"INSERT INTO login_track_tbl (ip_address, login_status, username) VALUES (?,?,?)\";\n\t\t\n\t\ttemplate.update(sql, new Object[] { ipAddress, status, username });\n\t}",
"public StatusLogger getStatusLogger();",
"@Override\n public void log()\n {\n }",
"public static void idle(){\n Logger.getGlobal().log(Level.INFO,\" Waiting....\");\n }",
"protected void statusMessage(String message) {\n \n m_Log.statusMessage(message);\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }",
"public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }",
"public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}",
"@Override\n public void logs() {\n \n }",
"private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\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\n public void onLogon(SessionID sessionID) {\n LOG.info(\"Server: onLogon of \" + sessionID);\n }",
"private void logKeytabStatus(UserGroupInformation ugi) throws IOException {\n // These two methods to not indicate whether the Kerberos authentication is currently valid.\n // However, they do inidicate a pre-requisite for being able to Re-Login via keytab.\n logger.info(\"new UGI is configured to login from keytab? \" + ugi.isFromKeytab());\n logger.info(\"new UGI has Kerberos Credentials? \" + ugi.hasKerberosCredentials());\n\n // Log the (latest) Last Login time\n User user = ugi.getSubject().getPrincipals(User.class).iterator().next();\n logger.info(\"Latest Login: \" + user.getLastLogin());\n }",
"@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }",
"void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }",
"public static void log(IStatus status) {\n getDefault().getLog().log(status);\n switch (status.getCode()) {\n case IStatus.ERROR:\n IvyDEMessage.error(status.getMessage(), status.getException());\n break;\n case IStatus.CANCEL:\n case IStatus.WARNING:\n IvyDEMessage.warn(status.getMessage(), status.getException());\n break;\n case IStatus.OK:\n case IStatus.INFO:\n IvyDEMessage.info(status.getMessage(), status.getException());\n break;\n }\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"void log();",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), \"Successfully logged out.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}",
"@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}",
"@FXML\n\tpublic void logDebugLevel() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Debug Level : \" + debugValue.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t\tlogDetails1.getEngine().executeScript(\"window.scrollTo(0, document.body.scrollHeight);\");\n\t}",
"private void logToFile() {\n }",
"private void Log(String action) {\r\n\t}",
"public void threadStatusLog() {\n LogUtils.logger(TAG, \"All Run Thread Size : \" + threadControl.size() +\n \"\\nAll Run Thread : \" + threadControl);\n\n }",
"void completeCurrentLog() throws IOException;",
"protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}",
"public static void makeLogged() {\n\t\tMemberSessionFacade.setAttribute(ConfigKeys.LOGGED, \"1\");\n//\t\tControllerUtils.addCookie(ConfigKeys.LOGGED, \"1\");\n\t}",
"public void logData(){\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }",
"static void logInPanelHelpAcknowledged() {\n RecordUserAction.record(\"ContextualSearch.logInPanelHelpAcknowledged\");\n }",
"public static void logEvent(boolean status, String PassDescription, String FailDescription) {\n\n\t\tif (status) {\n\t\t\tReports.logEvent(\"Pass\", PassDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + PassDescription + \" <<>>\");\n\n\t\t} else {\n\t\t\tReports.logEvent(\"Fail\", FailDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + FailDescription + \" <<>>\");\n\n\t\t}\n\n\t}",
"public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }",
"public String showStatus();",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }",
"abstract void initiateLog();",
"public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }",
"@Override\n\tpublic void svnLogFinish() {\n\t\tsendMailLogInfo();\n\t}",
"void onStatusUpdate(int status);",
"public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}",
"private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}",
"private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }",
"protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}",
"public void status(View view) {\n\n // Getting the unique id\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"EasyExpense\",0);\n unique_id = sharedPreferences.getString(\"unique_id\",null);\n\n getBills GetBills = new getBills(afterLogin.this);\n GetBills.execute(unique_id);\n }",
"void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }",
"public TrayHandler() {\n this.statusImages[0] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/active.png\");\n this.statusImages[1] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/inactive.png\");\n \n this.statusText[0] = \"Apache is running\";\n this.statusText[1] = \"Apache is not running\";\n \n this.systemtray = SystemTray.getSystemTray();\n }",
"void completeLogs() throws IOException;",
"private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agent\");\r\n\t\tif (userAgent == null) {\r\n\t\t\tuserAgent = \"<unknown>\";\r\n\t\t}\r\n\r\n\t\tString binding = getCallContext().getBinding();\r\n\r\n\t\tLOG.info(\"Operation: {}, Repository ID: {}, Binding: {}, User Agent: {}\", operation, repositoryId, binding,\r\n\t\t\t\tuserAgent);\r\n\t\t\r\n\t\t// also dump to console for testing\r\n\t\tString result =\r\n\t\tString.format(\"Operation: %s, Repository ID: %s, Binding: %s, User Agent: %s\", \r\n\t\t\t\toperation, repositoryId, binding, userAgent);\r\n\t\tSystem.out.println(result);\r\n\t}",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"private void openTomopitchLog() {\n String logFileName = DatasetFiles.getTomopitchLogFileName(manager, axisID);\n TextPageWindow logFileWindow = new TextPageWindow();\n logFileWindow.setVisible(logFileWindow.setFile(manager.getPropertyUserDir()\n + File.separator + logFileName));\n }",
"public void logSensorData () {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public void run() {\n for (int j = 0; j < mLogLevelActions.length; j++) {\n Action a = mLogLevelActions[j];\n if (a == this) {\n a.setChecked(true);\n\n // set the log level\n mLogPanel.setCurrentFilterLogLevel(j + 2);\n } else {\n a.setChecked(false);\n }\n }\n }",
"@Override\n public void logOut() {\n }",
"public void writeToControllerGameLog(String message) {\n controller.getUIController().writeToLogBox(message);\n }",
"@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}",
"public void syncLogsAccordingly( ){\n Log.d(TAG, \"Syncing Logs to Log panel\");\n\n try{\n Log.d(TAG , \"STATUS : \"+AppInfoManager.getAppStatusEncode());\n APPORIOLOGS.appStateLog(AppInfoManager.getAppStatusEncode());}catch (Exception e){}\n AndroidNetworking.post(\"\"+ AtsApplication.EndPoint_add_logs)\n .addBodyParameter(\"timezone\", TimeZone.getDefault().getID())\n .addBodyParameter(\"key\", AtsApplication.getGson().toJson(HyperLog.getDeviceLogs(false)))\n .setTag(\"log_sync\")\n .setPriority(Priority.HIGH)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject response) {\n try{\n ModelResultChecker modelResultChecker = AtsApplication.getGson().fromJson(\"\"+response,ModelResultChecker.class);\n if(modelResultChecker.getResult() == 1 ){\n Log.i(TAG, \"Logs Synced Successfully \");\n HyperLog.deleteLogs();\n onSync.onSyncSuccess(\"\"+AtsConstants.SYNC_EXISTING_LOGS);\n }else{\n Log.e(TAG, \"Logs Not synced from server got message \"+modelResultChecker.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }catch (Exception e){\n Log.e(TAG, \"Logs Not synced with error code: \"+e.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }\n @Override\n public void onError(ANError error) {\n Log.e(TAG, \"Logs Not synced with error code: \"+error.getErrorCode());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n });\n }",
"private void indicateUserLoginStatusChanged() {\n raise(new UserLoginStatusChangedEvent(null));\n }",
"@Override\n public void addStatusEvent(Status status) {\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }",
"public void traceStatus() {\n logger.trace(\"jvmThread: {}, jvmMethod: {}\", jvmThread, jvmMethod);\n logger.trace(\"localVariables: {}\", localVariables);\n logger.trace(\"operandStacks: {}\", operandStacks);\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}",
"private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}",
"public void recordOverallStatus(int status) {\n mOverallStatusHistogram.put(status, mOverallStatusHistogram.get(status) + 1);\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"Response<Void> logCustomStat(int index);",
"public void info(StatusTask t, String msg){\n\t\tt.setStaus(msg);\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }"
] | [
"0.7206895",
"0.6726409",
"0.65164864",
"0.6413613",
"0.6388692",
"0.63260645",
"0.62803644",
"0.6273684",
"0.62419516",
"0.622637",
"0.61432666",
"0.610612",
"0.60836273",
"0.6035046",
"0.6011565",
"0.5997451",
"0.5962452",
"0.5949854",
"0.59490806",
"0.59422964",
"0.5887037",
"0.5865071",
"0.5851956",
"0.584268",
"0.584268",
"0.584268",
"0.58263344",
"0.5806172",
"0.5803588",
"0.57965136",
"0.57934517",
"0.57871914",
"0.57845634",
"0.57777226",
"0.5776329",
"0.57752603",
"0.57669574",
"0.57667553",
"0.5753145",
"0.575263",
"0.573826",
"0.57378757",
"0.57233",
"0.57223874",
"0.57174563",
"0.5703539",
"0.57017905",
"0.5700298",
"0.56944466",
"0.56930894",
"0.56888026",
"0.56839496",
"0.5682071",
"0.5678876",
"0.56788373",
"0.5678386",
"0.5670598",
"0.56547433",
"0.5638789",
"0.5605967",
"0.5604674",
"0.5589502",
"0.55832773",
"0.557789",
"0.557324",
"0.5557369",
"0.55509293",
"0.5533875",
"0.55324954",
"0.5529761",
"0.55159396",
"0.5515771",
"0.5513811",
"0.55122274",
"0.55067897",
"0.55006856",
"0.54977214",
"0.5497532",
"0.5492935",
"0.54877704",
"0.5481474",
"0.54758984",
"0.54720795",
"0.5467263",
"0.54589707",
"0.5457134",
"0.5422646",
"0.5416909",
"0.54087293",
"0.5400458",
"0.53923786",
"0.53921086",
"0.5386535",
"0.53850037",
"0.53845316",
"0.53816646",
"0.5378875",
"0.5377704",
"0.5376776",
"0.53702945",
"0.5366562"
] | 0.0 | -1 |
Log to the status area | public void print(Object obj) {
print(obj.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void log(IStatus status) {\n\t getDefault().getLog().log(status);\n\t}",
"public static void logStatus(){\r\n\t\tLogger log = Logger.getLogger(LOGGER_NAME);\r\n\t\tStringBuilder logString = new StringBuilder(\"\\n*** PlugIn Status ***\\n\");\r\n\t\t\r\n\t\tList<String> storagePlugins = getPluginsByType(PluginType.STORAGE);\r\n\t\tlogString.append(\"Storage PlugIns: \"+storagePlugins.size()+\"\\n\");\r\n\t\t\r\n\t\tlog.info(logString.toString());\r\n\t\treturn;\r\n\t}",
"@Override\n\tpublic void doPostStatus(LoginDetails loginDetails) {\n\t\tSystem.out.println(\"Boomer post status\");\t\n\t\t\t\n\t}",
"public void viewLogs() {\n\t}",
"private void logKeytabStatus() throws IOException {\n // Check the UGI for the \"current user\"\n UserGroupInformation newUgi = UserGroupInformation.getCurrentUser();\n\n logKeytabStatus(newUgi);\n }",
"@Override\n public void logSmartDashboard() {\n SmartDashboard.putString(\"CargoIntake RollerState\", direction.toString());\n \n // Smart dashboard cargo loaded and photoelectric value\n SmartDashboard.putBoolean(\"CargoIntake IsCargoDetected\", isCargoDetected());\n SmartDashboard.putBoolean(\"CargoIntake IgnorePhotoelectric\",ignorePhotoelectric);\n }",
"void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}",
"private void logUser() {\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}",
"public void printStatus();",
"@Override\n public void onLoging() {\n }",
"private void logAdminUI() {\n\t\tString httpPort = environment.resolvePlaceholders(ADMIN_PORT);\n\t\tAssert.notNull(httpPort, \"Admin server port is not set.\");\n\t\tlogger.info(\"Admin web UI: \"\n\t\t\t\t+ String.format(\"http://%s:%s/%s\", RuntimeUtils.getHost(), httpPort,\n\t\t\t\t\t\tConfigLocations.XD_ADMIN_UI_BASE_PATH));\n\t}",
"protected void trackLoginStatus(String ipAddress, String username, int status) {\n\t\tJdbcTemplate template = new JdbcTemplate( dataSource);\n\t\tString sql = \"INSERT INTO login_track_tbl (ip_address, login_status, username) VALUES (?,?,?)\";\n\t\t\n\t\ttemplate.update(sql, new Object[] { ipAddress, status, username });\n\t}",
"public StatusLogger getStatusLogger();",
"@Override\n public void log()\n {\n }",
"public static void idle(){\n Logger.getGlobal().log(Level.INFO,\" Waiting....\");\n }",
"protected void statusMessage(String message) {\n \n m_Log.statusMessage(message);\n }",
"private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }",
"protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }",
"public void log(View view) {\n Log.i(TAG, \"LOGGING FOR \" + X + \", \" + Y);\n logButton.setText(R.string.logging_message);\n logButton.setEnabled(false);\n progressBar.setVisibility(View.VISIBLE);\n\n numLogs = 0;\n // Stops scanning after a pre-defined scan period.\n mHandler.postDelayed(new Runnable() {\n @Override\n public void run() {\n numLogs++;\n if (numLogs < NUM_LOGS){\n log();\n mHandler.postDelayed(this, SCAN_PERIOD);\n } else {\n mScanning = false;\n scanBLEDevice(false);\n logButton.setText(R.string.start_log_message);\n logButton.setEnabled(true);\n progressBar.setVisibility(View.INVISIBLE);\n }\n }\n }, SCAN_PERIOD);\n\n mScanning = true;\n scanBLEDevice(true);\n\n }",
"public void sendToDashboard() {\n\n\t\tif (Constants.DEBUG) {\n\t\t}\n\t}",
"@Override\n public void logs() {\n \n }",
"private void internalSetStatus(String status) {\n jStatusLine.setText(\"Status: \" + status);\n }",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"public void writeLog() {\n\n\t}",
"private void doIt() {\n\t\tlogger.debug(\"hellow this is the first time I use Logback\");\n\t\t\n\t}",
"protected void logStatusMessage(int status) {\n switch (status) {\n case EXIT_OK:\n logger.info(\"SCHEMA CHANGE: OK\");\n break;\n case EXIT_BAD_ARGS:\n logger.severe(\"SCHEMA CHANGE: BAD ARGS\");\n break;\n case EXIT_RUNTIME_ERROR:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n case EXIT_VALIDATION_FAILED:\n logger.warning(\"SCHEMA CHANGE: FAILED\");\n break;\n default:\n logger.severe(\"SCHEMA CHANGE: RUNTIME ERROR\");\n break;\n }\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\n public void onLogon(SessionID sessionID) {\n LOG.info(\"Server: onLogon of \" + sessionID);\n }",
"private void logKeytabStatus(UserGroupInformation ugi) throws IOException {\n // These two methods to not indicate whether the Kerberos authentication is currently valid.\n // However, they do inidicate a pre-requisite for being able to Re-Login via keytab.\n logger.info(\"new UGI is configured to login from keytab? \" + ugi.isFromKeytab());\n logger.info(\"new UGI has Kerberos Credentials? \" + ugi.hasKerberosCredentials());\n\n // Log the (latest) Last Login time\n User user = ugi.getSubject().getPrincipals(User.class).iterator().next();\n logger.info(\"Latest Login: \" + user.getLastLogin());\n }",
"@Override\n public void onStart(ITestContext tc) {\n StatusPrinter.printRunStart();\n }",
"void logSystemDetails() throws CometApiException {\n sendSynchronously(restApiClient::logSystemDetails, SystemUtils.readSystemDetails());\n }",
"public static void log(IStatus status) {\n getDefault().getLog().log(status);\n switch (status.getCode()) {\n case IStatus.ERROR:\n IvyDEMessage.error(status.getMessage(), status.getException());\n break;\n case IStatus.CANCEL:\n case IStatus.WARNING:\n IvyDEMessage.warn(status.getMessage(), status.getException());\n break;\n case IStatus.OK:\n case IStatus.INFO:\n IvyDEMessage.info(status.getMessage(), status.getException());\n break;\n }\n }",
"public void sendLog() {\n\t\tcommon.waitFor(5000);\n\t\tcommon.isElementDiplayed(sendButton);\n\t\tsendButton.click();\n\t\tcommon.isElementDiplayed(sucessMessage);\n\t\tsendButton.click();\n\n\t}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"void log();",
"public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), \"Successfully logged out.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}",
"protected void afterLoginSucess()\r\n\t{\n\t\tfbHelper.postStatusUpdate(\"Hi Testing\");\r\n\t}",
"@FXML\n\tprivate void logSerialNumberIncrement() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Serial Number Increment : \" + serialNumberIncrement.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t}",
"@FXML\n\tpublic void logDebugLevel() {\n\t\tcheckFieldEditOrNot = true;\n\t\tSX3Manager.getInstance().addLog(\"Debug Level : \" + debugValue.getValue() + \".<br>\");\n\t\tlogDetails1.getEngine().setUserStyleSheetLocation(\"data:,body{font: 12px Arial;}\");\n\n\t\tlogDetails1.getEngine().executeScript(\"window.scrollTo(0, document.body.scrollHeight);\");\n\t}",
"private void logToFile() {\n }",
"private void Log(String action) {\r\n\t}",
"public void threadStatusLog() {\n LogUtils.logger(TAG, \"All Run Thread Size : \" + threadControl.size() +\n \"\\nAll Run Thread : \" + threadControl);\n\n }",
"void completeCurrentLog() throws IOException;",
"protected void logToScreen() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tdisplayInfo = !displayInfo;\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\tproc.setDisplayInfo(displayInfo);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfactory.setDisplayInfo(displayInfo);\r\n\t\t}\r\n\t}",
"public static void makeLogged() {\n\t\tMemberSessionFacade.setAttribute(ConfigKeys.LOGGED, \"1\");\n//\t\tControllerUtils.addCookie(ConfigKeys.LOGGED, \"1\");\n\t}",
"public void logData(){\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }",
"static void logInPanelHelpAcknowledged() {\n RecordUserAction.record(\"ContextualSearch.logInPanelHelpAcknowledged\");\n }",
"public static void logEvent(boolean status, String PassDescription, String FailDescription) {\n\n\t\tif (status) {\n\t\t\tReports.logEvent(\"Pass\", PassDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + PassDescription + \" <<>>\");\n\n\t\t} else {\n\t\t\tReports.logEvent(\"Fail\", FailDescription);\n\t\t\tSystem.out.println(\"\t\t<<>> \" + FailDescription + \" <<>>\");\n\n\t\t}\n\n\t}",
"public void logLocation(View view) {\n writeGPSDataToDB(locationHandler.getLatitude(), locationHandler.getLongitude(), locationHandler.getAltitude());\n databaseHandler.setValueInExpInfo(((TextView) findViewById(R.id.accelerate_indicator_rec)).getText().toString(), \"receiver_orientation\", experimentNumber);\n accelerometerHandler.close();\n Toast.makeText(this, \"receivers GPS data logged\", Toast.LENGTH_SHORT).show();\n gpsLogged = true;\n }",
"public String showStatus();",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"abstract protected void _log(TrackingActivity activity) throws Exception;",
"public static void log(String toLog)\n {\n System.out.println(\"Log: \" + toLog);\n SmartDashboard.putString(\"Log\", toLog);\n }",
"abstract void initiateLog();",
"public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }",
"@Override\n\tpublic void svnLogFinish() {\n\t\tsendMailLogInfo();\n\t}",
"void onStatusUpdate(int status);",
"public void logDeviceEnterpriseInfo() {\n Callback<OwnedState> callback = (result) -> {\n recordManagementHistograms(result);\n };\n\n getDeviceEnterpriseInfo(callback);\n }",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"@FXML\n\tpublic void logRemoteWakeup() {\n\t\tcheckFieldEditOrNot = true;\n\t\tif (enableRemoteWakeup.isSelected()) {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Enable.<br>\");\n\t\t} else {\n\t\t\tSX3Manager.getInstance().addLog(\"Enable Remote Wakeup : Disable.<br>\");\n\t\t}\n\t}",
"private void log(String message) {\r\n\t\tif (ChartFrameSelectParametersMenuActionListener.printLog && Main.isLoggingEnabled()) {\r\n\t\t\tSystem.out.println(this.getClass().getName() + \".\" + message);\r\n\t\t}\r\n\t}",
"private void log() {\n\t\t\n//\t\tif (trx_loggin_on){\n\t\t\n\t\tif ( transLogModelThreadLocal.get().isTransLoggingOn() ) {\n\t\t\t\n\t\t\tTransLogModel translog = transLogModelThreadLocal.get();\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.put(entry.getKey().toString(), ((entry.getValue() == null)? \"\":entry.getValue()));\n\t\t\t}\n\t\t\ttransactionLogger.info(\"\"); // don't really need a msg here\n\t\t\t\n\t\t\t// TODO MDC maybe conflic with existing MDC using in the project\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesConText().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\tfor (Entry<Attr, String> entry : translog.getAttributesOnce().entrySet()) {\n\t\t\t\tMDC.remove(entry.getKey().toString());\n\t\t\t}\n\t\t\t\n\t\t\ttranslog.getAttributesOnce().clear();\n\t\t}\n\t\t\n\t}",
"private void log(String message) {\n if (this.listener != null) {\n message = \"CollabNet Tracker: \" + message;\n this.listener.getLogger().println(message);\n }\n }",
"private void addStateLog(){\n int state = GUIState.getState();\n if(state == 1){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n addText(\"Choose which card this card will affect!\");\n } if(state == 2){\n if(GUIState.command.equals(\"Summon\") || GUIState.command.equals(\"Defense\")){\n addText(\"Beginning \" + GUIState.command + \" processing!\");\n }\n addText(\"Choose where to put this card!\");\n }\n }",
"protected void log(String msg) {\n\t\tif(isLogging) {\n\t\t\tSystem.out.println(\"[TRACKER \" + id() + \"] \" + msg);\n\t\t}\n\t}",
"public void status(View view) {\n\n // Getting the unique id\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"EasyExpense\",0);\n unique_id = sharedPreferences.getString(\"unique_id\",null);\n\n getBills GetBills = new getBills(afterLogin.this);\n GetBills.execute(unique_id);\n }",
"void error() {\n status = ERROR;\n System.out.println(\"error\");\n stateChanged();\n }",
"public TrayHandler() {\n this.statusImages[0] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/active.png\");\n this.statusImages[1] = Toolkit.getDefaultToolkit().getImage(\"src/apache2tray/images/inactive.png\");\n \n this.statusText[0] = \"Apache is running\";\n this.statusText[1] = \"Apache is not running\";\n \n this.systemtray = SystemTray.getSystemTray();\n }",
"void completeLogs() throws IOException;",
"private void getloggersStatus() { \n\t\tAppClientFactory.getInjector().getSearchService().isClientSideLoggersEnabled(new SimpleAsyncCallback<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String result) {\n\t\t\t\tAppClientFactory.setClientLoggersEnabled(result);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}",
"protected void slflog(String operation, String repositoryId) {\r\n\t\tif (repositoryId == null) {\r\n\t\t\trepositoryId = \"<none>\";\r\n\t\t}\r\n\r\n\t\tHttpServletRequest request = (HttpServletRequest) getCallContext().get(CallContext.HTTP_SERVLET_REQUEST);\r\n\t\tString userAgent = request.getHeader(\"User-Agent\");\r\n\t\tif (userAgent == null) {\r\n\t\t\tuserAgent = \"<unknown>\";\r\n\t\t}\r\n\r\n\t\tString binding = getCallContext().getBinding();\r\n\r\n\t\tLOG.info(\"Operation: {}, Repository ID: {}, Binding: {}, User Agent: {}\", operation, repositoryId, binding,\r\n\t\t\t\tuserAgent);\r\n\t\t\r\n\t\t// also dump to console for testing\r\n\t\tString result =\r\n\t\tString.format(\"Operation: %s, Repository ID: %s, Binding: %s, User Agent: %s\", \r\n\t\t\t\toperation, repositoryId, binding, userAgent);\r\n\t\tSystem.out.println(result);\r\n\t}",
"void printHellow() {\n logger.debug(\"hellow world begin....\");\n logger.info(\"it's a info message\");\n logger.warn(\"it's a warning message\");\n loggerTest.warn(\"from test1 :....\");\n loggerTest.info(\"info from test1 :....\");\n\n // print internal state\n LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();\n StatusPrinter.print(lc);\n }",
"private void openTomopitchLog() {\n String logFileName = DatasetFiles.getTomopitchLogFileName(manager, axisID);\n TextPageWindow logFileWindow = new TextPageWindow();\n logFileWindow.setVisible(logFileWindow.setFile(manager.getPropertyUserDir()\n + File.separator + logFileName));\n }",
"public void logSensorData () {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n public void run() {\n for (int j = 0; j < mLogLevelActions.length; j++) {\n Action a = mLogLevelActions[j];\n if (a == this) {\n a.setChecked(true);\n\n // set the log level\n mLogPanel.setCurrentFilterLogLevel(j + 2);\n } else {\n a.setChecked(false);\n }\n }\n }",
"@Override\n public void logOut() {\n }",
"public void writeToControllerGameLog(String message) {\n controller.getUIController().writeToLogBox(message);\n }",
"@Override\r\n\t\tpublic void onStatus(Map<String, Object> arg0) {\n\t\t\tSystem.out.println(\"Method createMeetiong status: \" + arg0);\r\n\t\t}",
"@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n log();\n }",
"public void printStatus() {\n\t\tSystem.out.println(\"Current : \"+current+\"\\n\"\n\t\t\t\t+ \"Tour restant : \"+nb_rounds+\"\\n\"\n\t\t\t\t\t\t+ \"Troupe restant : \"+nb_to_train);\n\t}",
"public void syncLogsAccordingly( ){\n Log.d(TAG, \"Syncing Logs to Log panel\");\n\n try{\n Log.d(TAG , \"STATUS : \"+AppInfoManager.getAppStatusEncode());\n APPORIOLOGS.appStateLog(AppInfoManager.getAppStatusEncode());}catch (Exception e){}\n AndroidNetworking.post(\"\"+ AtsApplication.EndPoint_add_logs)\n .addBodyParameter(\"timezone\", TimeZone.getDefault().getID())\n .addBodyParameter(\"key\", AtsApplication.getGson().toJson(HyperLog.getDeviceLogs(false)))\n .setTag(\"log_sync\")\n .setPriority(Priority.HIGH)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject response) {\n try{\n ModelResultChecker modelResultChecker = AtsApplication.getGson().fromJson(\"\"+response,ModelResultChecker.class);\n if(modelResultChecker.getResult() == 1 ){\n Log.i(TAG, \"Logs Synced Successfully \");\n HyperLog.deleteLogs();\n onSync.onSyncSuccess(\"\"+AtsConstants.SYNC_EXISTING_LOGS);\n }else{\n Log.e(TAG, \"Logs Not synced from server got message \"+modelResultChecker.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }catch (Exception e){\n Log.e(TAG, \"Logs Not synced with error code: \"+e.getMessage());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n }\n @Override\n public void onError(ANError error) {\n Log.e(TAG, \"Logs Not synced with error code: \"+error.getErrorCode());\n onSync.onSyncError(\"\"+AtsConstants.SYNC_EXISTING_LOGS_ERROR);\n }\n });\n }",
"private void indicateUserLoginStatusChanged() {\n raise(new UserLoginStatusChangedEvent(null));\n }",
"@Override\n public void addStatusEvent(Status status) {\n }",
"public synchronized void startUpdates(){\n mStatusChecker.run();\n }",
"public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }",
"public void traceStatus() {\n logger.trace(\"jvmThread: {}, jvmMethod: {}\", jvmThread, jvmMethod);\n logger.trace(\"localVariables: {}\", localVariables);\n logger.trace(\"operandStacks: {}\", operandStacks);\n }",
"public void status(leapstream.scoreboard.core.model.Status status) {\n Stati stati = status.is();\n foreground(stati);\n background(stati);\n label.text(\"\" + stati);\n }",
"public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}",
"private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}",
"public void recordOverallStatus(int status) {\n mOverallStatusHistogram.put(status, mOverallStatusHistogram.get(status) + 1);\n }",
"public void logStoreAppendSuccess(AppendLogCommand cmd) {\r\n\r\n\r\n\r\n if (logger.isInfoEnabled())\r\n logger.info(\"LogStore call back MemberAppend {}\",\r\n new String(cmd.getTerm() + \" \" + cmd.getLastIndex()));\r\n\r\n\r\n\r\n // send to all follower and self\r\n\r\n\r\n\r\n }",
"public void timeLine() {\r\n\r\n try {\r\n List<Status> statuses = twitter.getHomeTimeline();\r\n System.out.println(\"Showing home timeline.\");\r\n for (Status status : statuses) {\r\n System.out.println(status.getUser().getName() + \":\"\r\n + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n }",
"Response<Void> logCustomStat(int index);",
"public void info(StatusTask t, String msg){\n\t\tt.setStaus(msg);\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }"
] | [
"0.7206895",
"0.6726409",
"0.65164864",
"0.6413613",
"0.6388692",
"0.63260645",
"0.62803644",
"0.6273684",
"0.62419516",
"0.622637",
"0.61432666",
"0.610612",
"0.60836273",
"0.6035046",
"0.6011565",
"0.5997451",
"0.5962452",
"0.5949854",
"0.59490806",
"0.59422964",
"0.5887037",
"0.5865071",
"0.5851956",
"0.584268",
"0.584268",
"0.584268",
"0.58263344",
"0.5806172",
"0.5803588",
"0.57965136",
"0.57934517",
"0.57871914",
"0.57845634",
"0.57777226",
"0.5776329",
"0.57752603",
"0.57669574",
"0.57667553",
"0.5753145",
"0.575263",
"0.573826",
"0.57378757",
"0.57233",
"0.57223874",
"0.57174563",
"0.5703539",
"0.57017905",
"0.5700298",
"0.56944466",
"0.56930894",
"0.56888026",
"0.56839496",
"0.5682071",
"0.5678876",
"0.56788373",
"0.5678386",
"0.5670598",
"0.56547433",
"0.5638789",
"0.5605967",
"0.5604674",
"0.5589502",
"0.55832773",
"0.557789",
"0.557324",
"0.5557369",
"0.55509293",
"0.5533875",
"0.55324954",
"0.5529761",
"0.55159396",
"0.5515771",
"0.5513811",
"0.55122274",
"0.55067897",
"0.55006856",
"0.54977214",
"0.5497532",
"0.5492935",
"0.54877704",
"0.5481474",
"0.54758984",
"0.54720795",
"0.5467263",
"0.54589707",
"0.5457134",
"0.5422646",
"0.5416909",
"0.54087293",
"0.5400458",
"0.53923786",
"0.53921086",
"0.5386535",
"0.53850037",
"0.53845316",
"0.53816646",
"0.5378875",
"0.5377704",
"0.5376776",
"0.53702945",
"0.5366562"
] | 0.0 | -1 |
Reevaluate the supplied forecaster on the current data | protected void reevaluateForecaster(final String name,
final WekaForecaster forecaster, final Instances trainHeader) {
if (!trainHeader.equalHeaders(m_instances)) {
JOptionPane.showMessageDialog(null, "Data used to train this forecaster " +
"is not compatible with the currently loaded data:\n\n"
+ trainHeader.equalHeadersMsg(m_instances), "Unable to reevaluate model",
JOptionPane.ERROR_MESSAGE);
} else {
if (m_runThread == null) {
synchronized (this) {
m_startBut.setEnabled(false);
m_stopBut.setEnabled(true);
}
m_runThread = new ForecastingThread(forecaster, name);
((ForecastingThread)m_runThread).setConfigureAndBuild(false);
m_runThread.setPriority(Thread.MIN_PRIORITY);
m_runThread.start();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void loadForecaster() {\n File sFile = null;\n int returnVal = m_fileChooser.showOpenDialog(this);\n if (returnVal == m_fileChooser.APPROVE_OPTION) {\n sFile = m_fileChooser.getSelectedFile();\n \n if (m_log != null) {\n m_log.statusMessage(\"Loading forecaster...\");\n }\n \n Object f = null;\n Instances header = null;\n boolean loadOK = true;\n try {\n ObjectInputStream is = new ObjectInputStream(new FileInputStream(sFile));\n f = is.readObject();\n header = (Instances)is.readObject();\n is.close();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex, \"Load failed\",\n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (!loadOK) {\n if (m_log != null) {\n m_log.logMessage(\"Loading from file \" + sFile.getName() + \"' failed.\");\n m_log.statusMessage(\"OK\");\n }\n } else if (!(f instanceof WekaForecaster)) {\n JOptionPane.showMessageDialog(this, \n \"Loaded model is not a weka forecaster!\", \"Weka forecasting\", \n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (loadOK) {\n String name = (new SimpleDateFormat(\"HH:mm:ss - \")).format(new Date());\n StringBuffer outBuff = new StringBuffer();\n WekaForecaster wf = (WekaForecaster)f; \n \n String lagOptions = \"\";\n if (wf instanceof TSLagUser) {\n TSLagMaker lagMaker = ((TSLagUser)wf).getTSLagMaker();\n lagOptions = Utils.joinOptions(lagMaker.getOptions());\n }\n \n String fname = wf.getAlgorithmName();\n String algoName = fname.substring(0, fname.indexOf(' '));\n if (algoName.startsWith(\"weka.classifiers.\")) {\n name += algoName.substring(\"weka.classifiers.\".length());\n } else {\n name += algoName;\n }\n name += \" loaded from '\" + sFile.getName() + \"'\";\n \n outBuff.append(\"Scheme:\\n\\t\" + fname).append(\"\\n\");\n outBuff.append(\"loaded from '\" + sFile.getName() + \"'\\n\\n\");\n \n if (lagOptions.length() > 0) {\n outBuff.append(\"Lagged and derived variable options:\\n\\t\").\n append(lagOptions + \"\\n\\n\");\n }\n \n outBuff.append(wf.toString());\n \n m_history.addResult(name, outBuff);\n m_history.setSingle(name);\n \n List<Object> resultList = new ArrayList<Object>();\n resultList.add(wf); resultList.add(header);\n m_history.addObject(name, resultList);\n updateMainTabs(name); \n } \n }\n }",
"@Override\r\n public void resetEvaluation ()\r\n {\r\n evaluation = null;\r\n }",
"private void refreshData() {\r\n\tif (fieldSpeciesContextSpec == null){\r\n\t\tsetData(null);\r\n\t} else {\r\n\t\tsetData(fieldSpeciesContextSpec.computeApplicableParameterList());\r\n\t}\r\n}",
"public void evaluate() {\r\n Statistics.evaluate(this);\r\n }",
"public void refresh() {\r\n numberThreshold = hasNumberThreshold();\r\n dateThreshold = hasDateThreshold();\r\n }",
"void recompute () {\n current_part.t_Cl = current_part.t_Cd = current_part.t_Cm = null;\n computeFlowAndRegenPlot();\n }",
"private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}",
"private void applyRules () throws DataNormalizationException {\n\t\tapplyRules(null);\n\t}",
"public void refreshDataFilter();",
"protected void startForecaster(final WekaForecaster forecaster) {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, null); \n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }",
"@Override\n public void eval(final AbraModule module)\n {\n clearSizes(module);\n\n // single pass over everything\n super.eval(module);\n\n // some sizes may have been indeterminable for now due to recursion\n resolveRecursions(module);\n }",
"private void remplirFabricantData() {\n\t}",
"public void postProcess() {\n if (foreignColumnName != null) {\n foreignAutoRefresh = true;\n }\n if (foreignAutoRefresh && maxForeignAutoRefreshLevel == NO_MAX_FOREIGN_AUTO_REFRESH_LEVEL_SPECIFIED) {\n maxForeignAutoRefreshLevel = DatabaseField.DEFAULT_MAX_FOREIGN_AUTO_REFRESH_LEVEL;\n }\n }",
"@Override\n public void redo()\n {\n story.setEstimate(newEstimate);\n }",
"@Override\n public void refreshFeed(boolean invalidateData) {\n retrySubredditLoad(Constants.TAG_FRAG_SUBREDDIT_VIEWER, invalidateData);\n // Pop the current subreddit paginator since we're about to create a new one by refreshing\n if(!App.getStackRedditPaginator().isEmpty()){\n App.getStackRedditPaginator().pop();\n }\n }",
"void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}",
"private void refreshData(){\n Log.d(LOG_TAG, \"refreshData()\");\n mRVAdapter.setData(null);\n loadData();\n }",
"public abstract void recalc();",
"public void evaluate(String trainFile, String validationFile, String testFile, String featureDefFile) {\n/* 710 */ List<RankList> train = readInput(trainFile);\n/* */ \n/* 712 */ List<RankList> validation = null;\n/* */ \n/* 714 */ if (!validationFile.isEmpty()) {\n/* 715 */ validation = readInput(validationFile);\n/* */ }\n/* 717 */ List<RankList> test = null;\n/* */ \n/* 719 */ if (!testFile.isEmpty()) {\n/* 720 */ test = readInput(testFile);\n/* */ }\n/* 722 */ int[] features = readFeature(featureDefFile);\n/* 723 */ if (features == null) {\n/* 724 */ features = FeatureManager.getFeatureFromSampleVector(train);\n/* */ }\n/* 726 */ if (normalize) {\n/* */ \n/* 728 */ normalize(train, features);\n/* 729 */ if (validation != null)\n/* 730 */ normalize(validation, features); \n/* 731 */ if (test != null) {\n/* 732 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 735 */ RankerTrainer trainer = new RankerTrainer();\n/* 736 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 738 */ if (test != null) {\n/* */ \n/* 740 */ double rankScore = evaluate(ranker, test);\n/* 741 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 743 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 745 */ System.out.println(\"\");\n/* 746 */ ranker.save(modelFile);\n/* 747 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"@Override\n void execute(RolapEvaluator evaluator) {\n }",
"private void updateFMeasure(){\n double precisionValue = precision.get(precision.size()-1);\n double recallValue = recall.get(recall.size()-1);\n if(precisionValue==0.0 || recallValue==0.0){\n fMeasures.add(0.0);\n }else{\n fMeasures.add((2*precisionValue*recallValue)/(precisionValue+recallValue));\n }\n \n }",
"private void returnForecast() {\n\t\tif (callback != null) {\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t\tif (forecasts.isEmpty()&&reload) {\n\t\t\t\tupdateForecastRequest();\n\t\t\t} else {\n\t\t\t\t// then ask the serviceupdater to update data\n\t\t\t\t// but update only if one day of difference between the last update and now is more\n\t\t\t\t// than one day\n\t\t\t\tString strLastUpdate = MyApplication.instance.getServiceManager().getForecastServiceUpdater().getLastUpdate(this.woeid);\n\t\t\t\tLog.e(\"ForecastServiceData\", \"strLastUpdate \" + strLastUpdate);\n\t\t\t\ttry {\n\t\t\t\t\t// empty data base case and empty SharedPreference\n\t\t\t\t\tif (strLastUpdate.equals(\"null\")) {\n\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// current case\n SimpleDateFormat sdf=MyApplication.instance.getServiceManager().getForecastServiceUpdater().getDateFormatForLastUpdate();\n\t\t\t\t\t\tDate lastUpdate = sdf.parse(strLastUpdate);\n\t\t\t\t\t\tif (new Date().getTime() - lastUpdate.getTime() > 1000 * 60 * 60 * 24) {\n\t\t\t\t\t\t\t// if the last update was one day ago, then make an automatic update\n\t\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tExceptionManager.manage(new ExceptionManaged(this.getClass(), R.string.exc_date_parsing, e));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public abstract Object evaluate( Feature feature ) throws FilterEvaluationException;",
"public void reloadData() {\n log.debug(\"Getting value from method {}\", method.getName());\n T fetchedValue = (T) executeMethod(instance, method, null);\n setData(fetchedValue);\n }",
"public void refresh() {\n\t\tgetData();\n\t\trender();\n\t}",
"@Generated(hash = 74421150)\n public synchronized void resetForecast() {\n forecast = null;\n }",
"public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }",
"public abstract RefreshResults refresh();",
"protected void useDataOld() {\n\t\tfloat x = values[0];\n\t\tfloat y = values[1];\n\t\tfloat z = values[2];\n\n\t\tcallListener(new AccelarationSensorData(millis, nanos, x, y, z));\n\t}",
"protected void stopForecaster() {\n if (m_runThread != null) {\n m_runThread.interrupt();\n m_runThread.stop();\n }\n }",
"@Override\n\tprotected void getDataRefresh() {\n\t\t\n\t}",
"protected void processDataObject() throws Exception\r\n\t{\r\n\t\tif (maximalRecordsToPass > 0 && currentPassedRecord > maximalRecordsToPass)\r\n\t\t{\r\n\t\t\t// simulate conversion end\r\n\t\t\tendDocument();\r\n\t\t\tthrow new RuntimeException(\"Converter ended after \"\t+ maximalRecordsToPass\t+ \" records (this is debug mode)\");\r\n\t\t}\r\n\t\tDataObject dataObject = getDataObject();\r\n\t\tObjectRule rule = dataObject.getDataObjectRule();\r\n\n\t\tString subject = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tValue checkedSubjectValue = rule.checkConditionsAndGetSubject(dataObject);\n\t\t\tif (checkedSubjectValue != null) {\n\t\t\t\tsubject = checkedSubjectValue.getValue();\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(\"Problem with preprocessor on object rule\\n\"\t+ getDataObject().getDataObjectRule().toString(), e);\r\n\t\t}\r\n\r\n\t\tif (subject == null)\r\n\t\t{\r\n\t\t\t// this object should be ignored, remove unprocessed children from the\r\n\t\t\t// queue\r\n\t\t\tfor (DataObject childDataObject : dataObject.findAllChildren())\r\n\t\t\t{\r\n\t\t\t\tif (childDataObject == dataObject)\r\n\t\t\t\t\tthrow new Exception(\"Internal error: when removing child object fo the parent that should not be converted - a child is the same as the father\");\r\n\t\t\t\tpartsCompleted.remove(childDataObject);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// process this object\r\n\t\t\ttry\r\n\t\t\t{\n\t\t\t\trule.processDataObject(subject, this);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\n\t\t\t\tthrow new Exception(\n\t\t\t\t\t\t\"Exception with running property rules on object rule\\n\"\r\n\t\t\t\t\t\t+ getDataObject().getDataObjectRule().toString(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void refreshData() {\n // Prevent unnecessary refresh.\n if (mRefreshDataRequired) {\n // Mark all entries in the contact info cache as out of date, so\n // they will be looked up again once being shown.\n mAdapter.invalidateCache();\n fetchCalls();\n mRefreshDataRequired = false;\n }\n }",
"@Override\n public void retrack() {\n }",
"public void rifleActualWeapon(){\n if(this.actualWeapon != null)\n {\n this.actualWeapon.getPreviousTargets().clear();\n this.actualWeapon.setLastTargetSquare(null);\n this.actualWeapon.setLastDirection(null);\n }\n\n }",
"public void run () {\n generalFeatureExtraction();\n\n //\n // 2 - Traverse the Call Graph and propagate call stack counter\n propagateFeatures();\n }",
"public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t\tgetTable().tableChanged(new TableModelEvent(this));\r\n\t}",
"public void evaluatePopulation() {\n // reset the total fitness score\n totalFitness = 0;\n\n for (int i = 0; i < populationSize; i++) {\n population.get(i).setRawFitness(\n FeederCollection.getFeeders().get(i).GetFitness());\n totalFitness += population.get(i).getRawFitness();\n }\n\n // set the normalized fitness for each population member\n for (Genotype g : population) {\n // normalized fitness = raw fitness / total fitness\n g.setNormalizedFitness((g.getRawFitness() / totalFitness));\n }\n\n // sort the popoulation\n Collections.sort(population, Genotype.FitnessOrder);\n\n highFitnesses.add(population.get(0).getRawFitness());\n avgFitnesses.add(totalFitness / population.size());\n\n\n }",
"public void refreshData() {\n\n if (!mUpdatingData) {\n new RefreshStateDataTask().execute((Void) null);\n }\n }",
"public void evaluate(String trainFile, double percentTrain, String testFile, String featureDefFile) {\n/* 799 */ List<RankList> train = new ArrayList<>();\n/* 800 */ List<RankList> validation = new ArrayList<>();\n/* 801 */ int[] features = prepareSplit(trainFile, featureDefFile, percentTrain, normalize, train, validation);\n/* 802 */ List<RankList> test = null;\n/* */ \n/* */ \n/* 805 */ if (!testFile.isEmpty()) {\n/* */ \n/* 807 */ test = readInput(testFile);\n/* 808 */ if (normalize) {\n/* 809 */ normalize(test, features);\n/* */ }\n/* */ } \n/* 812 */ RankerTrainer trainer = new RankerTrainer();\n/* 813 */ Ranker ranker = trainer.train(this.type, train, validation, features, this.trainScorer);\n/* */ \n/* 815 */ if (test != null) {\n/* */ \n/* 817 */ double rankScore = evaluate(ranker, test);\n/* 818 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* */ } \n/* 820 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 822 */ System.out.println(\"\");\n/* 823 */ ranker.save(modelFile);\n/* 824 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"public void reassignIfNeeded() {\n\t}",
"public void reSurrect(){\n\t\tcanvas = Canvas.getInstance();\n\t\tfor(int i = 0; i < myEffects.size(); i++){\n\t\t\tmyEffects.get(i).reSurrect();\n\t\t}\n\t}",
"Snapshot apply();",
"@Override\r\n\tpublic void refresh(Object userData) {\n\r\n\t}",
"public DataHolder postProcess( DataHolder holder );",
"void warmup(ConsolidatedSnapshot snapshot, double[] forecasts);",
"public void refresh() {\n\t\tif (render != null) render.cancel();\n\n\t\tif (preview != null) {\n\t\t\tneedsPreview = true;\n\n\t\t} else {\n\t\t\tpreview = new Iterator(transformations, plotter.get(), 100000, RESET_INTERVAL);\n\t\t\tneedsPreview = false;\n\n\t\t\tpreview.setOnSucceeded(event -> {\n\t\t\t\tshowImg(preview.getValue());\n\t\t\t\tpreview = null;\n\n\t\t\t\tif (needsPreview) {\n\t\t\t\t\trefresh(); // generate the next preview\n\t\t\t\t} else {\n\t\t\t\t\trender(1);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tpreview.threadRun();\n\t\t}\n\n\n\t}",
"private void prepareEvaluate(final ProgressHandle progh, EvChannel chValue, final EvChannel chMask, List<String> use)\n\t\t{\n\t\t//Clear prior data\n\t\tuseMeasures.clear();\n\t\tuseMeasures.addAll(use);\n\t\tcolumns.clear();\n\t\tframeInfo.clear();\n\t\t\n\t\t//Figure out columns\n\t\tfor(String s:useMeasures)\n\t\t\tcolumns.addAll(measures.get(s).getColumns());\n\n\t\t//Lazily evaluate stacks\n\t\t//for(Map.Entry<EvDecimal, EvStack> e:chValue.imageLoader.entrySet())\n\t\tfor(final EvDecimal frame:chValue.getFrames())\n\t\t\t{\n\t\t\tFrameInfo info=new FrameInfo();\n\t\t\t//final EvDecimal frame=e.getKey();\n\t\t\tEvStack thestack=chValue.getStack(frame);\n\t\t\t\n\t\t\t//final EvStack stackValue=e.getValue();\n\t\t\tfinal WeakReference<EvStack> weakStackValue=new WeakReference<EvStack>(thestack);\n\t\t\tfinal WeakReference<EvChannel> weakChMask=new WeakReference<EvChannel>(chMask);\n\t\t\tfinal WeakReference<FrameInfo> weakInfo=new WeakReference<FrameInfo>(info);\n\t\t\t\n\t\t\tinfo.calcInfo=new CalcInfo(){\n\t\t\t\tpublic void calc()\n\t\t\t\t\t{\n\t\t\t\t\tfor(String s:useMeasures)\n\t\t\t\t\t\tmeasures.get(s).analyze(progh, weakStackValue.get(), weakChMask.get().getStack(frame),weakInfo.get());\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\n\t\t\tframeInfo.put(frame, info);\n\t\t\t}\n\t\t}",
"public void redraw(Data data)\n {\n outputHelper.redraw(data);\n }",
"@Override\n // onDataChange runs each time data is changed in above path and returns the whole data in snapshot\n public void onDataChange(DataSnapshot joinedUserDataSnapshot) {\n prepareReviewData((Map<String, Object>) joinedUserDataSnapshot.getValue());\n mDatabaseReference.removeEventListener(mValueEventListener);\n }",
"private void refreshSource() {\n if (source != null && featureCollection != null) {\n source.setGeoJson( featureCollection );\n }\n }",
"public void deliverResult(ArrayList<Recept> data) {\n recepts = data;\n super.deliverResult(recepts);\n }",
"@Override\n public void evaluateTariffs (List<Tariff> tariffs)\n {\n for (EvCustomer customer : evCustomers) {\n customer.evaluateTariffs(tariffs);\n }\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\n public void doEvaluation(Individual sample, boolean isTrain) {\n mainEvaluator.doEvaluation(sample, isTrain);\n }",
"public void processFights() {\n\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\n\t\t\t\tbattlefield[row][column].fight();\n\t\t\t}\n\t\t}\n\t}",
"public void updateData(Trick completedTrick);",
"@Override\n\tpublic void buildEvaluator(Instances data) throws Exception {\n\t\tthis.instances = data;\n\t}",
"public abstract void redrawPathsafterDeserialization(FingerDrawingActivity fda);",
"private void expensesUpdateWaterfallChart() {\n\n waterfallData.clear();\n waterfallData = DBGetExpenses.forEachDayChallengeWasRunning(key1OfActiveChallenge, goal);\n //waterfall.data(waterfallData);\n //waterfallView.invalidate();\n }",
"@Override\r\n public void afterVisit() {\n final MethodCallUtils.EnclosingRefs enclosing = \r\n MethodCallUtils.getEnclosingInstanceReferences(\r\n thisExprBinder, expr,\r\n superClassDecl,\r\n context.theReceiverNode, getEnclosingSyntacticDecl());\r\n /* The transformer will already be set in the map correctly for these\r\n * effects when they are original generated. We are just modifying\r\n * the lock and evidence information for the effects.\r\n */\r\n for (final Effect e : newContext.theEffects.build()) {\r\n Effect maskedEffect = e.mask(thisExprBinder);\r\n if (maskedEffect != null) {\r\n // Mask again if the effect is on the receiver of the anonymous class\r\n if (maskedEffect.affectsReceiver(newContext.theReceiverNode)) {\r\n context.theEffects.add(\r\n Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new EmptyTarget(new EmptyEvidence(Reason.UNDER_CONSTRUCTION)),\r\n new MaskedEffectEvidence(maskedEffect),\r\n maskedEffect.getNeededLocks()));\r\n } else {\r\n final Target target = maskedEffect.getTarget();\r\n \r\n final TargetEvidence te = target.getEvidence();\r\n if (te instanceof EmptyEvidence\r\n && ((EmptyEvidence) te).getReason() == Reason.METHOD_CALL) {\r\n /* Special case: empty effect that carries lock preconditions */\r\n final ImmutableSet.Builder<NeededLock> newLockSet = ImmutableSet.builder();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLockSet.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n context.theEffects.add(\r\n Effect.empty(maskedEffect.getSource(),\r\n new EmptyEvidence(Reason.METHOD_CALL), \r\n ImmutableSet.of(getEvidence()), newLockSet.build()));\r\n } else if (target instanceof InstanceTarget) {\r\n final IRNode ref = target.getReference();\r\n \r\n final IRNode newRef = enclosing.replace(ref);\r\n if (newRef != null) {\r\n final IRNode objectExpr = thisExprBinder.bindThisExpression(newRef);\r\n final Target newTarget = new InstanceTarget(\r\n objectExpr, target.getRegion(),\r\n new EnclosingRefEvidence(maskedEffect.getSource(), ref, newRef));\r\n final Set<NeededLock> newLocks = new HashSet<>();\r\n for (final NeededLock lock : maskedEffect.getNeededLocks()) {\r\n newLocks.add(lock.replaceEnclosingInstanceReference(enclosing));\r\n }\r\n elaborateInstanceTarget(\r\n context.bcaQuery, lockFactory, thisExprBinder, lockModel.get(),\r\n maskedEffect.getSource(), maskedEffect.isRead(), newTarget, getEvidence(),\r\n newLocks, context.theEffects);\r\n } else {\r\n /* XXX: Not sure if it is possible to get here. External\r\n * variable references are turned into ANyInstance targets\r\n * during elaboration.\r\n */\r\n /* 2012-08-24: We have to clean the type to make sure it is not a \r\n * type formal.\r\n */\r\n IJavaType type = thisExprBinder.getJavaType(ref);\r\n if (type instanceof IJavaTypeFormal) {\r\n type = TypeUtil.typeFormalToDeclaredClass(\r\n thisExprBinder.getTypeEnvironment(), (IJavaTypeFormal) type);\r\n }\r\n context.theEffects.add(Effect.effect(\r\n maskedEffect.getSource(), maskedEffect.isRead(),\r\n new AnyInstanceTarget(\r\n (IJavaReferenceType) type, target.getRegion(),\r\n new UnknownReferenceConversionEvidence(\r\n maskedEffect, ref, (IJavaReferenceType) type)),\r\n getEvidence(), maskedEffect.getNeededLocks()));\r\n }\r\n } else {\r\n context.theEffects.add(\r\n maskedEffect.updateEvidence(target.getEvidence(), ImmutableSet.of(getEvidence())));\r\n }\r\n }\r\n }\r\n }\r\n }",
"public void modelRewind()\n {\n\tif (manim==null) return;\n\tmodelStop();\n\tmanim.rewind();\n\tclearToBack();\n\tmodelStep();\n }",
"void refresh(Collection<? extends BaseModel> objects);",
"@Override\n\tprotected void updateDataFromRead(CountedData counter, final GATKSAMRecord gatkRead, final int offset, final byte refBase) {\n Object[][] covars;\n\t\ttry {\n\t\t\tcovars = (Comparable[][]) gatkRead.getTemporaryAttribute(getCovarsAttribute());\n\t\t\t// Using the list of covariate values as a key, pick out the RecalDatum from the data HashMap\n\t NestedHashMap data;\n\t data = dataManager.data;\n\t final Object[] key = covars[offset];\n\t\t\tBisulfiteRecalDatumOptimized datum = (BisulfiteRecalDatumOptimized) data.get( key );\n\t if( datum == null ) { // key doesn't exist yet in the map so make a new bucket and add it\n\t // initialized with zeros, will be incremented at end of method\n\t datum = (BisulfiteRecalDatumOptimized)data.put( new BisulfiteRecalDatumOptimized(), true, (Object[])key );\n\t }\n\n\t // Need the bases to determine whether or not we have a mismatch\n\t final byte base = gatkRead.getReadBases()[offset];\n\t final long curMismatches = datum.getNumMismatches();\n\t final byte baseQual = gatkRead.getBaseQualities()[offset];\n\n\t // Add one to the number of observations and potentially one to the number of mismatches\n\t datum.incrementBaseCounts( base, refBase, baseQual );\n\t increaseCountedBases(counter,1);\n\t\t\tincreaseNovelCountsBases(counter,1);\n\t\t\tincreaseNovelCountsMM(counter,(datum.getNumMismatches() - curMismatches));\n\t \n\t\t} catch (IllegalArgumentException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n //counter.novelCountsBases++;\n \n //counter.novelCountsMM += datum.getNumMismatches() - curMismatches; // For sanity check to ensure novel mismatch rate vs dnsnp mismatch rate is reasonable\n \n }",
"@Override public void refreshFromVariable(VariableContainer_ifc container){\n if(bActive){\n List<Track> listTracks1 = listTracks; //Atomic access, iterate in local referenced list.\n float[] values = new float[listTracks1.size()];\n int ixTrack = -1;\n int[] timeShortAbsLastFromVariable = null;\n boolean bDifferentTime = false;\n boolean bRefreshed = false; //set to true if at least one variable is refreshed.\n for(Track track: listTracks1){\n if(track.variable ==null && bNewGetVariables){ //no variable known, get it.\n String sDataPath = track.getDataPath();\n if(sDataPath !=null){\n if(sDataPath.startsWith(\"-\")){ //it is a comment\n int posEnd = sDataPath.indexOf('-',1) +1;\n sDataPath = sDataPath.substring(posEnd); //after second '-', inclusive first '-' if no second found.\n }\n String sPath2 = sDataPath.trim();\n if(!sDataPath.startsWith(\"#\")){ //don't regard commented line\n String sPath = gralMng.getReplacerAlias().replaceDataPathPrefix(sPath2); //replaces only the alias:\n track.variable = container.getVariable(sPath);\n if(track.variable == null){\n System.err.printf(\"GralCurveView - variable not found; %s in curveview: %s\\n\", sPath, super.name);\n }\n }\n }\n }\n final float value;\n \n if(track.variable !=null ){\n int[] timeShort = track.variable.getLastRefreshTimeShort();\n if(timeShort !=null && timeShort[0] !=0) {\n if(timeShortAbsLastFromVariable == null) { timeShortAbsLastFromVariable = timeShort; }\n else if(timeShort != timeShortAbsLastFromVariable) { // has another time \n //maybe todo possibility to mark a curve as old\n bDifferentTime = timeShortAbsLastFromVariable[0] != timeShort[0];\n if((timeShort[0] - timeShortAbsLastFromVariable[0] ) >0) {\n timeShortAbsLastFromVariable[0] = timeShort[0]; //use the last value\n timeShortAbsLastFromVariable[1] = timeShort[1];\n }\n }\n }\n if(track.variable.isRefreshed()){\n bRefreshed = true;\n }\n if(track.getDataPath().startsWith(\"xxx:\"))\n stop();\n value = track.variable.getFloat();\n track.variable.requestValue(System.currentTimeMillis());\n } else {\n value = 0;\n }\n values[++ixTrack] = value;\n } \n bNewGetVariables = false;\n final long timeyet = System.currentTimeMillis();\n final int timeshort, timeshortAdd;\n if(this.common.timeDatapath !=null && this.common.timeVariable ==null){\n String sPath = gralMng.getReplacerAlias().replaceDataPathPrefix(this.common.timeDatapath); //replaces only the alias:\n this.common.timeVariable = container.getVariable(sPath);\n }\n if(this.common.timeVariable !=null){\n //the time variable should contain a relative time stamp. It is the short time.\n //Usual it is in 1 ms-step. To use another step width, a mechanism in necessary.\n //1 ms in 32 bit are ca. +- 2000000 seconds or ~ +-23 days as longest time for differences.\n timeshort = this.common.timeVariable.getInt() + this.timeorg.timeshortAdd;\n this.common.timeVariable.requestValue(timeyet);\n if(this.timeorg.absTime.isCleaned()) {\n setTimePoint(timeyet, timeshort, 1.0f); //the first time set.\n timeshortAdd = 0;\n }\n else if((timeshort - this.timeorg.timeshortLast) <0 || this.timeorg.absTime.isCleaned()) {\n //new simulation time:\n timeshortAdd = this.timeorg.absTime.timeshort4abstime(timeyet);\n this.timeorg.timeshortAdd += timeshortAdd; \n setTimePoint(timeyet, timeshort, 1.0f); //for later times set the timePoint newly to keep actual.\n } else {\n timeshortAdd = 0;\n }\n } else if(timeShortAbsLastFromVariable !=null) {\n timeshort = timeShortAbsLastFromVariable[0];\n timeshortAdd = timeShortAbsLastFromVariable[1];\n if(this.timeorg.absTime.isCleaned()) {\n setTimePoint(timeyet, timeshort + timeshortAdd, 1.0f); //set always a timePoint if abstime is not given.\n }\n } else {\n timeshort = (int)timeyet; //The milliseconds from absolute time.\n timeshortAdd = 0;\n setTimePoint(timeyet, timeshort, 1.0f); //set always a timePoint if not data time is given.\n }\n if(bRefreshed && timeshort != this.timeorg.timeshortLast) {\n //don't write points with the same time, ignore seconds.\n setSample(values, timeshort, timeshortAdd);\n //System.out.println(\"setSample\");\n this.timeorg.timeshortLast = timeshort;\n }\n }\n }",
"@Override\n\tPieD remA(RemV remFn,Object f) {\n\t\treturn remFn.forTop(t, r, f);\n\t}",
"public void eval() {\n \n //The tube that is coming next\n Tube nextTube = null;\n \n //Looks at each tube's rightmost position and determines if it is greater than\n //then: 1/3 Screen width + middle of bird. In essence, it finds the closest \n //tube that the bird hasn't crossed yet and sets that as the 'nextTube'\n for (final Tube tube : tubes)\n if (tube.position + TUBE_WIDTH > WIDTH / 3 - BIRD_WIDTH / 2\n && (nextTube == null || tube.position < nextTube.position))\n nextTube = tube;\n \n //Looks at each bird. If it isn't dead, will give the proper inputs for each\n //of its 4 input neurons\n for (final Bird bird : birds) {\n if (bird.dead)\n continue;\n\n //array of 4 doubles to be used for the input neurons\n final double[] input = new double[4];\n //First input is relative to current bird's height\n input[0] = bird.height / HEIGHT;\n \n //If there is no tube in sight, set the input values to defaults...\n if (nextTube == null) {\n input[1] = 0.5;\n input[2] = 1.0;\n } \n //Otherwise, set the input values to next tube's coordinates\n else {\n input[1] = nextTube.height / HEIGHT;\n input[2] = nextTube.position / WIDTH;\n }\n //Fourth input is set to 1.0, which refers to the pipe gap\n input[3] = 1.0;\n\n //if output is greater than 0.5, the bird flaps\n final double[] output = bird.genome.evaluateNetwork(input);\n if (output[0] > 0.5)\n bird.flap = true;\n }\n }",
"@Override\n public void refreshData() {\n\n if (InternetConnection.checkConnection(context)) {\n ApiService apiService = RetroClient.getApiService();\n Call<String> call = apiService.getFactdata();\n Log.e(TAG, \"request ongetData url :\" + call.request().url());\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n Log.e(TAG, \"response : ongetData :\" + response.body());\n parseResponse(response.body());\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Log.e(TAG, \"onFailure ongetData : \" + t.getMessage());\n }\n });\n } else {\n factDataView.displayMessage(context.getString(R.string.nonetwork), false);\n }\n }",
"private void refreshFilterData(){\n empty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, filteredData);\n v.setAdapter(adapter);\n emptyViewForFilter();\n }",
"private void evaluationLogic() {\n // setup for logic:\n // if distToClosestEstimate[i][0] is smaller than threshold, we have a Tp\n // if distToClosestEstimate[i][0] is larger than threshold, we have a Fn\n // all estimatedFeatures that are not assigned Tp are therefore Fp\n for (int i = 0; i < groundTruthInstant.size(); ++i) {\n if (distToClosestEstimate[i][0] < truePositiveThreshold) {\n ++truePositiveCount;\n int assignedEstimatedFeature = (int) distToClosestEstimate[i][1];\n assignedEstimatedFeatures[assignedEstimatedFeature] = true;\n } else\n ++falseNegativeCount;\n }\n for (int i = 0; i < estimatedInstant.size(); ++i)\n if (!assignedEstimatedFeatures[i])\n ++falsePositiveCount;\n }",
"public abstract void refreshing();",
"public void refresh() {\n \t\tphysics.physik();\n \t\tcycleTest();\n \t}",
"@Override\n public void feedRawData(Image data) {\n mARGSession.feedRawData(data);\n }",
"private void iterativeDataPropertyMetrics() {\n\t}",
"public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}",
"private void refreshData(){\n filempty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, data);\n v.setAdapter(adapter);\n emptyView();\n }",
"public void refresh()\n {\n refresh( null );\n }",
"@FXML private void refreshData(){\n\t\tclearFields();\n\t\treadUsers();\n\t\tshowUsers();\n\t\trefreshInformationsFromTableView(null);\n\t}",
"@Override\r\n\tpublic void onRefresh() {\n\t\tloadFourmData(true);\r\n\t}",
"public void evaluate() throws Throwable {\n }",
"public void visit(CastLookahead n) {\n n.f0.accept(this);\n }",
"@Override\n public void run() {\n refreshData();\n }",
"public void calculateFDR() {\n\t\tlogger.info(\"calculateFDR\");\n\t\t\n\t\tupdateDecoyStrategy();\n\t\t\n\t\tproteinModeller.calculateFDR();\n\t\t\n\t\tproteinModeller.sortReport(sortPanel.getSortPriorities(),\n\t\t\t\tsortPanel.getSortOrders());\n\t\t\n\t\tneedsRecaching = true;\n\t}",
"public void resetToInitialBelief() {\n\t\t\t//TODO when do we call this?\n\t\t\tthis.data = new ArrayList<Double>();\n\t\t\tfor(int i = 0; i < _initialBelief.data.size(); i++) {\n\t\t\t\tthis.data.add(_initialBelief.data.get(i));\n\t\t\t}\n\t\t}",
"public void evaluate(String sampleFile, String validationFile, String featureDefFile, double percentTrain) {\n/* 761 */ List<RankList> trainingData = new ArrayList<>();\n/* 762 */ List<RankList> testData = new ArrayList<>();\n/* 763 */ int[] features = prepareSplit(sampleFile, featureDefFile, percentTrain, normalize, trainingData, testData);\n/* 764 */ List<RankList> validation = null;\n/* */ \n/* */ \n/* 767 */ if (!validationFile.isEmpty()) {\n/* */ \n/* 769 */ validation = readInput(validationFile);\n/* 770 */ if (normalize) {\n/* 771 */ normalize(validation, features);\n/* */ }\n/* */ } \n/* 774 */ RankerTrainer trainer = new RankerTrainer();\n/* 775 */ Ranker ranker = trainer.train(this.type, trainingData, validation, features, this.trainScorer);\n/* */ \n/* 777 */ double rankScore = evaluate(ranker, testData);\n/* */ \n/* 779 */ System.out.println(this.testScorer.name() + \" on test data: \" + SimpleMath.round(rankScore, 4));\n/* 780 */ if (modelFile.compareTo(\"\") != 0) {\n/* */ \n/* 782 */ System.out.println(\"\");\n/* 783 */ ranker.save(modelFile);\n/* 784 */ System.out.println(\"Model saved to: \" + modelFile);\n/* */ } \n/* */ }",
"public void reinitAff()\n\t{\n\t\tthis.gagne = false;\n\t\tthis.perdu = false;\n\t}",
"public final void recycle() \n\t{\n\tsource = fSource = null;\n\t\n\t// put back in recycler\n\tgRecycler.putObject(this);\n\t}",
"void pretrain(DataSetIterator iterator);",
"private void reanderImage(ImageData data) {\n \n }",
"@Override\n\tpublic void refreshData(){\n\t\tpageNum = 1;\n\t\tlist.clear();\n\t\tloadData();\n\t}",
"public void evaluate() {\n for (Chromosome chromo : chromosomes) {\n double chromoGH = chromo.getTotalGH();\n if (chromo.isValid()) {\n this.validChromosomes++;\n if (chromoGH > this.getBestScore()) {\n this.bestScore = chromoGH;\n this.setBestChromo(chromo);\n }\n }\n //Log.debugMsg(chromo.getTotalGH().toString());\n// this.map.put(chromoGH, chromo);\n }\n }",
"public void evalInd() {\n\t\tif (ourIndEval.evaluateInd(anIndividual)) { \n\t\t\tLogger.logDebugConsole(\" success eval\");\n\t\t\tLogger.log(\"Eval success \" + anIndividual.getClassName() + \" = \"\n\t\t\t\t\t+ anIndividual.getClassName() + \" Time: \"+anIndividual.getRunningTime()+\" Fit:\" + anIndividual.getFitness()\n\t\t\t\t\t+ \" TestError:\" + anIndividual.getFunctionalityErrorCount()+ \" ASTNodes: \" + anIndividual.getNumNodes() \n\t\t\t\t\t+ \" GPNodes: \" \t+ anIndividual.getNumGPNodes()\n\t\t\t\t\t+ \" xoverApplied: \" \t+ anIndividual.crossoverApplied()\n\t\t\t\t\t+ \" xovers: \" \t+ anIndividual.getCrossoverAttempts()\n\t\t\t\t\t+ \" mutationApplied: \" \t+ anIndividual.mutationApplied()\n\t\t\t\t\t+ \" mutations: \" \t+ anIndividual.getMutationAttempts());\n\t\t} else {\n\t\t\tLogger.log(\"Eval failed \" + anIndividual.getClassName());\n\t\t}\n\t\t\t\t\n\t}",
"public void postDeserialize(){\n\t\tif(fittings == null){\n\t\t\treturn;\n\t\t}\n\t\tfor(CutSheetInfo csi : getMainThreadedList()){\n\t\t\tpostDeserializeOne(csi);\n\t\t}\n\t\tfor(BranchInfo bi : getBranchMap().values()){\n\t\t\tfor(EdgeMultiplicity em : bi.getEdgeMultiplicity()){\n\t\t\t\tCutSheetInfo csi = em.getEdgeInfo();\n\t\t\t\tpostDeserializeOne(csi);\n\t\t\t}\n\t\t}\n\t}",
"private void refresh(final boolean forceRebuild) {\n Runnable refreshRunnable = new Runnable() {\r\n public void run() {\r\n boolean changesExist = refreshSnapshotsForChangedSeries(forceRebuild);\r\n // System.out.println(\"Changes \" + changesExist);\r\n if ( changesExist ) {\r\n //fire the jfreechart change\r\n seriesChanged(new SeriesChangeEvent(this));\r\n }\r\n }\r\n };\r\n \r\n if (! SwingUtilities.isEventDispatchThread() && useSwingThread) {\r\n SwingUtilities.invokeLater(refreshRunnable);\r\n } else {\r\n refreshRunnable.run();\r\n }\r\n \r\n \r\n }",
"public void retractAll(ObjectFilter filter) {\n LOGGER.info(\"Retracting all facts matching filter...\");\n for (FactHandle handle : getFactHandles(filter)) {\n retract(handle);\n }\n }",
"public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void dataChanged() {\n // get latest data\n runs = getLatestRuns();\n wickets = getLatestWickets();\n overs = getLatestOvers();\n\n currentScoreDisplay.update(runs, wickets, overs);\n averageScoreDisplay.update(runs, wickets, overs);\n }",
"@Override\n\tpublic void producirEfecto(Algoformer algoformer){\n\t\tthis.afectador.afectarAlgoformer(algoformer);\n\t}",
"public void testRefresh() throws Exception {\r\n System.out.println(\"refresh\");\r\n Summarizer instance = null;\r\n instance.refresh();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"protected final void redo() {\n requireNonNull(model);\n try {\n executeUndoableCommand();\n } catch (CommandException ce) {\n throw new AssertionError(\"The command has been successfully executed previously; \"\n + \"it should not fail now\");\n }\n model.updateFilteredPersonList(PREDICATE_SHOW_ALL_PERSONS);\n model.updateFilteredEventList(PREDICATE_SHOW_ALL_EVENTS);\n\n }"
] | [
"0.5413741",
"0.5121752",
"0.50878686",
"0.5053765",
"0.5026636",
"0.5006417",
"0.49859497",
"0.491702",
"0.49144223",
"0.4909001",
"0.48135906",
"0.4804059",
"0.4749947",
"0.47475663",
"0.47350675",
"0.47176862",
"0.47034305",
"0.4698982",
"0.46916437",
"0.46834046",
"0.4666372",
"0.46655545",
"0.46535957",
"0.464288",
"0.46406004",
"0.46404982",
"0.46367264",
"0.46356553",
"0.46097735",
"0.4603683",
"0.46011245",
"0.45978644",
"0.45827934",
"0.45693344",
"0.4569068",
"0.45633978",
"0.45620802",
"0.45589286",
"0.45475522",
"0.45445794",
"0.45355302",
"0.4523871",
"0.45209333",
"0.45154297",
"0.4511604",
"0.45111609",
"0.45003137",
"0.4499918",
"0.44945335",
"0.44945323",
"0.4489985",
"0.44835517",
"0.44775695",
"0.4472784",
"0.44631556",
"0.4461889",
"0.44602844",
"0.44597578",
"0.4459483",
"0.44557425",
"0.44464666",
"0.44434863",
"0.44330096",
"0.44259953",
"0.44246832",
"0.44213974",
"0.44198224",
"0.44134608",
"0.44091153",
"0.43956965",
"0.43942934",
"0.43933147",
"0.43887746",
"0.43883902",
"0.43868032",
"0.43751106",
"0.43734512",
"0.43712303",
"0.43688846",
"0.4364783",
"0.4364694",
"0.43612632",
"0.43603992",
"0.43581724",
"0.43568814",
"0.43567032",
"0.43561214",
"0.43547475",
"0.4352449",
"0.43507168",
"0.4349393",
"0.43428344",
"0.43415415",
"0.43381557",
"0.43378615",
"0.43370205",
"0.43297443",
"0.43282914",
"0.4326067",
"0.43258515"
] | 0.737718 | 0 |
Start the forecasting process for the supplied configured forecaster | protected void startForecaster(final WekaForecaster forecaster) {
if (m_runThread == null) {
synchronized (this) {
m_startBut.setEnabled(false);
m_stopBut.setEnabled(true);
}
m_runThread = new ForecastingThread(forecaster, null);
m_runThread.setPriority(Thread.MIN_PRIORITY);
m_runThread.start();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void reevaluateForecaster(final String name, \n final WekaForecaster forecaster, final Instances trainHeader) {\n \n if (!trainHeader.equalHeaders(m_instances)) {\n JOptionPane.showMessageDialog(null, \"Data used to train this forecaster \" +\n \"is not compatible with the currently loaded data:\\n\\n\" \n + trainHeader.equalHeadersMsg(m_instances), \"Unable to reevaluate model\",\n JOptionPane.ERROR_MESSAGE);\n } else {\n if (m_runThread == null) {\n synchronized (this) {\n m_startBut.setEnabled(false);\n m_stopBut.setEnabled(true);\n }\n \n m_runThread = new ForecastingThread(forecaster, name);\n ((ForecastingThread)m_runThread).setConfigureAndBuild(false);\n \n m_runThread.setPriority(Thread.MIN_PRIORITY);\n m_runThread.start();\n }\n }\n }",
"protected void loadForecaster() {\n File sFile = null;\n int returnVal = m_fileChooser.showOpenDialog(this);\n if (returnVal == m_fileChooser.APPROVE_OPTION) {\n sFile = m_fileChooser.getSelectedFile();\n \n if (m_log != null) {\n m_log.statusMessage(\"Loading forecaster...\");\n }\n \n Object f = null;\n Instances header = null;\n boolean loadOK = true;\n try {\n ObjectInputStream is = new ObjectInputStream(new FileInputStream(sFile));\n f = is.readObject();\n header = (Instances)is.readObject();\n is.close();\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex, \"Load failed\",\n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (!loadOK) {\n if (m_log != null) {\n m_log.logMessage(\"Loading from file \" + sFile.getName() + \"' failed.\");\n m_log.statusMessage(\"OK\");\n }\n } else if (!(f instanceof WekaForecaster)) {\n JOptionPane.showMessageDialog(this, \n \"Loaded model is not a weka forecaster!\", \"Weka forecasting\", \n JOptionPane.ERROR_MESSAGE);\n loadOK = false;\n }\n \n if (loadOK) {\n String name = (new SimpleDateFormat(\"HH:mm:ss - \")).format(new Date());\n StringBuffer outBuff = new StringBuffer();\n WekaForecaster wf = (WekaForecaster)f; \n \n String lagOptions = \"\";\n if (wf instanceof TSLagUser) {\n TSLagMaker lagMaker = ((TSLagUser)wf).getTSLagMaker();\n lagOptions = Utils.joinOptions(lagMaker.getOptions());\n }\n \n String fname = wf.getAlgorithmName();\n String algoName = fname.substring(0, fname.indexOf(' '));\n if (algoName.startsWith(\"weka.classifiers.\")) {\n name += algoName.substring(\"weka.classifiers.\".length());\n } else {\n name += algoName;\n }\n name += \" loaded from '\" + sFile.getName() + \"'\";\n \n outBuff.append(\"Scheme:\\n\\t\" + fname).append(\"\\n\");\n outBuff.append(\"loaded from '\" + sFile.getName() + \"'\\n\\n\");\n \n if (lagOptions.length() > 0) {\n outBuff.append(\"Lagged and derived variable options:\\n\\t\").\n append(lagOptions + \"\\n\\n\");\n }\n \n outBuff.append(wf.toString());\n \n m_history.addResult(name, outBuff);\n m_history.setSingle(name);\n \n List<Object> resultList = new ArrayList<Object>();\n resultList.add(wf); resultList.add(header);\n m_history.addObject(name, resultList);\n updateMainTabs(name); \n } \n }\n }",
"public static void main(String[] args) {\n\n try {\n if (args.length == 0) {\n throw new Exception(\"supply the name of an arff file\");\n }\n Instances i = new Instances(new java.io.BufferedReader(\n new java.io.FileReader(args[0])));\n ForecastingPanel scp = \n new ForecastingPanel(new LogPanel(new WekaTaskMonitor()), true, false, false);\n scp.setInstances(i);\n final javax.swing.JFrame jf =\n new javax.swing.JFrame(\"Weka Forecasting\");\n jf.getContentPane().setLayout(new BorderLayout());\n jf.getContentPane().add(scp, BorderLayout.CENTER);\n jf.addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent e) {\n jf.dispose();\n System.exit(0);\n }\n });\n jf.pack();\n jf.setVisible(true);\n } catch (Exception ex) {\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tforcastDao = new ForecastDAO();\n\t\t\tforecasts = forcastDao.loadAll(woeid);\n\t\t\tforcastDao = null;\n\t\t\tdaoCallHandler.sendMessage(daoCallHandler.obtainMessage());\n\t\t}",
"@Before\n public void setUp() {\n this.forecastService = new ForecastAdapter(new Forecast());\n }",
"public void start(){\n CoffeeMakerHelper coffeeMakerHelper = new CoffeeMakerHelper(inputArgs[0]);\n coffeeMakerService = coffeeMakerHelper.parseJsonFile();\n computeCoffeeMaker();\n }",
"public Forecasting() {\n }",
"public static void M_Forecast(X_M_Forecast f) {\n\t\tList<MPPMRP> list = getQuery(f, null, null).list();\n\t\tfor (MPPMRP mrp : list) {\n\t\t\tmrp.setM_Forecast(f);\n\t\t}\n\t}",
"public void goToForecast(View view) {\n Intent myIntent = new Intent(MainActivity.this, Forecast.class);\n MainActivity.this.startActivity(myIntent);\n }",
"@Override\n public void forecast(int numFuturePoints) {\n\n int startPoint = 0, endPoint = actual.length;\n double lastValue = actual[startPoint],forecast;\n double[][] trainMatrix = new double[trainPoints + validationPoints][2];\n trainMatrix[0][0] = actual[startPoint];\n trainMatrix[0][1] = lastValue;\n\n for (int i = startPoint + 1; i < endPoint; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n\n lastValue = optAlpha * actual[i] + (1 - optAlpha) * lastValue;\n }\n\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n\n forecastDataSet = new DataSet();\n startPoint = actual.length;\n Observation observation;\n double forecastValue, lowerBound, upperBound;\n\n for (int i = startPoint; i < startPoint + numFuturePoints; i++) {\n forecastValue = lastValue;\n\n lastValue = optAlpha * forecastValue + (1 - optAlpha) * lastValue;\n\n if (forecastValue < 0) {\n forecastValue = 0l;\n lowerBound = 0l;\n upperBound = 0l;\n } else {\n forecastValue = BiasnessHandler.adjustBiasness(forecastValue, accuracyIndicators.getBias());\n lowerBound = forecastValue - errorBound;\n upperBound = forecastValue + errorBound;\n }\n\n observation = new Observation();\n observation.setIndependentValue(IndependentVariable.SLICE, i - startPoint);\n observation.setDependentValue(forecastValue);\n observation.setLowerDependentValue(lowerBound > 0 ? lowerBound : 0);\n observation.setUpperDependentValue(upperBound);\n forecastDataSet.add(observation);\n\n }\n }",
"public static void main(String[] args){\n FinagoController finagoController = new FinagoController();\n finagoController.run();\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tExecutor executor = new Executor(this.env);\n\n\t\t\t// control loop\n\t\t\t//String dataFileName = monitorLog.monitor();\n\t\t\t//AnalysisStatus analysisStatus = analyser.analyse(dataFileName, args);\n\t\t\t// AdaptationPlan adaptationPlan =\n\t\t\t// planner.selectPlan(analysisStatus);\n\t\t\t//executor.execute(adaptationPlan);\n\t\t\t//System.out.println(this.getClass()+\" **************** CHANGE **************\"+System.nanoTime());\n\t\t\texecutor.executeFake(this.env);\n\t\t\t//executeFake();\n\t\t}",
"private void returnForecast() {\n\t\tif (callback != null) {\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t\tif (forecasts.isEmpty()&&reload) {\n\t\t\t\tupdateForecastRequest();\n\t\t\t} else {\n\t\t\t\t// then ask the serviceupdater to update data\n\t\t\t\t// but update only if one day of difference between the last update and now is more\n\t\t\t\t// than one day\n\t\t\t\tString strLastUpdate = MyApplication.instance.getServiceManager().getForecastServiceUpdater().getLastUpdate(this.woeid);\n\t\t\t\tLog.e(\"ForecastServiceData\", \"strLastUpdate \" + strLastUpdate);\n\t\t\t\ttry {\n\t\t\t\t\t// empty data base case and empty SharedPreference\n\t\t\t\t\tif (strLastUpdate.equals(\"null\")) {\n\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// current case\n SimpleDateFormat sdf=MyApplication.instance.getServiceManager().getForecastServiceUpdater().getDateFormatForLastUpdate();\n\t\t\t\t\t\tDate lastUpdate = sdf.parse(strLastUpdate);\n\t\t\t\t\t\tif (new Date().getTime() - lastUpdate.getTime() > 1000 * 60 * 60 * 24) {\n\t\t\t\t\t\t\t// if the last update was one day ago, then make an automatic update\n\t\t\t\t\t\t\tupdateForecastRequest();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tExceptionManager.manage(new ExceptionManaged(this.getClass(), R.string.exc_date_parsing, e));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tForecastManager mgr = new ForecastManagerImpl(\"/forecast.xlsx\");\n\n\t\t// load the weather data\n\t\tList<Forecast> forecasts = mgr.load();\n\n\t\t// convert the weather data into example data\n\t\tExample[] examples = DecisionTree.convertTo(forecasts);\n\n\t\t// build the decision tree\n\t\tNode<?> tree = DecisionTree.learnDecision(examples, Constants.real_attributes, Constants.no,\n\t\t\t\tConstants.desired_attribute);\n\n\t\t// print the decision tree\n\t\tSystem.out.println(tree.toString());\n\t}",
"public void setup() {\n\t\taddBehaviour(new TickerBehaviour(this, 1000L) {\n\n\t\t\t@Override\n\t\t\tprotected void onTick() {\n\t\t\t\tint extinguishedFires = 0;\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < worldAgent.getAircraftAgents().length; i++) {\n\t\t\t\t\textinguishedFires+=worldAgent.getAircraftAgents()[i].getAircraftMetricsStats().getNumTotalFiresExtinguishedByThisAircraft();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tworldAgent.getWorldMetricsStats().setNumTotalFiresExtinguishedByAllAircrafts(extinguishedFires);\n\t\t\t\t\n\t\t\t\tif(extinguishedFires >= 3) {\t\t\t\t\t\n\t\t\t\t\tlong end_time = System.currentTimeMillis();\n\t\t\t\t\tlong execution_time = end_time - init_time;\n\t\t\t\t\t\n\t\t\t\t\tAircraftAgent[] aircrafts = worldAgent.getAircraftAgents();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0; i < aircrafts.length; i++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(Thread sleepingThread : aircrafts[i].getSleepingThreads().values()) {\n\t\t\t\t\t\t\tSystem.err.println(\"Interrupting thread = \\\"\" + sleepingThread.getName() + \"!\");\n\t\t\t\t\t\t\tsleepingThread.interrupt();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tkillContainer();\n\t\t\t\t\t\n\t\t\t\t\tLogger.appendConfigValues(execution_time);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Run no. \" + JADELauncher.NUMBER_OF_RUNS + \" finished.\");\n\n\t\t\t\t\tif(JADELauncher.NUMBER_OF_RUNS == 0) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLogger.closeStream();\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\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tJADELauncher.NUMBER_OF_RUNS--;\n\t\t\t\t\t\tinstanceRun();\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t});\n\t\t\n\t\tinstanceRun();\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext ctx = SpringApplication.run(App.class, args);\r\n\t\t\r\n\t\t// Read fare calculation bean\r\n\t\tFareCalucation farecalculation = ctx.getBean(FareCalucation.class);\r\n\r\n\t\ttry {\r\n\t\t\t// Read journeys file and loop through it\r\n\t\t\tInputStream journeys = App.class.getClassLoader().getResourceAsStream(\"journeys.txt\");\r\n\t\t\tBufferedReader journeysbr = new BufferedReader(new InputStreamReader(journeys));\r\n\t\t\tString line;\r\n\t\t\twhile ((line = journeysbr.readLine()) != null) {\r\n\t\t\t\tSystem.out.println(\"Inpput Journey : \" + line);\r\n\t\t\t\tStringTokenizer token = new StringTokenizer(line);\r\n\t\t\t\twhile (token.hasMoreElements()) {\r\n\t\t\t\t\tString cdate = token.nextToken();\r\n\t\t\t\t\tString time = token.nextToken();\r\n\t\t\t\t\tint fromzone = Integer.parseInt(token.nextToken());\r\n\t\t\t\t\tint tozone = Integer.parseInt(token.nextToken());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// will process fare calculation of journey at a time.\r\n\t\t\t\t\tfarecalculation.caculateFare(new CommuterJourney(cdate, time, new Zone(fromzone, tozone)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException exp) {\r\n\t\t\tSystem.out.println(\"Error while processing in reading file\"+exp.getMessage());\r\n\t\t} catch (Exception exp) {\r\n\t\t\tSystem.out.println(\"Error while processing in fare calcutaion see below stacktrace\");\r\n\t\t\texp.printStackTrace();\r\n\t\t} \r\n\r\n\t\tSystem.out.println(\"TOTAL FARE:\" + farecalculation.getTotalFare());\r\n\t}",
"public static void automatedRun() throws Exception {\n deleteAllPropertiesFile();\n\n // Run the samples in a way that does not require input from the keyboard.\n automatedRun = true;\n new HotelTrain().run();\n\n // Clean-up.\n deleteAllPropertiesFile();\n }",
"private boolean parseForecasts(String rawData) {\n if (rawData == null) {\n return false;\n }\n\n if (!forecasts.isEmpty()) {\n forecasts.clear();\n }\n\n try {\n // Make a json array from the response string\n JSONObject jsonObj = new JSONObject( rawData );\n\n locationName = jsonObj.getString(\"LocationName\");\n waveModelName = jsonObj.getJSONObject(\"WaveModel\").getString(\"Description\");\n waveModelRun = jsonObj.getJSONObject(\"WaveModel\").getString(\"ModelRun\");\n\n // We need to save the model run for later so we can check for updates\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEEE MMMM dd, yyyy HHZ\");\n try {\n mLastFetchDate = formatter.parse(waveModelRun.replaceAll(\"z$\", \"+0000\"));\n\n // Add the hindcasting offset\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(mLastFetchDate);\n calendar.add(Calendar.HOUR_OF_DAY, 5);\n mLastFetchDate = calendar.getTime();\n } catch (Exception e) {\n return false;\n }\n\n windModelName = jsonObj.getJSONObject(\"WindModel\").getString(\"Description\");\n windModelRun = jsonObj.getJSONObject(\"WindModel\").getString(\"ModelRun\");\n\n // Get alllllll of the forecast data!\n JSONArray forecastJsonAray = jsonObj.getJSONArray(\"ForecastData\");\n dayCount = 0;\n int forecastOffset = 0;\n for (int i = FORECAST_DATA_BEGIN_INDEX; i < FORECAST_DATA_COUNT; i++) {\n Forecast newForecast = new Forecast();\n\n // Grab the next forecast object from the raw array\n JSONObject rawForecast = forecastJsonAray.getJSONObject(i);\n\n newForecast.date = rawForecast.getString(\"Date\");\n newForecast.time = rawForecast.getString(\"Time\");\n\n newForecast.minimumBreakingHeight = rawForecast.getDouble(\"MinimumBreakingHeight\");\n newForecast.maximumBreakingHeight = rawForecast.getDouble(\"MaximumBreakingHeight\");\n newForecast.windSpeed = rawForecast.getDouble(\"WindSpeed\");\n newForecast.windDirection = rawForecast.getDouble(\"WindDirection\");\n newForecast.windCompassDirection = rawForecast.getString(\"WindCompassDirection\");\n\n ApiApiMessagesSwellMessage primarySwell = new ApiApiMessagesSwellMessage();\n primarySwell.setWaveHeight(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"WaveHeight\"));\n primarySwell.setPeriod(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Period\"));\n primarySwell.setDirection(rawForecast.getJSONObject(\"PrimarySwellComponent\").getDouble(\"Direction\"));\n primarySwell.setCompassDirection( rawForecast.getJSONObject(\"PrimarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.primarySwellComponent = primarySwell;\n\n ApiApiMessagesSwellMessage secondarySwell = new ApiApiMessagesSwellMessage();\n secondarySwell.setWaveHeight(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"WaveHeight\"));\n secondarySwell.setPeriod(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Period\"));\n secondarySwell.setDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getDouble(\"Direction\"));\n secondarySwell.setCompassDirection(rawForecast.getJSONObject(\"SecondarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.secondarySwellComponent = secondarySwell;\n\n ApiApiMessagesSwellMessage tertiarySwell = new ApiApiMessagesSwellMessage();\n tertiarySwell.setWaveHeight(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"WaveHeight\"));\n tertiarySwell.setPeriod(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Period\"));\n tertiarySwell.setDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getDouble(\"Direction\"));\n tertiarySwell.setCompassDirection(rawForecast.getJSONObject(\"TertiarySwellComponent\").getString(\"CompassDirection\"));\n newForecast.tertiarySwellComponent = tertiarySwell;\n\n if (newForecast.time.equals(\"01 AM\") || newForecast.time.equals(\"02 AM\")) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n } else if (forecasts.size() == 0) {\n dayIndices[dayCount] = i - FORECAST_DATA_BEGIN_INDEX - forecastOffset;\n dayCount++;\n }\n\n forecasts.add(newForecast);\n }\n } catch ( JSONException e ) {\n e.printStackTrace();\n return false;\n }\n return true;\n }",
"public void start() { \t\n try {\n \tTask task = new FileTask(fileScanner);\n \tTaskDescription taskDescription = new TaskDescription();\n \ttaskDescription.setName(name + \"-FILE-EP\");\n \ttaskDescription.setTaskGroup(\"FILE-EP\");\n \ttaskDescription.setInterval(interval);\n \ttaskDescription.setIntervalInMs(true);\n \ttaskDescription.addResource(TaskDescription.INSTANCE, task);\n \ttaskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName());\n \tstartUpController = new StartUpController();\n \tstartUpController.setTaskDescription(taskDescription);\n \tstartUpController.init(synapseEnvironment);\n\n } catch (Exception e) {\n log.error(\"Could not start File Processor. Error starting up scheduler. Error: \" + e.getLocalizedMessage());\n }\n }",
"private void runTaco() { \n TacoRunner taco = new TacoRunner(configuration);\n taco.run();\n }",
"private void updateForecastRequest() {\n\t\tMyApplication.instance.getServiceManager().getForecastServiceUpdater()\n\t\t\t\t.updateForecastFromServer(new ForecastCallBack() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void forecastLoaded(List<YahooForcast> forecasts) {\n\t\t\t\t\t\tforecastUpdatedFromServiceUpdater(forecasts);\n\t\t\t\t\t}\n\t\t\t\t}, woeid);\n\t}",
"public void startTrainingMode() {\n\t\t\r\n\t}",
"public void getForecasts() {\r\n\r\n\t\tWeatherDAO weatherDao = new WeatherDAO();\r\n\r\n\t\tforecasts = weatherDao.getForecasts(this.getSceneNumber());\r\n\r\n\t\tif (forecasts == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisUpdated(forecasts[0]);\r\n\r\n\t\tsetLabels(forecasts);\r\n\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tApplicationContext ctx = new AnnotationConfigApplicationContext(AppConfig.class);\r\n\t\tPerformer performer = (Performer)ctx.getBean(\"singer\");\r\n\t\tperformer.perform();\r\n\t}",
"public void startHourlyActivity() {\n if (getForecast() != null && getForecast().getHourlyForecastList() != null) {\n Intent intent = new Intent(this, HourlyForecastActivity.class);\n intent.putParcelableArrayListExtra(MainActivity.HOURLY_FORECAST_PARCEL, (ArrayList<? extends Parcelable>) getForecast().getHourlyForecastList());\n startActivity(intent);\n }\n }",
"public static void runTrainControllers() {\n Map<String, TrainController> trains = getTrainControllers();\n for (String s : trains.keySet()) {\n TrainController tc = trains.get(s);\n if (tc.isRunning()) {\n PowerCalculator.run(tc);\n }\n }\n }",
"public void run(FuzzyEngine engine) throws FuzzyEngineException;",
"private void runInference() {\n interpreter.run(inputImage, outputArray);\n }",
"public void run () {\n generalFeatureExtraction();\n\n //\n // 2 - Traverse the Call Graph and propagate call stack counter\n propagateFeatures();\n }",
"public static void main(String[] args) {\n\t\tApplicationContext ctx = new AnnotationConfigApplicationContext(PerformerConfig.class);\r\n\t\tPerformer p = ctx.getBean(\"Rushikesh\",Performer.class);\r\n\t\ttry {\r\n\t\t\tp.perform();\r\n\t\t} catch (PerformanceExceptions e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"main started...\");\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tGlobalInfo.inputs[i] = -1;\n\t\t}\n\t\t\n\t\tDataFusion processor = new DataFusion();\n\t\tThread processThread = new Thread(processor);\n\t\tprocessThread.start();\t\n\t\t\n\t\tfor (int threadNo = 0; threadNo < 10; threadNo++) {\n\t\t\tSensor obj = new Sensor(threadNo);\n\t\t\tThread t = new Thread(obj);\n\t\t\tt.start();\n\t\t}\n\n\t}",
"void warmup(ConsolidatedSnapshot snapshot, double[] forecasts);",
"void start(String feedAddr) {\n this.scheduler = Executors.newSingleThreadScheduledExecutor(r -> new Thread(r, \"f\" + feedAddr));\n this.scheduler.scheduleAtFixedRate(this.newsProducer, this.newsProducingRateInMillis,\n this.newsProducingRateInMillis, TimeUnit.MILLISECONDS);\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tpt.getContext().startService( new Intent( pt.getContext(), PerfectTimeService.class ) );\n\t\t\t}",
"protected void setup() {\n\t\tDFAgentDescription dfd = new DFAgentDescription();\r\n\t\tdfd.setName(getAID());\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(\"TIS\");\r\n\t\tsd.setName(\"TIS\");\r\n\t\tdfd.addServices(sd);\r\n\t\ttry {\r\n\t\t\tDFService.register(this, dfd);\r\n\t\t} catch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Hello, Tractor Information Service agent \" + getAID().getName() + \" is ready\");\r\n\r\n\t\t// Create and show the GUI\r\n\t\tmyGui = new TISGUI(this);\r\n\t\tmyGui.showGui();\r\n\r\n\r\n\t\taddBehaviour(new TickerBehaviour(this, 5000) {\r\n\t\t\tprotected void onTick() {\r\n\r\n\t\t\t\t// get name of agent that manages the fuel usage for this tractor\r\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\r\n\t\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\t\tsd.setType(\"TractorDT\");\r\n\t\t\t\ttemplate.addServices(sd);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDFAgentDescription[] result = DFService.search(myAgent, template);\r\n\t\t\t\t\tDTAgents = new AID[result.length];\r\n\t\t\t\t\tfor (int i = 0; i < result.length; ++i) {\r\n\t\t\t\t\t\tDTAgents[i] = result[i].getName();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (FIPAException fe) {\r\n\t\t\t\t\tfe.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//System.out.println(\"DigitalTwin request being performed\");\r\n\t\t\t\t// Perform a Fuel Usage request\r\n\t\t\t\tmyAgent.addBehaviour(new DataRequestPerformer());// add behaviour here)\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\taddBehaviour(new TickerBehaviour(this, 5000) {\r\n\t\t\tprotected void onTick() {\r\n\t\t\t\tString PrintString = \"\";\r\n\t\t\t\t// get name of agent that manages the fuel usage for this tractor\r\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\r\n\t\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\t\ttemplate.addServices(sd);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDFAgentDescription[] result = DFService.search(myAgent, template);\r\n\t\t\t\t\tallAgents = new AID[result.length];\r\n\t\t\t\t\tfor (int i = 0; i < result.length; ++i) {\r\n\t\t\t\t\t\tallAgents[i] = result[i].getName();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (FIPAException fe) {\r\n\t\t\t\t\tfe.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (allAgents.length != 0) {\r\n\t\t\t\t\tfor (int i = 0; i < allAgents.length; ++i) {\r\n\t\t\t\t\t\tPrintString = PrintString + allAgents[i].getName() + \"\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmyGui.setAgentArea(PrintString);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Add the behaviour serving queries from GUI to add agents\r\n\t\taddBehaviour(new AgentAddServer());\r\n\t\t// Add the behaviour serving queries from GUI to delete agents\r\n\t\taddBehaviour(new AgentDeleteRequests());\r\n\r\n\t}",
"public interface ForecastListener \n {\n public void onForecastLoaded(Bitmap image, String temperature,\n String humidity, String precipitation);\n }",
"public void startFeeding() {\n motor.set(FEED_SPEED);\n }",
"private void start() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\tthrow new FlumeException(\n\t\t\t\t\t\"Source/Channel is null. Cannot start flume components\");\n\t\t}\n\t\tthis.sourceRunner.start();\n\t\tthis.channel.start();\n\t\tthis.sinkCounter.start();\n\t}",
"public static void start(Application application) {\n AppsFlyerAdRevenue.initialize(new AppsFlyerAdRevenue.Builder(application)\n .addNetworks(AppsFlyerAdRevenueWrapperType.MOPUB)\n .build());\n AppsFlyerAdRevenue.moPubWrapper().recordImpressionData();\n }",
"public void testApply() {\n \t\tCalendar dateTime = new GregorianCalendar();\n \t\tdateTime.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\t\t// Monday\n \t\tSystem.out.println(dateTime.toString());\n\t\tForecastData data = new ForecastData(dateTime, 35.0, 0.0, 0.0, 0.0, 0.0, 0.0, 37.0, 0.0, 0.0);\n \t\t\n \t\tFilter shouldPass = new Filter(\"pass\");\n \t\tFilter shouldFail = new Filter(\"fail\");\n \t\tFilter emptyFilter = new Filter(\"empty\");\n \t\tFilter multipleDays = new Filter(\"multipleDays\");\n \t\tFilter wrongDay = new Filter(\"wrongDay\");\n \t\tFilter noConditions = new Filter(\"noConditions\");\n \t\tFilter noTimes = new Filter(\"noTimes\");\n \t\t\n \t\tConditionRule cR = new ConditionRule(ConditionRule.conditions[0], 30, 45);\t\t// Temperature 30 -> 45\n \t\tTimeRule tR = new TimeRule(TimeRule.days[0]);\t\t\t// Monday\n \t\tTimeRule tR2 = new TimeRule(TimeRule.days[1]);\t\t\t// Tuesday\n \t\tConditionRule cR2 = new ConditionRule(ConditionRule.conditions[4], 35, 45);\t\t// Cloud Cover 35 -> 45\n \t\tConditionRule bad = new ConditionRule(ConditionRule.conditions[0], 0, 5);\t\t// Temperature 0 -> 5\n \t\t\n \t\tshouldPass.addRule(cR);\n \t\tshouldPass.addRule(cR2);\n \t\tshouldPass.addRule(tR);\n \t\t\n \t\tshouldFail.addRule(cR2);\n \t\tshouldFail.addRule(bad);\n \t\tshouldFail.addRule(tR2);\n \t\t\n \t\tmultipleDays.addRule(cR);\n \t\tmultipleDays.addRule(tR);\n \t\tmultipleDays.addRule(tR2);\n \t\t\n \t\twrongDay.addRule(cR);\n \t\twrongDay.addRule(cR2);\n \t\twrongDay.addRule(tR2);\n \t\t\n \t\tnoConditions.addRule(tR);\n \t\tnoConditions.addRule(tR2);\n \t\t\n \t\tnoTimes.addRule(cR);\n \t\tnoTimes.addRule(cR2);\n \t\t\n \t\tassertTrue(shouldPass.apply(data));\n \t\tassertFalse(emptyFilter.apply(data));\n \t\tassertFalse(shouldFail.apply(data));\n \t\tassertTrue(multipleDays.apply(data));\n \t\tassertFalse(wrongDay.apply(data));\n \t\tassertFalse(noConditions.apply(data));\n \t\tassertFalse(noTimes.apply(data));\t\n \t}",
"public static void main(String[] args) throws Exception {\n if (args.length < 2) {\n System.err.println(\"\\nusage: java -jar target/jarfilename.jar <path/to/input_gtfs.zip> <arrival_timeORdeparture_time> <Number_of\"\n + \"_records_to_fetch> \\nThe second argument specify whether to consider arrival_time or departure_time to calculate schedule_deviation\"\n + \"\\nThe third argument is optional, which specify number of records to fetch. If it not provided we retreive all records\");\n return;\n }\n\n File input = new File(args[0]);\n String arrivalOrDeparture = args[1].toLowerCase();\n if(!arrivalOrDeparture.equals(\"arrival_time\") && !arrivalOrDeparture.equals(\"departure_time\")) {\n System.err.println(\"\\nPlease check spelling of the string provided as second argument. It should be either arrival_time or departure_time\");\n return;\n }\n int numRecords = 0;\n if(args.length == 3) {\n numRecords = Integer.parseInt(args[2]);\n if(numRecords <= 0) {\n System.err.println(\"\\nThe third parameter 'Number of records to fetch' should be greater than 0\");\n return;\n }\n }\n System.err.println(\"\\nProcessing feed :\" + input.getName());\n FeedProcessor processor = new FeedProcessor(input, arrivalOrDeparture, numRecords);\n try {\n processor.load();\n } catch (IOException e) {\n System.err.println(\"Unable to access input GTFS \" + input.getPath() + \". Does the file exist and do I have permission to read it?\");\n return;\n }\n }",
"public void computeForecasts (GUICalcProgressBar progress, RJGUIController.XferForecastMod xfer) {\n\n\t\t// Save the catalog parameters\n\n\t\tcat_forecastStartTimeParam = xfer.x_forecastStartTimeParam;\n\t\tcat_forecastEndTimeParam = xfer.x_forecastEndTimeParam;\n\n\t\t// Compute the aftershock forecasts\n\n\t\tseqSpecForecast = makeForecast (progress, cat_forecastStartTimeParam, cur_model, \"Seq. Specific\");\n\t\tgenericForecast = makeForecast (progress, cat_forecastStartTimeParam, genericModel, \"Generic\");\n\t\tbayesianForecast = makeForecast (progress, cat_forecastStartTimeParam, bayesianModel, \"Bayesian\");\n\n\t\t// Remove the model-specific message\n\t\t\n\t\tif (progress != null) {\n\t\t\t//progress.setIndeterminate(true);\n\t\t\t//progress.setProgressMessage(\"Plotting...\");\n\t\t\tprogress.setIndeterminate(true, \"Plotting...\");\n\t\t}\n\n\t\t// Pre-compute elements for expected aftershock MFDs.\n\n\t\tgui_view.precomputeEAMFD (progress, cat_forecastStartTimeParam, cat_forecastEndTimeParam);\n\n\t\treturn;\n\t}",
"public List<DataCenterForecast> execute(TimeSlotBasedEntity timeRange) {\n \tlogger.debug(\"Starting power planning loop for time range: \" + timeRange);\n \tlogger.debug(\"Requesting energy forecasts...\");\n\t\tList<DataCenterForecast> forecasts = erdsHandler.getEnergyForecasts(timeRange);\n logger.debug(\"Got energy forecasts: \" + forecasts);\n return forecasts;\n }",
"public static void main(String[] args) { \n new FlightController(); \n }",
"public synchronized void runPreTurtles() {\n\t\tcomputePerceptions();\n\t\tfirePreAgentScheduling();\n\t}",
"public static void main(String[] args) {\n Fakultet faks = new Fakultet();\n\n }",
"public static void main(String[] args) {\n\t\tflightsData user = new flightsData();\n\t\tuser.loadRercords();\n\t}",
"public void start() {\n initDb();\n try {\n VacancyLoader vl = new VacancyLoader(this.connection, this.vacancies);\n vl.start();\n parse(checkDate());\n } catch (IOException e) {\n LOG.error(e.getMessage());\n }\n }",
"public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}",
"public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\r\n\r\n // use event time for the application\r\n env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);\r\n\r\n // switch messages disable filtering of sensor readings for a specific amount of time\r\n DataStream<Tuple2<String, Long>> filterSwitches = env\r\n .fromElements(\r\n // forward readings of sensor_2 for 10 seconds\r\n Tuple2.of(\"sensor_2\", 10_000L),\r\n // forward readings of sensor_7 for 1 minute\r\n Tuple2.of(\"sensor_7\", 60_000L));\r\n\r\n // ingest sensor stream\r\n DataStream<SensorReading> readings = env\r\n // SensorSource generates random temperature readings\r\n .addSource(new SensorSource());\r\n\r\n DataStream<SensorReading> forwardedReadings = readings\r\n // connect readings and switches\r\n .connect(filterSwitches)\r\n // key by sensor ids\r\n .keyBy(r -> r.id, s -> s.f0)\r\n // apply filtering CoProcessFunction\r\n .process(new ReadingFilter());\r\n\r\n forwardedReadings.print();\r\n\r\n env.execute(\"Filter sensor readings\");\r\n }",
"public void launch(){\n try{\n System.out.println(\"Main: Creando agentes\");\n \tmap = visualizer.getMapToLoad();\n \tsatelite = new Satelite(id_satelite, map, visualizer);\n \tdrone = new Drone(new AgentID(\"Drone\"), map.getWidth(), map.getHeigh(), id_satelite);\n \tSystem.out.println(\"MAIN : Iniciando agentes...\");\n \tvisualizer.setSatelite(satelite);\n satelite.start();\n drone.start();\n }catch(Exception e){\n \tSystem.err.println(\"Main: Error al crear los agentes\");\n System.exit(-1);\n }\n\t}",
"private void forecastUpdatedFromServiceUpdater(List<YahooForcast> forecasts) {\n\t\tif (callback != null) {\n\t\t\t// update your forecast\n\t\t\tthis.forecasts = forecasts;\n\t\t\t// use the callback to prevent the client\n\t\t\tif (callback.get() != null) {\n\t\t\t\t// yep, we use a weakReference\n\t\t\t\tcallback.get().forecastLoaded(forecasts);\n\t\t\t}\n\t\t}\n\t}",
"protected void stopForecaster() {\n if (m_runThread != null) {\n m_runThread.interrupt();\n m_runThread.stop();\n }\n }",
"private static void initiateProcessing(List<String> unparsedData) {\n\t\tparseTemperatureData(unparsedData);\n\t\t// compute average TMAX for each station\n\t\tstationAverageTMAX = Util.computeAverageTMAXForStation(stationTemperatureMap);\n\t}",
"@Generated(hash = 74421150)\n public synchronized void resetForecast() {\n forecast = null;\n }",
"@Override\n public void configureLoop(PIDSettings pidSettings, FeedForwardSettings feedForwardSettings,\n TrapezoidProfileSettings trapezoidProfileSettings) {\n master.configFactoryDefault();\n configPIDF(pidSettings, feedForwardSettings);\n configureTrapezoid(trapezoidProfileSettings);\n }",
"public void run() {\n\n // Initialize control center.\n\n control = new Dispatch(parameters);\n control.run();\n linked = control.gettasks();\n\n // Initialize trains.\n\n trains = new TrainSim[parameters.numTrains];\n\n for (int i = 0; i < parameters.numTrains; i++) {\n\n trains[i] = new TrainSim(parameters, i);\n trains[i].genbasis();\n\n }\n\n // Add linked tasks to trains.\n\n for (Task each : linked) {\n\n int trainid = each.getTrain();\n each = new Task(each.getType(), each.getBeginTime(), parameters, false);\n each.setID(trainid);\n if (each.getArrTime() < parameters.numHours*60) {\n trains[trainid].linktask(each);\n }\n }\n\n // Run each train\n\n for (TrainSim each : trains) {\n\n each.run();\n\n }\n\n }",
"public void setUpScene() {\r\n\r\n\t\tif (forecasts == null) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tDateFormatter.formatDates(forecasts);\r\n\r\n\t\tsetLabels(forecasts);\r\n \r\n\t\tWeatherDAO weatherDAO = new WeatherDAO();\r\n\r\n\t\tweatherDAO.saveForecasts(forecasts, getSceneNumber());\r\n\t\t\r\n\t\tsetGif(forecasts[0].getDayPhrase());\r\n\t}",
"public static void main(String[] args) throws Exception {\n \t\n \tImageClassifierService ics = new ImageClassifierService(\"t1\");\n \tics.start();\n\n \tImageClassifierService ics2 = new ImageClassifierService(\"t2\");\n \tics2.start();\n\n }",
"public void runExperiment() {\n\t\tevaluator = new Evaluator(trainingSet);\n\t\tevaluator.evaluateClassifiers(classifiers);\n\t}",
"public static void main(String[] args) {\n\t\tApplicationContext ctx=new ClassPathXmlApplicationContext(\"performance.xml\");\r\n\t Performer p=ctx.getBean(\"sonu nigam\", Performer.class); \r\n\t p.Performe();\r\n\t ConfigurableApplicationContext cfgCtx=(ConfigurableApplicationContext) ctx;\r\n\t cfgCtx.close();\r\n\t \r\n\t\r\n\t}",
"@Override\n public void run(final ApiConfiguration configuration, final Environment environment) throws ClassNotFoundException {\n configureServices(environment);\n }",
"@Override\n public void run() {\n if (experiment.randomSeed != -1) {\n ThreadLocalRandom.current().setSeed(experiment.randomSeed);\n }\n\n // Initialise the environment and agents\n environment.initialise();\n for (Agent agent : agents) {\n agent.initialise();\n }\n\n // Add the agents to the environment\n for (Agent agent : agents) {\n environment.add(agent);\n }\n\n // Run the experiment\n for (int update = 1, episode = 1; update <= experiment.totalUpdates; episode++) {\n // Restart the environment at the beginning of an episode\n environment.restart();\n\n // Play out an episode\n for (int turn = 1; !environment.isTerminal() && (environment.maxTurns() == 0 || turn <= environment.maxTurns()) && update <= experiment.totalUpdates; turn++, update++) {\n // Perform the next turn\n environment.performTurn();\n\n // Increment the task\n task.increment();\n\n // If evaluation point\n if (update % experiment.observationFrequency == 0) {\n evaluate(run, update, episode);\n }\n }\n }\n }",
"public static void main(String[] args) {\n\t \tApplicationContext context = new ClassPathXmlApplicationContext(\"withAutowireT.xml\"); \r\n\t \r\n\t \t//we get human object\r\n\t HumanT human=(HumanT)context.getBean(\"human\"); \r\n\t human.startPumping(); \r\n\t }",
"public void train(){\n recoApp.training(idsToTest);\n }",
"public void loadForecastData(Callback<Forecast> callback)\n\t{\n RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint(API_URL).build();\n \n WeatherService service = restAdapter.create(WeatherService.class);\n service.getForecastAsync(\"929d214ed2dfd3705ff1ee66c1d5c3be\",\"37.8267\",\"-122.423\", callback);\n \n\t}",
"public void run() {\n\t \t\t\tfinal Processor mProcessor = new Processor(ScanUtils.appFolder);\n\t \t\t\t\n\t \t\t\ttry {\n\t\t\t\t\t\tif( mProcessor.loadFormImage(inputPath, calibrationPath) ) {\n\t\t\t\t\t\t\tint formIdx = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int i = 0; i < templatePaths.length; i++){ \n\t\t\t\t\t\t\t\tLog.i(LOG_TAG, \"loadingFD: \" + templatePaths[i]);\n\t\t\t\t\t\t\t\tif(!mProcessor.loadFeatureData(templatePaths[i])){\n\t\t\t\t\t\t\t\t\tthrow new Exception(\"Could not load feature data from: \" + templatePaths[i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(templatePaths.length > 1) {\n\t\t\t\t\t\t\t\tformIdx = mProcessor.detectForm();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(formIdx >= 0) {\n\t\t\t\t\t\t\t\tif(mProcessor.setTemplate(templatePaths[formIdx])) {\n\t\t\t\t\t\t\t\t\tLog.i(LOG_TAG,\"template loaded\");\n\t\t\t\t\t\t\t\t\tif( mProcessor.alignForm(outputPath, formIdx) ) {\n\t\t\t\t\t\t\t\t\t\tLog.i(LOG_TAG,\"aligned\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tthrow new Exception(\"Failed to align form.\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tthrow new Exception(\"Failed to set template.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tthrow new Exception(\"Failed to detect form.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tthrow new Exception(\"Failed to load image: \" + inputPath);\n\t\t\t\t\t\t}\n\t \t\t\t} catch (Exception e) {\n\t \t\t\t\toutputData.putString(\"errorMessage\", e.toString());\n\t \t\t\t}\n\t \t\t\tMessage msg = new Message();\n\t \t\t\tmsg.setData(outputData);\n\t \t\t\thandler.sendMessage(msg);\n\t \t\t}",
"public void train() {\n\n int w;\n double sum = 0, avg;\n double forecast;\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n actual = observations.toArray();\n\n for (int i = 0; i < step * slices; i++)\n sum += actual[i];\n\n avg = sum / slices;\n\n for (int pos = 0; pos < trainPoints; pos++) {\n sum = 0;\n w = 0;\n\n if (pos >= step * slices) {\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n } else forecast = avg;\n\n trainMatrix[pos][0] = actual[pos];\n trainMatrix[pos][1] = forecast;\n }\n\n for (int pos = actual.length - validationPoints, j = 0; pos < actual.length; pos++) {\n sum = 0;\n w = 0;\n for (int k = pos - step * slices; k < pos; k += step)\n sum += actual[k] * weights[w++];\n forecast = sum / slices;\n valMatrix[j][0] = actual[pos];\n valMatrix[j][1] = forecast;\n j++;\n }\n double biasness = BiasnessHandler.handleOffset(valMatrix);\n accuracyIndicators.setBias(biasness);\n ModelUtil.computeAccuracyIndicators(accuracyIndicators, trainMatrix, valMatrix, dof);\n errorBound = ErrorBoundsHandler.computeErrorBoundInterval(trainMatrix);\n }",
"public static void main(String[] args) throws Exception {\n\t\tfinal StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n\n /* if you would like to use runtime configuration properties, uncomment the lines below\n * DataStream<String> input = createSourceFromApplicationProperties(env);\n */\n\n\t\tDataStream<String> input = createSourceFromStaticConfig(env);\n\n\t\t// Kinesis Firehose sink\n\t\tinput.addSink(createFirehoseSinkFromStaticConfig());\n\n\t\t// If you would like to use runtime configuration properties, uncomment the lines below\n\t\t// input.addSink(createFirehoseSinkFromApplicationProperties());\n\n\t\tenv.execute(\"Flink Streaming Java API Skeleton\");\n\t}",
"public void startup() {\n /* Schedule the cleanup task to delete old logs */\n if (scheduler != null) {\n logger.info(\"Starting log cleanup with a period of {} ms.\", retentionCheckMs);\n scheduler.schedule(\"kafka-log-retention\", new Runnable() {\n @Override\n public void run() {\n cleanupLogs();\n }\n }, InitialTaskDelayMs, retentionCheckMs, TimeUnit.MILLISECONDS);\n logger.info(\"Starting log flusher with a default period of {} ms.\", flushCheckMs);\n scheduler.schedule(\"kafka-log-flusher\", new Runnable() {\n @Override\n public void run() {\n flushDirtyLogs();\n }\n }, InitialTaskDelayMs, flushCheckMs, TimeUnit.MILLISECONDS);\n scheduler.schedule(\"kafka-recovery-point-checkpoint\", new Runnable() {\n @Override\n public void run() {\n checkpointRecoveryPointOffsets();\n }\n }, InitialTaskDelayMs, flushCheckpointMs, TimeUnit.MILLISECONDS);\n }\n if (cleanerConfig.enableCleaner)\n cleaner.startup();\n }",
"private void runProcessor(UtteranceProcessor processor, \n Utterance utterance, BulkTimer timer) \n throws ProcessException {\n\tif (processor != null) {\n\t String processorName = \"..\" + processor.toString();\n\t log(\" Running \" + processorName);\n\t timer.start(processorName);\n\t processor.processUtterance(utterance);\n\t timer.stop(processorName);\n\t}\n }",
"public static void main(String[] args) {\n\t\tApplicationContext context = new ClassPathXmlApplicationContext(\"beans-annotation.xml\");\n\t\tHumanAnno human = context.getBean(\"humanano\", HumanAnno.class);\n\t\thuman.startPumping();\n\t}",
"@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }",
"public void run() throws Exception {\n logger.log(Level.FINE, \"run()\");\n /* Start the discovery prcess by creating a LookupDiscovery\n * instance configured to discover BOTH the initial and additional\n * lookup services to be started.\n */\n String[] groupsToDiscover = toGroupsArray(getAllLookupsToStart());\n logger.log(Level.FINE,\n \"starting discovery by creating a \"\n +\"LookupDiscovery to discover -- \");\n for(int i=0;i<groupsToDiscover.length;i++) {\n logger.log(Level.FINE, \" \"+groupsToDiscover[i]);\n }//end loop\n LookupDiscovery ld = new LookupDiscovery(groupsToDiscover,\n getConfig().getConfiguration());\n lookupDiscoveryList.add(ld);\n\n /* Verify that the lookup discovery utility created above is\n * operational by verifying that the INITIIAL lookups are\n * discovered.\n */\n mainListener.setLookupsToDiscover(getInitLookupsToStart());\n ld.addDiscoveryListener(mainListener);\n waitForDiscovery(mainListener);\n\n /* Terminate the lookup discovery utility */\n ld.terminate();\n logger.log(Level.FINE, \"terminated lookup discovery\");\n\n\n /* Since the lookup discovery utility was terminated, the listener\n * should receive no more events when new lookups are started that\n * belong to groups the utility is configured to discover. Thus,\n * reset the listener to expect no more events.\n */\n mainListener.clearAllEventInfo();\n /* Verify that the lookup discovery utility created above is no\n * longer operational by starting the additional lookups, and\n * verifying that the listener receives no more discovered events.\n */\n logger.log(Level.FINE,\n \"starting additional lookup services ...\");\n startAddLookups();\n /* Wait a nominal amount of time to allow any un-expected events\n * to arrive.\n */\n waitForDiscovery(mainListener);\n }",
"protected static void runPipelines() {\n for (String cameraId : trackerAPIMap.keySet()) {\n runHALTrackerAPI(cameraId, Objects.requireNonNull(trackerAPIMap.get(cameraId)));\n }\n }",
"public void train() {\n\t\tfor (int i = 0; i < numberOfIterations; i++) {\n\t\t\t// for each training record\n\t\t\tfor (int j = 0; j < numberOfRecords; j++) {\n\t\t\t\t// calculate inputs and outputs\n\t\t\t\tforwardCalculation(records.get(j).input);\n\t\t\t\t// compute errors, update weights and thetas\n\t\t\t\tbackwardCalculation(records.get(j).output);\n\t\t\t}\n//\t\t\tpostprocessOutputs();\n\t\t}\n\t}",
"public void start() {\n\tanimator = new Thread(this);\n\tanimator.setName(\"erly_boid:::swarm intelligence\");\n\terlang =new Thread(co);\n\terlang.start();\n\tanimator.start();\n \n \n \t\n }",
"public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }",
"@Override\n\tpublic void run( String arg )\n\t{\n\t\tfinal LoadParseQueryXML result = new LoadParseQueryXML();\n\n\t\tif ( !result.queryXML( \"Dataset Quality Estimation\", true, true, true, true, true ) )\n\t\t\treturn;\n\n\t\testimateFRC( result.getData(), SpimData2.getAllViewIdsSorted( result.getData(), result.getViewSetupsToProcess(), result.getTimePointsToProcess() ) );\n\t}",
"public static void createFlakes(final ResourceMapping mapping)\n throws Exception {\n\n String appName = mapping.getAppName();\n\n String applicationJar = mapping.getApplicationJarPath();\n\n if (applicationJar != null) {\n try {\n\n String downloadLocation\n = Utils.getContainerJarDownloadPath(appName,\n applicationJar);\n\n File f = new File(downloadLocation);\n if (!f.exists()) {\n LOGGER.info(\"Downloading: \" + applicationJar);\n FloeClient.getInstance().downloadFileSync(applicationJar,\n downloadLocation);\n LOGGER.info(\"Finished Downloading: \" + applicationJar);\n }\n } catch (Exception e) {\n LOGGER.warn(\"No application jar specified. It should work\"\n + \" still work for inproc testing. Exception: {}\",\n e);\n }\n }\n\n String containerId = ContainerInfo.getInstance().getContainerId();\n\n Map<String, ResourceMapping.FlakeInstance> flakes = null;\n\n if (mapping.getDelta() == null) {\n ResourceMapping.ContainerInstance container\n = mapping.getContainer(containerId);\n if (container != null) {\n flakes = container.getFlakes();\n } else {\n LOGGER.warn(\"No flakes for this container.\");\n }\n } else {\n Map<String, ResourceMappingDelta.FlakeInstanceDelta>\n addedflakeDeltas\n = mapping.getDelta().getNewlyAddedFlakes(containerId);\n\n if (addedflakeDeltas != null) {\n flakes = new HashMap<>();\n\n for (Map.Entry<String, ResourceMappingDelta.FlakeInstanceDelta>\n fd : addedflakeDeltas.entrySet()) {\n flakes.put(fd.getKey(), fd.getValue().getFlakeInstance());\n }\n } else {\n LOGGER.warn(\"No new flakes for this container.\");\n }\n }\n\n //Create and wait for flakes to respond.\n if (flakes != null) {\n ContainerUtils.createFlakes(\n mapping.getAppName(),\n mapping.getApplicationJarPath(),\n containerId,\n flakes);\n }\n }",
"static void startJavaTrainer() {\n initializeMap();\n promptUser();\n startProgram();\n }",
"public static void main(String[] args) {\n TruckTour sol1 = new TruckTour();\n sol1.process();\n }",
"private void setup_for_mainshock (RJGUIController.XferCatalogMod xfer) {\n\n\t\t// Display mainshock information\n\n\t\tSystem.out.println (fcmain.toString());\n\n\t\t// Display list of OAF products for this mainshock\n\n\t\tif (fcmain.mainshock_geojson != null) {\n\t\t\tList<ComcatProductOaf> oaf_product_list = ComcatProductOaf.make_list_from_gj (fcmain.mainshock_geojson);\n\t\t\tfor (int k = 0; k < oaf_product_list.size(); ++k) {\n\t\t\t\tSystem.out.println (\"OAF product: \" + oaf_product_list.get(k).summary_string());\n\t\t\t}\n\t\t\tif (oaf_product_list.size() > 0) {\n\t\t\t\tSystem.out.println ();\n\t\t\t}\n\t\t}\n\n\t\t// Set up aafs_fcparams to hold the forecast parameters\n\n\t\taafs_fcparams = new ForecastParameters();\n\n\t\ttry {\n\t\t\tif (!( aafs_fcparams.fetch_forecast_params (fcmain, null) )) {\n\t\t\t\tthrow new IllegalStateException (\"RJGUIModel.setup_for_mainshock - Error fetching forecast params\");\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\tSystem.err.println (\"Error fetching forecast params\");\n\t\t\tthrow new IllegalStateException (\"RJGUIModel.setup_for_mainshock - Error fetching forecast params\", e);\n\t\t\t//e.printStackTrace();\n\t\t\t//genericParams = null;\n\t\t}\n\t\t\n\t\t// Announce regimes and parameters\n\n\t\tSystem.out.println (\"Generic parameters for regime \" + aafs_fcparams.generic_regime + \":\");\n\t\tSystem.out.println (aafs_fcparams.generic_params.toString());\n\n\t\tSystem.out.println (\"Magnitude-of-completeness parameters for regime \" + aafs_fcparams.mag_comp_regime + \":\");\n\t\tSystem.out.println (aafs_fcparams.mag_comp_params.toString());\n\n\t\tSystem.out.println (\"Default sequence-specific parameters:\");\n\t\tSystem.out.println (aafs_fcparams.seq_spec_params.toString());\n\n\t\t// Copy to fetch_fcparams\n\n\t\tfetch_fcparams = new ForecastParameters();\n\t\tfetch_fcparams.copy_from (aafs_fcparams);\n\n\t\t// No custom search region\n\n\t\tcustom_search_region = null;\n\n\t\t// No injectable text\n\n\t\tanalyst_inj_text = \"\";\n\n\t\t// Make the generic RJ model\n\n\t\tgenericModel = new RJ_AftershockModel_Generic(fcmain.mainshock_mag, aafs_fcparams.generic_params);\n\n\t\t// As a courtesy, spit out the decimal days remaining in the origin day\n\n\t\tSystem.out.println(\"The mainshock occurred \" + String.format(\"%.4f\", getTimeRemainingInUTCDay()) + \" days before midnight (UTC)\\n\");\n\t\treturn;\n\t}",
"public void doInitialSchedules() {\r\n\r\n\t\t// create the servicer, here make a vancarrier\r\n\t\tfor (int i = 0; i < vcNumber; i++) {\r\n\t\t\tVC vancarrier = new VC(this, \"Van Carrier\", true);\r\n\r\n\t\t\t// put the vancarrier on duty with placing it on the event-list\r\n\t\t\t// first\r\n\t\t\t// it will deactivate itself into waiting status\r\n\t\t\t// for the first truck right after activation\r\n\t\t\tvancarrier.activate();\r\n\t\t}\r\n\r\n\t\t// create a truck spring\r\n\t\tTruckGenerator firstarrival = new TruckGenerator(this, \"TruckArrival\", false);\r\n\r\n\t\t// place the truck generator on the event-list, in order to\r\n\t\t// start producing truck arrivals when the first truck comes\r\n\t\t// therefore we must use \"schedule\" instead of \"activate\"\r\n\t\tfirstarrival.schedule(new TimeSpan(getTruckArrivalTime()));\r\n\r\n\t}",
"public void run() {\n //Moved Observers NOV 15\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController); //would be created\n }\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController.userInfo);\n }\n CSVReader fileReader = new CSVReader(\"phase1/src/Resources/Talks.csv\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n for(ArrayList<String> talkData: fileReader.getData()){\n this.talkManager.createTalk(talkData.get(0), talkData.get(1), talkData.get(2),\n talkData.get(3), LocalDateTime.parse(talkData.get(4), formatter));\n }\n setTalkManager();\n messagingSystem.run();\n scheduleSystem.run();\n createSignUpAttendees();\n if (this.user instanceof Attendee) {\n userScheduleController.setSignUpMap(signUpMap);\n }\n if (this.user instanceof Organizer) {\n orgScheduleController.setSignUpMap(signUpMap);\n }\n }",
"public void run() throws FileNotFoundException, UnsupportedEncodingException {\n double averageError=1;\n int index=0;\n while(averageError> errorTreshold ||index<7) {\n trainPerceptrons();\n\n averageError= classifyPerformanceImages(asciiReader\n .getPerformanceImages());\n\n asciiReader.shuffleImages();\n index++;\n }\n \n System.out.println(\"# Average Error: \"+averageError);\n System.out.println(\"# Number of calibration rounds: \"+index);\n\n classifyTestImages();\n }",
"void analysisStarting();",
"public void setFFMPRunners(ArrayList<FFMPRunXML> runners) {\n if (configXml == null) {\n configXml = new FFMPRunConfigXML();\n }\n configXml.setFFMPRun(runners);\n }",
"public static void main(String... args) {\n\n System.out.println(\"File path: \" + args[0]);\n\n try {\n ParsedData data = ArffParser.arffFileReader(new File(args[0]));\n DataSet trainingDataSet = data.getDataset();\n ArrayList<Attribute> attributes = data.getAttributes();\n System.out.println(\"\\n Arff-File successfully loaded! \\n\");\n\n // Select attribute for class attribute\n int numClassAttribute = Integer.parseInt(args[1]);\n Attribute classAttribute = attributes.get(numClassAttribute);\n\n multipleRun(trainingDataSet.transformToWeightedDataSet(),\n attributes,\n classAttribute,\n Integer.parseInt(args[2]),\n Integer.parseInt(args[3]),\n Integer.parseInt(args[4]));\n\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\n serialization.deserializeAll();\n createDemoData();\n\n // Java FX -> invoke start method\n new Thread(() -> Application.launch(ATMFrame.class)).start();\n\n\n for (Account a : accountManager.account_map.values()) {\n if (a instanceof GIC) {\n ((GIC) a).newDay();\n }\n if (a instanceof Saving) {\n ((Saving) a).newDay();\n }\n if (a instanceof Youth) {\n ((Youth) a).newDay();\n }\n }\n }",
"public Object run(ModelFactory factory);",
"@Override\n public void run() {\n // Definition init\n // ===================================================================================================\n\n cElementalPrimitive.run();\n\n cPrimitiveDefinition.run();\n\n eQuarkDefinition.run();\n eLeptonDefinition.run();\n eNeutrinoDefinition.run();\n eBosonDefinition.run();\n\n dHadronDefinition.run();\n\n iaeaNuclide.run();\n\n dAtomDefinition.run();\n\n ePrimalAspectDefinition.run();\n\n dComplexAspectDefinition.run();\n }",
"public static void main(String[] args) {\n \n AirFilterTest app = new AirFilterTest();\n app.start();\n \n }",
"public static void main(String[] args) {\r\n SunSpotHostApplication app = new SunSpotHostApplication();\r\n app.run();\r\n }",
"public void callClient(String location) {\r\n\r\n\t\tcaller = new ForecastCaller(citySearchField, location, this);\r\n\t\tThread thread = new Thread((Runnable) caller);\r\n\r\n\t\tthread.start();\r\n\t}",
"protected void onTick() {\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\r\n\t\t\t\tServiceDescription sd = new ServiceDescription();\r\n\t\t\t\tsd.setType(\"TractorDT\");\r\n\t\t\t\ttemplate.addServices(sd);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tDFAgentDescription[] result = DFService.search(myAgent, template);\r\n\t\t\t\t\tDTAgents = new AID[result.length];\r\n\t\t\t\t\tfor (int i = 0; i < result.length; ++i) {\r\n\t\t\t\t\t\tDTAgents[i] = result[i].getName();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (FIPAException fe) {\r\n\t\t\t\t\tfe.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//System.out.println(\"DigitalTwin request being performed\");\r\n\t\t\t\t// Perform a Fuel Usage request\r\n\t\t\t\tmyAgent.addBehaviour(new DataRequestPerformer());// add behaviour here)\r\n\t\t\t}",
"public static void main(String[] args) {\n\t\tTradeListDAOImpl obj = new TradeListDAOImpl();\r\n\t\tLinkedList<TradeList> tradeList = new LinkedList<TradeList>();\r\n\t\tConnection conn = obj.openConnection();\r\n\t\tFrontRunningDetectionList detect = new FrontRunningDetectionList();\r\n\t\t\r\n\t\tfor (int i = 1; i <= 203; i++) {\r\n\t\t\tTradeList o = obj.fetchBySr(i, conn);\r\n\t\t\t// System.out.println(tradeList.size());\r\n\t\t\t\r\n\t\t\ttradeList.addFirst(o);\r\n\t\t\t\r\n\r\n\t\t}\r\n\t\t\r\n\t\tCollections.reverse(tradeList);\r\n\t\tSystem.out.println(detect.findFRScenario1(tradeList));\r\n\t\tSystem.out.println(detect.findFRScenario2(tradeList));\r\n\t\t// boolean b = obj.findFR(tradeList);\r\n\r\n\t}",
"public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}",
"public void start(Stage primaryStage) throws Exception {\n DependencyGraph dg = DependencyGraph.getGraph();\n\n //Validate out arguments and make sure they are correct\n _argumentsParser = new KernelParser(this);\n validateArguments();\n _maxThreads = _argumentsParser.getMaxThreads();\n\n //Parse the graph so that our data is ready for use in any point post this line.\n dg.setFilePath(_argumentsParser.getFilePath());\n dg.parse();\n\n //set up statistics\n ChartModel cModel = new ChartModel(_argumentsParser.getProcessorNo());\n _sModel = new StatisticsModel(cModel, _argumentsParser.getFilePath());\n _sModel.setStartTime(System.nanoTime());\n\n // run the algorithm\n Task task = new Task<Void>() {\n @Override\n public Void call() {\n InitialiseScheduling(_sModel);\n return null;\n }\n };\n\n new Thread(task).start();\n\n // renders the visualisation if nessasary\n if (_argumentsParser.displayVisuals()) {\n MainScreen mainScreen = new MainScreen(primaryStage, _sModel, this);\n }\n\n }",
"public Forecastday() {\n }"
] | [
"0.6240035",
"0.5815927",
"0.5514844",
"0.5433762",
"0.5263932",
"0.51601",
"0.5134338",
"0.51075816",
"0.509322",
"0.50703156",
"0.49872515",
"0.4929741",
"0.492182",
"0.48730928",
"0.484717",
"0.48075563",
"0.4807113",
"0.47835138",
"0.47831738",
"0.47713658",
"0.4769055",
"0.47548407",
"0.47481668",
"0.47457728",
"0.4742184",
"0.47414002",
"0.47340423",
"0.47318664",
"0.47114635",
"0.46925253",
"0.46796083",
"0.46534872",
"0.46462065",
"0.46352687",
"0.46279034",
"0.46090484",
"0.4601404",
"0.4600154",
"0.45992604",
"0.45652172",
"0.45643783",
"0.45621327",
"0.456149",
"0.45613453",
"0.45463246",
"0.45447138",
"0.45375118",
"0.45364243",
"0.4535571",
"0.4527837",
"0.45253718",
"0.45133197",
"0.4512922",
"0.45098472",
"0.4507889",
"0.4506027",
"0.4498393",
"0.44871005",
"0.44833606",
"0.44720507",
"0.44717672",
"0.44560364",
"0.44386312",
"0.44367924",
"0.4436315",
"0.4424087",
"0.44177026",
"0.44066814",
"0.43974236",
"0.43972299",
"0.43940046",
"0.439108",
"0.4389333",
"0.43806553",
"0.43735465",
"0.43718415",
"0.43695346",
"0.43633834",
"0.43633145",
"0.4358396",
"0.43561172",
"0.43510926",
"0.43507737",
"0.43483528",
"0.43397027",
"0.4335302",
"0.43331084",
"0.4330246",
"0.43285418",
"0.43282998",
"0.43268716",
"0.43185112",
"0.43081298",
"0.43064246",
"0.43063942",
"0.43050972",
"0.42997566",
"0.4299395",
"0.42989627",
"0.42976636"
] | 0.7252299 | 0 |
Tests the Weka Forecasting panel from the command line. | public static void main(String[] args) {
try {
if (args.length == 0) {
throw new Exception("supply the name of an arff file");
}
Instances i = new Instances(new java.io.BufferedReader(
new java.io.FileReader(args[0])));
ForecastingPanel scp =
new ForecastingPanel(new LogPanel(new WekaTaskMonitor()), true, false, false);
scp.setInstances(i);
final javax.swing.JFrame jf =
new javax.swing.JFrame("Weka Forecasting");
jf.getContentPane().setLayout(new BorderLayout());
jf.getContentPane().add(scp, BorderLayout.CENTER);
jf.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
jf.dispose();
System.exit(0);
}
});
jf.pack();
jf.setVisible(true);
} catch (Exception ex) {
ex.printStackTrace();
System.err.println(ex.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n try {\n Configuration configuration = new Configuration();\n ToolRunner.run(configuration,new FruitDriver(),args);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\t\tForecastManager mgr = new ForecastManagerImpl(\"/forecast.xlsx\");\n\n\t\t// load the weather data\n\t\tList<Forecast> forecasts = mgr.load();\n\n\t\t// convert the weather data into example data\n\t\tExample[] examples = DecisionTree.convertTo(forecasts);\n\n\t\t// build the decision tree\n\t\tNode<?> tree = DecisionTree.learnDecision(examples, Constants.real_attributes, Constants.no,\n\t\t\t\tConstants.desired_attribute);\n\n\t\t// print the decision tree\n\t\tSystem.out.println(tree.toString());\n\t}",
"public static void main(String [] args) {\n\n try {\n boolean readExp = Utils.getFlag('l', args);\n final String expFile = Utils.getOption('f', args);\n if (readExp && (expFile.length() == 0)) {\n\tthrow new Exception(\"A filename must be given with the -f option\");\n }\n Experiment exp = null;\n if (readExp) {\n\tFileInputStream fi = new FileInputStream(expFile);\n\tObjectInputStream oi = new ObjectInputStream(\n\t\t\t new BufferedInputStream(fi));\n\tObject to = oi.readObject();\n\tif (to instanceof RemoteExperiment) {\n\t exp = (RemoteExperiment)to;\n\t} else {\n\t exp = (Experiment)to;\n\t}\n\toi.close();\n } else {\n\texp = new Experiment();\n }\n System.err.println(\"Initial Experiment:\\n\" + exp.toString());\n final JFrame jf = new JFrame(\"Run Weka Experiment\");\n jf.getContentPane().setLayout(new BorderLayout());\n final RunPanel sp = new RunPanel(exp);\n //sp.setBorder(BorderFactory.createTitledBorder(\"Setup\"));\n jf.getContentPane().add(sp, BorderLayout.CENTER);\n jf.addWindowListener(new WindowAdapter() {\n\tpublic void windowClosing(WindowEvent e) {\n\t System.err.println(\"\\nExperiment Configuration\\n\"\n\t\t\t + sp.m_Exp.toString());\n\t jf.dispose();\n\t System.exit(0);\n\t}\n });\n jf.pack();\n jf.setVisible(true);\n } catch (Exception ex) {\n ex.printStackTrace();\n System.err.println(ex.getMessage());\n }\n }",
"public static void main(String[] args) {\n inOrbitDestinationControllerTest();\n// inOrbitReplayControllerTest();\n\n }",
"public static void main(String [] args){\n\t\n\tFile speedfile = new File(args[0]);\n\tFile category = new File(args[1]);\n\tFile datafile = new File(args[2]);\n\t\n\tDataset data = Dataset.VERBEECK;//decides which kind it is (SCHILDE, VERBEEK)\n\tnew TripSetup(speedfile, category, datafile, data);\n}",
"public static void main(String[] args) {\n new UAVModeSelector();\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t// Object instantiation\r\n\t\tTestFaceDetection test = new TestFaceDetection();\r\n\t\t\r\n\t\t// Test instance option\r\n\t\tSystem.out.println(\"Here tests instance option:\");\r\n\t\ttest.testInstanceOption();\r\n\t\t\r\n\t\t// Test initialize engine\r\n\t\tSystem.out.println(\"\\nHere tests initializing engine:\");\r\n\t\ttest.testInitializeEngine();\r\n\t\t\r\n\t\t// Test get version\r\n\t\tSystem.out.println(\"\\nHere tests getting version:\");\r\n\t\ttest.testGetVersion();\r\n\t}",
"public static void main(String[] args) {\n \n AirFilterTest app = new AirFilterTest();\n app.start();\n \n }",
"public static void main(String[] args){\n boolean run = true;\n TestSlideLeft TSL = new TestSlideLeft();\n System.out.println(\"Test to start \"+\n TSL.TestStart(run).getResult());\n \n }",
"public static void main(String[] args)\n {\n try\n {\n TestRunner.run(isuite());\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\tPredictExample pe = new PredictExample();\n\t\tpe.testPredicate();\n\t}",
"public static void main(String[] args) {\n Fakultet faks = new Fakultet();\n\n }",
"public static void main(String[] args) {\n SettVisualizer.startApplication();\r\n }",
"@Test\n public void testOne() {\n testDriver.pipeInput(recordFactory.create(Kafka_Streams_MachineLearning_H2O_GBM_Example.INPUT_TOPIC,\n null,\n \"1987,10,14,3,741,730,912,849,PS,1451,NA,91,79,NA,23,11,SAN,SFO,447,NA,NA,0,NA,0,NA,NA,NA,NA,NA,YES,YES\",\n 1L));\n assertThat(getOutput()).isEqualTo(\"Prediction: Is Airline delayed? => YES\");\n }",
"public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }",
"public static void main(String[] args) { \n new FlightController(); \n }",
"public static void main(String[] args)\n {\n TestRunner.run(suite());\n }",
"public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Horse> trainingSet = utility.readHorseColicfile(\"horseTrain.txt\");\n\t\tArrayList<Variable> variableSets = Horse.getAllVar();\n\t\tTree tree = new Tree();\n\t\t\n\t\tNode decisionTree = tree.buildTree(trainingSet, variableSets);\n\t\tutility.printNode(decisionTree);\n\t\t\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Horse> testSet = utility.readHorseColicfile(\"horseTest.txt\");\n\t\tutility.testTree(testSet, decisionTree);\n\t\t\n\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tfinal StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n\n /* if you would like to use runtime configuration properties, uncomment the lines below\n * DataStream<String> input = createSourceFromApplicationProperties(env);\n */\n\n\t\tDataStream<String> input = createSourceFromStaticConfig(env);\n\n\t\t// Kinesis Firehose sink\n\t\tinput.addSink(createFirehoseSinkFromStaticConfig());\n\n\t\t// If you would like to use runtime configuration properties, uncomment the lines below\n\t\t// input.addSink(createFirehoseSinkFromApplicationProperties());\n\n\t\tenv.execute(\"Flink Streaming Java API Skeleton\");\n\t}",
"public static void main(String[] args) {\n testRopeCut();\n }",
"public static void main(String[] args) {\n\t\tLogicTrainPassenger tp = new LogicTrainPassenger();\n\t\t//tp.insert1();\n\t\ttp.select1();\n\t}",
"public static void main(String[] args) {\n\t\tKukaTest app = new KukaTest();\n\t\tapp.runApplication();\n\t}",
"public static void main(String args[]) {\n IterativeTrainingPanel test = new IterativeTrainingPanel(null, null);\n // test.errorBar.setValue(5);\n SimpleFrame.displayPanel(test);\n }",
"public static void main(String[] args) {\n\t\tAbstractFactory tarrifFactory = FactoryProducer.getFactory(\"Tarrif\");\n\t\tAbstractFactory operatorFactory = FactoryProducer.getFactory(\"Operator\");\n\t\tTarrif tarrif = tarrifFactory.getMobileTarrif(\"Smart familly\");\n\t\tSystem.out.println(tarrif.toString());\n\t\tMobileOperator operator = operatorFactory.getMobileOperator(\"Life\");\n\t\tSystem.out.println(operator.toString());\n\n\t}",
"public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\tCentralTrafficRules AT = new AustralianTraffic();\n\t\tAustralianTraffic ATT = new AustralianTraffic();\n\t\tAT.green();\n\t\tATT.black();\n\t\tATT.holdup();\n\t\t\n\n\t}",
"public static void main(String args[]) {\n\n\t\tFlowers example = new Flowers();\n\t\t\n\t\texample.model();\n\n\t\tif (example.search())\n\t\t\tSystem.out.println(\"Solution(s) found\");\n\t\t\n\t}",
"public static void main(String args[])\n {\n junit.textui.TestRunner.run(suite());\n }",
"public static void main(String[] args) {\n \n SimpleSSRFilterTest app = new SimpleSSRFilterTest();\n app.start();\n \n }",
"public static void main(String[] args) throws Exception {\n\t\ttrainingInstances = StanceDetectionDataReader\r\n\t\t\t\t.readInstancesFromArff(ProjectPaths.ARFF_DATA_PATH + \"Ferr_doc2vec_train09-19_11-55.arff\");\r\n\t\tunlabtestInstances = StanceDetectionDataReader\r\n\t\t\t\t.readInstancesFromArff(ProjectPaths.ARFF_DATA_PATH + \"Ferr_doc2vec_unlabeled_test09-19_11-55.arff\");\r\n\t\r\n\t\ttrainingInstances.addAll(unlabtestInstances);\r\n\t\t\r\n\t\tClassifierTools ct = new ClassifierTools(trainingInstances, unlabtestInstances, null);\r\n\t\tStringToWordVector bow = ct.applyBoWFilter(2000, 1, 2);\r\n\t\tString time = FNCConstants.getCurrentTimeStamp();\r\n\t\tct.saveInstancesToArff(\"ferr_BoW2000_allf_\" + time);\r\n\t\t\r\n\t\t weka.core.SerializationHelper.write(ProjectPaths.MODEL_PATH + \"BoW_2000_train_test\", bow);\r\n\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t// test method\r\n\t\tNewFeatures newFeatures = new NewFeatures();\r\n\t\tnewFeatures.testingArrayList();\r\n\t\tnewFeatures.testingTryCatch();\r\n\t\tnewFeatures.testingNumericValues();\r\n\t\tnewFeatures.testingSwitchWithStringStatemant();\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"Transformers 7: Bay of Michael Bay\");\r\n\t}",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"public static void main(String[] args) throws IOException {\n\t\t testType1();\n\n\t\t// testMatrix();\n//\t\ttestKening();\n\t\t\n//\t\ttestOutline();\n\t}",
"public static void main(String[] args) \n\t{\n\t\t// Konfiguration\n\t\tTraining training = new Training();\n\t\tint numberOfAttributes = 18;\n\t\tStatisticOutput statisticWriter = new StatisticOutput(\"data/statistics.txt\");\n\t\t\n\t\ttraining.printMessage(\"*** TCR-Predictor: Training ***\");\n\t\t\n\t\ttraining.printMessage(\"Datenbank von Aminosäure-Codierungen wird eingelesen\");\n\t\t// Lies die EncodingDB ein\n\t\tAAEncodingFileReader aa = new AAEncodingFileReader();\n\t\tAAEncodingDatabase db = aa.readAAEncodings(\"data/AAEncodings.txt\");\n\t\ttraining.printMessage(\"Es wurden \" + db.getEncodingDatabase().size() + \" Codierungen einglesen\");\n\t\t\n\t\ttraining.printMessage(\"Trainingsdatensatz wird eingelesen und prozessiert\");\n\t\t// Lies zunächst die gesamten Trainingsdaten ein\n\t\tExampleReader exampleReader = new ExampleReader();\n\t\t\n\t\t// Spalte das Datenset\n\t\tDataSplit dataSplit_positives = new DataSplit(exampleReader.getSequnces(\"data/positive.txt\"), 5);\n\t\tArrayList<ArrayList<String>> complete_list_positiv = dataSplit_positives.getDataSet();\n\t\t\n\t\tDataSplit dataSplit_negatives = new DataSplit(exampleReader.getSequnces(\"data/negative.txt\"), 5);\n\t\tArrayList<ArrayList<String>> complete_list_negativ = dataSplit_negatives.getDataSet();\n\t\t\n\t\t// Lege Listen für die besten Klassifizierer und deren Evaluation an\n\t\tModelCollection modelCollection = new ModelCollection();\n\t\t\n\t\t/*\n\t\t * \n\t\t * Beginne Feature Selection\n\t\t * \n\t\t */\n\t\tArrayList<String> positivesForFeatureSelection = training.concatenateLists(complete_list_positiv);\n\t\tArrayList<String> negativesForFeatureSelection = training.concatenateLists(complete_list_negativ);\n\t\t\n\t\ttraining.printMessage(\"Convertiere Daten ins Weka ARFF Format\");\t\t\n\t\t// Convertiere Daten in Wekas File Format\n\t\tARFFFileGenerator arff = new ARFFFileGenerator();\n\t\tInstances dataSet = arff.createARFFFile(positivesForFeatureSelection, negativesForFeatureSelection, db.getEncodingDatabase());\n\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\n\t\ttraining.printMessage(\"Führe Feature Selection (Filtering) aus\");\n\t\t// Beginne Feature Selection\n\t\tFeatureFilter featureFilter = new FeatureFilter();\n\t\tfeatureFilter.rankFeatures(dataSet, numberOfAttributes);\t\t\t\t\t// Wähle die x wichtigsten Features aus\n\t\tdataSet = featureFilter.getProcessedInstances();\n\t\ttraining.printMessage(\"Ausgewählte Features: \" + featureFilter.getTopResults());\n\n\t\t/*\n\t\t * Führe die äußere Evaluierung fünfmal durch und wähle das beste Modell\n\t\t */\n\t\tfor (int outer_run = 0; outer_run < 5; outer_run++)\n\t\t{\n\t\t\tstatisticWriter.writeString(\"===== Äußere Evaluation \" + (outer_run + 1) + \"/5 =====\\n\\n\");\n\t\t\t\n\t\t\t\n\t\t\tArrayList<ArrayList<String>> list_positives = new ArrayList<ArrayList<String>>();\n\t\t\tlist_positives.addAll(complete_list_positiv);\n\t\t\t\n\t\t\tArrayList<ArrayList<String>> list_negatives = new ArrayList<ArrayList<String>>();\n\t\t\tlist_negatives.addAll(complete_list_negativ);\n\t\t\t\n\t\t\t// Lege das erste Fragment beider Listen für nasted-Crossvalidation beiseite\n\t\t\tArrayList<String> outer_List_pos = new ArrayList<String>();\n\t\t\touter_List_pos.addAll(list_positives.get(outer_run));\n\t\t\tlist_positives.remove(outer_run);\n\t\t\t\n\t\t\tArrayList<String> outer_List_neg = new ArrayList<String>();\n\t\t\touter_List_neg.addAll(list_negatives.get(outer_run));\n\t\t\tlist_negatives.remove(outer_run);\n\t\t\t\n\t\t\t// Füge die verbleibende Liste zu einer Zusammen\n\t\t\tArrayList<String> inner_List_pos = training.concatenateLists(list_positives);\n\t\t\tArrayList<String> inner_List_neg = training.concatenateLists(list_negatives);\n\t\t\t\t\n\n\t\t\t/*\n\t\t\t * \n\t\t\t * Ab hier nur noch Arbeiten mit innerer Liste, die Daten zum Evaluieren bekommt Weka vorerst \n\t\t\t * nicht zu sehen!\n\t\t\t * \n\t\t\t */\n\t\t\ttraining.printMessage(\"Convertiere Daten ins Weka ARFF Format\");\t\t\n\t\t\t// Convertiere Daten in Wekas File Format\n\t\t\tarff = new ARFFFileGenerator();\n\t\t\tdataSet = arff.createARFFFile(inner_List_pos, inner_List_neg, db.getEncodingDatabase());\n\t\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\t\n\t\t\tfeatureFilter.processInstances(featureFilter.getRanking(), dataSet, numberOfAttributes); // Filtere das innere Datenset nach Vorgabe\n\t\t\tdataSet = featureFilter.getProcessedInstances();\n\t\t\t\n\t\t\ttraining.printMessage(\"Beginne Gridsearch\");\n\t\t\t// Gridsearch starten\n\t\n\t\t\t\n\t\t\t\n\t\t\tParameterOptimization optimizer = new ParameterOptimization();\n\t\t\tString logFileName = outer_run + \"_\" + numberOfAttributes;\n\t\t\tGridSearch gridSearch = optimizer.performGridSearch(dataSet, logFileName);\n\t\t\ttraining.printMessage(\"Gefundene Parameter [C, gamma]: \" + gridSearch.getValues()); // liefert unter diesen Settings 1.0 und 0.0\n\n\t\t\tSMO sMO = (SMO)gridSearch.getBestClassifier();\n\t\t\t\t\t\t\t\n\t\t\t/*\n\t\t\t * \n\t\t\t * Evaluationsbeginn \n\t\t\t *\n\t\t\t */\n\t\t\ttraining.printMessage(\"Evaluiere die Performance gegen das äußere Datenset\");\n\t\t\ttraining.printMessage(\"Transcodierung des Evaluationsdatensatzes\");\n\t\t\tarff = new ARFFFileGenerator();\n\t\t\tdataSet = arff.createARFFFile(outer_List_pos, outer_List_neg, db.getEncodingDatabase());\n\t\t\tdataSet.setClass(dataSet.attribute(\"activator\"));\t\t\t// Lege das nominale Attribut fest, wonach klassifiziert wird\n\t\t\tdataSet.deleteStringAttributes(); \t\t\t\t\t\t\t// Entferne String-Attribute\n\t\t\t\n\t\t\t// Führe Feature-Filtering mit den Einstellungen der GridSearch aus\n\t\t\ttraining.printMessage(\"Führe Feature Selection (Filtering) auf GridSearch-Basis aus\");\n\t\t\t// Beginne Feature Selection\n\t\t\tfeatureFilter.processInstances(featureFilter.getRanking(), dataSet, numberOfAttributes);\t // Wähle die x wichtigsten Features aus\n\t\t\tdataSet = featureFilter.getProcessedInstances();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\ttraining.printMessage(\"Ermittle Performance\");\n\t\t\tEvaluator eval = new Evaluator();\n\t\t\teval.classifyDataSet(sMO, dataSet);\n\t\t\ttraining.printMessage(eval.printRawData());\n\t\t\t\n\t\t\t/*\n\t\t\t * Füge das Modell und die externe Evaulation zur Sammlung hinzu\n\t\t\t */\t\t\t\n\t\t\tmodelCollection.bestClassifiers.add(sMO);\n\t\t\tmodelCollection.evalsOfBestClassifiers.add(eval);\n\t\t\tmodelCollection.listOfNumberOfAttributes.add(numberOfAttributes);\n\t\t\tmodelCollection.listOfFeatureFilters.add(featureFilter);\n\t\t\t\n\t\t\tstatisticWriter.writeString(\"Verwendete Attribute: \" + featureFilter.getTopResults());\n\t\t\tstatisticWriter.writeString(eval.printRawData());\n\t\t\t\n\t\t}\n\t\tstatisticWriter.close();\n\t\t\n\t\t// Wähle das beste aller Modelle aus\n\t\ttraining.printMessage(\"Ermittle die allgemein besten Einstellungen\");\n\t\tModelSelection modelSelection = new ModelSelection();\n\t\tmodelSelection.calculateBestModel(modelCollection);\n\t\t\n\t\ttraining.printMessage(\"Das beste Model: \");\n\t\ttraining.printMessage(modelSelection.getBestEvaluator().printRawData());\n\t\tSystem.out.println(\"------ SMO ------\");\n\t\tfor (int i = 0; i < modelSelection.getBestClassifier().getOptions().length; i++)\n\t\t{\n\t\t\tSystem.out.print(modelSelection.getBestClassifier().getOptions()[i] + \" \");\n\t\t}\n\t\tSystem.out.println(\"\\n--- Features ---\");\n\t\tSystem.out.println(modelSelection.getBestListOfFeatures().getTopResults());\n\t\t\n\t\t// Schreibe das Modell in eine Datei\n\t\ttraining.printMessage(\"Das beste Modell wird auf Festplatte geschrieben\");\n\t\ttry\n\t\t{\n\t\t\tSerializationHelper.write(\"data/bestPredictor.model\", modelSelection.getBestClassifier());\n\t\t\tSerializationHelper.write(\"data/ranking.filter\", modelSelection.getBestListOfFeatures().getRanking());\n\t\t\tSerializationHelper.write(\"data/components.i\", (modelSelection.getBestListOfFeatures().getProcessedInstances().numAttributes()-1));\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.err.println(\"Fehler beim Schreiben des Modells auf Festplatte: \" + ex);\n\t\t}\n\t}",
"public static void main (String[] args)\n {\n /* junit.textui.TestRunner will write the test results to stdout. */\n junit.textui.TestRunner.run (SchemeTest.class);\n\n /* junit.swingui.TestRunner will display the test results in JUnit's\n swing interface. */\n //junit.swingui.TestRunner.run (SchemeTest.class);\n }",
"public static void main(String args[]) {\n junit.textui.TestRunner.run(suite());\n }",
"public static void main(String[] args) {\n new Fenetre(new Model(4));\n }",
"public static void main(String[] args) throws Exception {\n\t\tfinal StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n Person person = new Person();\n person.setId(42);\n person.setName(\"Felix\");\n person.setEmail(\"[email protected]\");\n\n\n Properties properties = new Properties();\n properties.setProperty(\"bootstrap.servers\", kafkaPort);\n properties.setProperty(\"group.id\", topicId);\n //properties.setProperty(\"zookeeper.connect\", zkPort);\n properties.setProperty(\"batch.size\", \"0\");\n\n TypeInformation<Person> typeInfo = TypeExtractor.getForClass(Person.class);\n DataStream<Person> stream = env.fromCollection(Arrays.asList(person), typeInfo);\n stream.addSink(new FlinkKafkaProducer<Person>(topicId, ser, properties));\n\n DataStreamSource<Person> messageStream = env\n .addSource(new FlinkKafkaConsumer<Person>(topicId, deser, properties));\n messageStream.print();\n\n\n\n\t\t// execute program\n\t\tenv.execute(\"Flink Streaming Java API Skeleton\");\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tfinal StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\t\t//TODO make this configurable get the class information from a config file\n\t\tIFlinkDataPipeline<String, String> pipeline = new FlinkDataPipeline();\n\t\tString jobName = pipeline.getJobName();\n\t\t\n\t\tTuple3<String, String, String> sourceTuple = pipeline.getSourceKafka();\n\t\tTuple2<String, String> sinkTuple = pipeline.getSinkKafka();\n\n\t\t//simple predefined DAG source -> filter -> map -> sink \n\t\tFlinkKafkaConsumer<String> source = getKafkaSource(sourceTuple);\n\t\tFlinkKafkaProducer<String> sink = getKafkaSink(sinkTuple);\n\t\tenv\n\t\t\t.addSource(source)\n\t\t\t.filter(pipeline.getFilterFunction())\n\t\t\t.map(pipeline.getMapperFunction())\n\t\t\t.addSink(sink);\n\t\t//run the job\n\t\tenv.execute(jobName);\n\t}",
"public static void main(String[] args) {\nSystem.out.println(isLive(args[0]));\n}",
"public static void main(String[] args) {\r\n junit.textui.TestRunner.run(suite());\r\n }",
"public void main(String args[]) throws IOException{\n\t\tMetricData metric = new MetricData();\n\t\tMethodData method = new MethodData();\n\t\tFanOutTest fot = new FanOutTest();\n\t\t\n\t\tUtility.Test();\n\t\t\n\t\tfot.start();\n\t\t\n\t\tFileData fileData = new FileData();\n\t\t\n\t\tmetric.getName();\n\t\tmetric.getValue();\n\t\t\n\t}",
"public static void main ( String[] args ) throws IOException {\n\t\trunSimpleIndicators(false);\t\t\r\n\t\trunMultiLineIndicators(true);\t \r\n\t\t\r\n\t\trunMultiSim(false) ;\r\n\t\t\r\n\t\t\r\n\t\trunMultiLayerIndicators(false);\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tTypecasting t=new Typecasting();\n\t\tt.typeCasting();\n\n\t}",
"public static void main(java.lang.String[] args) {\n junit.textui.TestRunner.run(suite());\n }",
"public static void main(String[] args) {\n new TSL2550Test();\n }",
"public static void main(String... args) {\n\n System.out.println(\"File path: \" + args[0]);\n\n try {\n ParsedData data = ArffParser.arffFileReader(new File(args[0]));\n DataSet trainingDataSet = data.getDataset();\n ArrayList<Attribute> attributes = data.getAttributes();\n System.out.println(\"\\n Arff-File successfully loaded! \\n\");\n\n // Select attribute for class attribute\n int numClassAttribute = Integer.parseInt(args[1]);\n Attribute classAttribute = attributes.get(numClassAttribute);\n\n multipleRun(trainingDataSet.transformToWeightedDataSet(),\n attributes,\n classAttribute,\n Integer.parseInt(args[2]),\n Integer.parseInt(args[3]),\n Integer.parseInt(args[4]));\n\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\r\n\r\n // use event time for the application\r\n env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime);\r\n\r\n // switch messages disable filtering of sensor readings for a specific amount of time\r\n DataStream<Tuple2<String, Long>> filterSwitches = env\r\n .fromElements(\r\n // forward readings of sensor_2 for 10 seconds\r\n Tuple2.of(\"sensor_2\", 10_000L),\r\n // forward readings of sensor_7 for 1 minute\r\n Tuple2.of(\"sensor_7\", 60_000L));\r\n\r\n // ingest sensor stream\r\n DataStream<SensorReading> readings = env\r\n // SensorSource generates random temperature readings\r\n .addSource(new SensorSource());\r\n\r\n DataStream<SensorReading> forwardedReadings = readings\r\n // connect readings and switches\r\n .connect(filterSwitches)\r\n // key by sensor ids\r\n .keyBy(r -> r.id, s -> s.f0)\r\n // apply filtering CoProcessFunction\r\n .process(new ReadingFilter());\r\n\r\n forwardedReadings.print();\r\n\r\n env.execute(\"Filter sensor readings\");\r\n }",
"public static void main(String[] args) {\n\n experiment();\n }",
"public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }",
"public static void main(String[] args) throws Exception {\n String fileName = \"src/tipper_arbitragem.fcl\";\r\n FIS fis = FIS.load(fileName,true);\r\n\r\n // Error while loading?\r\n if( fis == null ) { \r\n System.err.println(\"Can't load file: '\" + fileName + \"'\");\r\n return;\r\n }\r\n\r\n // Show \r\n JFuzzyChart.get().chart(fis);\r\n\r\n // Set inputs\r\n fis.setVariable(\"valor_mercado\", -0.5);\r\n fis.setVariable(\"valor_exchange\", -1);\r\n\r\n // Evaluate\r\n fis.evaluate();\r\n\r\n // Show output variable's chart\r\n //fis.getVariable(\"decisao\").getLatestDefuzzifiedValue();\r\n Variable tip = fis.getVariable(\"decisao\"); \r\n\r\n JFuzzyChart.get().chart(tip, tip.getDefuzzifier(), true);\r\n\r\n // Print ruleSet\r\n System.out.println(fis);\r\n }",
"public static void main(String args[]) {\n\t\t JUnitCore junit = new JUnitCore();\n\t\t junit.addListener(new TextListener(System.out));\n\t\t Result result = junit.run(registration.class); // Replace \"SampleTest\" with the name of your class\n\t\t if (result.getFailureCount() > 0) {\n\t\t System.out.println(\"Test failed.\");\n\t\t System.exit(1);\n\t\t } else {\n\t\t System.out.println(\"Session Test finished successfully.\");\n\t\t System.exit(0);\n\t\t }\n\t}",
"public static void main(String[] args) {\n\t\tLexicalizedParser lp = LexicalizedParser\n\t\t\t\t.loadModel(\"edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz\");\n\t\tString fileName = \"../../TrainingSet/Test/test_rather.txt\";\n\t\tif (fileName != \"\") {\n\t\t\tdemoDP(lp, fileName);\n\t\t} else {\n\t\t\tdemoAPI(lp);\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n int activeThreshold = 300;\n //Activity.selectActive(\"st\", 6, activeThreshold);\n //Activity.selectActive(\"ri\", 6, activeThreshold);\n //Activity.selectActive(\"dw\", 9, activeThreshold);\n\n //Interaction.analysis(\"st\", 6);\n //Interaction.analysis(\"ri\", 6);\n\n //BehaviourIndicators.analysis(\"st\", 6);\n //BehaviourIndicators.analysis(\"ri\", 6);\n //BehaviourIndicators.analysis(\"dw\", 9);\n\n Engagement.analysis(\"st\",6);\n Engagement.analysis(\"ri\",6);\n //todo the data files for DW have to be adjusted to the ones of the other two to be able to run it\n //Engagement.analysis(\"dw\",9);\n\n //Motivation.analysis(\"ri\", 6);\n //Motivation.analysis(\"st\", 6);\n }",
"public static void main(String[] args) {\n \n\t\tAudi audi = new Audi();\n\t\t\n\t\taudi.go();\n\t\t\n\t\tTrain train = new Train();\n\t\t\n\t\ttrain.go();\n\t\t\n\t\ttrain.setGoByAlgo(new GoByCar());\n\t\t\n\t\ttrain.go();\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) {\n\t\tWeightedInstances tempWeightedInstances = null;\n\t\tString tempFilename = \"src/data/iris.arff\";\n\t\ttry {\n\t\t\tFileReader tempFileReader = new FileReader(tempFilename);\n\t\t\ttempWeightedInstances = new WeightedInstances(tempFileReader);\n\t\t\ttempFileReader.close();\n\t\t} catch (Exception exception1) {\n\t\t\tSystem.out.println(\"Cannot read the file: \" + tempFilename + \"\\r\\n\" + exception1);\n\t\t\tSystem.exit(0);\n\t\t} // Of try\n\n\t\tSystem.out.println(tempWeightedInstances.toString());\n\n\t\ttempWeightedInstances.adjustWeightsTest();\n\t}",
"public static void main(String[] args) {\r\n if (args.length == 0) Stacker.main(args);\r\n Evaluator evaluator = new Evaluator();\r\n evaluator.switchTest = true;\r\n for (Op op : Op.values()) {\r\n Node node = new Node(op, null, null);\r\n evaluator.parse(node);\r\n }\r\n evaluator.switchTest = false;\r\n Test.run(evaluator, args);\r\n }",
"public static void main(String[] args) {\n startBeamSelection();\n }",
"public static void main(String[] args) {\n\t\tVechicle vechicle = new DefaultTester().new Car();\n\t\tvechicle.println();\n\t\tVechicle.blowHorn();\n\t}",
"public void testMain(Object[] args) {\n\t\t\n\t\tlabel_motorLegalAssistanceIfYo().waitForExistence();\n\n\t\tif (Common_Variables.MLA.equals(\"Y\")) {\n\t\t\tcheckBox_selectedOptionsmotorL(ANY, READY).click();\n\t\t\t\n\t\t}\n\t\t\n\t\tbutton_next(ANY, READY).click();\n\n\t}",
"public static void main(String[] args) {\n\ttest(tests);\n }",
"public static void main(String[] args) {\n\t\tFighter f = new Fighter();\r\n\t\t\r\n\t\tif(f instanceof Unit)\r\n\t\t\tSystem.out.println(\"f는 Unit클래스의 자손입니다.\");\r\n\t\tif(f instanceof Fightable)\r\n\t\t\tSystem.out.println(\"f는 Fightable 인터페이스를 구현했습니다.\");\r\n\t\tif(f instanceof Movable)\r\n\t\t\tSystem.out.println(\"f는 Movable 인터페이스를 구현했습니다..\");\r\n\t\tif(f instanceof Attackable)\r\n\t\t\tSystem.out.println(\"f는 Attackable인터페이스를 구현했습니다.\");\r\n\t\tif(f instanceof Object)\r\n\t\t\tSystem.out.println(\"f는 Obiect클래스의 자손입니다.\");\r\n\r\n\t}",
"@Test\n public void testRun() {\n System.out.println(\"run\");\n FluorescenceImporter importer = null;\n try {\n FluorescenceFixture tf = new FluorescenceFixture();\n importer = new FluorescenceImporter(tf.testData());\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Importing dataset\");\n importer.setProgressHandle(ph);\n \n importer.run();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n \n //FluorescenceDataset dataset = importer.getDataset();\n Dataset<? extends Instance> plate = importer.getDataset();\n System.out.println(\"inst A1 \"+ plate.instance(0).toString());\n System.out.println(\"plate \"+plate.toString());\n Dataset<Instance> output = new SampleDataset<Instance>();\n output.setParent((Dataset<Instance>) plate);\n ProgressHandle ph = ProgressHandleFactory.createHandle(\"Analyzing dataset\");\n // AnalyzeRunner instance = new AnalyzeRunner((Timeseries<ContinuousInstance>) plate, output, ph);\n // instance.run();\n \n }",
"public static void main(String[] args) {\n\t\tTestGraph GUIT = new TestGraph();\n\t\tGUIT.run();\n\t}",
"@Test\n @Category(SlowTest.class)\n public void AppSmokeTest(){\n App.main(new String[]{TEST_PATH + \"input.dot\",\"1\"});\n }",
"public static void main(String[] args) throws Exception {\n ParameterTool params = ParameterTool.fromPropertiesFile(args[0]);\n\n // create streaming environment\n final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();\n\n // enable event time processing\n env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);\n env.getConfig().setAutoWatermarkInterval(1000L);\n\n // enable fault-tolerance, 60s checkpointing\n env.enableCheckpointing(60000);\n\n // enable restarts\n env.setRestartStrategy(RestartStrategies.fixedDelayRestart(50, 500L));\n env.setStateBackend(new RocksDBStateBackend(\"file:///tmp/rocks_state_store\"));\n\n Properties kParams = params.getProperties();\n kParams.setProperty(\"group.id\", UUID.randomUUID().toString());\n //kParams.setProperty(\"group.id\", \"FLINK_KAFKA_GROUP\");\n DataStream<ObjectNode> inputStream = env.addSource(new FlinkKafkaConsumer010<>(params.getRequired(\"topic\"), new JSONDeserializationSchema(), kParams)).name(\"Kafka 0.10 Source\");\n\n DataStream<PlaneModel> planes = inputStream\n .assignTimestampsAndWatermarks(new PlaneTimestampExtractor())\n .keyBy(jsonNode -> jsonNode.get(\"icao\").textValue())\n .map(new PlaneMapper())\n .name(\"Timestamp -> KeyBy ICAO -> Map\");\n\n DataStream<Tuple2<Integer,PlaneModel>> keyedPlanes = planes\n .keyBy(\"icao\")\n .window(TumblingEventTimeWindows.of(Time.seconds(5)))\n .apply(new PlaneWindow())\n .name(\"Tumbling Window\");\n\n // Print plane stream to stdout\n keyedPlanes.print();\n\n DataStream<Tuple2<Integer,PlaneModel>> military_planes = keyedPlanes.filter(new MilitaryPlaneFilter())\n .name(\"Military Plane Filter\");\n military_planes.print();\n\n // At this point, build a stream that stores all the active (seen in the last\n // 60 seconds) ICAOs in our current airspace, and store in a single well known\n // queryable key. Emit every 5 seconds. This stream is only here to populate \n // the managed state, but if you use the print sink you'll get the array of \n // ICAOs as a string for debugging.\n DataStream<String> airspace = keyedPlanes.windowAll(SlidingEventTimeWindows.of(Time.seconds(60), Time.seconds(5)))\n .apply(new AirspaceWindow())\n .keyBy(0) // this will always be the 'AIRPLANE' key\n .map(new AirspaceMapper()); // mapper to store state\n\n airspace.print();\n\n String app_name = String.format(\"Streaming Planes <- Kafka Topic: %s\", params.getRequired(\"topic\"));\n env.execute(app_name);\n\n }",
"public static void main(String[] args) {\n PropertyConfigurator.configure(\"apache-jena-3.8.0/jena-log4j.properties\");\n\n if (args[0].equals(\"parse\")) {\n benchmark_parse(args);\n } else if (args[0].equals(\"query\")) {\n benchmark_query(args);\n } else if (args[0].equals(\"test\")) {\n benchmark_test(args);\n } else {\n System.err.println(\"Unrecognized benchmark name\");\n }\n }",
"public static void main(String args[]) {\n\tif (args.length == 0) new GUI();\n\telse { \n\t PredPrey pp = new PredPrey();\n\t double[] params = pp.getSettings();\n\t String inputFile = args[0];\n\t pp.run(params, inputFile);\n\t}\n }",
"public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }",
"public static void main(String[] args) throws Exception {\n\t\tAttributedReader reader = new AttributedReader();\n\t\tVariabilityModel afm = reader.parseFile(\"input/models/random/100-5-0-0.afm\");\n\t\tChocoReasoner reasoner = new ChocoReasoner();\n\t\tafm.transformTo(reasoner);\n\t\tChocoValidQuestion att= new ChocoValidQuestion();\n\t\treasoner.ask(att);\n\t\tSystem.out.println(att.isValid());\n\t}",
"public static void main(String[] args) {\n\n\t\t/**************************************/\n\t\tboolean startPlanetensystem = true;\n\t\tboolean startFreierFall = true;\n\n\t\tboolean testExpliziteVerfahren = true;\n\t\tboolean testKonvergenzordnung = true;\n\t\t/**************************************/\n\n\t\tif (startPlanetensystem) {\n\t\t\tnew PlanetenGUI().setVisible(true);\n\t\t}\n\n\t\tif (startFreierFall) {\n\t\t\tnew FastTransportGui().setVisible(true);\n\t\t}\n\n\t\tif (testExpliziteVerfahren)\n\t\t\ttestExpliziteVerfahren();\n\t\t\n\t\tif(testKonvergenzordnung)\n\t\t{\n\t\t\ttestKonvergenzordnung();\n\t\t}\n\t}",
"public static void main(String[] args) {\n MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();\n ApplicationContext context = new ClassPathXmlApplicationContext(\"appContext.xml\");\n\n\n try {\n ObjectName objectName = new ObjectName(\"com.thoughtworks.recordplayback:name=RecordPlayBackRunMode\");\n\n MBeanInfo runModeInfo = mbs.getMBeanInfo(objectName);\n\n for (MBeanOperationInfo operationInfo : runModeInfo.getOperations()) {\n System.out.println(operationInfo.getName());\n }\n\n Thread.sleep(60000 * 3);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"public static void main(String[] av) {\n \tnew TTTDemo();\n }",
"public static void main(String[] args) {\n\t\t RecognizeManagerTest rm = new RecognizeManagerTest();\r\n//\t\tString python = \"python C:\\\\Users\\\\Gal\\\\Desktop\\\\pydub_splitter.py \";\r\n//\t\tString wavFile = \"C:\\\\Users\\\\Gal\\\\Desktop\\\\test1.wav \";\r\n//\t\tString folder = \"C:\\\\Users\\\\Gal\\\\Desktop\\\\test\\\\\";\r\n//\t\ttry {\r\n//\t\t\tProcess p = Runtime.getRuntime().exec(python+wavFile+folder);\r\n//\t\t} catch (IOException e) {\r\n//\t\t\t// TODO Auto-generated catch block\r\n//\t\t\te.printStackTrace();\r\n//\t\t}\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\n\t\tFlower myFirstFlower = new Flower(0, 400, 200, 10, 50, 50, 6, true, \"Flower.java\");\n\t\tFlower mySecondFlower = new Flower(0, 400, 100, 10, 25, 25, 15, true, \"BlahblahblahFlower.java\");\n\t\tmyFirstFlower.setnumberOfRoots(6);\n\t\tmyFirstFlower.setScaleFactor(0.5f);\n\t\t\n\t\tArrayList<Flower> toPass = new ArrayList<Flower>();\n\t\ttoPass.add(myFirstFlower);\n\t\tfor (int i = 0; i< 10; i++)\n\t\t{\n\t\t\ttoPass.add(myFirstFlower);\n\t\t\ttoPass.add(mySecondFlower);\n\t\t}\n\t\t\n\t\t//Changes the color of the Flower\n\t\ttoPass.get(4).setPrimaryColor(Palette.CARROT);\n\t\t\n\t\tArrayList<FlowerRelation> relations = new ArrayList<FlowerRelation>();\n\t\trelations.add(new FlowerRelation(0, 1, 5));\n\t\trelations.add(new FlowerRelation(0, 2, 4));\n\t\trelations.add(new FlowerRelation(3, 2, 1));\n\t\t\n\t\tFlowerVisualizer myFV = new FlowerVisualizerImpl();\n\t\tmyFV.drawFlowers(toPass, 640, 480, relations);\n\t}",
"public static void main(String [] args) throws IOException {\n if (args.length != 2) {\n System.out.println(\"Not enough arguments\");\n return;\n }\n\n // Load the System Under Learning (SUL)\n SUL<String,String> sul = new ProcessSUL(args[1]);\n\n\n // the input alphabet\n Collection<String> inputAlphabet = Arrays.asList(args[0].split(\",\"));\n\n // runControlledExperiment for detailed statistics, runSimpleExperiment for just the result\n //BasicLearner.runControlledExperiment(sul, BasicLearner.LearningMethod.TTT, BasicLearner.TestingMethod.RandomWalk, inputAlphabet);\n BasicLearner.runControlledExperiment(sul, BasicLearner.LearningMethod.TTT, BasicLearner.TestingMethod.WpMethod, inputAlphabet);\n }",
"public static void main(String[] args) throws Exception {\n // TODO Auto-generated method stub\n if (args.length != 3) {\n System.err.println(\"Enter valid number of arguments <Inputdirectory> <Outputlocation>\");\n System.exit(0);\n }\n ToolRunner.run(new Configuration(), new MovieLensTopMovies(), args);\n }",
"public static void main(String[] args) {\n AubAbstractTest aubAbstractTest = new AubAbstractTest(1);\n System.out.println(aubAbstractTest);\n }",
"public static void main(String[] args)\r\n {\r\n \tTestWav gui = new TestWav();\r\n }",
"public static void main(String[] args) {\n Kendaraan.data();\n }",
"public static void main(String[] args) {\n\t\tnew FlowRegister().run();\n\t}",
"public static void main(String args[])\n\t{\n\t\tdrukaf();\n\t}",
"public static void main(String[] args) {\n\t\tInstrument instrument =new Instrument();\n\t\tinstrument.play();\n\t}",
"public static void main(String[] args) {\n \n convertDiagramTest();\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize(\"GUIEditors.props\");\n discretize0.useBinNumbersTipText();\n // Undeclared exception!\n try { \n discretize0.output();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // No output instance format defined\n //\n verifyException(\"weka.filters.Filter\", e);\n }\n }",
"public static void main(String[] args) {\r\n\t\tHero hero = new Hero(\"Nighthawk\");\r\n\t\thero.show();\r\n\t\thero.fight();\r\n\t}",
"public static void main(String[] args) {\n File metricsFile = null;\n if (args.length != 0) {\n metricsFile = new File(args[0]);\n }\n \n final MetricsFileParser metricsFileParser = \n (metricsFile == null) ? null : new MetricsFileParser(metricsFile);\n \n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n @Override\n public void run() {\n try {\n// PlasticLookAndFeel.setMyCurrentTheme(new SkyBluer());\n// javax.swing.UIManager.setLookAndFeel(\"com.jgoodies.looks.plastic.Plastic3DLookAndFeel\");\n\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n }\n MetrilyzerMainFrame mf = new MetrilyzerMainFrame(metricsFileParser);\n mf.setVisible( true );\n \n } catch (Exception e) {\n log.error(\"main\", e);\n }\n }});\n } catch (Throwable t) {\n log.error(\"This error is lame.\", t);\n }\n }",
"public static void main(String[] args) {\n\t\ttestStreamMapReduce();\r\n\t\t//testMethodReference();\r\n\t}",
"public static void main(String[] args){\n\t\tSystem.setProperty(\"smartqa.debug\", \"false\");\n\t\ttry{\n\t\t\tList<Scenario> scenarios = parseScenario(args);\n\t\t\tfor(Scenario scenario : scenarios)\n\t\t\t\trunScenario(scenario);\n\t\t\t\n\t\t\tfor(Scenario scenario : scenarios)\n\t\t\t\tSystem.out.println(scenario);\n\t\t}catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t\t\tthrow new SmartQAException(ex.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\ttestJacksonString();\r\n//\t\tgetFlightSearchData();\r\n\t}",
"public static void main(String args[]) {\n\t\tSystem.out.println(\"\\r\\ngetGameSituationTest()\");\n\t\tgetGameSituationTest();\n\n\t\tSystem.out.println(\"\\r\\nstateCheckerboardConvertionTest()\");\n\t\tstateCheckerboardConvertionTest();\n\n\t\tSystem.out.println(\"\\r\\ngetValidActionsTest()\");\n\t\tgetValidActionsTest();\n\t}",
"public static void main(String[] args) {\n\t\tUtility utility = new Utility();\n\t\t\n\t\t// build trainingset\n\t\tSystem.out.println(\"Training System....\");\n\t\tArrayList<Student> trainingSet = utility.readStudentfile(\"porto_math_train.csv\");\n\t\tArrayList<Variable> variableSets = Student.getAllVar();\n\n\t\tTree tree = new Tree();\n\t\tNode decisionTree = tree.buildTree2(trainingSet, variableSets);\n\n\t\tutility .printNode(decisionTree);\n\n\t\t// testing DT\n\t\tSystem.out.println(\"\\tTesting System (trainingSet)....\");\n\t\tutility.testTree2(trainingSet, decisionTree);\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\tTesting System (testSet)....\");\n\t\tArrayList<Student> testSet = utility.readStudentfile(\"porto_math_test.csv\");\n\t\tutility.testTree2(testSet, decisionTree);\t\t\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tDOMController domController = new DOMController(Constants.VALID_XML_FILE);\n\t\tdomController.parse(false);\n\t\tFlowers flowers = domController.getFlowers();\n\n\t\tSystem.out.println(\"====================================\");\n\t\tSystem.out.println(flowers);\n\t\tSystem.out.println(\"====================================\");\n\n\t\tSystem.out.println(\"====================================\");\n\t\tSorter.sortFlowersByGrovingTipsTemperature(flowers);\n\t\tSystem.out.println(flowers);\n\t\tSystem.out.println(\"====================================\");\n\n\t\tSystem.out.println(\"====================================\");\n\t\tSorter.sortFlowersByMultipling(flowers);\n\t\tSystem.out.println(flowers);\n\t}",
"public static void main(String[] args) {\n \tTwitterStreamingProcessor processor = new TwitterStreamingProcessor();\n \ttry {\n \t\tprocessor.setFilterQuery(TweetConstants.ELECTION_STREAM);\n\t\t\tprocessor.call();\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(ex.getMessage());\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tHelloAiming app = new HelloAiming();\n app.setConfigShowMode(ConfigShowMode.AlwaysShow);\n\t\tapp.start();\n\n\t}",
"public static void main(String[] args) {\n ReadFile trainingFile = new ReadFile(\"input/treino.txt\");\n ReadFile testFile = new ReadFile(\"input/teste.txt\");\n\n // Guarda as series temporais do arquivo de treino em uma lista\n ArrayList<TimeSerie> training = new ArrayList<>();\n while(trainingFile.hasNextLine()) {\n training.add(trainingFile.nextSerie());\n }\n\n // Processa cada linha do arquivo de teste e contabiliza um acerto ou erro\n while(testFile.hasNextLine()) {\n\n }\n }",
"public static void main(String[] args) throws Exception {\n\t\tVerbAnalyser arffGenerator = new VerbAnalyser();\n\t\t// arffGenerator.generateArffSim();\n\n\t\tArrayList<String> verbsList = arffGenerator\n\t\t\t\t.generateArffWithFeatures(ALL);\n\t\tarffGenerator.analyzerArff(verbsList);\n\t}",
"public static void main(String[] args) {\n //init\n Client.getLayerIntersectDao().getConfig().getIntersectionFile(null);\n\n //tests\n TestLayers();\n// TestFields();\n// TestObjects();\n// TestDistributions();\n// TestDistributionData();\n// TestDistributionShapes();\n// TestObjNames();\n }",
"public static void main(String[] args) {\n TestMultiRenderTarget app = new TestMultiRenderTarget();\n app.start();\n }"
] | [
"0.6124842",
"0.60806465",
"0.6071375",
"0.6008696",
"0.5967677",
"0.59339887",
"0.5928286",
"0.59251624",
"0.5885732",
"0.58736837",
"0.58396864",
"0.5780947",
"0.57351613",
"0.5727369",
"0.57178",
"0.57054245",
"0.5676241",
"0.5673",
"0.56398326",
"0.5635634",
"0.561891",
"0.56122816",
"0.5600991",
"0.55977106",
"0.55962163",
"0.55933857",
"0.5580464",
"0.5580457",
"0.55760753",
"0.5573746",
"0.5573405",
"0.55719453",
"0.5568524",
"0.55508",
"0.5540748",
"0.55375844",
"0.5537251",
"0.5533033",
"0.55303305",
"0.5522285",
"0.55095804",
"0.55046123",
"0.55001396",
"0.54995126",
"0.549632",
"0.548363",
"0.54689217",
"0.546719",
"0.545929",
"0.5456666",
"0.5449609",
"0.54470515",
"0.54469067",
"0.5445168",
"0.5441193",
"0.5438066",
"0.543626",
"0.5436123",
"0.5435947",
"0.54287857",
"0.54236114",
"0.5421206",
"0.54198164",
"0.54090345",
"0.5404944",
"0.54035205",
"0.5402392",
"0.54023695",
"0.53943115",
"0.539257",
"0.5387762",
"0.5379773",
"0.53778666",
"0.5374748",
"0.5373458",
"0.5366167",
"0.5365208",
"0.5354122",
"0.53538626",
"0.5349093",
"0.5346107",
"0.5331937",
"0.5326344",
"0.5324271",
"0.53213775",
"0.53153986",
"0.53078634",
"0.5306863",
"0.5306454",
"0.5305185",
"0.53017485",
"0.5300635",
"0.52980447",
"0.52978444",
"0.52966976",
"0.52951294",
"0.5293988",
"0.5292312",
"0.5289778",
"0.5280335"
] | 0.7439612 | 0 |
Interface etendue par les interfaces locale et remote du manager | public interface RappelManager
extends GenericManager<Rappel, Long>
{
public final static String SERVICE_NAME = "RappelManager";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface LocalizationService {\n\n /**\n *\n * @param locale - the languge that we like to present\n * @return\n */\n Map<String, String> getAllLocalizationStrings(Locale locale);\n\n /**\n * @param prefix - show all strings which start with thr prefix\n * @param locale - the languge that we like to present\n * @return\n */\n// Map<String, String> getAllLocalizationStringsByPrefix(String prefix, Locale locale);\n\n\n /**\n * @param key - the specific key\n * @param locale - the language that we like to present\n * @return\n */\n String getLocalizationStringByKey(String key, Locale locale);\n\n /**\n * Get the default system locale\n * @return\n */\n Locale getDefaultLocale();\n\n /**\n * Get evidence name\n * @param evidence\n * @return\n */\n String getIndicatorName(Evidence evidence);\n\n\n String getAlertName(Alert alert);\n\n Map<String,Map<String, String>> getMessagesToAllLanguages();\n}",
"public interface Locale {\n public String getStringById(int stringId);\n}",
"@Local\r\npublic interface MatiereDltManagerLocal\r\n extends MatiereDltManager\r\n{\r\n\r\n\r\n}",
"@Remote\r\npublic interface AdministrarGestionarLocalesCentroComercialBORemote {\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial de la\r\n * base de datos\r\n *\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();\r\n\r\n /**\r\n * Metodo encargado de obtener los registros de LocalCentroComercial por\r\n * medio de parametros de busqueda\r\n *\r\n * @param filtros Parametros de busqueda\r\n * @return Lista de LocalCentroComercial\r\n */\r\n public List<LocalCentroComercial> consultarLocalesCentroComercialPorParametro(Map<String, String> filtros);\r\n\r\n /**\r\n * Metodo encargado de obtener un LocalCentroComercial por medio de su id\r\n *\r\n * @param idLocalCentroComercial Id del local\r\n * @return LocalCentroComercial identificado por el id dado\r\n */\r\n public LocalCentroComercial obtenerLocalCentroComercialPorID(BigInteger idLocalCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de actualizar la informacion de un LocalCentroComercial\r\n *\r\n * @param localCentroComercial LocalCentroComercial a editar\r\n */\r\n public void actualizarInformacionLocalCentroComercial(LocalCentroComercial localCentroComercial);\r\n\r\n /**\r\n * Metodo encargado de registrar un LocalCentroComercial en la base de datos\r\n *\r\n * @param localCentroComercialNuevo LocalCentroComercial a registrar\r\n */\r\n public void almacenarNuevoLocalCentroComercialEnSistema(LocalCentroComercial localCentroComercialNuevo);\r\n\r\n /**\r\n * Metodo encargado de validar si el numero de local ya esta registradp\r\n *\r\n * @param numeroLocal Numero local\r\n * @return true -> no existe / false -> ya existe\r\n */\r\n public Boolean obtenerLocalPorNumeroLocal(String numeroLocal);\r\n}",
"public interface I18NService {\n Pagination<I18N> find(I18NQuery query, int pageNo, int pageSize);\n\n I18N get(String id);\n\n String save(I18NSave request);\n}",
"public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}",
"public DefaultLocalesManager() {\r\n\t}",
"@Local\r\npublic interface PrepaSalaireManagerLocal\r\n extends PrepaSalaireManager\r\n{\r\n\r\n\r\n}",
"public interface ILocalizationListener {\r\n\t/**\r\n\t * Does something when localization changes\r\n\t */\r\n\tvoid localizationChanged();\r\n}",
"public interface ResourceManager extends RemoteService{\n\n /**\n * This method returns a list of the resources.\n *\n * @return This list of resources.\n * @throws ResourcesException\n */\n public List<ResourceBase> listTypes() throws ResourceException;\n}",
"public interface LanguageInterface {\n public void setLanguage();\n}",
"public interface Message {\n public OptionsImpl getConfirm();\n\n public List<SystemImpl> getAddressees();\n\n}",
"@Remote\npublic interface PasseUneCommande {\n\n public Commande passeUneCommande(Double prixHT,String rendezvous,String cookies);\n\n public List<String> choisirCookies();\n\n public List<Commande> getCommandes();\n\n\n}",
"private void init() {\n\t\t\n\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\tFile localeDirectory = new File(propertiesManager.getProperty(\"locale.directory\", LOCALE_DIRECTORY));\n\n\t\tlocales = new ArrayList<Locale>();\n\n\t\ttry {\n\t\t\t\n\t\t\tClassUtils.addClassPathFile(localeDirectory);\n\t\t\t\n\t\t\t// Находим все доступные локали\n\t\t\tlocales = findAvailableLocales(localeDirectory);\n\n\t\t} catch(Exception ignore) {}\n\n\t\tfallbackLocale = Locale.ENGLISH;\n\t\tcontrol = new Control();\n\n\t\tif(!locales.contains(Locale.ENGLISH)) {\n\t\t\tlocales.add(0, fallbackLocale);\n\t\t}\n\n\t\tdefaultLocale = locales.get(locales.indexOf(Locale.ENGLISH));\n\t\t\n\t\tString language = propertiesManager.getProperty(\"locale.language\", \"\");\n\t\tString country = propertiesManager.getProperty(\"locale.country\", \"\");\n\t\tString variant = propertiesManager.getProperty(\"locale.variant\", \"\");\n\t\t\n\t\tLocale locale = new Locale(language, country, variant);\n\t\t\n\t\tif(locales.contains(locale)) {\n\t\t\tlocale = locales.get(locales.indexOf(locale));\n\t\t} else {\n\t\t\tlocale = defaultLocale;\n\t\t}\n\n\t\tsetLocale(locale);\n\t\t\n\t\tif(FontEditor.DEBUG) {\n\t\t\t\n\t\t\tfor(Locale l : locales) {\n\t\t\t\tSystem.out.println(\"locale found -> \" + l.getDisplayLanguage(Locale.ENGLISH));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Total locale(s) found: \" + locales.size());\n\t\t\tSystem.out.println();\n\t\t}\n//System.out.println(\">>> \" + getValue(\"shitd\"));\n\t}",
"public List<LocalCentroComercial> consultarLocalesCentroComercialRegistrados();",
"public interface LocaleContext {\n Locale getLocale();\n}",
"@Local\npublic interface CobranzaServiceLocal {\n\n ResumenInicialVO getCarteraPorTramos(List<Object[]> resultList);\n\n Response obtenerDocumentosSAP(Request request);\n\n Response getCargosSAP(Request request);\n}",
"public interface InterfaceServeurClient extends Remote {\n\n\tpublic void setServeur(InterfaceServeurClient serveur) throws RemoteException;\n\tpublic void setListeClient(ArrayList<InterfaceServeurClient> client) throws RemoteException;\n\tpublic Partie getPartie() throws RemoteException;\n\tpublic void ajouterClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic boolean retirerClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic InterfaceServeurClient getServeur() throws RemoteException;\n\tpublic String getNamespace() throws RemoteException;\n\tpublic String getNomJoueur() throws RemoteException;\n\tpublic int getIdObjetPartie() throws RemoteException;\n\tpublic void setIdObjetPartie(int idObjetPartie) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastie() throws RemoteException;\n\tpublic void setListeDynastie(ArrayList<Dynastie> liste) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastieDispo() throws RemoteException;\n\tpublic void setJoueur(Joueur j) throws RemoteException;\n\n\tpublic boolean deconnecter() throws RemoteException;\n\n\tpublic void notifierChangement(ArrayList<Object> args) throws RemoteException;\n\tpublic void addListener(ChangeListener listener) throws RemoteException;\n\tpublic void removeListener(ChangeListener listener) throws RemoteException;\n\tpublic void clearListeners() throws RemoteException;\n\tpublic Joueur getJoueur() throws RemoteException;\n\tpublic void setPartieCourante(Partie partie) throws RemoteException;\n\tpublic ArrayList<InterfaceServeurClient> getClients() throws RemoteException;\n\tpublic boolean send(Action action, int idClient) throws RemoteException;\n\tpublic void passerTour() throws RemoteException;\n\n\tpublic void switchJoueurEstPret(InterfaceServeurClient client) throws RemoteException;\n\tpublic void switchJoueurPret() throws RemoteException;\n\tpublic boolean setDynastieOfClient(InterfaceServeurClient client, Dynastie dynastie) throws RemoteException;\n\tpublic void setDynastie(Dynastie d) throws RemoteException;\n\tpublic void libererDynastie(Dynastie d) throws RemoteException;\n\tpublic int getUniqueId() throws RemoteException;\n\n\tpublic void envoyerNouveauConflit(Conflits conflit, int idClient) throws RemoteException;\n\tpublic void envoyerRenforts(ArrayList<TuileCivilisation> renforts, Joueur joueur) throws RemoteException;\n\tpublic boolean piocherCartesManquantes(Joueur j) throws RemoteException;\n\tpublic void finirPartie() throws RemoteException;\n\tpublic void envoyerPointsAttribues(Joueur joueur) throws RemoteException;\n\tpublic ArrayList<Joueur> recupererListeJoueurPartie() throws RemoteException;\n\tpublic void chargerPartie() throws RemoteException;\n}",
"@Remote\r\npublic interface ViewAnniversaireManagerRemote\r\n extends ViewAnniversaireManager\r\n{\r\n\r\n\r\n}",
"private LocaleManager() {\n\t\t\n\t\tinit();\n\t}",
"public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}",
"public interface LocaleProvider {\n\tLocale getLocale();\n}",
"public interface IBemListaInteractor {\n\n void buscarBensPorDepartamento(IBemListaPresenter listener);\n void atualizarListaBens(IBemListaPresenter listener);\n void buscarBemTipo(Context context, IBemListaPresenter listener);\n void buscarDadosQrCode(IBemListaPresenter listener);\n\n}",
"public interface SupportedLocales {\n\n Locale getDefaultLocale();\n\n Collection<Locale> getSupportedLocales();\n\n SupportedLocales withLocale(Locale locale);\n\n SupportedLocales withLocaleParsingPolicy(LocalePolicy localeParsingPolicy);\n\n SupportedLocales withLocaleLookupPolicy(LocalePolicy localeLookupPolicy);\n\n Locale filterForParsing(Locale locale);\n\n Locale filterForLookup(Locale locale);\n\n LocalePolicy getLocaleParsingPolicy();\n\n LocalePolicy getLocaleLookupPolicy();\n}",
"@Local\r\npublic interface ResourceRegistryDAOLocal\r\n extends ResourceRegistryDAO\r\n{\r\n\r\n\r\n}",
"public void setLang() {\n new LanguageManager() {\n @Override\n public void engLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_eng);\n mSaleTitle = getString(R.string.converter_sale_eng);\n mPurchaseTitle = getString(R.string.converter_purchase_eng);\n mCountTitle = getString(R.string.converter_count_of_currencies_eng);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_eng));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleEng());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleEng().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_eng);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_eng);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_eng);\n mToastFailure = getString(R.string.converter_toast_failure_eng);\n mTitle = getResources().getString(R.string.drawer_item_converter_eng);\n mMessage = getString(R.string.dialog_template_text_eng);\n mTitleButtonOne = getString(R.string.dialog_template_edit_eng);\n mTitleButtonTwo = getString(R.string.dialog_template_create_eng);\n mToastEdited = getString(R.string.converter_toast_template_edit_eng);\n mToastCreated = getString(R.string.converter_toast_template_create_eng);\n mMessageFinal = getString(R.string.converter_final_dialog_text_eng);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_eng);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_eng);\n }\n\n @Override\n public void ukrLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_ukr);\n mSaleTitle = getString(R.string.converter_sale_ukr);\n mPurchaseTitle = getString(R.string.converter_purchase_ukr);\n mCountTitle = getString(R.string.converter_count_of_currencies_ukr);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_ukr));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleUkr());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleUkr().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_ukr);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_ukr);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_ukr);\n mToastFailure = getString(R.string.converter_toast_failure_ukr);\n mTitle = getResources().getString(R.string.drawer_item_converter_ukr);\n mMessage = getString(R.string.dialog_template_text_ukr);\n mTitleButtonOne = getString(R.string.dialog_template_edit_ukr);\n mTitleButtonTwo = getString(R.string.dialog_template_create_ukr);\n mToastEdited = getString(R.string.converter_toast_template_edit_ukr);\n mToastCreated = getString(R.string.converter_toast_template_create_ukr);\n mMessageFinal = getString(R.string.converter_final_dialog_text_ukr);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_ukr);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_ukr);\n }\n\n @Override\n public void rusLanguage() {\n mFirstCurrencyTitle = getString(R.string.converter_main_currency_rus);\n mSaleTitle = getString(R.string.converter_sale_rus);\n mPurchaseTitle = getString(R.string.converter_purchase_rus);\n mCountTitle = getString(R.string.converter_count_of_currencies_rus);\n eTTitle.setText(getResources().getString(R.string.drawer_item_converter_rus));\n tVChosenCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase());\n tVChosenOrganizationTitle.setText(mMainListForActions.get(mPositionOfCurInList)\n .getOrganizations().get(mPositionOfOrgInList).getTitleRus());\n tVSecondCurrency.setText(mMainListForActions.get(mPositionOfCurInList)\n .getCurrency().getTitleRus().toUpperCase().concat(\" (\").concat(mCurrencyShortForm).concat(\")\"));\n mCurrencyDialogTitle = getString(R.string.drawer_item_currencies_rus);\n mOrganizationDialogTitle = getString(R.string.drawer_item_organizations_rus);\n mActionDialogTitle = getString(R.string.converter_dialog_action_title_rus);\n mToastFailure = getString(R.string.converter_toast_failure_rus);\n mTitle = getResources().getString(R.string.drawer_item_converter_rus);\n mMessage = getString(R.string.dialog_template_text_rus);\n mTitleButtonOne = getString(R.string.dialog_template_edit_rus);\n mTitleButtonTwo = getString(R.string.dialog_template_create_rus);\n mToastEdited = getString(R.string.converter_toast_template_edit_rus);\n mToastCreated = getString(R.string.converter_toast_template_create_rus);\n mMessageFinal = getString(R.string.converter_final_dialog_text_rus);\n mTitleButtonOneFinal = getString(R.string.converter_final_dialog_yes_rus);\n mTitleButtonTwoFinal = getString(R.string.converter_final_dialog_no_rus);\n }\n };\n getDataForActionDialog();\n setData();\n }",
"public interface ResourceManager {\r\n\r\n\t/**\r\n\t * Adds a resource bundle to be managed by the resource manager.\r\n\t * \r\n\t * @param bundleBaseName - the base name of the bundle to add.\r\n\t * @param locales - an array with the locales to consider for the bundle to add \r\n\t */\r\n\tvoid addBundle(String bundleBaseName, Locale... locales);\r\n\t\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t- the key of the requested text in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * in the resource bundle with the given base name, and for the resource manager default locale\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName);\r\n\r\n\t/**\r\n\t * Gets the localized text for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.\r\n\t * \r\n\t * @param bundleKey\t\t - the key of the requested text in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text should be found\r\n\t * @param locale \t\t - the locale of the resource bundle\r\n\t * @return the requested localized text\r\n\t */\r\n\tString getString(String bundleKey, String bundleBaseName, Locale locale);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey - the key of the requested message in the resource bundle\r\n\t * @param args \t\t- an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, Locale locale, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key, and for the resource manager default locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the value should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - an object array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleBaseName, Object... args);\r\n\r\n\t/**\r\n\t * Gets the localized text message for the specified bundle key,\r\n\t * from the resource bundle with the given base name, and for the specified locale.<br/>\r\n\t * If the requested message contains place holders, they will be substituted by the given arguments\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested message in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized text message should be found\r\n\t * @param locale\t\t - the locale of the resource bundle\r\n\t * @param args \t\t\t - the array with substitution parameters for the message\r\n\t * @return the requested localized text message\r\n\t */\r\n\tString getMessage(String bundleKey, String bundleName, Locale locale, Object... args);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey - the key of the requested localized object in the resource bundle\r\n\t * @param locale\t- the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, Locale locale);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for the resource manager default locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName);\r\n\t\r\n\t/**\r\n\t * Gets the localized object for the specified bundle key,\r\n\t * from the resource bundle with the given name, and for specified locale<br/>\r\n\t * This method should be used only if resources are stored in a subclass of {@link ResourceBundle}\r\n\t * \r\n\t * @param bundleKey \t - the key of the requested localized object in the resource bundle\r\n\t * @param bundleBaseName - the name of the bundle where the localized object should be found\r\n\t * @param locale\t \t - the locale of the resource bundle\r\n\t * @return the requested localized object\r\n\t */\r\n\tObject getObject(String bundleKey, String bundleBaseName, Locale locale);\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @return <code>true</code> if the resource manager has to return <code>null</code> for missing\r\n\t * resources, <code>false</code> otherwise\r\n\t */\r\n\tboolean isNullable();\r\n\t\r\n\t/**\r\n\t * Indicates if the resource manager has to return <code>null</code> if a resource is missing\r\n\t * @param nullable - <code>true</code> if the resource manager has to return <code>null</code>\r\n\t * \t\t\t\t\t for missing resource, <code>false</code> otherwise\r\n\t */\r\n\tvoid setNullable(boolean nullable);\r\n\r\n\t/**\r\n\t * Gets a set with the locales managed by the resource manager\r\n\t * @return a set of the locales managed by the resource manager\r\n\t */\r\n\tSet<Locale> getManagedLocales();\r\n\r\n\t/**\r\n\t * Gets the locale currently used as default by the resource manager\r\n\t * @return the locale currently used as default by the resource manager\r\n\t */\r\n\tLocale getDefaultLocale();\r\n}",
"@Remote\r\npublic interface MenuActionManagerRemote\r\n extends MenuActionManager\r\n{\r\n\r\n\r\n}",
"@Local\r\npublic interface CiviliteManagerLocal\r\n extends CiviliteManager\r\n{\r\n\r\n\r\n}",
"public interface GestionAsintomaticosInt extends Remote\n{\n \n public boolean registrarAsintomatico(PacienteCllbckInt objPaciente, int idPaciente) throws RemoteException;\n public boolean enviarIndicador(int id, float ToC) throws RemoteException;\n}",
"@Local\r\npublic interface CalendarRecordManagerLocal\r\n extends CalendarRecordManager\r\n{\r\n\r\n\r\n}",
"public interface MainUiMessages extends Messages {\n String login();\n String password();\n String submit();\n String exit();\n}",
"public void setLocalisation(final Room pLocalisation){this.aLocalisation = pLocalisation;}",
"public Room getLocalisation(){return this.aLocalisation;}",
"public interface LocalHandle {\n\n /**\n * 获取城市名称\n *\n * @param city\n */\n public void getCity(String city);\n}",
"public interface Mensaje_SMS_ACSLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: id\n\t */\n\tpublic java.lang.Long getId();\n\t/**\n\t * Set accessor for persistent attribute: id\n\t */\n\tpublic void setId(java.lang.Long newId);\n\t/**\n\t * Get accessor for persistent attribute: xml\n\t */\n\tpublic java.lang.String getXml();\n\t/**\n\t * Set accessor for persistent attribute: xml\n\t */\n\tpublic void setXml(java.lang.String newXml);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: fecha_envio\n\t */\n\tpublic java.sql.Timestamp getFecha_envio();\n\t/**\n\t * Set accessor for persistent attribute: fecha_envio\n\t */\n\tpublic void setFecha_envio(java.sql.Timestamp newFecha_envio);\n\t/**\n\t * Get accessor for persistent attribute: usuario\n\t */\n\tpublic java.lang.String getUsuario();\n\t/**\n\t * Set accessor for persistent attribute: usuario\n\t */\n\tpublic void setUsuario(java.lang.String newUsuario);\n}",
"public interface IRemoteEnvProxyManager extends IRemoteProxyManager {\n \t/**\n \t * Method to get system's environment variables.\n \t *\n\t * @param Project\n\t * IProject\n \t * @return Mapping of environment variables\n \t * @since 2.1\n\t*/\t\n \tpublic Map<String, String> getEnv(IProject project) throws CoreException;\n /**\n * Method to get system's environment variables.\n * \n * @param Resource URI\n * URI\n * @return Mapping of environment variables\n * @since 2.1\n */\n \tpublic Map<String, String> getEnv(URI uri) throws CoreException;\n }",
"public interface DialogKonstanten {\n\n String HANDBOOK_TITLE = \"Bedienungsanleitung\";\n String HANDBOOK_HEADER = \"Tastenbelegung und Menüpunkte\";\n String HANDBOOK_TEXT = \"Ein Objekt kann über den Menüpunkt \\\"File -> Load File\\\" geladen werden.\\nZu Bewegung des Objektes wird die Maus verwendet.\\nRMB + Maus: Bewegen\\nLMB + Maus: Rotieren\\nEine Verbindung zu einem anderen Programm wir über den Menüpunkt Network aufgebaut. Der Server wird gestartet indem keine IP eingegeben wird und eine Verbindung zu einem Server wird erreicht indem die jeweilige IP-Adresse in das erste Textfeld eigegeben wird.\";\n\n}",
"Set<Locale> getManagedLocales();",
"@Remote\r\npublic interface NoteMailManagerRemote\r\n extends NoteMailManager\r\n{\r\n\r\n\r\n}",
"@Local\r\npublic interface AdministrativeEJBLocal extends AbstractSolaTransactionEJBLocal {\r\n\r\n List<ChangeStatusType> getChangeStatusTypes(String languageCode);\r\n\r\n List<BaUnitType> getBaUnitTypes(String languageCode);\r\n\r\n List<MortgageType> getMortgageTypes(String languageCode);\r\n\r\n List<RrrGroupType> getRRRGroupTypes(String languageCode);\r\n\r\n List<RrrType> getRRRTypes(String languageCode);\r\n\r\n BaUnit getBaUnitById(String id);\r\n\r\n Rrr getRrr(String id);\r\n\r\n BaUnit getBaUnitByCode(String nameFirstPart, String nameLastPart);\r\n\r\n BaUnit saveBaUnit(String serviceId, BaUnit baUnit);\r\n\r\n List<BaUnit> getBaUnitsByTransactionId(String transactionId);\r\n\r\n List<BaUnitRelType> getBaUnitRelTypes(String languageCode);\r\n\r\n BaUnit terminateBaUnit(String baUnitId, String serviceId);\r\n\r\n BaUnit cancelBaUnitTermination(String baUnitId);\r\n\r\n List<RrrLoc> getRrrLocsById(String locId);\r\n\r\n Moth saveMoth(Moth moth);\r\n\r\n Moth getMoth(String id);\r\n\r\n List<Moth> getMoths(String vdcCode, String mothLuj);\r\n\r\n Moth getMoth(String vdcCode, String mothLuj, String mothLujNumber);\r\n\r\n Loc saveLoc(Loc loc);\r\n\r\n Loc getLoc(String id);\r\n\r\n LocWithMoth getLocWithMoth(String id);\r\n\r\n BaUnit saveBaUnit(BaUnit baUnit);\r\n\r\n LocWithMoth getLocByPageNoAndMoth(LocSearchByMothParams searchParams);\r\n\r\n List<LocWithMoth> getLocListByPageNoAndMoth(LocSearchByMothParams searchParams);\r\n\r\n List<Loc> getLocList(String mothId);\r\n\r\n List<RestrictionReason> getRestrictionReasons(String languageCode);\r\n\r\n List<RestrictionReleaseReason> getRestrictionReleaseReasons(String languageCode);\r\n\r\n List<RestrictionOffice> getRestrictionOffices(String languageCode);\r\n\r\n List<OwnerType> getOwnerTypes(String languageCode);\r\n\r\n List<OwnershipType> getOwnershipTypes(String languageCode);\r\n\r\n List<TenancyType> getTenancyTypes(String languageCode);\r\n\r\n void deletePendingBaUnit(String baUnitId);\r\n\r\n List<Moth> searchMoths(MothSearchParams params);\r\n\r\n List<Moth> searchMothsByParts(String searchString);\r\n}",
"void localizationChaneged();",
"public SrvI18n() {\n try { //to fix Android Java\n messages = ResourceBundle.getBundle(\"MessagesBundle\");\n } catch (Exception e) {\n Locale locale = new Locale(\"en\", \"US\");\n messages = ResourceBundle.getBundle(\"MessagesBundle\", locale);\n }\n }",
"@ImplementedBy(DefaultLanguageInSession.class)\npublic interface LanguageInSession extends ResourceStoringOperations<Locale> {\n\n Optional<Locale> findCountry();\n\n @Override\n void store(@Nullable final Locale locale);\n\n @Override\n void remove();\n}",
"public interface ChatMsgManager extends IManager {\r\n\r\n}",
"@Local\r\npublic interface EltSalaireDAOLocal\r\n extends EltSalaireDAO\r\n{\r\n\r\n\r\n}",
"public interface ServConstrainsManagement {\n /**\n * Obtien la lista de componentes visuales a los cuales no tendra accesso\n * el rol (perfil) que esta operando el sistema\n * @return Lista de componentes visuales que no tiene acceso\n */\n public List<ViewConstrainsEnum> getViewConstrainsUIComponent();\n \n}",
"@Remote\r\npublic interface EcheanceReglementManagerRemote\r\n extends EcheanceReglementManager\r\n{\r\n\r\n\r\n}",
"public interface I18nConstants {\n // Common\n String userName();\n\n String email();\n\n String confirmEmail();\n\n String password();\n\n String confirmPassword();\n\n String skip();\n\n String close();\n\n String tooltipCloseDialog();\n\n String tooltipMinimize();\n\n String tooltipMaximize();\n\n String highScore();\n\n String limitation();\n\n String houseSpace();\n\n String noMoney();\n\n String notEnoughMoney();\n\n String tooManyItems();\n\n String spaceLimitExceeded();\n\n String unregisteredUser();\n\n String unnamedUser();\n\n String yes();\n\n String no();\n\n String newBase();\n\n String startOver();\n\n String stop();\n\n String mission();\n\n String refresh();\n\n String player();\n\n String planet();\n\n String filter();\n\n String activate();\n\n String cancel();\n\n String start();\n\n String description();\n\n String abort();\n\n String date();\n\n String time();\n\n String event();\n\n String save();\n\n String dismiss();\n\n String nameToShort();\n\n String nameAlreadyUsed();\n\n String unknownErrorReceived();\n\n String name();\n\n String send();\n\n String noSuchUser(String userName);\n\n String change();\n\n String message();\n\n String featureNextRelease();\n\n String featureComingSoon();\n\n String loading();\n\n String serverError();\n\n String connectWithFacebook();\n\n String availableCrystals(String text);\n\n // Login logout\n String login();\n\n String loginFailed();\n\n String loginFailedText();\n\n String loginFailedNotVerifiedText();\n\n String logout();\n\n String logoutQuestion();\n\n String logoutTextFacebook(String name);\n\n String tooltipNotRegistered();\n\n String tooltipNotVerified(String userName);\n\n String tooltipLoggedIn(String userName);\n\n String forgotPassword();\n\n // Radar\n String tooltipRadar();\n\n String tooltipZoomIn();\n\n String tooltipZoomOut();\n\n String tooltipZoomHome();\n\n String tooltipZoomAttack();\n\n String tooltipRadarPageLeft();\n\n String tooltipRadarPageRight();\n\n String tooltipRadarPageUp();\n\n String tooltipRadarPageDown();\n\n String radarNoPower();\n\n String radarNoRadarBuilding();\n\n // Dialogs\n String messageDialog();\n\n String inventory();\n\n String inventoryNotAvailableMission();\n\n String inventoryNotAvailableBase();\n\n String startTutorialFinished();\n\n String questPassed();\n\n String boxPicked();\n\n // Connection\n String connectionFailed();\n\n String connectionLost();\n\n String connectionAnotherExits();\n\n String connectionNone();\n\n String connectionNoneLoggedOut();\n\n String wrongBase();\n\n String notYourBase();\n\n // Sell\n String sellConfirmationTitle();\n\n String sellConfirmation();\n\n String tooltipSell();\n\n // Register dialog\n String unregistered();\n\n String unnamed();\n\n String chatUnregistered();\n\n String chatUnnamed();\n\n String registerFacebookNickname();\n\n String registerThanks();\n\n String registerThanksLong();\n\n String registerConfirmationEmailSent(String email);\n\n String register();\n\n String registerDirect();\n\n String registerFacebook();\n\n String registrationFailed();\n\n String registrationFilled();\n\n String registrationMatch();\n\n String registrationEmailNotValid();\n\n String registrationEmailMatch();\n\n String registrationEmail();\n\n String registrationUser();\n\n String setName();\n\n String registrationPasswordNotValid();\n\n String setNameFailedNotVerifiedText();\n\n // Side Cockpit\n String tooltipEnergy();\n\n String tooltipMute();\n\n String tooltipHighScore();\n\n String tooltipFacebookCommunity();\n\n String tooltipFacebookInvite();\n\n String singlePlayer();\n\n String tooltipAbortMission();\n\n String multiplayer();\n\n // Quests\n String questBotBasesText(String botBases);\n\n String nextPlanet();\n\n String tooltipNextPlanet();\n\n String questDialog();\n\n String tooltipQuestDialog();\n\n String questVisualisation();\n\n String tooltipQuestVisualisation();\n\n String pressButtonWhenReady();\n\n String tooltipStartMission();\n\n String reward();\n\n String xpReward(int xp);\n\n String razarionReward(int razarion);\n\n String crystalReward(int crystals);\n\n String activeQuest();\n\n String activeQuestAbort();\n\n String questOverview(int questsDone, int totalQuests);\n\n String missionOverview(int missionsDone, int totalMissions);\n\n String youPassedQuest(String questTitle);\n\n String noMoreQuests();\n\n String noActiveQuest();\n\n String questBasesKilled();\n\n String questBoxesPicked();\n\n String questCrystalsIncreased();\n\n String questArtifactItemAdded();\n\n String questResourcesCollected();\n\n String questTimeRemaining();\n\n String questTimeNotFulfilled();\n\n String questBuilt();\n\n String questUnitStructuresBuilt();\n\n String questArtifactItemAddedActionWord();\n\n String questDestroyed();\n\n String questUnitStructuresDestroyed();\n\n String questMinutesPast();\n\n String startMission();\n\n String competeMission();\n\n String go();\n\n String questEnumPvp();\n\n String questEnumPve();\n\n String questEnumBossPve();\n\n String questEnumMission();\n\n String questEnumGather();\n\n String questEnumMoney();\n\n String questEnumBuildup();\n\n String questEnumHoldTheBase();\n\n String questType();\n\n String abortMission();\n\n String reallyAbortMission();\n\n String placeStartItemTitle();\n\n String placeStartItemDescription();\n\n // Dead-end and new base\n String reachedDeadEnd();\n\n String reachedDeadEndItem();\n\n String reachedDeadEndMoney();\n\n String startNewBase();\n\n String baseLostTitle();\n\n String baseLost();\n\n // Item cockpit\n String guildMembershipRequestItemCockpit();\n\n String tooltipLaunchMissile();\n\n String tooltipUpgrade();\n\n String tooltipBuild(String itemName);\n\n String tooltipNoBuildLevel(String itemName);\n\n String tooltipNoBuildLimit(String itemName);\n\n String tooltipNoBuildHouseSpace(String itemName);\n\n String tooltipNoBuildMoney(String itemName);\n\n String botEnemy();\n\n String botNpc();\n\n String playerEnemy();\n\n String playerFriend();\n\n String itemCockpitGuildMember();\n\n String tooltipSelect(String itemName);\n\n String notPlaceHere();\n\n String notPlaceOver();\n\n String containingNoUnits();\n\n String containing1Unit();\n\n String containingXUnits(int count);\n\n String unloadButton();\n\n String unloadButtonTooltip();\n\n // Highscore\n String findMe();\n\n String rank();\n\n String killed();\n\n String killedPve();\n\n String killedPvp();\n\n String basesKilled();\n\n String basesLost();\n\n String created();\n\n String create();\n\n // Inventory\n String useItem();\n\n String workshop();\n\n String dealer();\n\n String funds();\n\n String artifacts();\n\n String buy();\n\n String tooltipAssemble();\n\n String assemble();\n\n String tooltipArtifact(String artifactName);\n\n String youOwn(int ownCount);\n\n String useItemLimit(String itemName);\n\n String useItemHouseSpace();\n\n String useItemMoney();\n\n String enemyTooNear();\n\n String crystalAmount(int crystals);\n\n String cost(int crystalCost);\n\n String leaveBaseNextPlanet();\n\n String goNextPlanet();\n\n String getInventoryItemTitle();\n\n String getInventoryItemNotEnough(String inventoryItemName);\n\n String getArtifactItemTitle();\n\n String getInventoryArtifactNotEnough(String inventoryArtifactName);\n\n // Startup\n String startupClearGame();\n\n String startupLoadRealGameInfo();\n\n String startupDeltaStartRealGame();\n\n String startupLoadUnits();\n\n String startupInitUnits();\n\n String startupRunRealGame();\n\n String startupCheckCompatibility();\n\n String startupLoadJavaScript();\n\n String startupInitGui();\n\n String startupInitRealGame();\n\n String startupPreloadImageSpriteMaps();\n\n String startupLoadSimulationGameInfo();\n\n String startupInitSimulatedGame();\n\n String startupRunSimulatedGame();\n\n String startupDeltaStartSimulatedGame();\n\n // Unlock dialogs\n String unlockDialogTitle();\n\n String unlockDialogText();\n\n String nothingToUnlockDialogText();\n\n String unlockCrystalCost(int crystals);\n\n String unlockFailed();\n\n String unlockNotEnoughCrystals();\n\n // ???\n String createBase();\n\n String createBaseInBotFailed();\n\n String chooseYourStartPoint();\n\n // Menu\n String tooltipMenuNewBaseSimulated();\n\n String tooltipMenuNewBaseRealGame();\n\n String menuNews();\n\n String menuHistory();\n\n String menuTooltipRegisterLogin();\n\n String menuTooltipNews();\n\n String menuTooltipHistory();\n\n String menuTooltipHistoryOnlyRegistered();\n\n String menuTooltipHistoryOnlyRealGame();\n\n String menuTooltipHistoryOnlyRegisteredVerified();\n\n String menuTooltipGuildsMission();\n\n String guildsOnlyRegisteredVerified();\n\n String guildsOnlyRegistered();\n\n String menuTooltipMyGuild();\n\n String menuTooltipGuilds();\n\n String menuMyGuild();\n\n String menuGuilds();\n\n String menuSearchGuilds();\n\n String menuCreateGuild();\n\n String menuGuildInvitations();\n\n String menuInviteFriends();\n\n String menuInviteFriendsTooltip();\n\n String menuGetCrystals();\n\n String menuTooltipGetCrystals();\n\n String menuBuyPaypal();\n\n String menuBuyFacebook();\n\n String menuOverviewGetCrystals();\n\n String menuStarMap();\n\n String menuStarMapTooltip();\n\n String menuStarMapTooltipMission();\n\n // News Dialog\n String newsDialogTitle();\n\n // History Dialog\n String historyDialogTitle();\n\n // Guild dialogs\n String createGuildDialogTitle();\n\n String createGuildDialog();\n\n String myGuildDialogTitle();\n\n String searchGuildDialogTitle();\n\n String member();\n\n String guildRank();\n\n String kick();\n\n String guildKickMember();\n\n String guildKickMemberMessage(String name);\n\n String guildPresident();\n\n String guildManagement();\n\n String guildMember();\n\n String changeRank();\n\n String gildMemberInvited();\n\n String gildMemberInvitedMessage(String userName);\n\n String inviteMember();\n\n String createGuildInsufficientCrystals();\n\n String createGuildCrystalCost(int cost);\n\n String guildText();\n\n String guildMembers();\n\n String guildMembershipRequestTitle();\n\n String guildMembershipRequest();\n\n String guildMembershipRequestSent(String name);\n\n String joinGuild();\n\n String joinGuildMessage(String name);\n\n String dismissGuildMessage(String name);\n\n String guildTab();\n\n String guildMemberTab();\n\n String guildRecruitingTab();\n\n String guildInviteMessage();\n\n String guildMembershipRequestText();\n\n String leaveGuild();\n\n String closeGuild();\n\n String leaveGuildMessage();\n\n String closeGuildMessage();\n\n String guildNameFilter();\n\n String guildInvitations();\n\n String guildInvitationsMessage();\n\n String changeRankText(String name);\n\n String noGuildRequests();\n\n String noGuildInvitations();\n\n String noGuilds();\n\n String guildToSendRequest();\n\n String guildTextShort();\n\n String guildInvitationNotification();\n\n String openGuildInvitation();\n\n String guildMembershipRequestNotification();\n\n String openGuildMembershipRequest();\n\n String guildInvitationNotRegistered(String playerName);\n\n String guildInvitationBaseAbandoned(String playerName);\n\n String userIsAlreadyAGuildMember(String userName);\n\n String guildLostTitle();\n\n String guildLostMessage();\n\n // Chat\n String tooltipChatMenu();\n\n String globalChat();\n\n String guildChat();\n\n String chatMessageFilter();\n\n String chatMessageFilterNoGuild();\n\n // Invite friends\n String inviteFriends();\n\n String inviteFriendsOnlyRegisteredVerified();\n\n String inviteFriendsOnlyRegistered();\n\n String inviteFriendsDescription();\n\n String inviteFriendsViaFacebook();\n\n String inviteFriendsViaMail();\n\n String inviteFriendsViaUrl();\n\n String inviteUrlDescription();\n\n String tabInvite();\n\n String tabComplete();\n\n String sendButton();\n\n String generateButton();\n\n String invitationCrystalBonus();\n\n String crystalBonus();\n\n String fbInviteTitle();\n\n String fbInviteMessage();\n\n String inviteFriendsEmailNotValid();\n\n String invitationEmailSent(String address);\n\n String invitationFacebookSent();\n\n String noFriendInvited();\n\n // Crystal helper\n String buyDialogCost(int crystalCost);\n\n String buyDialogbalance(int crystalBalance);\n\n String invite();\n\n String howToGetCrystals();\n\n String buyCrystalsViaPayPal();\n\n String buyCrystalsViaFacebook();\n\n String invitationFriendsAndGetCrystals();\n\n String collectBoxesAndGetCrystals();\n\n // Buy crystals dialog\n String buyCrystalsPaypal();\n\n String buyCrystalsPaypal1();\n\n String buyCrystalsPaypal2();\n\n String buyCrystalsPaypa3();\n\n String buyCrystalsPaypal4();\n\n String buyCrystalsPaypal5();\n\n String buyCrystalsPaypalOnlyRegistered();\n\n String buyCrystalsPaypalOnlyRegisteredVerified();\n\n String buyCrystalsPaypalDialogTitle();\n\n String buyCrystalsFacebookDialogTitle();\n\n String buyCrystalsFacebook();\n\n String buyCrystalsFacebook1();\n\n String buyCrystalsFacebook2();\n\n String buyCrystalsFacebook3();\n\n String buyCrystalsFacebook4();\n\n String buyCrystalsFacebook5();\n\n String buyCrystalsFacebookButton(int crystals);\n\n String buyCrystalsFacebookOnlyRegisteredVerified();\n\n String buyCrystalsFacebookOnlyRegistered();\n\n String tanksCrystalBoughtDialogTitle();\n\n String tanksCrystalBoughtDialog(int delta, int value);\n\n // Star map\n String starMapDialogTitle();\n\n String minLevel();\n\n String planetSize();\n\n String allowedUnits();\n\n String bases();\n\n String bots();\n\n String units();\n\n String land();\n\n String wrongLevelForLand();\n\n String tooltipShowUnitsOnPlanet();\n\n String tooltipLandOnPlanet();\n\n String youAreAlreadyOnThisPlanet();\n\n String moveToPlanetTitle();\n\n String moveToPlanet(String name);\n\n String leaveBaseMoveToPlanet(String name);\n\n // Training\n String trainingTipScroll();\n\n String trainingTipSelectItem(String itemTypeName);\n\n String trainingTipClickItem();\n\n String trainingTipSendBuildCommand(String itemTypeName);\n\n String trainingTipSendBuildFinalizeCommand(String itemTypeName);\n\n String trainingTipFactorizeCommand(String itemTypeName);\n\n String trainingTipSendCollectCommand(String itemTypeName);\n\n String trainingTipToBeBuiltPlacer(String itemTypeName);\n\n String trainingTipWatchQuestDialog();\n\n String trainingTipClickContainerItem(String itemTypeName);\n\n String trainingTipClickMove();\n\n String trainingTipClickUnload();\n\n String trainingTipClickUnloadMode();\n\n String apply();\n\n String ok();\n\n // Level up dialog\n String levelUpDialogTitle();\n\n String youReachedLevel(int level);\n\n // User account dialog\n String userAccountDialogTitle();\n\n // System\n String serverRebootTitle();\n\n String serverRebootMissionNotSaved();\n\n String serverRebootNotRegistered();\n\n String planetRestartTitle();\n\n String planetRestartMessage();\n\n String serverRestartTitle();\n\n String serverShuttingDown();\n\n String serverStarting();\n\n String serverRunning();\n\n String unknown();\n}",
"public interface Localizable extends Serializable {\r\n /**\r\n * Gets the source (non-localized) string.\r\n *\r\n * @return the source string.\r\n */\r\n String getSourceString();\r\n\r\n /**\r\n * Gets the localized string.\r\n *\r\n * @param locale locale into which to get the string.\r\n * @return the localized string or the source string if no\r\n * localized version is available.\r\n */\r\n String getLocalizedString(Locale locale);\r\n}",
"@Local\r\npublic interface RetardPaiementModalDAOLocal\r\n extends RetardPaiementModalDAO\r\n{\r\n\r\n\r\n}",
"UmType getUserManager();",
"public interface InterfaceClient extends Remote {\n\n double seConnecter(Client client) throws RemoteException;\n\n \n\n boolean peutReserver(Reservation rv) throws RemoteException;\n\n void visualiser(Vehicule voiture) throws RemoteException;\n\n \n \n \n void deconnexion() throws RemoteException;\n\n boolean sinscrire(Client client) throws RemoteException;\n\n void inscriptionReussite(Client client) throws RemoteException;\n}",
"public void setLocales(List<Locale> locales);",
"@Local\npublic interface AdvertBundleDaoInterface extends DaoInterface<AdvertBundleEntity> {\n\n\tList<AdvertBundleEntity> findAllForPartner(PartnerEntity partner);\n\n\t/**\n\t * Hleda vsechny AdvertBundle, ke kterym je treba vystavit novou proforma-fakturu\n\t * @return\n\t */\n\tList<AdvertBundleEntity> findAllRequiredNewProforma();\n\n}",
"public interface CalendrierIntervenantManager\r\n extends GenericManager<CalendrierIntervenant, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"CalendrierIntervenantManager\";\r\n\r\n}",
"public ApplicationLocales(ActionServlet servlet) {\n\n super();\n Locale list[] = Locale.getAvailableLocales();\n MessageResources resources = (MessageResources)\n servlet.getServletContext().getAttribute(Globals.MESSAGES_KEY);\n if (resources == null)\n return;\n String config = resources.getConfig();\n if (config == null)\n return;\n\n for (int i = 0; i < list.length; i++) {\n try {\n ResourceBundle bundle =\n ResourceBundle.getBundle(config, list[i]);\n if (bundle == null)\n continue;\n if (list[i].equals(bundle.getLocale())) {\n localeLabels.add(list[i].getDisplayName());\n localeValues.add(list[i].toString());\n supportedLocales.add(list[i]);\n }\n } catch( Exception ex ) {\n servlet.log(\"Missing locale \" + list[i] );\n continue;\n }\n }\n\n }",
"@ImplementedBy(DefaultStringManager.class)\npublic interface StringManager extends ResourceManager<StringManager, StringResource> {\n\n @Override\n default String getType() {\n return \"string\";\n }\n}",
"public interface DealsWithPlatformInfo {\n public void setPlatformInfoManager (PlatformInfoManager platformInfoManager);\n}",
"public MostrarBienesWizard(String locale)\r\n {\r\n \t this.locale=locale;\r\n \t try{\r\n initComponents();\r\n renombrarComponentes();\r\n inventarioClient= new InventarioClient(aplicacion.getString(UserPreferenceConstants.LOCALGIS_SERVER_ADMCAR_SERVLET_URL) +\r\n \t\tConstantes.INVENTARIO_SERVLET_NAME);\r\n \r\n } catch (Exception e){\r\n logger.error(\"Error al importar actividades economicas\",e);\r\n }\r\n }",
"void localizationChanged();",
"void localizationChanged();",
"void localizationChanged();",
"public TranslatorManager getManager();",
"static private synchronized void initServices() {\n if (_eiService == null) {\n try {\n _eiService = (ExtensionInstallerService)ServiceManager.lookup(\"javax.jnlp.ExtensionInstallerService\");\n _basicService = (BasicService)ServiceManager.lookup(\"javax.jnlp.BasicService\");\n _downloadService = (DownloadService)ServiceManager.lookup(\"javax.jnlp.DownloadService\");\n } catch(UnavailableServiceException use) {\n Config.trace(\"Unable to locate service: \" + use);\n }\n }\n\n // We cannot really use this, since it breaks lazy loading. When resources for all locales\n // are in place it should be ok. Or we need another solution.\n //_resources = ResourceBundle.getBundle(\"jnlp/JreInstaller/resources/strings\");\n try {\n URL bundle = (new Config()).getClass().getClassLoader().getResource(\"jnlp/sample/JreInstaller/resources/strings.properties\");\n _resources = new PropertyResourceBundle(bundle.openStream());\n } catch(Throwable t) {\n Config.trace(\"Unable to load resources: \" + t);\n }\n }",
"public interface IArticuloLeyMercadoGestor {\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado CODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @throws SICException\n\t */\n\tvoid codificarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId) throws SICException;\n\t\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado DESCODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @param codigoCausal\n\t * @param valorCausal\n\t * @throws SICException\n\t */\n\tvoid descodificarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId, Integer codigoCausal, String valorCausal) throws SICException;\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado REACTIVADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @param userId\n\t * @throws SICException\n\t */\n\tvoid reactivarArticuloLeyMercado(Integer codigoCompania, String codigoArticulo, String userId) throws SICException;\n\t\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado CODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param articuloLeyMercadoDTO entidad que representa la informacion de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @throws SICException\n\t */\n\tvoid codificarArticuloLeyMercado(ArticuloLeyMercadoDTO articuloLeyMercadoDTO) throws SICException;\t\n\n\t/**\n\t * M\\u00E9todo que permite registrar un art\\u00EDculo con estado DESCODIFICADO seg\\u00FAn la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param articuloLeyMercadoDTO entidad que representa la informacion de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @throws SICException\n\t */\n\tvoid descodificarArticuloLeyMercado(ArticuloLeyMercadoDTO articuloLeyMercadoDTO) throws SICException;\n\t\n\t/**\n\t * Metodo que permite obtener la informacion actual de Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado del articulo\n\t * @author mgranda\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @return\n\t * @throws SICException\n\t */\n\tArticuloLeyMercadoDTO obtenerArticuloLeyMercado(Integer codigoCompania, String codigoArticulo) throws SICException;\n\n\t/**\n\t * Metodo que permite obtener la informacion historica de estados del articulo segun la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @author mgranda\n\t * @param first\n\t * @param pageSize\n\t * @param sortField\n\t * @param filters\n\t * @return\n\t * @throws SICException\n\t */\n\tList<ArticuloBitacoraLeyMercadoDTO> obtenerHistoricoLeyMercado(int first, int pageSize, String sortField, Map<String, String> filters) throws SICException;\n\t\n\t/**\n\t * Metodo que permite obtener el total de la informacion historica de estados del articulo segun la Ley Org\\u00E1nica de Regulaci\\u00F3n y Control del Poder de Mercado\n\t * @param codigoCompania\n\t * @param codigoArticulo\n\t * @return\n\t * @throws SICException\n\t */\n\tLong obtenerTotalHistoricoLeyMercado(Integer codigoCompania, String codigoArticulo) throws SICException;\n}",
"@PostConstruct\n public void init()\n throws RedbackServiceException\n {\n getI18nProperties( \"en\" );\n getI18nProperties( \"fr\" );\n }",
"public interface ListService {\n\n public String showListCmd();\n\n}",
"public void mudarIdioma() {\n\t\tString localeStr = facesUtil.getParam(\"locale\");\n\n\t\tif (localeStr.length() == 2) {\n\t\t\tlocale = new Locale(localeStr);\n\n\t\t} else {\n\t\t\tlocale = new Locale(localeStr.substring(0, 2), localeStr.substring(3));\n\t\t}\n\n\t\tfacesUtil.setLocale(locale);\n\t\tLog.setLogger(ConfigBean.class, facesUtil.getMessage(\"MGL064\", new String[] { localeStr }), Level.INFO);\n\t}",
"public interface NCBENU {\n}",
"public interface SistemaArqOperations \r\n{\r\n int list_Arq (String nome, String[] aq, String p);\r\n String[] att_clientes ();\r\n String[] get_Arq (int a);\r\n void set_Arq (String[] aq, int idd);\r\n String get_path (int a);\r\n int qtd_clientes ();\r\n}",
"public abstract EnvioMensajesCallBackInterface getInterfaceCallback();",
"@Local\npublic interface IGestionnaireReponseService {\n\n /**\n * Envoie une reponse avec le code de statut HTTP fourni, contenant, dans son body,\n * la collection d'entites qui a fait l'objet d'une requete de recuperation (GET /collection).\n * @param listeEntites Liste d'entites recuperees\n * @param reponse Reponse retournee (celle prise en parametre de la methode appelee de la servlet)\n * @param <TEntite> Classe de l'entite (generique, pour prendre n'importe quel objet)\n * @throws IOException en cas d'erreur de creation de l'objet de sortie du contenu du body renvoye\n */\n <TEntite> void envoiReponseAvecDonnees(ArrayList<TEntite> listeEntites, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;\n\n /**\n * Envoie une reponse avec le code de statut HTTP fourni, contenant, dans son body,\n * l'entite qui a fait l'objet d'une requete de recuperation, de creation ou de modification.\n * @param entite Entite recuperee\n * @param reponse Reponse retournee (celle prise en parametre de la methode appelee de la servlet)\n * @param <TEntite> Classe de l'entite (generique, pour prendre n'importe quel objet)\n * @throws IOException en cas d'erreur de creation de l'objet de sortie du contenu du body renvoye\n */\n <TEntite> void envoiReponseAvecDonnees(TEntite entite, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;\n\n /**\n * Envoie une reponse 200 OK sans body. Appel uniquement par une route DELETE (suppression d'entite).\n *\n * @param reponse Reponse renvoyee (celle prise en parametre de la methode appelee de la servlet)\n */\n void envoiReponseSansDonnees(HttpServletResponse reponse);\n\n}",
"private LocalizationProvider() {\r\n\t\tthis.language = DEFAULT_LANGUAGE;\r\n\t\tthis.bundle = ResourceBundle.getBundle(\"hr.fer.zemris.java.hw11.jnotepadapp.local.languages\",\r\n\t\t\t\tLocale.forLanguageTag(language));\r\n\t}",
"List<Locale> getSupportedLocales() {\n return Collections.unmodifiableList(mSupportedLocales);\n }",
"@Local\r\npublic interface BonLivraisonManagerLocal\r\n extends BonLivraisonManager\r\n{\r\n\r\n\r\n}",
"@Local\r\npublic interface ViewBulletinPaieHelperManagerLocal\r\n extends ViewBulletinPaieHelperManager\r\n{\r\n\r\n\r\n}",
"public void updateI18N() {\n\t\t/* Update I18N in the menuStructure */\n\t\tappMenu.updateI18N();\n\t\t/* Pack all */\n\t\tLayoutShop.packAll(shell);\n\t}",
"@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}",
"@Remote\r\npublic interface RappelManagerRemote\r\n extends RappelManager\r\n{\r\n\r\n\r\n}",
"@Local\npublic interface IndirizzoFacadeLocal {\n\n void create(Indirizzo indirizzo);\n\n void edit(Indirizzo indirizzo);\n\n void remove(Indirizzo indirizzo);\n\n Indirizzo find(Object id);\n\n List<Indirizzo> findAll();\n\n /** Restituisce tutte le stringe \"citta\" che iniziano con il parametro\n * @param subCitta la stringa da cercare\n * @return una lista di stringhe che rappresentano i nomi delle citta presenti su db\n */\n public List<String> getCitta(String subCitta);\n\n /** carica tutti i nomi della città presenti nel database\n * @return la lista dei nomi delle città sotto forma di String\n */\n public java.util.List<java.lang.String> getCitta();\n\n}",
"public interface RemoteDataSource {\n\n interface ZhiHuDataSource {\n /**\n * 启动界面图片文字\n */\n void getSplashInfo(String res, RemoteApiCallback<SplashBean> callback);\n\n /**\n * 最新日报\n */\n void getNewsDailyList(RemoteApiCallback<NewsDailyBean> callback);\n\n /**\n * 往期日报\n */\n void getNewsDailyBefore(String date, RemoteApiCallback<NewsDailyBean> callback);\n\n /**\n * 主题日报\n */\n void getThemes(RemoteApiCallback<ThemesBean> callback);\n\n /**\n * 主题日报详情\n */\n void getThemesDetail(int id, RemoteApiCallback<ThemesListBean> callback);\n\n /**\n * 热门日报\n */\n void getHotNews(RemoteApiCallback<HotNewsBean> callback);\n\n /**\n * 日报详情\n */\n void getNewsDetailInfo(int id, RemoteApiCallback<NewsDetailBean> callback);\n\n /**\n * 日报的额外信息\n */\n void getNewsExtraInfo(int id, RemoteApiCallback<NewsExtraBean> callback);\n\n /**\n * 日报的长评论\n */\n void getLongCommentInfo(int id, RemoteApiCallback<CommentsBean> callback);\n\n /**\n * 日报的短评论\n */\n void getShortCommentInfo(int id, RemoteApiCallback<CommentsBean> callback);\n\n /**\n * 专题特刊\n */\n void getSpecials(RemoteApiCallback<SpecialsBean> callback);\n\n /**\n * 专题特刊列表\n */\n void getSpecialList(int id, RemoteApiCallback<SpecialListBean> callback);\n\n /**\n * 获取专栏的之前消息\n */\n void getBeforeSpecialListDetail(int id, long timestamp, RemoteApiCallback<SpecialListBean> callback);\n\n /**\n * 获取推荐的作者专题\n */\n void getRecommendedAuthorColumns(int limit, int offset, int seed, RemoteApiCallback<List<RecommendAuthorBean>> callback);\n\n /**\n * 获取专栏作者的详细信息\n */\n void getColumnAuthorDetail(String name, RemoteApiCallback<ColumnAuthorDetailBean> callback);\n\n /**\n * 获取推荐的文章\n */\n void getRecommendedAuthorArticles(int limit, int offset, int seed, RemoteApiCallback<List<RecommendArticleBean>> callback);\n\n /**\n * 获取某人的专题\n */\n void getColumnsOfAuthor(String name, int limit, int offset, RemoteApiCallback<List<ColumnsBean>> callback);\n\n /**\n * 获取某篇专题文章详情\n */\n void getColumnArticleDetail(int id, RemoteApiCallback<ColumnArticleDetailBean> callback);\n\n /**\n * 获取文章的评论\n */\n void getColumnComments(int id, int limit, int offset, RemoteApiCallback<List<ColumnCommentsBean>> callback);\n }\n\n interface GankDataSource {\n /**\n * 获取某个类别的信息\n */\n void getGankNewsByCategory(String category, int num, int page, RemoteApiCallback<List<GankNewsBean>> callback);\n\n /**\n * 获取某天的所有类别信息\n */\n void getGankNewsOfSomeday(int year, int month, int day, RemoteApiCallback<GankDateNewsBean> callback);\n\n /**\n * 获取随机推荐的信息\n */\n void getRecommendGankNews(String category, int num, RemoteApiCallback<List<GankNewsBean>> callback);\n }\n\n interface TianXinDataSource {\n /**\n * 获取天行数据精选\n */\n void getTianXinNews(String type, String key, int num, int page, RemoteApiCallback<List<TianXinNewsBean>> callback);\n\n /**\n * 通过关键字获取天行数据精选\n */\n void getTianXinNewsByWord(String type, String key, int num, int page, String word, RemoteApiCallback<List<TianXinNewsBean>> callback);\n }\n}",
"public interface ResourceConfig {\n\n public ResourceBundle config = ResourceBundle.getBundle(\"resource-config\");\n\n public String DEFAULT_LOCALE = config.getString(\"defaultLocale\");\n\n public String EXCEPTION_MESSAGE_PREFIX = config.getString(\"exception_message_prefix\");\n\n public boolean VALUE_NEED_ENCODE = new Boolean(config.getString(\"stringEncode\")).booleanValue();\n\n public String SOURCE_ENCODE = config.getString(\"sourceEncode\");\n\n public String TARGET_ENCODE = config.getString(\"targetEncode\");\n\n public String LOCALE_LIST = config.getString(\"localeList\");\n\n public String RESOURCEBOX_FILES = config.getString(\"resourcebox_files\");\n\n public String CONSTANTS_FILES = config.getString(\"constants_files\");\n\n}",
"public interface LanguageDAO extends CommonEntityDAO {\r\n}",
"public interface TelIpManageService {\n\n public List<CallCenter> queryCallCenters();\n\n public void updateCallCenter(CallCenter callCenter);\n\n\tpublic void deleteCallCenters(List<Integer> callCenterIDs);\n\n\tpublic void addCallCenter(CallCenter callCenter);\n\n\tpublic CallCenter queryCallCenter(Integer callCenterID);\n}",
"public interface IMensagemGrupo {\n\n\t/** Retorna o Tipo de Envio. */\n\tTipoEnvio getTipoEnvio();\n\t\n\t/** Define o Tipo de Envio. */\n\tvoid setTipoEnvio(TipoEnvio tipoEnvio);\n\t\n\t/** Retorna o Grupo. */\n\tGrupo getGrupo();\n\t\n\t/** Define o Grupo. */\n\tvoid setGrupo(Grupo grupoUsuario);\n\t\n}",
"public interface InterfaceSistemaDeControle {\r\n\t\r\n\t/** Este método adiciona um pedido.\r\n\t * \r\n\t * @param p Recebe um objeto do tipo Pedido.\r\n\t */\r\n\t\r\n\tpublic void adicionaPedido (Pedido p);\r\n\t\r\n\t/** Este método pesquisa pedidos utilizando o código do produto.\r\n\t * \r\n\t * @param codProduto Recebe um objeto do tipo String que representa o código do produto.\r\n\t * @return Este método retorna uma Lista do tipo Pedido contendo todos os produtos que têm o código \r\n\t * igual ao passado no parametro.\r\n\t */\r\n\t\r\n\tpublic List<Pedido> pesquisaIncluindoProduto (String codProduto);\r\n\t\r\n\t/** Este método remove um pedido.\r\n\t * \r\n\t * @param numPedido Este método do tipo long recebe o número do pedido que será removido.\r\n\t */\r\n\tpublic void removePedido (long numPedido);\r\n\t\r\n}",
"public interface MineContract {\n String CUSTOMER_WORK_ORDER_LIST = \"/serviceWork/serviceWorkList\";//客服工单列表\n\n interface IMineView extends BaseViewInterface {\n }\n\n interface IMinePresent {\n /**\n * 获取客服工单列表\n * @param offset\n * @param limit\n * @param villageId\n * @param ghsUserId\n * @param state 1:跟进中 2:完成 3:待跟进\n * @param tag\n */\n void getCustomerWorkOrders(int offset, int limit, int villageId, int ghsUserId, int state, String tag);\n }\n}",
"public interface ITransModel {\n\n void getTransList(String catid, String device, String moni, ITransListListener listener);\n\n}",
"public interface TCNetworkManageInterface {\n\n public String serviceIdentifier();\n\n public String apiClassPath();\n\n public String apiMethodName();\n}",
"@Remote\r\npublic interface ActionItemManagerRemote\r\n extends ActionItemManager\r\n{\r\n\r\n\r\n}",
"public interface ConditionPaiementManager\r\n extends GenericManager<ConditionPaiement, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"ConditionPaiementManager\";\r\n\r\n}",
"public interface PlatformManagerClient {\n\n /**\n * 查询所有平台\n * @return 平台列表\n */\n ResultDTO<List<Platform>> getAllPlatform();\n\n /**\n * 按id查询平台\n * @param platformId 平台Id\n * @return\n */\n ResultDTO<Platform> getPlatformById(@NotBlank String platformId);\n\n /**\n * 按id查询平台\n * @param appId 微信公众平台id\n * @return\n */\n ResultDTO<Platform> getPlatformByAppId(@NotBlank String appId);\n\n /**\n * 按企业码查询平台\n * @param platformCode 平台企业码\n * @return\n */\n ResultDTO<Platform> getPlatformByCode(@NotBlank(message=\"平台代码不可以为空\") String platformCode);\n\n /**\n * 创建平台\n * @param platform 平台信息\n * @return\n */\n ResultDTO<Boolean> createPlatform(@NotNull(message=\"平台类不可为空\") @Valid Platform platform);\n\n /**\n * 更新平台\n * @param platform 平台信息\n * @return\n */\n ResultDTO<Boolean> updatePlatform(@NotNull @Valid Platform platform);\n\n /**\n * 禁用平台\n * @param platformId\n * @return\n */\n ResultDTO<Boolean> disablePlatform(@NotBlank String platformId);\n\n /**\n * 解禁平台\n * @param platformId\n * @return\n */\n ResultDTO<Boolean> enablePlatform(@NotBlank String platformId);\n\n /**\n * 分页查询平台\n * @param keyWord 企业码关键字\n * @param pageNo 页码\n * @param pageSize 分页大小\n * @return\n */\n ResultDTO<PageInfo<Platform>> listPlatform(String keyWord, @NotNull Integer pageNo, @NotNull Integer pageSize);\n\n\n /**\n * 获取所有平台的企业码\n * @return\n */\n ResultDTO<List<String>> listAllPlatformCodes();\n}",
"@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }",
"public AbstractLocalizationProvider() {\r\n\t\tsuper();\r\n\t\tthis.listeners = new ArrayList<>();\r\n\t}",
"public interface SimpleLogRemote extends javax.ejb.EJBObject, com.arexis.mugen.simplelog.SimpleLogRemoteBusiness {\n \n \n}",
"public interface CompteManager\r\n extends GenericManager<Compte, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"CompteManager\";\r\n\r\n}",
"public interface Compromiso_peticionLocal extends javax.ejb.EJBLocalObject {\n\t/**\n\t * Get accessor for persistent attribute: tiag_id\n\t */\n\tpublic java.lang.Long getTiag_id();\n\t/**\n\t * Set accessor for persistent attribute: tiag_id\n\t */\n\tpublic void setTiag_id(java.lang.Long newTiag_id);\n\t/**\n\t * Get accessor for persistent attribute: id_rango\n\t */\n\tpublic java.lang.Integer getId_rango();\n\t/**\n\t * Set accessor for persistent attribute: id_rango\n\t */\n\tpublic void setId_rango(java.lang.Integer newId_rango);\n\t/**\n\t * Get accessor for persistent attribute: peti_numero\n\t */\n\tpublic java.lang.Long getPeti_numero();\n\t/**\n\t * Set accessor for persistent attribute: peti_numero\n\t */\n\tpublic void setPeti_numero(java.lang.Long newPeti_numero);\n\t/**\n\t * Get accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic java.lang.String getCodigo_pcom();\n\t/**\n\t * Set accessor for persistent attribute: codigo_pcom\n\t */\n\tpublic void setCodigo_pcom(java.lang.String newCodigo_pcom);\n\t/**\n\t * Get accessor for persistent attribute: dia_especifico\n\t */\n\tpublic java.sql.Timestamp getDia_especifico();\n\t/**\n\t * Set accessor for persistent attribute: dia_especifico\n\t */\n\tpublic void setDia_especifico(java.sql.Timestamp newDia_especifico);\n\t/**\n\t * Get accessor for persistent attribute: id_tecnico\n\t */\n\tpublic java.lang.Long getId_tecnico();\n\t/**\n\t * Set accessor for persistent attribute: id_tecnico\n\t */\n\tpublic void setId_tecnico(java.lang.Long newId_tecnico);\n\t/**\n\t * Get accessor for persistent attribute: user_mac\n\t */\n\tpublic java.lang.String getUser_mac();\n\t/**\n\t * Set accessor for persistent attribute: user_mac\n\t */\n\tpublic void setUser_mac(java.lang.String newUser_mac);\n\t/**\n\t * Get accessor for persistent attribute: hora_desde\n\t */\n\tpublic java.lang.String getHora_desde();\n\t/**\n\t * Set accessor for persistent attribute: hora_desde\n\t */\n\tpublic void setHora_desde(java.lang.String newHora_desde);\n\t/**\n\t * Get accessor for persistent attribute: hora_hasta\n\t */\n\tpublic java.lang.String getHora_hasta();\n\t/**\n\t * Set accessor for persistent attribute: hora_hasta\n\t */\n\tpublic void setHora_hasta(java.lang.String newHora_hasta);\n\t/**\n\t * Get accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic java.lang.String getCodigo_agencia();\n\t/**\n\t * Set accessor for persistent attribute: codigo_agencia\n\t */\n\tpublic void setCodigo_agencia(java.lang.String newCodigo_agencia);\n\t/**\n\t * Get accessor for persistent attribute: estado\n\t */\n\tpublic java.lang.Short getEstado();\n\t/**\n\t * Set accessor for persistent attribute: estado\n\t */\n\tpublic void setEstado(java.lang.Short newEstado);\n\t/**\n\t * Get accessor for persistent attribute: grse_id\n\t */\n\tpublic java.lang.Integer getGrse_id();\n\t/**\n\t * Set accessor for persistent attribute: grse_id\n\t */\n\tpublic void setGrse_id(java.lang.Integer newGrse_id);\n\t/**\n\t * Get accessor for persistent attribute: fecha\n\t */\n\tpublic java.sql.Timestamp getFecha();\n\t/**\n\t * Set accessor for persistent attribute: fecha\n\t */\n\tpublic void setFecha(java.sql.Timestamp newFecha);\n\t/**\n\t * Get accessor for persistent attribute: care_id\n\t */\n\tpublic java.lang.Integer getCare_id();\n\t/**\n\t * Set accessor for persistent attribute: care_id\n\t */\n\tpublic void setCare_id(java.lang.Integer newCare_id);\n\t/**\n\t * Get accessor for persistent attribute: usua_id\n\t */\n\tpublic java.lang.Long getUsua_id();\n\t/**\n\t * Set accessor for persistent attribute: usua_id\n\t */\n\tpublic void setUsua_id(java.lang.Long newUsua_id);\n\t/**\n\t * Get accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic java.lang.Long getId_cita_previa();\n\t/**\n\t * Set accessor for persistent attribute: id_cita_previa\n\t */\n\tpublic void setId_cita_previa(java.lang.Long newId_cita_previa);\n}",
"protected void localeChanged() {\n\t}",
"public interface RemoteDataSource {\n\n /**\n * 请求短信验证码\n * @param context\n * @param phoneNumber\n * @param type 类型:re注册;lg登录\n * @param callback\n * @return\n */\n boolean requestPhoneCheckCode(Context context, String phoneNumber, String type,\n BaseNetworkRequest.RequestCallback callback);\n /**\n * 注册\n * @param context\n * @param phoneNumber 手机号\n * @param checkCode 验证码\n * @param callback\n * @return\n */\n String register(Context context, String phoneNumber, String checkCode,\n BaseNetworkRequest.RequestCallback callback);\n\n /**\n * 登录\n * @param context\n * @param phoneNumber\n * @param checkCode\n * @param callback\n * @return\n */\n String login(Context context, String phoneNumber, String checkCode,\n BaseNetworkRequest.RequestCallback callback);\n\n /**\n * 获取词汇列表\n * @param context\n * @param page\n *@param sort\n * @param sortType\n * @param callback @return\n */\n String getCategoryList(Context context, int page, String sort, String sortType,\n BaseNetworkRequest.RequestCallback callback);\n\n /**\n * 获取图片\n * @param context\n * @param url\n * @param imageView\n * @param maxWidth\n * @param maxHeight\n * @param defaultImage\n * @param errorImage\n */\n public void getImageForView(@NonNull Context context, String url, ImageView imageView, int maxWidth,\n int maxHeight, int defaultImage, int errorImage);\n\n /**\n * 获取词汇列表\n * @param context\n * @param categoryId\n * @param page\n * @param secondLan\n * @param callback @return\n * */\n public String getVocabularyList(@NonNull Context context, String categoryId, int page,\n String secondLan, BaseNetworkRequest.RequestCallback callback);\n\n /**\n * 新增词汇分类\n * @param context\n * @param category\n * @param callback\n */\n public void postCategory(@NonNull Context context, List<PostParam> category,\n BaseNetworkRequest.RequestCallback callback);\n\n /**\n * 新增词汇\n * @param context\n * @param vocabulary\n * @param callback\n */\n public void postVocabulary(@NonNull Context context, List<PostParam> vocabulary,\n BaseNetworkRequest.RequestCallback callback);\n}",
"public interface IConversationView {\n\n //初始化我们的聊天视图\n void initConversationView(List<EMConversation> emConversationList);\n\n}"
] | [
"0.6879806",
"0.6270815",
"0.6227726",
"0.61852247",
"0.6100339",
"0.5967303",
"0.59518534",
"0.59347266",
"0.5914048",
"0.5908129",
"0.583974",
"0.5830078",
"0.5822163",
"0.5820339",
"0.5814302",
"0.5796019",
"0.57848644",
"0.5772592",
"0.5765515",
"0.57473564",
"0.57352495",
"0.57188916",
"0.5691783",
"0.56630236",
"0.566197",
"0.5621284",
"0.5620428",
"0.5600989",
"0.56007606",
"0.556859",
"0.55600107",
"0.5559057",
"0.5551394",
"0.55507207",
"0.5549263",
"0.5540207",
"0.551799",
"0.55127054",
"0.5512362",
"0.55077845",
"0.5506027",
"0.5503976",
"0.5503909",
"0.54922473",
"0.5481397",
"0.54681087",
"0.54634535",
"0.545978",
"0.54397607",
"0.54380023",
"0.5419463",
"0.54033214",
"0.5402857",
"0.5402295",
"0.54010195",
"0.5397485",
"0.53935117",
"0.5389795",
"0.5383669",
"0.53818154",
"0.53804576",
"0.53804576",
"0.53804576",
"0.5380152",
"0.5362139",
"0.53574675",
"0.5356266",
"0.5348167",
"0.5347617",
"0.5347144",
"0.5342704",
"0.5339038",
"0.5337964",
"0.53251994",
"0.53191465",
"0.5315577",
"0.5313218",
"0.53098416",
"0.53031176",
"0.530084",
"0.52829444",
"0.5276532",
"0.5272056",
"0.52627677",
"0.52534425",
"0.52531457",
"0.52509224",
"0.52470076",
"0.52402264",
"0.52384126",
"0.5237396",
"0.5237379",
"0.5232216",
"0.5228",
"0.52278006",
"0.52265555",
"0.5221173",
"0.5221142",
"0.52201325",
"0.5212723",
"0.52107716"
] | 0.0 | -1 |
check and get the wallet details from the db by the session id | private boolean getDetails(){
ResultSet rs = this.SQL.PreparedSelect("btcwallet", new String[]{"guid","rnd","time","session"}, "`session`="+this.Session, "1", "");
try {
if(rs.first()){
this.GUID=rs.getString("guid");
this.Time=rs.getString("time");
this.Creator=rs.getString("rnd");
return true;
}
} catch (SQLException ex) {
Logger.getLogger(openBTCWallet.class.getName()).log(Level.SEVERE, null, ex);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getWalletId() {\r\n return walletId;\r\n }",
"private int getWallet() {\n\t\treturn wallet;\n\t}",
"public UUID getWalletId();",
"public Wallet retrieve(long id) {\n Wallet wallet = repository.retrieve(id);\n\n if (wallet == null) {\n errorState.addError(\"id\", \"No results for given value.\");\n return WalletResponse.NOT_FOUND;\n }\n\n return wallet;\n }",
"private void getMyWallet() {\n AppDialog.showProgressDialog(mActivity, true);\n IApiClient client = ApiClient.getApiClient();\n ReqMyWallet reqWallet = new ReqMyWallet();\n reqWallet.setServiceKey(mAppSharedPreference.getString(PreferenceKeys.KEY_SERVICE_KEY, ServiceConstants.SERVICE_KEY));\n reqWallet.setMethod(MethodFactory.MY_WALLET.getMethod());\n reqWallet.setUserID(mAppSharedPreference.getString(PreferenceKeys.KEY_USER_ID, \"\"));\n Call<ResMyWallet> call = client.myWallet(reqWallet);\n call.enqueue(new Callback<ResMyWallet>() {\n @Override\n public void onResponse(Call<ResMyWallet> call, Response<ResMyWallet> response) {\n AppDialog.showProgressDialog(mActivity, false);\n if (isAdded()) {\n mResMyWallet = response.body();\n if (mResMyWallet != null) {\n if (mResMyWallet.getSuccess() == ServiceConstants.SUCCESS) {\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvCancellation.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvCancellation.setText(mActivity.getString(R.string.rs) + mResMyWallet.getRefundAmt());\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvCashback.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvCashback.setText(mActivity.getString(R.string.rs) + mResMyWallet.getCashBackAmt());\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvPrizeMoney.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvPrizeMoney.setText(mActivity.getString(R.string.rs) + mResMyWallet.getPrizeAmt());\n if (mResMyWallet.getTotalAmt().isEmpty()) {\n tvWalletBalance.setText(mActivity.getString(R.string.rs) + \"0\");\n } else {\n tvWalletBalance.setText(mActivity.getString(R.string.rs) + mResMyWallet.getTotalAmt());\n }\n\n } else {\n ToastUtils.showShortToast(mActivity, mResMyWallet.getErrstr());\n }\n } else {\n ToastUtils.showShortToast(mActivity, R.string.err_network_connection);\n }\n }\n }\n\n @Override\n public void onFailure(Call<ResMyWallet> call, Throwable t) {\n AppDialog.showProgressDialog(mActivity, false);\n ToastUtils.showShortToast(mActivity, R.string.err_network_connection);\n }\n });\n }",
"com.weizhu.proto.WeizhuProtos.Session getSession();",
"public Account getAccountByID(int id)//This function is for getting account for transfering amount\r\n {\r\n return this.ac.stream().filter(ac1 -> ac1.getAccId()==id).findFirst().orElse(null);\r\n }",
"public boolean hasWalletId() {\n return walletId_ != null;\n }",
"String checkTrueDetails() throws JSONException \n {\n String result;\n DataBaseConnection db= new DataBaseConnection();\n db.connectToDB();\n try {\n if (db.checkIfExist(db.checkUser,usernameJsn ))\n {\n String userPassword= db.findValue(usernameJsn, \"USERNAME\",\"PASSWORD\",\"PLAYERS\");\n if (userPassword.equals(passwordJsn))\n result= \"Success\";\n else\n result= \"WRONG PASSWORD\";\n }\n \n else result= \"user doesn't exist\";\n } catch (SQLException ex) {\n Logger.getLogger(LoginUser.class.getName()).log(Level.SEVERE, null, ex);\n result=\"error\";\n }\n db.closeDBConnection();\n return result;\n }",
"public PlayerWallet getGameWallet() {\n return gameWallet;\n\n }",
"@Override\n public CreateSessionResponse createSession()\n throws EwalletException {\n return null;\n }",
"private GameInfo retrieveGameInfo(String gameId) {\n GameInfo gameInfo = sessionInfo.getGameInfo();\n if(gameInfo != null && gameId.equals(gameInfo.getId())) {\n return gameInfo;\n }\n return null;\n }",
"com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();",
"public Wallet showBalance(String phone) throws PaymentWalletException {\r\n\t\tWallet wall = entityManager.find(Wallet.class,phone);\r\n\t\tif(wall!=null)\r\n\t\t{\r\n\t\t\treturn wall;\r\n\t\t}\r\n\t\treturn wall;\r\n\t\t\r\n\t\t\r\n\t}",
"InternalSession findSession(String id);",
"public boolean withdraw(long id, String password, String currency, double amount);",
"public dc_wallet() {}",
"@Override\n public JSONObject getHwWalletObjectById(String urlSegment, String id) {\n HttpHeaders header = constructHttpHeaders();\n // Construct the http URL.\n String baseUrl = ConfigUtil.instants().getValue(\"walletServerBaseUrl\");\n String walletServerUrl = baseUrl + urlSegment + id;\n\n // Send the http request and get response.\n HttpEntity<JSONObject> entity = new HttpEntity<>(header);\n ResponseEntity<JSONObject> response =\n REST_TEMPLATE.exchange(walletServerUrl, HttpMethod.GET, entity, JSONObject.class);\n\n // Return the model or instance with the corresponding ID.\n return response.getBody();\n }",
"public boolean deposit(long id, String password, String currency, double amount);",
"public Session findSession(String id) throws IOException;",
"private void getUserFromDatabase(String id) {\n splashViewModel.getUserFromId(id);\n splashViewModel.getUser().observe(this, user -> {\n startSessionListActivity(user.getUid());\n finish();\n });\n }",
"@ApiOperation(value = \"Returns a authenticated user's Wallet info/Passbook.\", response = Wallet.class)\n\t@PostMapping(\"/get/details\")\n\tpublic Wallet getUserDetails() throws UserNotFoundException, WalletNotFoundException {\n\t\tString userid = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tAssert.notNull(userid, \"No user has logged in so can't send wallet details\");\n\n\t\treturn walletService.getWalletDataForUser(userid);\n\t}",
"@Transactional\r\n\t@Override\r\n\tpublic List<Map<String, Object>> findbyperaccount(String peracId) {\n\t\tList<Map<String, Object>> list=dao.findbyperaccount(peracId);\r\n\t\treturn list;\r\n\t}",
"public List<Account> getBalanceByPassbook(String passbook_id) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<Account> accountList= session.createQuery(\"select a.balance from Account a, Passbook p where p.passbook_id='\"+passbook_id+\"'\").list();\n return AccountDto.getBalanceByPassbook(accountList);\n }",
"String getSessionID();",
"String getSessionID();",
"@Path(\"/{id}\")\n @GET\n public Response getSession(@PathParam(\"id\") Long id) {\n log.debug(\"REST request to get Session : {}\", id);\n Session session = sessionRepository.find(id);\n return Optional.ofNullable(session)\n .map(result -> Response.status(Response.Status.OK).entity(session).build())\n .orElse(Response.status(Response.Status.NOT_FOUND).build());\n }",
"public String getUserActivePurchaseLog(int conversationId){\n\t String UserActivePurchaseLogId=null;\n\t try{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t ////System.out.println(\"Connecting to database...\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t ////System.out.println(\"Creating statement...\");\n\t\t stmt = conn.createStatement();\n\t\t \n\t\t //Dapetin jarak setiap narik data\n\t\t String statement = \"SELECT * FROM `purchase_logs` INNER JOIN `conversations` ON `purchase_logs`.`user_id` = `conversations`.`user_id` WHERE `conversations`.`id` = \"+conversationId+\" AND `purchase_logs`.`status` = 0\";\n\t\t \n\t\t ////System.out.println(statement);\n\t\t ResultSet rs = stmt.executeQuery(statement);\n\t\t while(rs.next()){\n\t \t\t\t//////System.out.println(\"test III\");\n\t\t //Retrieve by column name\n\t\t String id = rs.getString(\"id\");\n\t\t //Display values\n\t\t ////System.out.println(\", Purchase Log Id : \" + id);\n\t\t UserActivePurchaseLogId = id;\n\t\t }\n\t\t //STEP 6: Clean-up environment\n\t\t rs.close();\n\t\t stmt.close();\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(stmt!=null)\n\t\t stmt.close();\n\t\t }catch(SQLException se2){\n\t\t }// nothing we can do\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t \t ////System.out.println(\"Goodbye!\");\t \n\t return UserActivePurchaseLogId;\n }",
"public abstract I_SessionInfo getSession(I_SessionName sessionName);",
"public CredentialsModel find(int id) {\n Statement stmt = null;\n Connection connection = null;\n try {\n try {\n connection = ds.getConnection();\n try {\n stmt = connection.createStatement();\n ResultSet result = stmt\n .executeQuery(\"SELECT * FROM Credentials \"\n + \"where EmpNum = '\" + id + \"'\");\n if (result.next()) {\n CredentialsModel cred = new CredentialsModel();\n cred.setPassword(result.getString(\"EmpPassword\"));\n cred.setUserName(result.getString(\"EmpUsername\"));\n return cred;\n } else {\n return null;\n }\n } finally {\n if (stmt != null) {\n stmt.close();\n }\n\n }\n } finally {\n if (connection != null) {\n connection.close();\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"Error in find \" + id);\n ex.printStackTrace();\n return null;\n }\n }",
"boolean hasMerchantData();",
"boolean hasMerchantData();",
"private void verifyFromSQLite(){\n textInputLayoutUsername.setErrorEnabled(false);\n textInputLayoutPassword.setErrorEnabled(false);\n User user = new User();\n boolean _isnorekexist = false;\n\n for (int i=0;i<User.users.size();i++) {\n if (User.users.get(i).username.equals(textInputEditTextUsername.getText().toString())) {\n _isnorekexist = true;\n user = User.users.get(i);\n break;\n }\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextUsername, textInputLayoutUsername, getString(R.string.error_message_username))) {\n return;\n }\n if (!inputValidation.isInputEditTextFilled(textInputEditTextPassword, textInputLayoutPassword,getString(R.string.error_message_password))) {\n return;\n }\n if (!inputValidation.isInputEditTextNoRekExist(textInputEditTextUsername, textInputLayoutUsername,_isnorekexist,getString(R.string.error_username_not_exists))){\n return;\n }\n if (databaseHelper.checkUsername(textInputEditTextUsername.getText().toString().trim()\n , textInputEditTextPassword.getText().toString().trim())) {\n\n SessionManager sessionManager = SessionManager.with(this);\n sessionManager.createsession(user);\n progress = new ProgressDialog(this);\n progress.setMessage(\"Loading...\");\n progress.show();\n Thread _thread = new Thread() {\n @Override\n public void run() {\n try {\n Thread.sleep(2000);\n progress.dismiss();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n masuk();\n }\n });\n\n }\n };\n _thread.start();\n }\n else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(nestedScrollView, getString(R.string.error_valid_username_pin), Snackbar.LENGTH_LONG).show();\n }\n }",
"public void setWalletId(Long walletId) {\r\n this.walletId = walletId;\r\n }",
"public void setWalletId(Long walletId) {\r\n this.walletId = walletId;\r\n }",
"private void checkSession(final long sessionID, final long sessionVerID)\n {\n }",
"public String transaction_pay(int reservationId) {\r\n\t\ttry {\r\n\t\t\tif (username == null){\r\n\t\t\t\treturn \"Cannot pay, not logged in\\n\";\r\n\t\t\t}\r\n\t\t\tbeginTransaction();\r\n\t\t\t\r\n\t\t\t//query for the user balance \r\n\t\t\tcheckBalanceStatement.clearParameters();\r\n\t\t\tcheckBalanceStatement.setString(1, username);\r\n\t\t\tResultSet b = checkBalanceStatement.executeQuery();\r\n\t\t\tb.next();\r\n\t\t\tint user_balance = b.getInt(\"balance\");\r\n\t\t\t\r\n\t\t\t//get the price of the first flight\r\n\t\t\tunpaidReservationStatement.clearParameters();\r\n\t\t\tunpaidReservationStatement.setString(1, username);\r\n\t\t\tunpaidReservationStatement.setInt(2, reservationId);\r\n\t\t\tResultSet unpaid = unpaidReservationStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tint total_price = 0;\r\n\t\t\tif (!unpaid.next()){\r\n\t\t\t\trollbackTransaction();\r\n\t\t\t\treturn \"Cannot find unpaid reservation \"+reservationId+\" under user: \"+username+\"\\n\";\r\n\t\t\t} else {\r\n\t\t\t\t//unpaid.next() ?? maybe not sure\r\n\r\n\t\t\t\tint fid1 = unpaid.getInt(\"fid1\");\r\n\t\t\t\tint fid2 = unpaid.getInt(\"fid2\");\r\n\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\tcheckPriceStatement.setInt(1, fid1);\r\n\t\t\t\tResultSet p1 = checkPriceStatement.executeQuery();\r\n\t\t\t\tp1.next();\r\n\t\t\t\ttotal_price += p1.getInt(\"price\");\r\n\t\t\t\tp1.close();\r\n\t\t\t\t\r\n\t\t\t\t//unpaidReservationStatement2.clearParameters();\r\n\t\t\t\t//unpaidReservationStatement2.setString(1, username);\r\n\t\t\t\t//unpaidReservationStatement2.setInt(2, reservationId);\r\n\t\t\t\t//ResultSet second = unpaidReservationStatement2.executeQuery();\r\n\t\t\t\tif (fid2 != 0){\r\n\t\t\t\t\t//second fid is not null\r\n\t\t\t\t\tcheckPriceStatement.clearParameters();\r\n\t\t\t\t\tcheckPriceStatement.setInt(1, fid2);\r\n\t\t\t\t\tResultSet p2 = checkPriceStatement.executeQuery();\r\n\t\t\t\t\tp2.next();\r\n\t\t\t\t\ttotal_price += p2.getInt(\"price\");\r\n\t\t\t\t\tp2.close();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (total_price > user_balance){\r\n\t\t\t\t\trollbackTransaction();\r\n\t\t\t\t\treturn \"User has only \"+user_balance+\" in account but itinerary costs \"+total_price+\"\\n\";\r\n\t\t\t\t} else {\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdatePaidStatement.clearParameters();\r\n\t\t\t\t\tupdatePaidStatement.setString(1, \"true\");\r\n\t\t\t\t\tupdatePaidStatement.setInt(2, reservationId);\r\n\t\t\t\t\tupdatePaidStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tupdateBalanceStatement.clearParameters();\r\n\t\t\t\t\tupdateBalanceStatement.setInt(1, (user_balance-total_price));\r\n\t\t\t\t\tupdateBalanceStatement.setString(2, username);\r\n\t\t\t\t\tupdateBalanceStatement.executeUpdate();\r\n\t\t\t\t\t\r\n\t\t\t\t\tcommitTransaction();\r\n\t\t\t\t\treturn \"Paid reservation: \"+reservationId+\" remaining balance: \"+(user_balance-total_price)+\"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (SQLException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t//rollbackTransaction();\r\n\t\t\treturn \"Failed to pay for reservation \" + reservationId + \"\\n\";\r\n\t\t}\r\n }",
"@GetMapping(\"/{uuid}\")\n public ResponseEntity<Wallet> getWallet(@PathVariable String uuid) {\n return ResponseEntity\n .ok()\n .body(walletService.getWallet(uuid));\n }",
"private static String obtainSessionID(ApiContext apiContext) throws Exception {\n GetSessionIDCall apiCall = new GetSessionIDCall(apiContext);\n\n apiCall.setRuName(ruName);\n String sessionID = apiCall.getSessionID();\n //Handle the result returned\n logger.info(\"sessionID : \" + sessionID);\n return sessionID;\n }",
"java.lang.String getSessionID();",
"protected void loadInfo() {\n\t\tboolean isSuccess = true;\n\t\ttry {\n\t\t\tsmt = conn.createStatement();\n\t\t\trs = smt.executeQuery(\"select * from Google_Auth\");\n\t\t\totp_username = rs.getString(\"username\");\n\t\t\totp_SECRET_KEY = aria.Decrypt(rs.getString(\"secretcode\"));\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n isSuccess = false;\n }\n }",
"DangerMerchant selectByPrimaryKey(Integer id);",
"public boolean hasWalletId() {\n return walletIdBuilder_ != null || walletId_ != null;\n }",
"@Override\n public StandardBizResponse extendSession(\n StandardBizRequest standardBizRequest)\n throws EwalletException {\n return null;\n }",
"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 String loginVendor(Connection connection, String vendor_id){\n String query=\"select vendor_name, password from vendor where vendor_id = \"+\"\\'\"+vendor_id+\"\\'\\n\";\n String vendor_name;\n String password;\n\n try {\n /**\n * Execute the query and return the result set\n */\n Statement stmt = connection.createStatement();\n ResultSet result = stmt.executeQuery(query);\n result.next();\n\n vendor_name=result.getString(\"vendor_name\");\n password=result.getString(\"password\");\n\n\n Scanner pw= new Scanner(System.in);\n System.out.println(\"Please Enter your Password: \");\n String password_input =pw.nextLine();\n\n // if incorrect password\n while(!password_input.equals(password)){\n System.out.println(INCORRECT_PW);\n System.out.print(\"Please Enter your Password: \");\n password_input = pw.nextLine();\n }\n return \"Welcome! \" +vendor_name;\n\n } catch (SQLException e) {\n return Vendor_DOESNT_EXIST;\n }\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Payment> retrievePaymentDetails() throws ApplicationException {\n \tSession session = null;\n try {\n session = getSession();\n\t return session.createQuery(\"FROM PurchaseOrder\").list(); \n\t } catch (HibernateException e) {\n\t throw new ApplicationException(\"Some error occured while listing the details of all cart\",e); \n\t } finally {\n\t \t session.flush();\n\t }\n }",
"private Account loadDataFromDB(String id){\n if(mCurrentAccount == null){\n mCurrentAccount = getAccountDetailUC.execute(id);\n try {\n mLastSaveAccount = mCurrentAccount.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n }else{\n mCurrentAccount = getAccountDetailUC.execute(id);\n }\n return mCurrentAccount;\n }",
"@GET\n @Path(\"{id}\")\n @Produces(\"application/hal+json\")\n public Response get(@PathParam(\"regNo\") String regNo, @PathParam(\"accountNo\") String accountNo, @PathParam(\"id\") String id) {\n Optional<Transaction> transaction = admin.findTransaction(regNo, accountNo, id);\n if (transaction.isPresent()) {\n CacheControl cc = new CacheControl();\n cc.setMaxAge(24 * 60 * 60);\n return Response.ok(entityBuilder.buildTransactionJson(transaction.get(), uriInfo)).cacheControl(cc).build();\n } else {\n return Response.status(Response.Status.NOT_FOUND).build();\n }\n }",
"boolean hasTxnresponse();",
"public static Account getAccountDetails(int accountId) throws SQLException {\n boolean cdt1 = Checker.checkValidUserAccountAccountId(accountId);\n // if it is a account id, establish a connection\n if (cdt1) {\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n Connection connection = DatabaseDriverHelper.connectOrCreateDataBase();\n ResultSet results = DatabaseSelector.getAccountDetails(accountId, connection);\n while (results.next()) {\n // get the account details\n String name = results.getString(\"NAME\");\n BigDecimal balance = new BigDecimal(results.getString(\"BALANCE\"));\n // make an account class (either chequing, savings, or tfsa) based on the type\n if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(accountId, name, balance);\n connection.close();\n return chequing;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(accountId, name, balance);\n connection.close();\n return savings;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(accountId, name, balance);\n connection.close();\n return tfsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsa = new RestrictedSavingsAccountImpl(accountId, name, balance);\n connection.close();\n return rsa;\n } else if (DatabaseSelectHelper.getAccountType(accountId) == map.accountTypes.get(AccountTypes.BALANCEOWING)) {\n BalanceOwingAccount boa = new BalanceOwingAccountImpl(accountId, name, balance);\n connection.close();\n return boa;\n }\n }\n }\n return null;\n }",
"Session get(int id);",
"public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);",
"private void queryForSelectedSession(String sessionId) {\r\n GetSessionQuery getSessionQuery = GetSessionQuery.builder().id(sessionId).build();\r\n awsAppSyncClient.query(getSessionQuery)\r\n .responseFetcher(AppSyncResponseFetchers.NETWORK_ONLY)\r\n .enqueue(getSessionCallBack);\r\n }",
"synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }",
"public BankAccount findAccountById(int currentBankID) throws SQLException;",
"boolean hasSession();",
"@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}",
"PasswdDo selectByPrimaryKey(Integer id);",
"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 }",
"@Test\n public void getNotExistingSession() throws Exception {\n addDevice();\n assertEquals(\"Session should be created\", snmpSession, snmpController.getSession(device.deviceId()));\n assertEquals(\"Map should contain session\", 1, snmpController.snmpDeviceMap.size());\n assertEquals(\"Session should be fetched from map\", snmpSession, snmpController.getSession(device.deviceId()));\n }",
"private void getRegisterDetails() {\n String android_id = Settings.Secure.getString(this.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n Log.d(\"androidId\", android_id);\n\n int loginDeviceType = 1;\n\n APIHelper.init_connection(getApplicationContext(), android_id, loginDeviceType, new Callback() {\n @Override\n public void onSuccess(JSONObject response) {\n try {\n AppController.user_id = response.getString(\"user_id\");\n AppController.user_device_id = response.getString(\"user_device_id\");\n mProgressBar.setProgress(60);\n startApp();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFail(String error) {\n }\n });\n }",
"public static Payout retrieve(String id) throws PayabbhiException {\n\t\treturn request(Method.GET, urlFor(Payout.class, id), null, Payout.class);\n\t}",
"PasswordCard selectByPrimaryKey(Integer id);",
"public void callSessionConfirmationApi() {\n if (Utils.isNetworkConnected(mContext)) {\n\n Utils.showDialog(mContext);\n ApiHandler.getApiService().get_Session_ContactEnrollment(getSessionConfirmationdetail(), new retrofit.Callback<TeacherInfoModel>() {\n @Override\n public void success(TeacherInfoModel sessionconfirmationInfoModel, Response response) {\n Utils.dismissDialog();\n if (sessionconfirmationInfoModel == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (sessionconfirmationInfoModel.getSuccess() == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (sessionconfirmationInfoModel.getSuccess().equalsIgnoreCase(\"false\")) {\n Utils.ping(mContext, getString(R.string.false_msg));\n return;\n }\n if (sessionconfirmationInfoModel.getSuccess().equalsIgnoreCase(\"True\")) {\n// Utils.ping(mContext, \"Login succesfully\");\n confimDialog.dismiss();\n Intent isearchBYuser = new Intent(mContext, PaymentSuccessActivity.class);\n isearchBYuser.putExtra(\"transactionId\", orderIDStr);\n isearchBYuser.putExtra(\"responseCode\", \"0\");\n isearchBYuser.putExtra(\"order_id\", orderIDStr);\n startActivity(isearchBYuser);\n\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Utils.dismissDialog();\n error.printStackTrace();\n error.getMessage();\n Utils.ping(mContext, getString(R.string.something_wrong));\n }\n });\n } else {\n Utils.ping(mContext, getString(R.string.internet_connection_error));\n }\n }",
"private Wallet checkIfWalletExistsAndGetAndLock(TransactionDto transactionDto) {\n Wallet wallet = walletRepository.findAndLockWalletById(transactionDto.getWalletId());\n if (wallet == null) {\n throw new BusinessLogicException(String.format(\"A wallet with the id '%d' doesn't exist.\",\n transactionDto.getWalletId()));\n }\n return wallet;\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 int getPlayerWallet() {\n\t\t\treturn playerWallet;\n\t\t}",
"public Transaction getTransaction(int id){\n return accSystem.get(id);\n }",
"public void callSessioncapacityApi() {\n if (Utils.isNetworkConnected(mContext)) {\n\n Utils.showDialog(mContext);\n ApiHandler.getApiService().get_Check_SpotAvailability_By_SessionID(getSessioncapacityDetail(), new retrofit.Callback<TeacherInfoModel>() {\n @Override\n public void success(TeacherInfoModel sessionModel, Response response) {\n Utils.dismissDialog();\n if (sessionModel == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (sessionModel.getSuccess() == null) {\n Utils.ping(mContext, getString(R.string.something_wrong));\n return;\n }\n if (sessionModel.getSuccess().equalsIgnoreCase(\"false\")) {\n new AlertDialog.Builder(new ContextThemeWrapper(mContext, R.style.AppTheme))\n .setMessage(getResources().getString(R.string.fail_msg))\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .show();\n return;\n }\n if (sessionModel.getSuccess().equalsIgnoreCase(\"True\")) {\n Utils.dismissDialog();\n if (!contatIDstr.equalsIgnoreCase(\"\") && !sessionIDStr.equalsIgnoreCase(\"\")) {////&& !AppConfiguration.classsessionPrice.equalsIgnoreCase(\"0.00\")) {\n callpaymentRequestApi();\n }\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Utils.dismissDialog();\n error.printStackTrace();\n error.getMessage();\n Utils.ping(mContext, getString(R.string.something_wrong));\n }\n });\n } else {\n Utils.ping(mContext, getString(R.string.internet_connection_error));\n }\n }",
"private FileTransfer getFileTransferSession(String transferId) {\n ApiManager instance = ApiManager.getInstance();\n FileTransferService ftApi = instance.getFileTransferApi();\n if (ftApi == null) {\n Logger.d(TAG,\n \"getFileTransferSession() MessageingApi instance is null\");\n return null;\n }\n FileTransfer fileTransferSession = null;\n try {\n fileTransferSession = ftApi.getFileTransfer(transferId);\n } catch (JoynServiceException e) {\n Logger.e(TAG,\n \"getFileTransferSession() Get file session failed\");\n e.printStackTrace();\n fileTransferSession = null;\n } finally {\n return fileTransferSession;\n }\n }",
"Account getAccount(Long recvWindow, Long timestamp);",
"public BankThing retrieve(String id);",
"@Override\n\t\t\t\tpublic void onQueryInventoryFinished(IabResult result, Inventory inv) {\n\t\t\t\t\t if (mHelper == null) return;\n\t\t\t\t\t \n\t\t\t\t\t if (!result.isSuccess()) {\n\t\t\t return;\n\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t Purchase premiumPurchase = inv.getPurchase(Paid_Id_VF);\n\t\t\t\t\t\n\t\t\t\t\t Common.mIsPaid = (premiumPurchase != null && verifyDeveloperPayload(premiumPurchase));\n\t\t\t\t SharedPreferences sharedPreferences = MainActivity.this.getSharedPreferences(PREFS_NAME,0); //已经设置密码 \n\t\t\t\t SharedPreferences.Editor meditor = sharedPreferences.edit(); \n\t\t\t\t\t meditor.putBoolean(\"isPaid\",Common.mIsPaid ); \n\t\t\t\t\t meditor.commit();\n\t\t\t\t\t \n\t\t \t\t\t if (overviewFragment != null) {\n\t\t \t\t\t\t \n\t\t \t\t\t\t refreshADS = (OnRefreshADS) overviewFragment;\n\t\t \t\t\t\t refreshADS.refreshADS();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}",
"Account getAccount(int id);",
"private int getSessionFromClient(int playerID){\n\n\t\tint sessionIDSearched = -1;\n\n\t\tfor (Player p : getPlayerMap().values()) {\n\t\t\tif(p.getPlayerID() == playerID){\n\t\t\t\tsessionIDSearched = p.getSessionID();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn sessionIDSearched;\n\n\t}",
"public static JSONObject checkKitchenLogin(String userid, String pwd ) throws Exception{\n\t\tJSONObject jsonObject = new JSONObject();\n\t\tBoolean isUserAvailable = false;\n\t\tConnection connection = null;\n\t\ttry {\n\t\t\tconnection = DBConnection.createConnection();\n\t\t\tSQL:{\n\t\t\t\tPreparedStatement preparedStatement = null;\n\t\t\t\tResultSet resultSet = null;\n\t\t\t\tString sql = \"SELECT * FROM fapp_accounts \"\n\t\t\t\t\t\t+ \" WHERE username = ? AND password = ? \";\n\t\t\t\ttry {\n\t\t\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\t\t\tpreparedStatement.setString(1, userid);\n\t\t\t\t\tpreparedStatement.setString(2, pwd);\n\t\t\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\t\t\tif(resultSet.next()){\n\t\t\t\t\t\tisUserAvailable = true;\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tisUserAvailable = false;\n\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally{\n\t\t\t\t\tif(connection!=null){\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t} \n\t\tjsonObject.put(\"status\", isUserAvailable);\n\t\treturn jsonObject;\n\t}",
"private boolean checkUnpaidReservation(int id) throws SQLException {\n\t\tcheckUnpaidReservationStatement.clearParameters();\n\t\tcheckUnpaidReservationStatement.setInt(1, id);\n\t\tcheckUnpaidReservationStatement.setString(2, this.username);\n\t\tResultSet result = checkUnpaidReservationStatement.executeQuery();\n\t\tresult.next();\n\t\tboolean out = result.getInt(1) == 1;\n\t\tif (DEBUG) {\n\t\t\tSystem.out.println(\"checkUnpaidReservation: \"+result.getInt(1)+\"\\n\");\n\t\t}\n\t\tresult.close();\n\t\treturn out;\n\t}",
"@Test\n public void contextLoads() throws JSONException {\n\n System.out.println(userService.getMyWallet(\"awdawd\"));\n\n\n }",
"public static synchronized SessionState getSession(String sessionid) {\n return statemap.get(sessionid);\n }",
"Transaction get(String id) throws Exception;",
"List<BankWallet> findByUser(User user);",
"public boolean checkLoginEntry(String name,int pin) {\n SQLiteDatabase db1 = this.getReadableDatabase();\n // SELECT * FROM expense WHERE id = ?;\n String selectQuery = \"SELECT * FROM \" + TABLE_LOGIN + \" WHERE \" + KEY_PIN + \" = \" + pin + \" AND \" + KEY_USERNAME + \" = \" +\"'\"+name+\"'\";\n Log.d(TAG, selectQuery);\n Cursor c = db1.rawQuery(selectQuery, null);\n if (c.getCount() ==1 ) {\n return true;\n }\n else\n {\n return false;\n }\n }",
"@Override\n\tpublic Object getWalletList(PagingTool pagingTool) throws Exception {\n\t\treturn null;\n\t}",
"public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"@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\r\n\t\t\tpublic Object doInTransaction(TransactionStatus arg0) {\n\t\t\t\t\r\n\t\t\t\tSqlLogInspetor sqlLogInspetor = new SqlLogInspetor();\r\n\t\t\t\tsqlLogInspetor.enable();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\tSignatureBean signatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tMasterBEnt masterBEnt = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQUVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoiZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> detailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tMasterBComp masterBComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAuZGV0YWlsQUVudENvbCIsInJhd0tleVZhbHVlcyI6WyIxIiwiMSJdLCJyYXdLZXlUeXBlTmFtZXMiOlsiamF2YS5sYW5nLkludGVnZXIiLCJqYXZhLmxhbmcuSW50ZWdlciJdfQ\");\r\n\t\t\t\tCollection<DetailAEnt> compDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29tcCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wIiwicmF3S2V5VmFsdWVzIjpbIjEiLCIxIl0sInJhd0tleVR5cGVOYW1lcyI6WyJqYXZhLmxhbmcuSW50ZWdlciIsImphdmEubGFuZy5JbnRlZ2VyIl19\");\r\n\t\t\t\tMasterBCompComp masterBCompComp = PlayerManagerTest.this.manager.getBySignature(signatureBean);\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tsignatureBean = PlayerManagerTest.this.manager.deserializeSignature(\"eyJjbGF6ek5hbWUiOiJvcmcuanNvbnBsYXliYWNrLnBsYXllci5oaWJlcm5hdGUuZW50aXRpZXMuTWFzdGVyQkVudCIsImlzQ29sbCI6dHJ1ZSwicHJvcGVydHlOYW1lIjoibWFzdGVyQkNvbXAubWFzdGVyQkNvbXBDb21wLmRldGFpbEFFbnRDb2wiLCJyYXdLZXlWYWx1ZXMiOlsiMSIsIjEiXSwicmF3S2V5VHlwZU5hbWVzIjpbImphdmEubGFuZy5JbnRlZ2VyIiwiamF2YS5sYW5nLkludGVnZXIiXX0\");\r\n\t\t\t\tCollection<DetailAEnt> compCompDetailAEntCol = PlayerManagerTest.this.manager.getBySignature(signatureBean);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp(), sameInstance(masterBComp)\", masterBEnt.getMasterBComp(), sameInstance(masterBComp));\r\n\t\t\t\tAssert.assertThat(\"masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBEnt.getMasterBComp().getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\t\r\n\t\t\t\tAssert.assertThat(\"masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp)\", masterBComp.getMasterBCompComp(), sameInstance(masterBCompComp));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compDetailAEntCol))\", detailAEntCol, not(sameInstance(compDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"detailAEntCol, not(sameInstance(compCompDetailAEntCol))\", detailAEntCol, not(sameInstance(compCompDetailAEntCol)));\r\n\t\t\t\tAssert.assertThat(\"compDetailAEntCol, not(sameInstance(compCompDetailAEntCol))\", compDetailAEntCol, not(sameInstance(compCompDetailAEntCol)));\r\n\t\t\t\t\r\n\t\t\t\tsqlLogInspetor.disable();\r\n\t\t\t\t\r\n\t\t\t\treturn null;\r\n\t\t\t}",
"public LiveData<List<WalletWithRelations>> loadWallets() {\n return wallets;\n }",
"public Optional<CheckingAcc> find(Long id){\n if (checkingAccRepository.findById(id).isPresent()){\n return checkingAccRepository.findById(id);\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"There is no account with the provided id\");\n }\n }",
"Transaction getTransctionByTxId(String txId);",
"@java.lang.Override\n public java.lang.String getWalletId() {\n java.lang.Object ref = walletId_;\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 walletId_ = s;\n return s;\n }\n }",
"public Object getMyidForPassword(Object obj) {\n\t\tMemberVO requestMemberVO = (MemberVO)obj;\r\n\t\tString id = requestMemberVO.getId();\r\n\r\n\t\tMemberVO memberVO = new MemberVO();\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new FileReader(\"member.txt\"));\r\n\t\t\tString[] tempStringArray; \r\n\t\t\tString[] temp2StringArray; \r\n\t\t\tArrayList<String> favoriteList = new ArrayList<String>();\r\n\r\n\t\t\tString line = \"\";\r\n\t\t\twhile((line = br.readLine()) != null) {\r\n\t\t\t\ttempStringArray = line.split(\"§§\");\r\n\t\t\t\tmemberVO.setUserNumber(Integer.parseInt(tempStringArray[0]));\r\n\t\t\t\tmemberVO.setId(tempStringArray[1]);\r\n\t\t\t\tmemberVO.setBirth(tempStringArray[2]);\r\n\t\t\t\tmemberVO.setPhoneNumber(tempStringArray[3]);\r\n\t\t\t\tmemberVO.setEmail(tempStringArray[4]);\r\n\t\t\t\tmemberVO.setPassword(tempStringArray[5]);\r\n\t\t\t\tmemberVO.setName(tempStringArray[6]);\r\n\t\t\t\tmemberVO.setGender(tempStringArray[7]);\r\n\t\t\t\tmemberVO.setAddress(tempStringArray[8]);\r\n\t\t\t\tmemberVO.setPoint(Integer.parseInt(tempStringArray[9]));\r\n\t\t\t\ttemp2StringArray = tempStringArray[10].split(\",\");\r\n\t\t\t\tfor(String favorite : temp2StringArray) {\r\n\t\t\t\t\tfavoriteList.add(favorite);\r\n\t\t\t\t}\r\n\t\t\t\tmemberVO.setFavorite(favoriteList);\r\n\t\t\t\tmemberVO.setProfilePhotoPath(tempStringArray[11]);\r\n\r\n\t\t\t\tif(id.equals(memberVO.getId())) {\r\n\t\t\t\t\tSystem.out.println(\"아이디 찾기 완료 : \" + memberVO.toString());\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tfavoriteList.clear();\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(br != null) {\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"아이디 찾기 실패\");\r\n\t\treturn false;\r\n\t}",
"public Key getkey(String appid) {\n log.debug(getSessionFactory() == null ? \"Session Factory is null\" : \"Session Factory is Not null\");\n log.debug(\"Application id :\" + appid);\n\n try {\n SimpleJdbcTemplate jdbcTemplate =\n new SimpleJdbcTemplate(SessionFactoryUtils.getDataSource(getSessionFactory()));\n Map args = new HashMap();\n args.put(\"in1\", new String(appid));\n\n return jdbcTemplate.queryForObject(\"select a.APP_ID,a.name,a.CERTIFICATEID,a.soa_group_id,c.soa_group_name from \" + APP_KEY_TABLE + \" a , SOA_GROUP c where a.status='Active' and a.soa_group_id=c.soa_group_id and a.APP_ID=?\"\n , new ParameterizedRowMapper<Key>() {\n public Key mapRow(ResultSet rs, int rowNum) throws SQLException {\n return new Key(rs.getString(\"APP_ID\"), rs.getString(\"name\"), rs.getString(\"soa_group_id\"), rs.getString(\"soa_group_name\"), rs.getString(\"CERTIFICATEID\"));\n }\n }, appid);\n } catch (DataAccessException e) {\n e.printStackTrace();\n return null;//To change body of catch statement use File | Settings | File Templates.\n }\n }",
"public ArrayList<GamePurchase> GetTransactionGame(int TransactionID);",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }",
"private boolean update() {\r\n\t\ttry {\r\n\t\t\tif (_session != null) {\r\n\t\t\t\tlong usrid = _session.getUsrID();\r\n\t\t\t\tJSONObject result = new JSONObject();\r\n\t\t\t\tresult.put(\"usrid\", usrid);\r\n\t\t\t\taddData(result);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetError(e);\r\n\t\t}\r\n\t\tsetError(Transaction.NO_SESSION_ERROR);\r\n\t\treturn false;\r\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}",
"DatabaseSession openSession();",
"private static ProfileKey getProfileKey(long id, Connection connection)\n throws ProfileKeyManagerPersistenceException {\n try {\n PreparedStatement statement = connection.prepareStatement(\"SELECT registered_flag, username \"\n + \"FROM all_user WHERE user_id = ?\");\n\n try {\n statement.setLong(1, id);\n\n ResultSet results = statement.executeQuery();\n try {\n if (!results.next()) {\n return null;\n }\n\n String type = (results.getString(1).equalsIgnoreCase(\"Y\")\n ? TYPE_REGISTERED : TYPE_UNREGISTERED);\n String username = results.getString(2);\n\n return new ProfileKey(id, username, type);\n } finally {\n closeResults(results);\n }\n } finally {\n closeStatement(statement);\n }\n } catch (SQLException ex) {\n throw new ProfileKeyManagerPersistenceException(\"SQL error: \" + ex.getMessage(), ex);\n }\n }"
] | [
"0.58102053",
"0.5740966",
"0.5721326",
"0.5695709",
"0.56499666",
"0.5586825",
"0.55430067",
"0.5503893",
"0.547076",
"0.542043",
"0.5366456",
"0.535345",
"0.5291553",
"0.52734387",
"0.5272928",
"0.5210497",
"0.5184846",
"0.51704824",
"0.51646817",
"0.51624554",
"0.5160239",
"0.515347",
"0.5138232",
"0.5116396",
"0.51088727",
"0.51088727",
"0.51088524",
"0.51087874",
"0.51084185",
"0.5100682",
"0.50941366",
"0.50941366",
"0.5088433",
"0.50840807",
"0.50840807",
"0.5084047",
"0.50774616",
"0.5071186",
"0.5035374",
"0.5015907",
"0.5014913",
"0.5012984",
"0.49902058",
"0.49886233",
"0.49845168",
"0.49837658",
"0.4952317",
"0.4937186",
"0.49320683",
"0.4924944",
"0.49145588",
"0.4907581",
"0.49067888",
"0.49061093",
"0.48928893",
"0.48769078",
"0.4871497",
"0.4860397",
"0.4859149",
"0.48554403",
"0.48440152",
"0.4840308",
"0.48377442",
"0.48269382",
"0.48253182",
"0.4818364",
"0.48141432",
"0.48079747",
"0.4805284",
"0.48052153",
"0.48040375",
"0.4798415",
"0.47983202",
"0.47942734",
"0.47891214",
"0.47855914",
"0.4778378",
"0.47734264",
"0.47700706",
"0.4769593",
"0.47666353",
"0.47654608",
"0.476072",
"0.47592142",
"0.47579616",
"0.47560623",
"0.47431108",
"0.47424957",
"0.4738198",
"0.47329363",
"0.47268638",
"0.4718542",
"0.47158676",
"0.470901",
"0.47019058",
"0.4695388",
"0.4692661",
"0.46823433",
"0.46820304",
"0.46782076"
] | 0.68971956 | 0 |
get the active addresses and ballances from the wallet (it gets in bult rather then multiple queries) | private boolean getAddresses(){
try {
URLtoJSON URLtoJSON = new URLtoJSON();
JSONObject json = URLtoJSON.open(this.URL+"merchant/"+this.GUID+"/list?password="+this.pswd()+"&api_code="+this.ApiCode);
if(!json.isNull("error")) return false; //If there is no transactions return false;
JSONArray nameArray = json.names();
JSONArray TotalArray = json.toJSONArray(nameArray);
JSONArray JAddresses = TotalArray.getJSONArray(0);
for(int i = 0; i < JAddresses.length(); i++){
String O="false";
String S="false";
String N="false";
String[] Label=JAddresses.getJSONObject(i).getString("label").split("_",-1);
if(Label.length==3){
O=Label[1];
S=Label[0];
N=Label[2];
}
String[] Matched=this.matchDB(JAddresses.getJSONObject(i).getString("address"));
String[] Details= new String[]{
"S: "+S, //0 Transaction ID
Matched[0], //1 Sender
Float.toString(JAddresses.getJSONObject(i).getLong("total_received")/100000000)+" (BTC)",//2 Amount in btc
O, //3 Choosen option
"btc", //4 Currency
"O: "+Matched[2], //5 Date
Matched[1] //6 Senders nem or false
};
if(!this.list.contains(Details)){
this.list.add(Details);
if(!"false".equals(O) && !O.equals("")){
this.setAmountsAndEntries(Integer.parseInt(O), JAddresses.getJSONObject(i).getLong("total_received"), Details[6]); //add the amount and rise the entries
}
}
}
return true;
} catch (JSONException | NumberFormatException e) {
e.printStackTrace();
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void listBalances() {\n\t\t\r\n\t}",
"public List<Address> getAllAddresses() throws BackendException;",
"@Override\n\tpublic List<Address> FindAllAddress() {\n\t\treturn ab.FindAll();\n\t}",
"public List<Address> findAll();",
"public List<UrlAddress> searchDBUrl() {\n log.info(new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(new Date()) + \"find all url address\");\n List<UrlAddress> all = urlRepository.findAll();\n return all;\n }",
"@Override\r\n\tpublic List<Map<String, String>> selectAddressList() {\n\t\treturn ado.selectAddressList();\r\n\t}",
"@NotNull\n List<Balance> balances(@NotNull List<String> addresses) throws EtherScanException;",
"public static List<Address> GetAllRecordsFromTable() {\n\n return SQLite.select().from(Address.class).queryList();\n\n\n }",
"@Override\r\n\tpublic List<Address> findAll() {\r\n\t\tDAOJDBC DAOJDBCModel = new DAOJDBC();\r\n\t\tStatement sqlStatement = null;\r\n\t\tList<Address> arrayList = new ArrayList<>();\r\n\t\t\r\n\t\tResultSet array = DAOJDBCModel.multiCallReturn(\"SELECT * FROM address;\", sqlStatement);\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(array.next()) {\r\n\t\t\t\tarrayList.add(new Address(array.getInt(\"id\"), array.getString(\"street\"), array.getString(\"district\"),\r\n\t\t\t\t\t\tarray.getInt(\"number\"), array.getString(\"note\"))); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn arrayList;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tDB.closeStatament(sqlStatement);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public List<Address> getAddresses()\n\t{\n\t\treturn getAddresses( getSession().getSessionContext() );\n\t}",
"public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }",
"public List<Address> getAddresses(final SessionContext ctx)\n\t{\n\t\tList<Address> coll = (List<Address>)getProperty( ctx, ADDRESSES);\n\t\treturn coll != null ? coll : Collections.EMPTY_LIST;\n\t}",
"public static List<Address> list() throws SQLException, Exception {\n\n String sql = \"SELECT * FROM address WHERE (enabled=?)\";\n\n List<Address> listAddress = null;\n\n Connection con = null;\n\n PreparedStatement stmt = null;\n\n ResultSet result = null;\n try {\n //Opens a connection to the DB\n con = ConnectionUtils.getConnection();\n //Creates a statement for SQL commands\n stmt = con.prepareStatement(sql);\n stmt.setBoolean(1, true);\n\n result = stmt.executeQuery();\n\n while (result.next()) {\n\n if (listAddress == null) {\n listAddress = new ArrayList<Address>();\n }\n // Create a Address instance and population with BD values\n Address address = new Address();\n\n address.setId(result.getInt(\"id\"));\n PublicPlaceType publicPlaceType = DAOPublicPlaceType.get(result.getInt(\"publicplace_type_id\"));\n address.setPublicPlaceType(publicPlaceType);\n City city = DAOCity.get(result.getInt(\"city_id\"));\n address.setCity(city);\n address.setPublicPlace(result.getString(\"publicplace\"));\n address.setNumber(result.getInt(\"number\"));\n address.setComplement(result.getString(\"complement\"));\n address.setDistrict(result.getString(\"district\"));\n address.setZipcode(result.getInt(\"zipcode\"));\n\n // Add the instance in the list\n listAddress.add(address);\n }\n } finally {\n ConnectionUtils.finalize(result, stmt, con);\n }\n\n return listAddress;\n }",
"List<WayBill> getWayBillVisited();",
"public List<PeerAddress> all() {\n final List<PeerAddress> all = new ArrayList<PeerAddress>();\n for (final Map<Number160, PeerStatistic> map : peerMapVerified) {\n synchronized (map) {\n for (PeerStatistic peerStatistic : map.values()) {\n all.add(peerStatistic.peerAddress());\n }\n }\n }\n return all;\n }",
"@GetMapping( value = \"/wallets\",produces = MediaType.APPLICATION_JSON_VALUE)\n public List<Wallet> getWallet() throws ExecutionException, InterruptedException {\n CompletableFuture<List<Wallet>> wallet = walletBankService.getWallet();\n CompletableFuture.allOf(wallet).join();\n List<Wallet> wallets = wallet.get();\n return wallets;\n }",
"AllUsersAddresses getAllUsersAddresses();",
"private void loadMoreAddresses() {\n if(!isLastPage) {\n isLoading = true;\n LobDemoApp.getLobDemoClient().getAddresses(mLayoutManager.getItemCount(), PAGE_SIZE, this, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n isLoading = false;\n\n parseAddresses(response);\n }\n });\n }\n // TODO: Issue a GET addresses request using the API Client\n }",
"public Map<String, Integer> getAccountBalances() throws LedgerException {\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch exception that 'Block does not exist' and throw a more specific error\n throw new LedgerException(\"get account balances\", \"No blocks have been committed yet.\");\n }\n\n // Get accountBalanceMap from the last committed block\n Map<String, Account> accountMap = lastBlock.getBalanceMap();\n\n // Create new map to store values\n Map<String, Integer> accountBalancesMap = new HashMap<String, Integer>();\n\n // Iterate through accounts to retrieve their current balances.\n for (Map.Entry<String, Account> entry : accountMap.entrySet() ) {\n accountBalancesMap.put(entry.getKey(), entry.getValue().getBalance());\n }\n\n return accountBalancesMap;\n }",
"@Override\r\n\tpublic List<UserAddress> viewUserAddressList() {\r\n\t\tList<UserAddress> result = new ArrayList<UserAddress>();\r\n useraddressrepository.findAll().forEach(UserAddress1 -> result.add(UserAddress1));\r\n return result;\r\n\t}",
"public List<Address> listAddress()\n {\n @SuppressWarnings(\"unchecked\")\n List<Address> result = this.sessionFactory.getCurrentSession().createQuery(\"from AddressImpl as address order by address.id asc\").list();\n\n return result;\n }",
"public Map<String, String> getActiveAccountsForDropDown(String companyId, boolean getAdvertiser, boolean getAgencies) throws Exception;",
"public List getAddressList() {\r\n System.out.println(\"List Elements :\" + addressList);\r\n return addressList;\r\n }",
"private void loadAddresses() {\n\t\ttry {\n\t\t\torg.hibernate.Session session = sessionFactory.getCurrentSession();\n\t\t\tsession.beginTransaction();\n\t\t\taddresses = session.createCriteria(Address.class).list();\n\t\t\tsession.getTransaction().commit();\n\t\t\tSystem.out.println(\"Retrieved addresses from database:\"\n\t\t\t\t\t+ addresses.size());\n\t\t} catch (Throwable ex) {\n\t\t\tSystem.err.println(\"Can't retrieve address!\" + ex);\n\t\t\tex.printStackTrace();\n\t\t\t// Initialize the message queue anyway\n\t\t\tif (addresses == null) {\n\t\t\t\taddresses = new ArrayList<Address>();\n\t\t\t}\n\t\t}\n\t}",
"public List<Address> getGeocoderAddress(Context context, double latitude, double longitude, int maxAddresses ) {\n if (location != null) {\n\n Geocoder geocoder = new Geocoder(context, Locale.ENGLISH);\n\n try {\n /**\n * Geocoder.getFromLocation - Returns an array of Addresses\n * that are known to describe the area immediately surrounding the given latitude and longitude.\n */\n List<Address> addresses = geocoder.getFromLocation(latitude, longitude, maxAddresses);\n\n return addresses;\n } catch (IOException e) {\n //e.printStackTrace();\n }\n }\n\n return null;\n }",
"private SpeechletResponse bankAddressResponse() {\n\n Place place = getPlaceWithOpeningHours();\n\n if (place == null) {\n log.error(\"No place was found! Your address: \" + deviceAddress.toString());\n return getAskResponse(BANK_CONTACT_CARD, ERROR_TEXT);\n }\n\n return doBankAddressResponse(place);\n }",
"private Response getAddressList( String term )\n {\n\n ReferenceList list = null;\n try\n {\n if ( \"RestAddressService\".equals( AddressServiceProvider.getInstanceClass( ) ) )\n {\n list = AddressServiceProvider.searchAddress( null, term );\n }\n\n }\n catch( RemoteException e )\n {\n AppLogService.error( e );\n }\n\n if ( list == null )\n {\n _logger.error( Constants.ERROR_NOT_FOUND_RESOURCE );\n return Response.status( Response.Status.NOT_FOUND )\n .entity( JsonUtil.buildJsonResponse( new ErrorJsonResponse( Response.Status.NOT_FOUND.name( ), MSG_ERROR_GET_ADDRESSES ) ) ).build( );\n }\n\n return Response.status( Response.Status.OK ).entity( JsonUtil.buildJsonResponse( new JsonResponse( list ) ) ).build( );\n }",
"public String getAddresses()\n {\n return _addresses;\n }",
"public AsyncResult<List<Address>> requestReachabilityAddresses(Jid contact) {\r\n // In addition, a contact MAY request a user's reachability addresses in an XMPP <iq/> stanza of type \"get\".\r\n return xmppSession.query(IQ.get(contact, new Reachability())).thenApply(result -> {\r\n Reachability reachability = result.getExtension(Reachability.class);\r\n if (reachability != null) {\r\n return reachability.getAddresses();\r\n }\r\n return null;\r\n });\r\n }",
"public LiveData<List<WalletWithRelations>> loadWallets() {\n return wallets;\n }",
"java.util.List<kr.pik.message.Profile.ProfileMessage.ContactAddress> \n getContactAddressList();",
"public ArrayList<Wallet> getAllWalletItems() {\n String[] columns = {\n COLUMN_WALLET_ID,\n COLUMN_WALLET_AMOUNT,\n COLUMN_WALLET_TITLE,\n COLUMN_WALLET_CURRENCY,\n COLUMN_WALLET_NOTE,\n COLUMN_WALLET_EXPIRES_ON,\n COLUMN_WALLET_TYPE\n };\n // sorting orders\n String sortOrder =\n COLUMN_WALLET_ID + \" DESC\";\n ArrayList<Wallet> walletList = new ArrayList<Wallet>();\n SQLiteDatabase db = this.getReadableDatabase();\n\n Cursor cursor = db.query(WALLET_TABLE, columns, null, null, null, null, sortOrder); //The sort order\n\n if (cursor != null){\n if (cursor.moveToFirst()) {\n do {\n Wallet wallet = new Wallet();\n\n wallet.setId(cursor.getInt(cursor.getColumnIndex(COLUMN_WALLET_ID)));\n wallet.setAmount(cursor.getInt(cursor.getColumnIndex(COLUMN_WALLET_AMOUNT)));\n wallet.setTitle((cursor.getString(cursor.getColumnIndex(COLUMN_WALLET_TITLE))));\n wallet.setNote((cursor.getString(cursor.getColumnIndex(COLUMN_WALLET_NOTE))));\n wallet.setCurrency(cursor.getInt(cursor.getColumnIndex(COLUMN_WALLET_CURRENCY)));\n wallet.setExpiresOn(cursor.getString(cursor.getColumnIndex(COLUMN_WALLET_EXPIRES_ON)));\n wallet.setWalletType(cursor.getString(cursor.getColumnIndex(COLUMN_WALLET_TYPE)));\n\n walletList.add(wallet);\n } while (cursor.moveToNext());\n }\n }\n cursor.close();\n db.close();\n return walletList;\n }",
"Collection<Account> getAll();",
"public static List<Address> getAddressesFromGeoCoder(Context context,double latitude,double longitude,int addressesToReturn) {\n List<Address> listOfAddresses = null;\n Geocoder gc=new Geocoder(context);\n try {\n listOfAddresses = gc.getFromLocation(latitude, longitude, addressesToReturn);\n\n //This is a test of more than one zip code - will give us 10023 & 10024\n //listOfAddresses = gc.getFromLocation(40.782891, -73.983085, addressesToReturn);\n } catch (IOException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n catch (IllegalArgumentException e) {\n Log.e(new Object() { }.getClass().getEnclosingClass()+\">\",e.getMessage());\n }\n //Could be empty or null - we don't want to return null\n if (listOfAddresses==null){\n listOfAddresses=new ArrayList<>();\n }\n return listOfAddresses;\n }",
"public List<Account> getBalanceByPassbook(String passbook_id) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<Account> accountList= session.createQuery(\"select a.balance from Account a, Passbook p where p.passbook_id='\"+passbook_id+\"'\").list();\n return AccountDto.getBalanceByPassbook(accountList);\n }",
"public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}",
"public List<Account> queryAll() {\n\t\treturn null;\n\t}",
"public List<PostalAddress> newServiceProvidingRequest() {\n UserSession session = app.getCurrentSession();\n String email = session.getEmailUser();\n ClientRecords rc = company.getClientRecords();\n cli = rc.getClientByEmail(email);\n List<PostalAddress> led = cli.getPostalAddresses();\n return led;\n }",
"public static Map<PhoneNumber, PhoneAccount> getAllAccounts(){\n\t\tMap<PhoneNumber, PhoneAccount> defensiveCopyphoneAccounts = new HashMap<PhoneNumber, PhoneAccount>();\n\t\tdefensiveCopyphoneAccounts.putAll(phoneAccounts);\n\t\t\n\t\treturn defensiveCopyphoneAccounts;\n\t}",
"public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }",
"public void getAddress() {\n if (mLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), mLocation);\n } else {\n mLocation = null;\n if (ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n Location currLocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n if (currLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(currLocation.getLatitude(), currLocation.getLongitude()));\n } else {\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 5, this);\n if (mCurrLocation != null) {\n mBusinessAddress = AppUtil.getAddress(getContext(), new LatLng(mCurrLocation.getLatitude(), mCurrLocation.getLongitude()));\n } else {\n // Default location in case location search doesn't work on first try\n mBusinessAddress = DiscoverConstants.DEFAULT_LOCATION;\n }\n }\n } else {\n mBusinessAddress = null;\n }\n }\n }",
"io.envoyproxy.envoy.data.dns.v3.DnsTable.AddressList getAddressList();",
"public static List<Address> listAddressBillingByIdCustomer(int a) throws SQLException, NamingException {\n List<Address> result = new ArrayList<Address>();\n Database database = Database.getInstance();\n Connection connection;\n connection = database.getConnection();\n PreparedStatement statement = connection.prepareStatement(viewAddressBillingByIdCustomer);\n statement.setInt(1, a);\n ResultSet rs = statement.executeQuery();\n while (rs.next()) {\n Address address = new Address(\n rs.getInt(\"ADDRESS_ID\"),\n rs.getString(\"ADDRESS_COMPANY_NAME\"),\n rs.getString(\"ADDRESS_L_NAME\"),\n rs.getString(\"ADDRESS_F_NAME\"),\n rs.getString(\"ADDRESS_STREET\"),\n rs.getString(\"ADDRESS_STREET_EXTRA\"),\n rs.getString(\"ADDRESS_POSTCODE\"),\n rs.getString(\"ADDRESS_CITY\"),\n rs.getString(\"ADDRESS_PHONE\"),\n rs.getString(\"ADDRESS_PHONE_EXTRA\"));\n result.add(address);\n }\n return result;\n }",
"public Set<Integer> getActiveNeighbors() {\n HashSet<Integer> retSet = new HashSet<Integer>();\n\n for (AS tAS : this.providers) {\n retSet.add(tAS.getASN());\n }\n for (AS tAS : this.customers) {\n retSet.add(tAS.getASN());\n }\n for (AS tAS : this.peers) {\n retSet.add(tAS.getASN());\n }\n\n return retSet;\n }",
"@GetMapping()\n\t@Override\n\tpublic List<Address> findAll() {\n\t\treturn addressService.findAll();\n\t}",
"ArrayList<Bet> selectWonBetsOfAccount(Account account) throws DAOException;",
"@Override\n public Map<String, BankAccount> getAccounts(Connection connection, String src, String trg, boolean forUpdate) throws SQLException, BankBusinessException {\n String query = \"\";\n String tableName = connectionProperties.getTableName();\n if (forUpdate) {\n query = String.format(\"select * from %s where card_number = ? or card_number = ? FOR UPDATE\", tableName);\n } else {\n query = String.format(\"select * from %s where card_number = ? or card_number = ?\", tableName);\n }\n PreparedStatement preparedStatement = connection.prepareStatement(query);\n preparedStatement.setString(1, src);\n preparedStatement.setString(2, trg);\n log.info(\"Query {}\", query);\n ResultSet set = preparedStatement.executeQuery();\n final Map<String, BankAccount> accountMap = new HashMap<>();\n while (set.next()) {\n BankAccount account = new BankAccount();\n account.setCardNumber(set.getString(\"card_number\"));\n account.setBalance(set.getDouble(\"balance\"));\n accountMap.put(account.getCardNumber(), account);\n }\n return accountMap;\n }",
"List<WayBill> getAllWayBill();",
"@Override\n public List<UTXO> getOpenTransactionOutputs(List<Address> addresses) throws UTXOProviderException {\n\n List<UTXO> results = new LinkedList<UTXO>();\n for (Address a : addresses) {\n ByteBuffer bb = ByteBuffer.allocate(21);\n bb.put((byte) KeyType.ADDRESS_HASHINDEX.ordinal());\n bb.put(a.getHash160());\n\n ReadOptions ro = new ReadOptions();\n Snapshot sn = db.getSnapshot();\n ro.snapshot(sn);\n\n // Scanning over iterator very fast\n\n DBIterator iterator = db.iterator(ro);\n for (iterator.seek(bb.array()); iterator.hasNext(); iterator.next()) {\n ByteBuffer bbKey = ByteBuffer.wrap(iterator.peekNext().getKey());\n bbKey.get(); // remove the address_hashindex byte.\n byte[] addressKey = new byte[20];\n bbKey.get(addressKey);\n if (!Arrays.equals(addressKey, a.getHash160())) {\n break;\n }\n byte[] hashBytes = new byte[32];\n bbKey.get(hashBytes);\n int index = bbKey.getInt();\n Sha256Hash hash = Sha256Hash.wrap(hashBytes);\n UTXO txout;\n try {\n // TODO this should be on the SNAPSHOT too......\n // this is really a BUG.\n txout = getTransactionOutput(hash, index);\n } catch (BlockStoreException e) {\n throw new UTXOProviderException(\"block store execption\", e);\n }\n if (txout != null) {\n Script sc = txout.getScript();\n Address address = sc.getToAddress(params, true);\n UTXO output = new UTXO(txout.getHash(), txout.getIndex(), txout.getValue(), txout.getHeight(),\n txout.isCoinbase(), txout.getScript(), address.toString());\n results.add(output);\n }\n }\n try {\n iterator.close();\n ro = null;\n sn.close();\n sn = null;\n } catch (IOException e) {\n log.error(\"Error closing snapshot/iterator?\", e);\n }\n }\n return results;\n }",
"public List<Address> getAllAddresses(long id) {\n\t\tList<Address> address = new ArrayList<>();\r\n\t\taddressdao.findByUserUId(id)\r\n\t\t.forEach(address::add);\r\n\t\treturn address;\r\n\t}",
"public String getBalances() {\n\n\t\treturn getJson(API_VERSION, ACCOUNT, \"getbalances\");\n\t}",
"List<Account> getAccountByCountryOrState(String country,String state);",
"public Map<CeloContract, String> allAddresses() {\n for (CeloContract contract : CeloContract.values()) {\n this.addressFor(contract);\n }\n return cache;\n }",
"public List<Balance> getAddBalanceList() {\r\n\t\tList<Balance> balanceList = new ArrayList<Balance>();\r\n\t\tif (selectedItem != null) {\r\n\t\t\tList<Book> bookList = new ArrayList<Book>();\r\n\t\t\tfor (BalanceData b : GlobalBalance.instance().list()) {\r\n\t\t\t\t// Flag no se ha encontrado\r\n\t\t\t\tboolean founded = false;\r\n\t\t\t\t// Recuperar la lista de books a las que pertenece el balance\r\n\t\t\t\tbookList = bookService.getBooksByIdBalance(b.getId());\r\n\t\t\t\tfor (Book book : bookList) {\r\n\t\t\t\t\t// Si el book seleccionado ya pertenece al balance\r\n\t\t\t\t\tif (selectedItem.getId().compareTo(book.getId()) == 0) {\r\n\t\t\t\t\t\t// Flag se ha encontrado\r\n\t\t\t\t\t\tfounded = true;\r\n\t\t\t\t\t\t// Detener el bucle\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Si el balance no ha sido agregado ya al book\r\n\t\t\t\tif (!founded) {\r\n\t\t\t\t\t// Agregarlo a la lista\r\n\t\t\t\t\tbalanceList.add(b.getEntity());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn balanceList;\r\n\t}",
"ArrayList<Bet> selectLostBetsOfAccount(Account account) throws DAOException;",
"private void loadAddresses() {\n isLoading = false;\n isLastPage = false;\n mAdapter.clearAll();\n\n // Fetch items starting from the first\n loadMoreAddresses();\n }",
"private void getMyWallet() {\n AppDialog.showProgressDialog(mActivity, true);\n IApiClient client = ApiClient.getApiClient();\n ReqMyWallet reqWallet = new ReqMyWallet();\n reqWallet.setServiceKey(mAppSharedPreference.getString(PreferenceKeys.KEY_SERVICE_KEY, ServiceConstants.SERVICE_KEY));\n reqWallet.setMethod(MethodFactory.MY_WALLET.getMethod());\n reqWallet.setUserID(mAppSharedPreference.getString(PreferenceKeys.KEY_USER_ID, \"\"));\n Call<ResMyWallet> call = client.myWallet(reqWallet);\n call.enqueue(new Callback<ResMyWallet>() {\n @Override\n public void onResponse(Call<ResMyWallet> call, Response<ResMyWallet> response) {\n AppDialog.showProgressDialog(mActivity, false);\n if (isAdded()) {\n mResMyWallet = response.body();\n if (mResMyWallet != null) {\n if (mResMyWallet.getSuccess() == ServiceConstants.SUCCESS) {\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvCancellation.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvCancellation.setText(mActivity.getString(R.string.rs) + mResMyWallet.getRefundAmt());\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvCashback.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvCashback.setText(mActivity.getString(R.string.rs) + mResMyWallet.getCashBackAmt());\n// if (mResMyWallet.getRefundAmt().isEmpty())\n// tvPrizeMoney.setText(mActivity.getString(R.string.rs) + \"0\");\n// else\n// tvPrizeMoney.setText(mActivity.getString(R.string.rs) + mResMyWallet.getPrizeAmt());\n if (mResMyWallet.getTotalAmt().isEmpty()) {\n tvWalletBalance.setText(mActivity.getString(R.string.rs) + \"0\");\n } else {\n tvWalletBalance.setText(mActivity.getString(R.string.rs) + mResMyWallet.getTotalAmt());\n }\n\n } else {\n ToastUtils.showShortToast(mActivity, mResMyWallet.getErrstr());\n }\n } else {\n ToastUtils.showShortToast(mActivity, R.string.err_network_connection);\n }\n }\n }\n\n @Override\n public void onFailure(Call<ResMyWallet> call, Throwable t) {\n AppDialog.showProgressDialog(mActivity, false);\n ToastUtils.showShortToast(mActivity, R.string.err_network_connection);\n }\n });\n }",
"public List<String> getAddresses() {\n // Lazy initialization with double-check.\n List<String> a = this.addresses;\n if (a == null) {\n synchronized (this) {\n a = this.addresses;\n if (a == null) {\n this.addresses = a = new ArrayList<String>();\n }\n }\n }\n return a;\n }",
"public List<DietaBalanceada> consultar_dietaBalanceada();",
"List<?> getAddress();",
"public Call<BCExplorerResult<List<AddressData>>> getAddressesData(List<MinterAddress> addresses) {\n checkNotNull(addresses, \"List can't be null\");\n checkArgument(addresses.size() > 0, \"List can't be empty\");\n\n final List<String> sAddresses = new ArrayList<>(addresses.size());\n for (MinterAddress address : addresses) {\n if (address == null) {\n continue;\n }\n sAddresses.add(address.toString());\n }\n\n checkArgument(sAddresses.size() > 0, \"List contains all null items\");\n\n return getInstantService(this).balanceMultiple(sAddresses);\n }",
"@Override\r\n\tpublic List<EasybuyAddress> getAddressByUserId(String id) {\n\t\tList<EasybuyAddress> addresses=new ArrayList<EasybuyAddress>();\r\n\t\tString sql=\"select * from easybuy_address where ad_user_id=?\";\r\n\t\tResultSet rSet=super.query(sql, new Object[]{id});\r\n\t\ttry {\r\n\t\t\twhile(rSet.next())\r\n\t\t\t{\r\n\t\t\t\tEasybuyAddress address=new EasybuyAddress();\r\n\t\t\t\taddress.setAd_id(rSet.getInt(1));\r\n\t\t\t\taddress.setAd_user_id(rSet.getString(2));\r\n\t\t\t\taddress.setAd_address(rSet.getString(3));\r\n\t\t\t\taddresses.add(address);\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 addresses;\r\n\t}",
"@Override\r\n\tpublic Account loadAccount(String accountNumber) {\n\t\tAccount account1=null;\r\n\t\ttry {\r\n\t\t\taccount1 = account.getclone(account);\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\tString sql = \"SELECT a.accountNumber, a.balance, a.accountType, b.name, b.email, c.street, c.city, c.zip, c.state \"+\r\n \"FROM customer b \"+\r\n \"INNER JOIN address c \"+\r\n \"ON b.addressID = c.ID \"+\r\n \"INNER JOIN account a \"+\r\n \"ON b.ID = a.CustomerID \"+\r\n\t\t\"WHERE a.accountNumber = \"+accountNumber+\";\" ;\r\n\t\tPreparedStatement preparedStatement;\r\n\r\n\r\n\r\ntry {\r\n\r\n\tpreparedStatement = con.prepareStatement(sql);\r\n\t\r\n\t\r\n ResultSet rs=preparedStatement.executeQuery();\r\n\r\n\r\n while ( rs.next() ) {\r\n \taccount1.setAccountNumber(Integer.toString(rs.getInt(1)));\r\n \taccount1.setBalance((double) rs.getInt(2));\r\n \tAccountType accty=BankAccountType.CHECKING;\r\n \tif(\"SAVING\".equalsIgnoreCase(rs.getString(3))){\r\n \t\taccty=BankAccountType.SAVING;\r\n \t}\r\n \taccount1.setAccountType(accty);\r\n \taccount1.getCustomer().setName(rs.getString(4));\r\n \taccount1.getCustomer().setEmail(rs.getString(5));\r\n \taccount1.getCustomer().getAddress().setStreet(rs.getString(6));\r\n \taccount1.getCustomer().getAddress().setCity(rs.getString(7));\r\n \taccount1.getCustomer().getAddress().setZip(rs.getString(8));\r\n \taccount1.getCustomer().getAddress().setState(rs.getString(9));\r\n \taccount1.setAccountEntries(getAccountEntry(accountNumber));\r\n \t\r\n System.out.println(account1);\r\n \r\n }\r\n} catch (SQLException e) {\r\n\t// TODO Auto-generated catch block\r\n\tSystem.out.println(\"Connection Failed! Check output console\");\r\n\te.printStackTrace();\r\n}\r\nlog();\r\n\r\n \r\nreturn account1;\r\n\t}",
"public Addressbook[] getAddressbooks() throws RemoteException;",
"public static void getAcountsBalance(int value) {\n\t\t\t\n\t\t\taccounts.clear();\n\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND balance =\" + value;\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsBalance\");\n\t\t }\n\t\n\t\t}",
"public ArrayList<Address> getAddresses() {\n return addresses;\n }",
"boolean hasAddressList();",
"public ArrayList<BankAccount> getAccounts() {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id > ?\";\n\n\t\tArrayList<BankAccount> bankAccounts = new ArrayList<>();\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tpstmt.setInt(1, 0);\n\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\n\t\t\t\tBankAccount bankAccount = new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t\tbankAccounts.add(bankAccount);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn bankAccounts;\n\t}",
"public List<Address> getAllAddressesByName(String user_name) {\n\t\tList<Address> address = new ArrayList<>();\r\n\t\taddressdao.findByUserUsername(user_name)\r\n\t\t.forEach(address::add);\r\n\t\treturn address;\r\n\t}",
"@GetMapping( value = \"/bank\",produces = MediaType.APPLICATION_JSON_VALUE)\n public List<BankAccount> getBankAccount() throws ExecutionException, InterruptedException {\n CompletableFuture<List<BankAccount>> bankAccount = walletBankService.getBankAccount();\n CompletableFuture.allOf(bankAccount).join();\n List<BankAccount> bankAccounts = bankAccount.get();\n return bankAccounts;\n }",
"List<Address> findByState(String state);",
"public Call<BCExplorerResult<AddressData>> getAddressData(MinterAddress address, boolean withSum) {\n return getAddressData(address.toString(), withSum);\n }",
"public List<AccountBean> getAllAccounts() {\n\t\tList<AccountBean> accountBeans = null;\n\t\tConnectionSource connectionSource = null;\n\t\tDao<AccountBean, Integer> contactDao = null;\n\n\t\ttry {\n\t\t\tconnectionSource = new AndroidConnectionSource(mDatabase);\n\t\t\tcontactDao = DaoManager.createDao(connectionSource,\n\t\t\t\t\tAccountBean.class);\n\t\t\taccountBeans = contactDao.queryBuilder()\n\t\t\t\t\t.orderBy(IConstants.ORDER_BY_UPDATED_AT, false).query();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn accountBeans;\n\t}",
"List<Account> selectAll();",
"public HashMap<String, Accounts> getAccounts(){\n return accounts;\n }",
"@Override\n\tpublic List<BillardAccounts> getBilliardAccounts() {\n\t\treturn announceMapper.getBilliardAccounts();\n\t}",
"static void printAccountBalance(String address){\n }",
"@Test\n public void testGetPeerAddresses() {\n replay(participantsConfig);\n\n peerManager.activate();\n\n List<IpAddress> expectedAddresses = new ArrayList<>();\n expectedAddresses.add(IpAddress.valueOf(PEER_IP));\n expectedAddresses.add(IpAddress.valueOf(NEW_PEER1_IP));\n Collections.sort(expectedAddresses);\n\n List<IpAddress> actualAddresses =\n peerManager.getPeerAddresses(bgpConfig);\n Collections.sort(actualAddresses);\n\n assertEquals(expectedAddresses, actualAddresses);\n }",
"public Address getBillingAddress() {\n return billingAddress;\n }",
"Object getBcclist();",
"public static ArrayList<CustomerInfoBean> getCutomers_onActive(int onloan,\r\n\t\t\tint oncash) {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tSystem.out.println(\"Onloan \" + onloan + \" oncsah \" + oncash);\r\n\t\t// if(onloan==0 && oncash==0){querycon=\"\";}\r\n\t\t//\r\n\t\t// if(onloan==1){querycon=\"and sld.payement_option=1\";}\r\n\t\t// else if (oncash==1){querycon=\"and sld.payement_option=0\";} else\r\n\t\t// {querycon=\"\";}\r\n\t\t// // if((onloan==1) && (oncash==1)){querycon=\"and sld.payement_option=0\r\n\t\t// or sld.payement_option=1\";} else {querycon=\"\";}\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,sld.payement_option, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE a.appliance_status=1;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tSystem.out.print(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}",
"List<AccountDetail> findAllByAddressStartingWith(String address);",
"@Test\n\tpublic void testRetrieveMultipleAddressesForDriver() throws MalBusinessException{\n\t\t// driver with more than one address\n\t\tLong drv_id = 168535L;\n\t\tList<DriverAddress> da = driverService.getDriver(drv_id).getDriverAddressList();\n\t\tassertTrue(da.size() > 1);\n\t\t\n\t}",
"default Gwei get_total_active_balance(BeaconState state) {\n return get_total_balance(state,\n get_active_validator_indices(state, get_current_epoch(state)));\n }",
"public List<CoinbaseAccount> getCoinbaseAccounts() throws IOException {\n\n String path = \"/v2/accounts\";\n String apiKey = exchange.getExchangeSpecification().getApiKey();\n BigDecimal timestamp = coinbase.getTime(Coinbase.CB_VERSION_VALUE).getData().getEpoch();\n String signature = getSignature(timestamp, path);\n showCurl(apiKey, timestamp, signature, path);\n \n return coinbase.getAccounts(Coinbase.CB_VERSION_VALUE, apiKey, signature, timestamp).getData();\n }",
"@Test\n\tpublic void testDriverAddressesReturned(){ \n\t\t// Left the driver values in this test method as the driver id and the expected values are very closely tied and extracting\n\t\t// them out to a properties file doesn't seem to make sense as these are old drivers that will not likely change.\n\t\t\n\t\tlong driverId = 3l; // driver with no post address, 2 garaged history addresses and 1 current\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE).size(), 0);\t\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 3);\n\t\t\n\t\tdriverId = 4l; // driver with no history addresses\n\t\tassertEquals(driverService.getDriverAddressesByType(driverId, DriverService.GARAGED_ADDRESS_TYPE).size(), 1);\n\t\t\n\t\tdriverId = 125989l; // driver with multiple post\n\t\tList<DriverAddressHistory> list = driverService.getDriverAddressesByType(driverId, DriverService.POST_ADDRESS_TYPE);\n\t\tassertEquals(list.size(), 4);\n\t\t// check end date of first record\n\t\tassertEquals(list.get(0).getEndDate().toString(), \"2006-12-09 09:39:05.0\"); \n\t\t// check calculated start date of history record when change on same day\n\t\tassertEquals(list.get(1).getStartDate().toString(), \"2006-12-09 09:58:51.0\");\n\t\t// check calculated start date of history record when change not on same day\n\t\tassertEquals(list.get(2).getStartDate().toString(), \"Sun Dec 10 00:00:00 EST 2006\"); //TODO This is too brittle need to redo date/time test\n\t\t// check start date of current record\n\t\tassertEquals(list.get(3).getStartDate().toString(), \"Fri Apr 03 00:00:01 EDT 2009\"); //TODO This is too brittle need to redo date/time test\n\t}",
"List<Account> findAll();",
"List<Account> findAll();",
"default Gwei get_attesting_balance(BeaconState state, List<PendingAttestation> attestations) {\n return get_total_balance(state, get_unslashed_attesting_indices(state, attestations));\n }",
"@Override\n\tpublic List<ComBorrowings> getAllComBorrowingsInfo() {\n\t\treturn comBorrowingsMapper.selectByExample(new ComBorrowingsExample());\n\t}",
"@Override\n public Map<Bytes32, Bytes> getAllAccountStorage(final Address address, final Hash rootHash) {\n final Map<Bytes32, Bytes> results = new HashMap<>();\n BonsaiLayeredWorldState currentLayer = this;\n while (currentLayer != null) {\n if (currentLayer.trieLog.hasStorageChanges(address)) {\n currentLayer\n .trieLog\n .streamStorageChanges(address)\n .forEach(\n entry -> {\n if (!results.containsKey(entry.getKey())) {\n final UInt256 value = entry.getValue().getUpdated();\n // yes, store the nulls. If it was deleted it should stay deleted\n results.put(entry.getKey(), value);\n }\n });\n }\n if (currentLayer.getNextWorldView().isEmpty()) {\n currentLayer = null;\n } else if (currentLayer.getNextWorldView().get() instanceof BonsaiLayeredWorldState) {\n currentLayer = (BonsaiLayeredWorldState) currentLayer.getNextWorldView().get();\n } else {\n final Account account = currentLayer.getNextWorldView().get().get(address);\n if (account != null) {\n account\n .storageEntriesFrom(Hash.ZERO, Integer.MAX_VALUE)\n .forEach(\n (k, v) -> {\n if (!results.containsKey(k)) {\n results.put(k, v.getValue());\n }\n });\n }\n currentLayer = null;\n }\n }\n return results;\n }",
"private List<DriverAddress> generateAddresses(Driver driver, int amount){\n\t\tList<DriverAddress> addresses = new ArrayList<DriverAddress>();\n\t\tfor(int i=0; i < amount; i++){ \t\t\n\t\t\taddresses.add(new DriverAddress());\n\t\t\taddresses.get(i).setBusinessInd(\"N\");\n\t\t\taddresses.get(i).setAddressLine1(i + \" Driver Service Test\");\n\t\t\taddresses.get(i).setPostcode(\"45241\");\n\t\t\taddresses.get(i).setGeoCode(\"0800\");\t\t\n\t\t\taddresses.get(i).setAddressType(driverService.getDriverAddressTypeCodes().get(0));\n\t\t\taddresses.get(i).setDriver(driver);\n\t\t}\n\t\treturn addresses;\n\t}",
"public List<Address> getAddresses() {\r\n\r\n if (this.addresses == null) {\r\n\r\n this.addresses = new ArrayList<Address>();\r\n\r\n }\r\n\r\n return this.addresses;\r\n\r\n }",
"public String getBillingAddressDetails(){\n String address = driver.findElement(oBillingAddress).getText();\n logger.debug(\"billing address is :\" + address);\n return address;\n }",
"@Override\r\n\tpublic List<AppAccount> findAllAppAccounts() {\r\n\t\tlogger.debug(\"findAllAppAccounts() method started\");\r\n\t\tList<AppAccount> models = new ArrayList<AppAccount>();\r\n\t\ttry {\r\n\t\t\t// call Repository method\r\n\t\t\tList<AppAccountEntity> entities = appAccRepository.findAll();\r\n\r\n\t\t\tif (entities.isEmpty()) {\r\n\t\t\t\tlogger.warn(\"***No Accounts found in Application****\");\r\n\t\t\t} else {\r\n\t\t\t\t// convert Entities to models\r\n\t\t\t\tfor (AppAccountEntity entity : entities) {\r\n\t\t\t\t\tAppAccount model = new AppAccount();\r\n\t\t\t\t\tBeanUtils.copyProperties(entity, model);\r\n\t\t\t\t\tmodels.add(model);\r\n\t\t\t\t}\r\n\t\t\t\tlogger.info(\"All Accounts details loaded successfully\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"Exception occured in findAllAppAccounts()::\" + e.getMessage());\r\n\t\t}\r\n\t\tlogger.debug(\"findAllAppAccounts() method ended\");\r\n\t\treturn models;\r\n\t}",
"List<Account> findByAddressStartingWith(String startAddress);",
"@Override\n\tpublic List<Account> getAllAcountsForUser(User user) {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Account where user.id=:user\");\n\t\tquery.setParameter(\"user\", user.getId()); // maybe put the id here ? \n\t\tList<Account> accountList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn accountList;\n\t}",
"@Test\n public void testGetAllAddresses() throws Exception {\n List<Address> expected = new ArrayList<>();\n expected.add(createMockedAddress(1));\n\n new Expectations() {{\n jdbcTemplate.query(anyString, (RowMapperResultSetExtractor<?>) any);\n returns(expected);\n }};\n\n List<Address> actual = addressService.getAllAddresses();\n assertEquals(actual.size(), 1);\n assertEquals(actual.get(0), expected.get(0));\n }",
"@RequestMapping(value = \"/all\")\n public List<Account> getAll(){\n return new ArrayList<>(accountHelper.getAllAccounts().values());\n }",
"@RequestLine(\"GET /accounts\")\n AccountList getAccountsListOfUser();"
] | [
"0.602731",
"0.601722",
"0.59512407",
"0.5861105",
"0.5750117",
"0.5714007",
"0.5656505",
"0.56539595",
"0.5623041",
"0.561931",
"0.56168604",
"0.5522406",
"0.5514049",
"0.55097663",
"0.54808056",
"0.54738957",
"0.54738134",
"0.54585266",
"0.5451186",
"0.54484856",
"0.54477006",
"0.54435825",
"0.54193383",
"0.536955",
"0.5363395",
"0.5356473",
"0.53490084",
"0.5331155",
"0.53297687",
"0.53292996",
"0.5327618",
"0.53213644",
"0.5315006",
"0.5305187",
"0.5288217",
"0.5280788",
"0.52787495",
"0.5275517",
"0.5251909",
"0.52516085",
"0.5242839",
"0.5237379",
"0.52271885",
"0.5220947",
"0.522023",
"0.5207215",
"0.52048284",
"0.5200239",
"0.5189027",
"0.5185638",
"0.5173796",
"0.5162268",
"0.5156093",
"0.5151835",
"0.51495266",
"0.5146148",
"0.5144095",
"0.5140602",
"0.51369333",
"0.5132746",
"0.51264626",
"0.5121148",
"0.51171505",
"0.51154625",
"0.51053715",
"0.5095999",
"0.5082741",
"0.5081236",
"0.50778645",
"0.5057758",
"0.50533664",
"0.50500685",
"0.50405604",
"0.5034807",
"0.5034434",
"0.50174916",
"0.501115",
"0.50028706",
"0.50016946",
"0.49931672",
"0.4987393",
"0.49757794",
"0.4964532",
"0.49621242",
"0.49612936",
"0.49589872",
"0.49531442",
"0.49531442",
"0.4948691",
"0.4947682",
"0.49461934",
"0.49455956",
"0.49399614",
"0.49373165",
"0.49350655",
"0.4933609",
"0.4932645",
"0.493137",
"0.4930909",
"0.49284938"
] | 0.62446684 | 0 |
generate the password from the details given | private String pswd(){
try{
PBEKeySpec spec = new PBEKeySpec(this.Creator.toUpperCase().toCharArray(), this.Time.getBytes(), 100, 512);
SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
//System.out.println("pswd="+this.toHex(skf.generateSecret(spec).getEncoded()));
return this.toHex(skf.generateSecret(spec).getEncoded());
}catch(InvalidKeySpecException | NoSuchAlgorithmException e){
e.printStackTrace();
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String generatePass(){\r\n \r\n String password = new Random().ints(10, 33, 122).collect(StringBuilder::new,\r\n StringBuilder::appendCodePoint, StringBuilder::append)\r\n .toString();\r\n return password;\r\n\r\n }",
"public static String createPassword()\r\n\t{\r\n\t\treturn getRandomPwd(4);\r\n\t}",
"public String createPassword() {\n String alphabet= \"abcdefghijklmnopqrstuvwxyz\";\n int count=0;\n String randomPass=\"\";\n while (count<this.length){\n randomPass+=alphabet.charAt(this.randomNumber.nextInt(alphabet.length()-1));\n count++;\n }\n return randomPass;\n }",
"private String generatePass(int passwdLength, int minDigits, List<Boolean> options)\n {\n PasswordGenerator pg = new PasswordGenerator(passwdLength, minDigits, options);\n\n return pg.generatePasswd();\n }",
"public String generatePassword(){\n\t\treturn \"a\" + super.generatePassword() + \"1\";\n\t}",
"public void makePassword() {\n String str = \"\";\r\n StringBuilder strBuilder = new StringBuilder(str);\r\n Random generator = new Random();\r\n int[] senha = new int[6];\r\n for (int i = 0; i < 6; i++) {\r\n senha[i] = generator.nextInt(10);\r\n strBuilder.append(Integer.toString(senha[i]));\r\n }\r\n str = strBuilder.toString();\r\n this.setPassword(str);\r\n //passwordList.add(l);\r\n }",
"public String generatePassword() {\n List<char[]> allAllowed = new ArrayList<>();\n if (uppercase) {\n allAllowed.add(UPPERCASE);\n }\n if (lowercase) {\n allAllowed.add(LOWERCASE);\n }\n if (numbers) {\n allAllowed.add(NUMBERS);\n }\n if (symbols) {\n allAllowed.add(SYMBOLS);\n }\n\n //Use cryptographically secure random number generator\n Random random = new SecureRandom();\n\n StringBuilder password = new StringBuilder();\n\n // Random chars\n for (int i = 0; i < length - allAllowed.size(); i++) {\n char[] characterType = allAllowed.get(random.nextInt(allAllowed.size()));\n password.append(characterType[random.nextInt(characterType.length)]);\n }\n\n //Ensure password policy is met by inserting required random chars in random positions\n for (char[] category : allAllowed) {\n password.insert(random.nextInt(password.length()), category[random.nextInt(category.length)]);\n }\n return password.toString();\n }",
"public String generatePassword(Node node);",
"private String newPassword() {\n\t\tchar[] vet = new char[10];\n\t\tfor(int i=0; i<10; i++) {\n\t\t\tvet[i] = randomChar();\n\t\t}\n\t\treturn new String(vet);\n\t}",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"public String createPassword() {\n while (i < length){\n temp += abc.charAt(random.nextInt(26));\n i++;\n }\n\n this.password = this.temp;\n this.temp = \"\";\n this.i = 0;\n return password;\n }",
"private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }",
"String getNewPassword();",
"Password getPsw();",
"String password();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"private String getPasswordFor(String name) {\n return new StringBuilder().append(PASSWORD_FOR).append(\" '\").append(name).append(\"': \").toString();\n }",
"protected String generatePassword(int bytes) {\n \n Random r = new SecureRandom();\n byte[] tempBytes = new byte[bytes];\n r.nextBytes(tempBytes);\n return Base64.getEncoder().encodeToString(tempBytes);\n\n }",
"public static String generatePasswort(String passwort) {\n Validator.check(!passwort.isEmpty(), ERR_MSG_PASSWORD_EMPTY);\n\n StringBuilder sb = new StringBuilder();\n\n byte[] mdbytes = verschlüsselePasswort(passwort);\n Validator.check(mdbytes != null, ERR_MSG_PASSWORT);\n\n for (byte mdbyte : mdbytes) {\n sb.append(Integer.toString((mdbyte & 0xff) + 0x100, 16).substring(1));\n }\n\n return sb.toString();\n }",
"String getUserPassword();",
"String getTemporaryPassword();",
"public java.lang.String getPassword();",
"private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }",
"public static synchronized String getRandomPassword() {\n\t\t StringBuilder password = new StringBuilder();\n\t\t int j = 0;\n\t\t for (int i = 0; i < MINLENGTHOFPASSWORD; i++) {\n\t\t \t//System.out.println(\"J is \"+j);\n\t\t password.append(getRandomPasswordCharacters(j));\n\t\t j++;\n\t\t \n\t\t if (j == 4) {\n\t\t j = 0;\n\t\t }\n\t\t }\n\t\t return password.toString();\n\t\t}",
"public static String randomPassword(int len) {\n System.out.println(\"IN AUTO HASH\");\n String chars = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk\"\n +\"lmnopqrstuvwxyz!@#$%&\";\n Random rnd = new Random();\n StringBuilder sb = new StringBuilder(len);\n for (int i = 0; i < len; i++)\n sb.append(chars.charAt(rnd.nextInt(chars.length())));\n return sb.toString();\n }",
"private String getTempPassword(int length) {\r\n\t\tRandom rand = new Random(9845936902l);\r\n\t\tchar[] buf = new char[length];\r\n\t\tfor (int idx = 0; idx < buf.length; ++idx)\r\n\t\t\tbuf[idx] = symbols[rand.nextInt(symbols.length)];\r\n\t\treturn new String(buf);\r\n\t}",
"public String getPassword();",
"public String getPassword();",
"public static void main(String[] args) {\n\t\tPassword p = new Password();\n\t\tString epassword = \"ff6b6db0b2f4506c074343f20805a39ca856bf3a\";\n\t\tString passText = \"123456\";\n\t\tString id = \"371328198106084016\";\n\t\tString salt = p.getSalt(id);\n\t\tString sp = p.getPassphrase(salt, passText);\n\t\tSystem.out.println(\"salt : +\" + salt +\" passphrase: \"+sp);\n\t\tSystem.out.println(p.matchPassphrase(sp, salt, passText) + \"--------------- for real :\");\n\t\tsalt =\"SjZ1MmwxIDIzMiw2IDEyOTA5MTE1MSAxNDE6ODE2NjEgM1A4TQ==\";\n\t\tsp = \"11895b3270e3fd9038252d4fd45400b6fa30de4f\";\n\t\tSystem.out.println(p.matchPassphrase(sp, salt, \"123456\"));\n\t}",
"public String generatePassword(int size) {\n\n int wordIndx = getRandomWord();\n String newPassword = threeCharWords.get(wordIndx);\n return newPassword + getRandomNumber(size);\n\n\n }",
"public String generateOTP() {\n String values = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"; //characters to use in password\n Random random = new Random();\n char[] password = new char[6]; //setting password size to 6\n IntStream.range(0, password.length).forEach(i -> password[i] = values.charAt(random.nextInt(values.length())));\n return String.valueOf(password);\n }",
"com.google.protobuf.ByteString\n getNewPasswordBytes();",
"public void generateRandomPassword() {\n\t\tString randomPassword = \"\";\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".toCharArray();\n\t\tjava.util.Random random = new java.util.Random();\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t char c = chars[random.nextInt(chars.length)];\n\t\t randomPassword += c;\n\t\t}\n\t\tthis.password = randomPassword;\n\t}",
"private String encrypt_password(String password)\r\n\t{\r\n\t\tString generated_password = null;\r\n try\r\n {\r\n\r\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\r\n md.update(password.getBytes());\r\n byte[] bytes = md.digest();\r\n StringBuilder sb = new StringBuilder();\r\n for(int i=0; i< bytes.length ;i++)\r\n {\r\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n generated_password=sb.toString();\r\n }\r\n catch (NoSuchAlgorithmException e)\r\n {\r\n \r\n }\r\n return generated_password;\r\n\t}",
"public static void main(String[] args) {\n System.out.println(generateRandomPassword(8));\n }",
"private void generatePasswords() {\n\t\tif(passwords != null) {\n\t\t\treturn;\n\t\t}\n\t\tpasswords = new String[10];\n\t\tint index = 0;\n\t\twhile(index < passwords.length) {\n\t\t\tpasswords[index] = generatePassword();\n\t\t\tindex++;\n\t\t}\n\t}",
"public static String generateNewPassword(String toMail){\n String newPassword = genString(); //generate a new password\n String newPasswordText = \"Hello, your new password for Household Manager is: \"+newPassword+\n \"\\n Please log in and change your password. You can do this by pressing 'My Profile'->'Edit Profile'\";\n sendMail(toMail,newPasswordText); //Send the new password to the users email.\n return newPassword; //return the new password\n }",
"public void createPassword(String userid, String password) {\n\t\tif (password.length()>=12){\n\t\t\tif(password.matches(\".*\\\\d.*\")&&password.matches(\".*[!@#$%^&*].*\")&&!password.equals(password.toLowerCase())&& !password.equals(password.toUpperCase())){\n\t\t\t\tString salt= generateSalt();\n\t\t\t\tpwds.put(userid,encrypt(password,salt));\n\t\t\t\tsalts.put(userid,salt);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"bad password\");\n\n\t\t\t}\n\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"bad password\");\n\n\t\t}\n\n\n\t}",
"public String generateMP() {\n\t\t\tString characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*()-_=+[{]}\\\\|;:\\'\\\",<.>/?\";\n\t\t\tString pwd = RandomStringUtils.random(15, 0, 0, false, false, characters.toCharArray(), new SecureRandom());\n\t\t\treturn pwd;\n\t\t}",
"public char[] getPassword();",
"public static void main(String[] args) {\n\t\t\r\n\t\tSupplier<String>randomPassword=()->{\r\n\t\t\t\r\n\t\t\tString otp=\"\";\r\n\t\t\t\r\n\t\t\tSupplier<Integer>digit=()->(int)(Math.random()*10);\r\n\t\t\t\r\n\t\t\tString symbol=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$\";\r\n\t\t\tSupplier<Character>character=()->symbol.charAt((int)(Math.random()*29));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<=8;i++) {\r\n\t\t\t\tif(i%2==1) {\r\n\t\t\t\t\totp=otp+digit.get();\r\n\t\t\t\t}else {\r\n\t\t\t\t\totp=otp+character.get();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn otp;\r\n\t\t};\r\n\t\t\r\n\t\tSystem.out.println(\"Your 8 digit otp is :\"+randomPassword.get());\r\n\r\n\t}",
"private String getPassword(){\n System.out.println(\"Enter the Password Minimum Of 8 Charters\");\n return sc.next();\n }",
"public String getPassword() {\r\n\t\t// Get the password\r\n\t\tchar []code = password.getPassword();\r\n\t\t\r\n\t\t// Make the password string\r\n\t\tString password = \"\";\r\n\t\t\r\n\t\t// convert the char[] to string\r\n\t\tfor (char c: code){\r\n\t\t\tpassword += c;\r\n\t\t}\r\n\t\t\r\n\t\t// Return the password string\r\n\t\treturn password;\r\n\t}",
"public String encode( String password );",
"private String randomPassword(int length) {\r\n\t\tString passSet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%\";\r\n\t\tchar[] password = new char[length];\r\n\t\tfor(int i=0;i<length;i++) {\r\n\t\t\tint ind = (int) (Math.random()*passSet.length());\r\n\t\t\tpassword[i] = passSet.charAt(ind);\r\n\t\t}\r\n\t\treturn new String(password);\r\n\t}",
"private String randomPassword(int length) {\r\n\t\t\tString passwordSet=\"ABCDEFGHIJKLMNOPQRSTUWXYZ0123456789!@#$%\";\r\n\t\t\tchar [] password = new char[length];\r\n\t\t\tfor(int i=0; i<length; i++) {\r\n\t\t\t\tint rand=(int)(Math.random() * passwordSet.length());\r\n\t\t\t\tpassword[i] = passwordSet.charAt(rand);\r\n\t\t\t\tSystem.out.println(rand);\r\n\t\t\t\tSystem.out.println(passwordSet.charAt(rand));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn new String(password);\r\n\t\t\t\r\n\t\t}",
"private String randomisePassword(Handler h) throws DataFault{\n\t\tRandomService serv = getContext().getService(RandomService.class);\n\t\tString new_password = serv.randomString(DatabasePasswordComposite.GENERATED_PASSWORD_LENGTH);\n\t\tif( DatabasePasswordComposite.NON_RANDOM_PASSWORD.isEnabled(getContext())){\n\t\t\tnew_password=nonRandomString(DatabasePasswordComposite.GENERATED_PASSWORD_LENGTH);\n\t\t\tgetLogger().debug(\"Non random password \"+new_password);\n\t\t}\n\t\tif( DatabasePasswordComposite.LOG_RANDOM_PASSWORD.isEnabled(getContext())){\n\t\t\tgetLogger().debug(\"Person \"+h.user.getIdentifier()+\" password randomised to \"+new_password);\n\t\t}\n\t\tif (!canResetPassword(h.user)) {\n\t\t\t// hack to give some indication if person removed\n\t\t\tnew_password = \"Account is disabled\";\n\t\t} else {\n\t\t\th.setPassword(new_password.trim());\n\t\t\th.setPasswordStatus(DatabasePasswordComposite.INVALID);\n\t\t\th.commit();\n\t\t}\n\t\treturn new_password;\n\t}",
"@AutoEscape\n\tpublic String getPassword2();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"public String encodePassword(String normalPassword, String key);",
"private String randomPassword(int length){\r\n\t\tString passwordSet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!?$#@\";\r\n\t\t\tchar[] password = new char[length];\r\n\t\t\t\t\r\n\t\t\tfor(int i = 0; i < length; i++){\r\n\t\t\t\tint rand = (int) (Math.random() * passwordSet.length());\r\n\t\t\t\tpassword[i] = passwordSet.charAt(rand);\r\n\t\t\t}\r\n\t\treturn new String(password);\r\n\t}",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"void mo33731Pw();",
"public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }",
"private Object String(char[] password) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"java.lang.String getPass();",
"java.lang.String getPass();",
"String getUserPasswordHash();",
"public String generateOTP(String username){\n sendOTP(username);\n return new String(\"pass\");\n }",
"public static String createPassword(String clearString) throws AppException {\n if (clearString == null) {\n throw new AppException(\"No password defined!\");\n }\n return BCrypt.hashpw(clearString, BCrypt.gensalt());\n }",
"String getPass();",
"public String Password()// method for getting the password given by user\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter password: \");\n\t\tString password = sc.next();\n\n\t\treturn password;\n\t}",
"public String decode( String encodedPassword );",
"public static String specifyApplicationPassword() {\n return holder.format(\"specifyApplicationPassword\");\n }",
"public static String generatSecurePassword(String emailId, String password) {\n\t\treturn getSha512(emailId + \"#\" + getmd5(emailId + \"#\" + password));\n\t}",
"public static String generateBCrypt(String password) {\n if (password == null) {\n return password;\n }\n\n BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();\n return bCryptPasswordEncoder.encode(password);\n }",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"com.google.protobuf.ByteString\n getPasswordBytes();",
"public static String generatePassPhrase(int length) {\n LOG.debug(\"generate new random passphrase with length: \" + length);\n final char[] allowableCharacters = new char[]{'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'm',\n 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G',\n 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4',\n '5', '6', '7', '8', '9'};\n\n StringBuilder pass = new StringBuilder();\n for (int i = 0; i < length; i++) {\n pass.append(allowableCharacters[RandomUtils.nextInt(0, allowableCharacters.length)]);\n }\n return pass.toString();\n }",
"public static String getPassword()\n\t{\n\t\tScanner kb = new Scanner(System.in);\n\n\t\tp(\"Guideline for password:\");\n\t\tp(\"The password should be at least six characters long.\");\n\t\tp(\"The password should contain at least one uppercase and at least one lowercase letter.\");\n\t\tp(\"The password should have at least one digit.\");\n\t\tp(\"Enter a password:\");\n\t\treturn kb.nextLine();\n\t}",
"public String getIdGeneratorDatabasePassword(){\n \t\treturn getDecryptedProperty(\"org.sagebionetworks.id.generator.database.password\");\n \t}",
"public String getPassword() {return password;}",
"public String securePassword(String pwd) {\r\n\r\n byte[] securePassword = hash(pwd.toCharArray(), pwd.getBytes());\r\n \r\n String returnValue = Base64.getEncoder().encodeToString(securePassword);\r\n return returnValue;\r\n\t}",
"private char[] getPass()\n {\n return password.getPassword();\n }",
"private static String getEncryptedStoredPassword(String args[]) {\n return args[1].trim() ;\n }",
"public String generate(int length) {\r\n\t\tString chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\r\n\t\tString pass = \"\";\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tint i = (int) Math.floor(Math.random() * 62);\r\n\t\t\tpass += chars.charAt(i);\r\n\t\t}\r\n\r\n\t\treturn pass;\r\n\t}",
"@Override\n\tpublic String getPassword() {\n\t\treturn \"ajay\";\n\t}",
"public abstract String getPassword() throws DataServiceException;",
"public PasswordGenerator(int length, Random random, String symbols)\n {\n if (length < 1)\n {\n throw new IllegalArgumentException(\"String length must be 1 or more\");\n }\n if (symbols.length() < 2)\n {\n throw new IllegalArgumentException(\"There must be at least 2 symbols to chose from\");\n }\n\n this.random = random;\n this.symbols = symbols.toCharArray();\n this.buf = new char[length];\n }",
"java.lang.String getPwd();",
"public static void main(String[] args) throws Exception{\n\t\tString pass = \"Difficult@5658\";\n\t\tSystem.out.println(new BCryptPasswordEncoder(12).encode(pass));\n\t}"
] | [
"0.7854275",
"0.7660988",
"0.7655341",
"0.7491217",
"0.748067",
"0.74287885",
"0.7405387",
"0.7392047",
"0.7368294",
"0.7308388",
"0.7308388",
"0.7308388",
"0.7308388",
"0.7308388",
"0.7308388",
"0.7308388",
"0.73077774",
"0.7187292",
"0.7142582",
"0.71150994",
"0.70912635",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.707965",
"0.7078264",
"0.70332843",
"0.69771564",
"0.69544846",
"0.6939786",
"0.6913689",
"0.6858563",
"0.6798485",
"0.6789681",
"0.6768596",
"0.6765968",
"0.6765968",
"0.67418677",
"0.6740778",
"0.66821074",
"0.66745234",
"0.6653473",
"0.6647482",
"0.6643506",
"0.66337633",
"0.6607155",
"0.657",
"0.6561602",
"0.65536416",
"0.6534687",
"0.65146184",
"0.6512506",
"0.64826363",
"0.6477694",
"0.64589393",
"0.6441834",
"0.64150125",
"0.640437",
"0.640437",
"0.6403689",
"0.6374218",
"0.6353279",
"0.63343173",
"0.6292535",
"0.6288928",
"0.62843406",
"0.62843406",
"0.62762386",
"0.627338",
"0.62707555",
"0.62587637",
"0.623751",
"0.6231807",
"0.6229771",
"0.622711",
"0.6219666",
"0.6207107",
"0.6207107",
"0.6207107",
"0.6207107",
"0.6207107",
"0.6207107",
"0.6207107",
"0.61855567",
"0.6182886",
"0.6175558",
"0.6174878",
"0.61731166",
"0.6146092",
"0.61460435",
"0.61418825",
"0.6135427",
"0.6126685",
"0.612303",
"0.61132216",
"0.60910547"
] | 0.0 | -1 |
check if the address is allocated in the database | private String[] matchDB(String AddressDetails){
String state="SELECT `entry`.`sender`,"
+ "`entry`.`nem`,"
+ "`entry`.`option`"
+ "FROM `entry` "
+ "WHERE `entry`.`recipientaddress`=?"
+ "AND `entry`.`type`='btc'"
+ "LIMIT 1";
PreparedStatement statement=null;
ResultSet RS=null;
String nem="false";
String sender="false";
String option="false";
try{
statement=SQL.Connect.prepareStatement(state);
statement.setString(1, AddressDetails);
RS=statement.executeQuery();
if(RS.first()){
sender=RS.getString("sender");
nem=RS.getString("nem");
option=RS.getString("option");
}
}catch(SQLException ex){
}finally{
org.apache.commons.dbutils.DbUtils.closeQuietly(statement);
org.apache.commons.dbutils.DbUtils.closeQuietly(RS);
}
return new String[]{sender,nem,option};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasAddress();",
"boolean hasAddress();",
"boolean hasHasAddress();",
"protected boolean containsAddress(InetAddress address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = this.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t\t\tif (address==null) pstmt.setString(1, \"localhost\");\n\t\t\telse pstmt.setString(1, NetworkManager.addressToString(address));\n\t ResultSet rs = pstmt.executeQuery();\n\t return !(rs.isClosed());\n\t\t} catch (SQLException e) {\n \tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to check if address %s is in the database\\n\",address), e);\n\t\t}\n\t\treturn true; // Pas accessible\n\t}",
"boolean hasQueryAddress();",
"public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }",
"@java.lang.Override\n public boolean hasAddress() {\n return address_ != null;\n }",
"boolean hasAddressList();",
"public boolean hasAddress() {\n return addressBuilder_ != null || address_ != null;\n }",
"public boolean isSetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ADDRESS$2) != null;\n }\n }",
"public static boolean checkAddressSQL(Connection conn, String address, String address2) {\r\n \r\n //SQL select statment to check for existing address\r\n String selectAllAddress = \"SELECT * FROM address WHERE address=? AND address2=?\";\r\n boolean flag = false;\r\n try{\r\n //create prepared statement object\r\n setPreparedStatement(conn, selectAllAddress);\r\n //get prepared statement reference\r\n PreparedStatement ps = getPreparedStatement();\r\n \r\n ps.setString(1, address);\r\n ps.setString(2, address2);\r\n //execute prepared statements\r\n ps.execute(); \r\n //create result set\r\n ResultSet rs = ps.getResultSet();\r\n \r\n if(rs.next()) {\r\n \r\n addressId = rs.getInt(\"addressId\");\r\n flag = true;\r\n \r\n }\r\n else{\r\n \r\n addressId = maxAddressId(conn);\r\n }\r\n \r\n \r\n }catch(SQLException e) {\r\n \r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return flag;\r\n }",
"public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }",
"boolean isAddressOf(int addr) {\n return addr == mAddress;\n }",
"public boolean isExisted(String addressId) {\n //check if this address is already existed.\n return true;\n }",
"abstract void addressValidity();",
"protected int isExternByAddress(String address) {\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().selectByAddress);\n\t pstmt.setString(1,address);\n\t ResultSet rs = pstmt.executeQuery();\n\t return rs.getInt(\"isExtern\");\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get isExtern of address %s in the database\\n\",address), e);\n\t\t}\n return 0; // Pas accessible\n\t}",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }",
"boolean hasAddressCreationStrategy();",
"public boolean containsAddress(String address) {\n\t\treturn tseqnums.containsKey(address);\n\t}",
"public boolean isSetAddress() {\n\t\treturn this.address != null;\n\t}",
"public boolean hasExternalAddressbooks() throws RemoteException;",
"private boolean canFindLocationAddress(){\n\n Geocoder geo = new Geocoder(this);\n\n //Get address provided for location as Address object\n try{\n List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);\n //Return true if an address is found\n return (foundAddresses.size() == 1);\n }\n catch(IOException e){\n e.printStackTrace();\n return false;\n }\n\n }",
"private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }",
"private boolean validateAddress() {\n if (address==null) {\n tvAddress.setText(String.format(\"%s*\", getString(R.string.address_activity)));\n showToast(getString(R.string.error_address_required));\n return false;\n }\n return true;\n }",
"public Boolean boundaryCheck(int addr) {\r\n\t\t// Make sure address is less than LIMIT and SP, and greater than base\r\n\t\tif (addr < getLIM() && addr < getSP() && addr >= getBASE()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tm_TH.interruptIllegalMemoryAccess(addr);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"boolean hasOccupation();",
"boolean hasOccupation();",
"boolean hasOccupation();",
"boolean hasOccupation();",
"boolean hasOccupation();",
"boolean hasBitcoinAddress();",
"private void monitorExistingAddresses() throws SQLException {\n Statement stm = databaseSource.getConnection().createStatement();\n ResultSet rs = stm.executeQuery(\"\"\n + \"SELECT pay_in_bitcoin_public_key, pay_in_ether_public_key, creation_date FROM investor;\");\n\n while(rs.next()) {\n String bitcoinPublicKey = rs.getString(\"pay_in_bitcoin_public_key\");\n String etherPublicKey = rs.getString(\"pay_in_ether_public_key\");\n Date creationDate = rs.getDate(\"creation_date\");\n long timestamp = creationDate.getTime() / 1000L;\n\n if (bitcoinPublicKey != null)\n bitcoinMonitor.addMonitoredPublicKey(bitcoinPublicKey, timestamp);\n\n if (etherPublicKey != null)\n ethereumMonitor.addMonitoredEtherPublicKey(etherPublicKey);\n }\n }",
"public boolean hasQueryAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean isOccupied() {\n return !(getLease() == null);\r\n }",
"public boolean hasQueryAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"boolean isIPGeolocationCountryDatabaseEmbedded();",
"public boolean isAllocated()\n\t{\n\t\tif(getQtyAllocated().signum()!=0)\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}",
"public boolean existsAddress(byte ip[])\n {\n try\n {\n return (resolve(ip)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }",
"private boolean isAddressValid(String s) {\n for (Property prt : propertyList) { //(String t : propertyAddrLine1s)\n if (prt.getAddrline1().matches(s)) {\n createdProperty = prt;\n return true;\n }\n }\n return false;\n }",
"private boolean isRelevant(Address address){\n\n return Math.abs(ride.getStartLatitude() - address.getLatitude()) < 2 &&\n Math.abs(ride.getStartLongitude() - address.getLongitude()) < 2;\n }",
"public boolean addAddress(Address address) {\n\t\tList<Address> addresslist = addressdao.findByUserUId(address.getUser().getId());\r\n\t\tif(addresslist.size() == 0){\r\n\t\t\taddressdao.save(address);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}",
"public boolean isSetGraph_addr() {\n return this.graph_addr != null;\n }",
"boolean isIPGeolocationCityDatabaseEmbedded();",
"public boolean hasMAddr() {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG, \"hasMaddr () \");\n Via via=(Via)sipHeader;\n \n return via.hasParameter(Via.MADDR);\n }",
"public boolean isAbleToBeAllocated( )\r\n {\r\n // Do not allow allocation if it's too slow!\r\n if (lastTransferRateBPS < ServiceManager.sCfg.minimumAllowedTransferRate\r\n && lastTransferRateBPS > 0)\r\n {\r\n addToCandidateLog( \"Refusing candidate allocation as last transfer rate was only \" \r\n + lastTransferRateBPS + \" bps\");\r\n NLogger.debug( NLoggerNames.Download_Candidate_Allocate,\r\n \"Refusing candidate allocation as last transfer rate was only \" \r\n + lastTransferRateBPS + \" bps\");\r\n return false;\r\n }\r\n long currentTime = System.currentTimeMillis();\r\n return statusTimeout <= currentTime;\r\n }",
"protected abstract void onAddressAllocated(int logicalAddress);",
"private static boolean validateAddress(String address) {\n return !address.isEmpty();\n }",
"public boolean isAssignable(DatabaseInfo databaseInfo) {\n return isAssignable(databaseInfo, start()).result() <= 0;\n }",
"boolean hasCapacity();",
"public void compareAddress()\n {\n Address a = new Address(\"Amapolas\",1500,\"Providencia\",\"Santiago\");\n Address b = new Address(\"amapolas\",1500, \"providencia\",\"santiago\");\n Address c = new Address(\"Hernando Aguirre\",1133,\"Providencia\", \"Santiago\");\n \n boolean d = a.equals(b); \n }",
"boolean hasResponseAddress();",
"boolean equals(String address) { return this.address.getHostAddress().equals(address); }",
"public boolean checkAddressSuported(String address) {\n\t\treturn false;\n\t}",
"private boolean checkSpaceAvailability(Point targetLocation, ICityFragment element) {\r\n //basic constraint:no other things here\r\n\r\n if (city.isAnythingHere(targetLocation, element.getBoundary().width, element.getBoundary().height, element)) {\r\n return false;\r\n }\r\n\r\n //crossroads:at least one road can connected\r\n if (element instanceof Crossroads) {\r\n var crossroad = (Crossroads) element;\r\n\r\n var accessibleRoad = findAccessibleRoads(crossroad, targetLocation);\r\n\r\n if (accessibleRoad == null || accessibleRoad.size() <= 1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private boolean createEmployeeAvailability(String name) {\n int empID;\n empID = findEmployee(name);\n\n String employeeAvailablitySQL = \"INSERT INTO empAvailability(empID, availability) values(\" +\n \"'\" + empID + \"'\" + \",\" +\n \"'000,000,000,000,000,000,000')\";\n return (database.updateDatabase(employeeAvailablitySQL));\n }",
"public boolean testAllocation() {\n //\tCash Trx always allocated\n if (isCashTrx()) {\n if (!isAllocated()) {\n setIsAllocated(true);\n return true;\n }\n return false;\n }\n //\n BigDecimal alloc = getAllocatedAmt();\n\n if (alloc == null) {\n alloc = Env.ZERO;\n }\n BigDecimal total = getPayAmt();\n\n if (!isReceipt()) {\n total = total.negate();\n }\n boolean test = total.compareTo(alloc) == 0;\n boolean change = test != isAllocated();\n if (change) {\n setIsAllocated(test);\n }\n log.fine(\"Allocated=\" + test\n + \" (\" + alloc + \"=\" + total + \")\");\n return change;\n }",
"public boolean needsAllocation(TypeReference type) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).size() > 1) { // TODO INCORRECT may all be UNALLOCATED\n return false;\n } else {\n return (seenTypes.get(type).get(0).status == ValueStatus.UNALLOCATED);\n }\n } else {\n return true;\n }\n }",
"private static boolean updateAddress(String address) {\n\n if(deviceService.updateServerAddress(address) == true)\n return true;\n else\n return false;\n\n\n\n }",
"public boolean isAllocated(int node) {\n\t\t\treturn node < 0 || n2i[node] != Integer.MAX_VALUE;\n\t\t}",
"private static boolean isHere(int portNummber,InetAddress address, String nameOfProduct){\n\n for(SensorData sensorData : actualSensorDatas){\n if((sensorData.getPortNummber() == portNummber)\n || (sensorData.getAddress() == address)\n || (sensorData.getProduct().getNameOfProduct() == nameOfProduct) ){\n return true;\n }\n }\n return false;\n }",
"boolean hasPhy();",
"public boolean checkDbStructure(){\n\t\tboolean isStructureOk = false;\n\t\t\n\t\ttry {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t.getConnection(getConnectionURI());\n\t\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Description, Version from \" + mDbName + \".\" + TABLE_AREA);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select Area_ID, Route_ID from \" + mDbName + \".\" + TABLE_AREA_HAS_ROUTES);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Ticket_ID, Name, StartName, EndName from \" + mDbName + \".\" + TABLE_ROUTE);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select Route_ID, Station_ID, Position from \" + mDbName + \".\" + TABLE_ROUTE_HAS_STATIONS);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Abbreviation, Latitude, Longitude from \" + mDbName + \".\" + TABLE_STATION);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\n\t\t\tmPreparedStatement = mMysqlConnection\n\t\t\t\t.prepareStatement(\"select ID, Name, Icon, Is_Superior from \" + mDbName + \".\" + TABLE_TICKET);\t\t\t\n\t\t\tmPreparedStatement.executeQuery();\n\t\t\t\n\t\t\tisStructureOk = true;\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.severe(\"!EXCEPTION: \" + e.getMessage());\n\t\t\tisStructureOk = false;\n\t\t}\n\t\t\n\t\treturn isStructureOk;\n\t}",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"boolean hasIp();",
"private static boolean validAddressREST_Postman() throws JSONException, IOException {\n\t\tOkHttpClient client = new OkHttpClient();\n\n\t\tString city = \"Lombard\";\n\t\tcity = \"\\\"\" + city + \"\\\"\";\n\t\t\n\t\tString state = \"IL\";\n\t\tstate = \"\\\"\" + state + \"\\\"\";\n\t\t\n\t\tString zip = \"60148\";\n\t\tzip = \"\\\"\" + zip + \"\\\"\";\n\t\t\n\t\tMediaType mediaType = MediaType.parse(\"application/json\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"{\\r\\n\\t\\\"AccessRequest\\\": {\\r\\n\\t\\t\\\"UserId\\\": \\\"attarsaaniya\\\",\\r\\n\\t\\t\\\"AccessLicenseNumber\\\": \"\n\t\t\t\t+ \"\\\"DD33B9ADDD7ADDC8\\\",\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Password\\\": \\\"Summer2017\\\"\\r\\n\\t},\\r\\n\\t\\\"AddressValidationRequest\\\": \"\n\t\t\t\t+ \"{\\r\\n\\t\\t\\\"Address\\\": {\\r\\n\\t\\t\\t\\\"StateProvinceCode\\\": \" + state + \",\\r\\n\\t\\t\\t\"\n\t\t\t\t+ \"\\\"PostalCode\\\": \" + zip + \",\\r\\n\\t\\t\\t\\\"City\\\": \" + city + \"\\r\\n\\t\\t},\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Request\\\": {\\r\\n\\t\\t\\t\\\"TransactionReference\\\": {\\r\\n\\t\\t\\t\\t\\\"CustomerContext\\\": \"\n\t\t\t\t+ \"\\\"mycustomer\\\"\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"RequestAction\\\": \\\"AV\\\"\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\");\n\t\t\n\t\tRequest request = new Request.Builder().url(\"https://wwwcie.ups.com/rest/AV\").post(body).build();\n\n\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\tJSONObject jResp = new JSONObject(response.body().string());\n\t\tSystem.out.println(jResp);\n\t\t\n\t\t// there shoudl be a better way to parse through the tree tbh\n\t\t// but this seems intuitive enough to do (though so extra) \n\t\tJSONObject addrValResp = jResp.getJSONObject(\"AddressValidationResponse\");\n\t\tJSONObject addrVal = addrValResp.getJSONObject(\"AddressValidationResult\");\n\t\tJSONObject addr = addrVal.getJSONObject(\"Address\");\n\t\tString cityResponse = addr.getString(\"City\");\n\t\tString stateResponse = addr.getString(\"StateProvinceCode\");\n\t\t\n\t\tString zipResponse = addrVal.getString(\"PostalCodeLowEnd\");\n\t\t\n\t\t\n\t\tSystem.out.println(cityResponse);\n\t\tSystem.out.println(stateResponse);\n\t\tSystem.out.println(zipResponse);\n//\t\tString success = addrVal\n\t\t\n\t\treturn false;\n\t}",
"public boolean needsAllocArrays() {\n return this.table == null;\n }",
"public boolean handleAddress(Address address, String processName) {\n\t\tint pageHit = 0;\n\t\tsynchronized (mainMemory) {\n\t\t\t// Check if address divided by page/frame size is > page/frame size if so break\n\t\t\tif (address.getPage() > VMsim.pageCount) {\n\t\t\t\tSystem.out.println(address.getPage() + \"HERE\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tpageHit = mainMemory.checkPageIfAvailable(address.getPage());\n\t\t}\n\t\t// Check if the address hits\n\t\tif (pageHit > 0) {\n\t\t\tSystem.out.println(processName + \" accesses address \" + address.getAddress() + \" (page number = \" + address.getPage() + \", page offset=\" + address.getOffset() + \") in main memory (frame number = \" + pageHit + \"). \");\n\t\t} else {\n\t\t\tFaultHandlerThread faultHandler = (FaultHandlerThread) VMsim.threadMap.get(\"fault_handler\");\n\t\t\tfaultHandler.handle(address, processName);\n\t\t}\n\t\treturn true;\n\t}",
"void addHasAddress(String newHasAddress);",
"private void checkAddress() {\n\t\t// if \"Set Address\" has not been performed then give the message to set\n\t\t// it first\n\t\tif (null == oscPort) {\n\t\t\tshowError(\"Please set an address first\");\n\t\t}\n\t}",
"public boolean updateAddress(Address newAddress);",
"private boolean uniqueAddress(NetworkAddr nA) {\n\t\tif(nA.nodeId() == 0 && nA.networkId() == getAddr().networkId())\n\t\t\treturn false;\n\t\tfor(RouteTableEntry addr : _routingTable)\n\t\t{\n\t\t\tif(addr == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tif(addr.networkAddress.SameAddress(nA))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean addAddress(AddressDTO address) throws RetailerException, ConnectException {\n\t\tboolean addAddressState = address.isAddressStatus();\n\t\tString addressID = address.getAddressId();\n\t\tString retailerID = address.getRetailerId();\n\t\tString city = address.getCity();\n\t\tString state = address.getState();\n\t\tString zip = address.getZip();\n\t\tString buildingNum = address.getBuildingNo();\n\t\tString country = address.getCountry();\n\t\tConnection connection = null;\n\t\ttry {\n\n\t\t\tconnection = DbConnection.getInstance().getConnection();\n\t\t\texceptionProps = PropertiesLoader.loadProperties(EXCEPTION_PROPERTIES_FILE);\n\t\t\tgoProps = PropertiesLoader.loadProperties(GO_PROPERTIES_FILE);\n\n\t\t\tPreparedStatement statement = connection.prepareStatement(QuerryMapper.INSERT_NEW_ADDRESS_IN_ADDRESSDB);\n\t\t\tstatement.setString(1, addressID);\n\t\t\tstatement.setString(2, retailerID);\n\t\t\tstatement.setString(3, city);\n\t\t\tstatement.setString(4, state);\n\t\t\tstatement.setString(5, zip);\n\t\t\tstatement.setString(6, buildingNum);\n\t\t\tstatement.setString(7, country);\n\t\t\tstatement.setBoolean(8, addAddressState);\n\t\t\tint row = statement.executeUpdate();\n\t\t\tif (row == 1)\n\t\t\t\treturn true;\n\t\t} catch (DatabaseException | IOException | SQLException e)// SQLException\n\t\t{\n\t\t\tGoLog.logger.error(exceptionProps.getProperty(EXCEPTION_PROPERTIES_FILE));\n\t\t\tthrow new RetailerException(\".....\" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new ConnectException(Constants.connectionError);\n\t\t\t}\n\t\t}\n\n\t\treturn addAddressState;\n\t}",
"boolean isFree(Position position);",
"default boolean hasEnoughMemory(long memory){\n return getUnusedMemory() >= memory;\n }",
"public boolean containsAddress(String address)\n {\n boolean hasAddr = false;\n //Scan addresses for this address\n address = Numeric.cleanHexPrefix(address);\n for (String thisAddr : addresses)\n {\n if (thisAddr != null && thisAddr.contains(address))\n {\n hasAddr = true;\n break;\n }\n }\n\n return hasAddr;\n }",
"public void IsInUse() {\n\t\tSystem.out.println(\"Table being cleaned, cannot be used.\");\n\t}",
"@Test\n public void testAddressExhaustion() throws Exception {\n mRepo.updateParams(new IpPrefix(TEST_SERVER_ADDR, 28), TEST_EXCL_SET, TEST_LEASE_TIME_MS,\n null /* clientAddr */);\n\n // /28 should have 16 addresses, 14 w/o the first/last, 11 w/o excluded addresses\n requestAddresses((byte) 11);\n verify(mCallbacks, times(11)).onLeasesChanged(any());\n\n try {\n mRepo.getOffer(null, TEST_MAC_2,\n IPV4_ADDR_ANY /* relayAddr */, INETADDR_UNSPEC /* reqAddr */, HOSTNAME_NONE);\n fail(\"Should be out of addresses\");\n } catch (DhcpLeaseRepository.OutOfAddressesException e) {\n // Expected\n }\n verifyNoMoreInteractions(mCallbacks);\n }",
"public Boolean checkHouseWithId(){\n\t\t\tif(removeHouse == null){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}",
"public boolean checkIfThisGAZRecordIsInTheDB()\n\t{\n\t\treturn checkIfThisRecordIsInTheDB(getWhereConditionBaseOnIdRecord());\n\t}",
"boolean hasResMineInstanceID();",
"@Override\n\tpublic boolean IsDeliveryaddressValid(String name, String street, String city, String province, String postalcode) {\n\t\t\n\t\tData data = new Data();\n\t\tList<Deliveryaddress> deliveryaddress = data.getDeliveryaddressData();\n\t\t\n\t\tfor(Deliveryaddress d: deliveryaddress) {\n\t\t\tif(name.equals(d.name) && street.equals(d.street) && city.equals(d.city) && province.equals(d.province) && postalcode.equals(d.postalcode)) {\n\t\t\t\treturn true;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}",
"public static void hasMemAllocation(String filePath) {\n\t\tString row = firstRow(filePath);\n\t\tArrayList<String> splits = splits(row);\n\t\tString memAllocation = splits.get(2); // 22966436\n\t\t\n\t\tif (memAllocation.matches(\"\\\\d*\")) {\n\t\t\tMain.debug.LOG(\"omni-epsilon.log contains memory allocation\");\n\t\t} else {\n\t\t\tMain.debug.LOGError(\"omni-epsilon.log does not contain memory allocation\");\n\t\t}\n\t}",
"boolean hasResMineID();",
"private boolean hasMapping(Identifier pid) throws DataAccessException {\n\n boolean mapped = false;\n int countReturned = 0;\n\n if (pid.getValue() == null) {\n throw new DataAccessException(new Exception(\"The given identifier was null\"));\n }\n\n // query the identifier table\n String sqlStatement = \"SELECT guid FROM \" + IDENTIFIER_TABLE + \"where guid = ?\";\n\n countReturned = this.jdbcTemplate\n .queryForInt(sqlStatement, new Object[] { pid.getValue() });\n\n if (countReturned > 0) {\n mapped = true;\n }\n\n return mapped;\n }",
"public boolean hasOccupation() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasOccupation() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasOccupation() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasOccupation() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public final boolean hasAllocationSize() {\n return m_allocSize > 0 ? true : false;\n }",
"public boolean isOccupied(){\n \t\treturn occupiedSeconds > 0;\n \t}",
"public abstract boolean hasMapped(Long queryNode);",
"boolean known() {\n\t\t\treturn !varAddress && !varMask;\n\t\t}",
"private boolean isValid() {\n\t\treturn proposalTable != null && !proposalTable.isDisposed();\n\t}",
"protected boolean isOccupied(){\n\t\treturn occupied;\n\t}",
"public int size() {\n\t\treturn addresses.size();\n\t}",
"public boolean isSpaceOccupied(Coordinate position) {\n for (Rover rover : rovers) {\n if (rover.getCurrentPosition().equals(position)) {\n return true;\n }\n }\n return false;\n }"
] | [
"0.7419916",
"0.7419916",
"0.73186314",
"0.7045076",
"0.6971722",
"0.69513845",
"0.6878853",
"0.6771886",
"0.66840285",
"0.66556734",
"0.6554892",
"0.6530979",
"0.65055215",
"0.62505984",
"0.6250283",
"0.6166953",
"0.6160906",
"0.6159085",
"0.61556417",
"0.61525935",
"0.6081408",
"0.60783225",
"0.60503846",
"0.60287005",
"0.6015918",
"0.6004814",
"0.59696674",
"0.59126097",
"0.59126097",
"0.59126097",
"0.59126097",
"0.59126097",
"0.58124095",
"0.5767689",
"0.5756518",
"0.5748579",
"0.5747786",
"0.57383484",
"0.57365966",
"0.5728508",
"0.572691",
"0.5712962",
"0.5693794",
"0.5683357",
"0.56778765",
"0.5665094",
"0.5663565",
"0.56387943",
"0.5613288",
"0.5584686",
"0.5573867",
"0.556095",
"0.5556925",
"0.55449426",
"0.5538954",
"0.5527094",
"0.55193937",
"0.54984045",
"0.5488045",
"0.5469966",
"0.5460395",
"0.54548746",
"0.5451356",
"0.5448856",
"0.5446184",
"0.5446184",
"0.5446184",
"0.5446184",
"0.543838",
"0.5431425",
"0.54305243",
"0.5430189",
"0.54201293",
"0.5411498",
"0.5393138",
"0.5389321",
"0.5387121",
"0.5385182",
"0.5364477",
"0.53617597",
"0.5354328",
"0.53513175",
"0.53469336",
"0.5337332",
"0.53295",
"0.53242064",
"0.5317214",
"0.5311173",
"0.53084016",
"0.530293",
"0.53026015",
"0.53011554",
"0.5299703",
"0.5296525",
"0.5292524",
"0.52913195",
"0.5283883",
"0.52796865",
"0.527462",
"0.52736235",
"0.5264824"
] | 0.0 | -1 |
TODO Autogenerated method stub | @SuppressWarnings("deprecation")
public String format(Date date,boolean time){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
String timestamp=dateFormat.format(date)+"T";
if(time){
dateFormat = new SimpleDateFormat("HH:mm:ssZ");
timestamp+=dateFormat.format(date);
}
else{
date.setHours(12);
date.setMinutes(0);
date.setSeconds(0);
dateFormat = new SimpleDateFormat("HH:mm:ss");
timestamp+=dateFormat.format(date);
timestamp+="+0000";
}
return timestamp;
} | {
"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 |
endregion your codes 1 region your codes 2 | SiteLotteryOdds getOddBetSortLine(String code ,Integer siteId,String hid,String betSort); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void method2(){\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public static void CC2_1() {\n\t}",
"@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}",
"@Override\n\tpublic void dosomething2() {\n\t\t\n\t}",
"private void t2() {\n // read from a super region, write to a sub region: keep both\n readProtected();\n writeDefault();\n }",
"@Override\n\tpublic void step2() {\n\t\t\n\t}",
"protected void method2() {\n\t}",
"@Override\n\tpublic void method2() {\n\n\t}",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"private void exitSequence_mainRegion_State2() {\n\t\texitSequence_mainRegion_State2__region0();\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"private void t3() {\n // write to a super region, read from a subregion: only keep write\n writeProtected();\n readDefault();\n }",
"@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}",
"void tempInRegionUI();",
"@Override\n\tpublic void b2() {\n\t\t\n\t}",
"public void skystonePos2() {\n }",
"private void searchCode() {\n }",
"public final static void method2(){\n }",
"@Override\n\tpublic void myMethod2() {\n\t\t\n\t}",
"@Override\n\tpublic void name1() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\r\n\tpublic void method2() {\n\t\tSystem.out.println(\"method2....\");\r\n\t}",
"static void method1()\r\n {\n }",
"private int getRegion(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.getRegion(java.lang.String):int\");\n }",
"public void init2() {\n }",
"public void init2() {\n }",
"@Override\n\tpublic void visitXindent(Xindent p) {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"private void sub() {\n\n\t}",
"public void mo4359a() {\n }",
"public final void mo51373a() {\n }",
"public void method_202() {}",
"@Override\r\n\tpublic void a1() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF2() {\n\t\t\r\n\t}",
"public MarkedRegion(AbstractInsnNode start, AbstractInsnNode end) {\n this.start = start;\n this.ends = new LinkedList<AbstractInsnNode>();\n this.ends.add(end);\n }",
"CD withCode();",
"public void mo1531a() {\n }",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public void skystonePos4() {\n }",
"@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}",
"public void mo21785J() {\n }",
"private void test2(){\n\t}",
"public void method1()\r\n\t{\r\n\t}",
"public void init2() {\n\t}",
"@Override\n\tpublic void f2() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void Coding() {\n\t\tBefore();\n\t\tcoder.Coding();\n\t\tEnd();\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public static void generateCode()\n {\n \n }",
"public void mo38117a() {\n }",
"private zza.zza()\n\t\t{\n\t\t}",
"static void feladat4() {\n\t}",
"@Override\r\n\tpublic void method1() {\n\t}",
"public void mo21793R() {\n }",
"public void mo21782G() {\n }",
"public void mo115188a() {\n }",
"public static void example2() {\n // moved to edu.jas.application.Examples\n }",
"CodeBlock createCodeBlock();",
"public void skystonePos3() {\n }",
"public void mo115190b() {\n }",
"public void gored() {\n\t\t\n\t}",
"public MarkedRegion(AbstractInsnNode start) {\n this.start = start;\n this.ends = new LinkedList<AbstractInsnNode>();\n }",
"public void method2() {\n }",
"private void level4() {\n }",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }",
"@Override\n\tpublic void orgasm() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"static void feladat3() {\n\t}",
"public void mo5382o() {\n }",
"public static void c1() {\n\t}",
"@Override\r\npublic void method2() {\n\t\r\n}",
"private B() {\n void var2_-1;\n void var1_-1;\n }",
"public void mo23813b() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void visitXdefindent(Xdefindent p) {\n\n\t}",
"public void method3() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public void stg() {\n\n\t}",
"public void mo21779D() {\n }",
"public void mo21825b() {\n }",
"public Contenido copiar() {\n\t\tthrow new NotImplementedException();\r\n\t}",
"public void mo12930a() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private reg1() {\n }",
"@Override\n\tpublic void b1() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF1() {\n\t\t\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"public void method4() {\n }",
"private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }",
"private final void i() {\n }",
"public void cocinar(){\n\n }"
] | [
"0.5790832",
"0.57606393",
"0.57233137",
"0.5714987",
"0.57091737",
"0.5686841",
"0.5670707",
"0.5650829",
"0.5545139",
"0.5538972",
"0.5538972",
"0.5473905",
"0.5470748",
"0.54704225",
"0.5469382",
"0.5459013",
"0.5457285",
"0.5453491",
"0.5444294",
"0.54417765",
"0.5428553",
"0.5428363",
"0.542477",
"0.54102576",
"0.540832",
"0.54038435",
"0.53986716",
"0.5372071",
"0.5364765",
"0.53569514",
"0.53569514",
"0.53549135",
"0.5346519",
"0.5323942",
"0.5318604",
"0.53185666",
"0.5310228",
"0.5307017",
"0.5306576",
"0.5301109",
"0.52953684",
"0.5294195",
"0.52870715",
"0.5277125",
"0.52705926",
"0.5266451",
"0.5265115",
"0.52601844",
"0.5246636",
"0.52435917",
"0.5240997",
"0.52361256",
"0.52336204",
"0.523245",
"0.5224633",
"0.5221115",
"0.5214252",
"0.5214002",
"0.5213256",
"0.5212894",
"0.52119815",
"0.52009904",
"0.51959145",
"0.51920694",
"0.51887035",
"0.5178057",
"0.5176441",
"0.5175915",
"0.5175292",
"0.5173466",
"0.5171572",
"0.51698",
"0.51667476",
"0.51663584",
"0.51605606",
"0.5159571",
"0.515794",
"0.51510733",
"0.5145746",
"0.51447403",
"0.51435906",
"0.5143092",
"0.5133528",
"0.5131627",
"0.51260704",
"0.51253635",
"0.5124897",
"0.51232374",
"0.51232344",
"0.5122519",
"0.51195097",
"0.5119075",
"0.5118002",
"0.5116145",
"0.51111394",
"0.51099604",
"0.51045686",
"0.51029336",
"0.5102776",
"0.50897455",
"0.50880235"
] | 0.0 | -1 |
A listener that will process a action sent to the ActionsService. | public interface ActionListener {
/**
* Process a action sent to {@link ActionListener}.
*
* @param action Action to be processed.
*/
void process(Action action);
/**
* The firing cycle has ended, the actions can be sent
*/
void flush();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void processAction(CIDAction action);",
"public void executeAction( String actionInfo );",
"public abstract void onAction();",
"interface Action {\n void process(AbstractMessagingService serviceAction,\n Message message);\n\n }",
"void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);",
"public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }",
"@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 handleEventAgentAction(Agent agent, Action action) {\n\t\t// TODO: verify the agent is \"authorised\" to execute this action\n\t\tengine.submitAction(action);\n\t\t\n\t\t// TODO: handle response to Action, ie. callback... direct it back to the Agent.\n\t}",
"public void addActionListeners() {\n\t\tApp.sc.createListener(\"/\" + this.getID() + \"/action/sent\", new OSCListener() {\n\t\t\t@Override\n\t\t\tpublic void acceptMessage(Date time, OSCMessage message) {\n\t\t\t\tConnector actionOutConnector = getConnector(ConnectorType.ACTION_OUT);\n\t\t\t\tactionOutConnector.flashConnection();\n\t\t\t}\n\t\t});\n\t}",
"public void performAction(HandlerData actionInfo) throws ActionException;",
"public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {\r\n\r\n }",
"public void action() {\n action.action();\n }",
"public interface OnActionSelectedListener {\n\t\t\tpublic void onActionSelected(Tweet tweet, String action);\n\t}",
"@Override\n\tpublic synchronized void processCfAction(String user, CfAction action) {\n\t\tprocessNewMessage(user, action);\n\t}",
"public void actionStarted(ActionStreamEvent action);",
"@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}",
"public void processAction (ActionRequest request, ActionResponse response) \n throws PortletException, java.io.IOException {\n throw new PortletException(\"processAction method not implemented\");\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"@Override\n public void accept(Action action) {\n }",
"void actionChanged( final ActionAdapter action );",
"public void setAction(String action) { this.action = action; }",
"@Override\n public void onPressed(Action action) {\n // pass the message on\n notifyOnPress(action);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }",
"@Override\n\tpublic void actionHandler(Actions action, int arg1, int arg2) {\n\t\tlogic.actionHandler(action, arg1, arg2);\n\t}",
"private void act() {\n\t\tmyAction.embodiment();\n\t}",
"public synchronized void applyAction(int action) {\n\n }",
"void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);",
"@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}",
"@Override\r\n\tpublic void processAction(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws IOException, PortletException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.processAction(actionRequest, actionResponse);\r\n\t}",
"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 setAction(String action) {\n this.action = action;\n }",
"public void setAction(String action) {\n this.action = action;\n }",
"public interface ActionCompletedReceiver {\n /** Receives a completed action. */\n void actionCompleted(ActionLookupData actionLookupData);\n /** Notes that an action has started, giving the key. */\n void noteActionEvaluationStarted(ActionLookupData actionLookupData, Action action);\n }",
"public void performAction();",
"public void setAction (String action) {\n this.action = action;\n }",
"@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\tadaptee.botonRecibir_actionPerformed(e);\n\t}",
"@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }",
"public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"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 }",
"public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }",
"public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"@Override\n public void onAction(RPObject player, RPAction action) {\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 }",
"public void setAction(Action action) {\n this.action = action;\n }",
"public void notifyNewAction(Action action){\n\t\tnotifyObservers(action);\n\t}",
"public void setAction(String action) {\n\t\tthis.action = action;\n\t}",
"public abstract Action getAction();",
"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 action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}",
"@Override\n\tpublic void processAction(ActionRequest actionRequest, ActionResponse actionResponse)\n\t\t\tthrows IOException, PortletException {\n\t\tsuper.processAction(actionRequest, actionResponse);\n\t}",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\taddAction();\n\t\t\t}",
"protected void fireActionChanged()\n {\n for( final ActionAdapterListener listener : this.listeners )\n {\n listener.actionChanged( this );\n }\n }",
"interface ActionDelegate {\n\n /** Called when value of the 'Working directory' field has been changed. */\n void onWorkingDirectoryChanged();\n\n /** Called when value of the 'Arguments' field has been changed. */\n void onArgumentsChanged();\n }",
"@Override\n public void onResult(final AIResponse result) {\n DobbyLog.i(\"Action: \" + result.getResult().getAction());\n }",
"public void setAction(String action);",
"protected void processNewMessage(String user, CfAction action){\n\t\tif (shouldTakeActionOnMessage(action)){\n\t\t\tsendToAllAgents(user, action);\t\n\t\t}\n\t}",
"@Override\n\tpublic boolean processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException {\n\t\tString cmd = ParamUtil.getString(actionRequest, Constants.CMD);\n\t\tSystem.out.println(\"CMD=\" + cmd);\n\t\treturn _mvcActionCommand.processAction(actionRequest, actionResponse);\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void processEvent(ActionEvent e) {\n\t\tArrayList<ActionListener> list;\n\n\t\tsynchronized (this) {\n\t\t\tif (actionListenerList == null)\n\t\t\t\treturn;\n\t\t\tlist = (ArrayList<ActionListener>) actionListenerList.clone();\n\t\t}\n\n\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\tActionListener listener = list.get(i);\n\t\t\tlistener.actionPerformed(e);\n\t\t}\n\t}",
"void actionCompleted(ActionLookupData actionLookupData);",
"public void doAction(){}",
"interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }",
"void applyAction(Action action, Session session) throws ActionException;",
"public void setAction(int value) {\n this.action = value;\n }",
"void actionProcessed(Action action, ActionResult res, int round);",
"public int getAction() {\n return action_;\n }",
"@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}",
"public void submit(Action<T> action) {\r\n Logger.v(this, \">> submit\");\r\n \r\n if (mReceiver != null) {\r\n Logger.v(this, \"submit, executing\");\r\n action.apply(mReceiver);\r\n } else {\r\n Logger.v(this, \"submit, cached\");\r\n mActions.add(action);\r\n }\r\n\r\n Logger.v(this, \"<< submit\");\r\n }",
"abstract public void performAction();",
"@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}",
"void onAction(TwitchUser sender, TwitchMessage message);",
"interface ActionDelegate {\n\n void onRouteUrlsChanged();\n\n void onResetRouteUrls();\n\n void onSaveRouteUrls();\n }",
"public void onEventAction(final Event event, final String textMsg, final int action) {\n if (action == R.id.ic_action_vector_resend_message) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n resend(event);\n }\n });\n } else if (action == R.id.ic_action_vector_redact_message) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n new AlertDialog.Builder(getActivity())\n .setMessage(getString(R.string.redact) + \" ?\")\n .setCancelable(false)\n .setPositiveButton(R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n if (event.isUndelivered() || event.isUnknownDevice()) {\n // delete from the store\n mSession.getDataHandler().deleteRoomEvent(event);\n\n // remove from the adapter\n mAdapter.removeEventById(event.eventId);\n mAdapter.notifyDataSetChanged();\n mEventSendingListener.onMessageRedacted(event);\n } else {\n redactEvent(event.eventId);\n }\n }\n })\n .setNegativeButton(R.string.cancel, null)\n .show();\n }\n });\n } else if (action == R.id.ic_action_vector_copy) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n SystemUtilsKt.copyToClipboard(getActivity(), textMsg);\n }\n });\n } else if ((action == R.id.ic_action_vector_cancel_upload) || (action == R.id.ic_action_vector_cancel_download)) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n new AlertDialog.Builder(getActivity())\n .setMessage((action == R.id.ic_action_vector_cancel_upload) ?\n R.string.attachment_cancel_upload : R.string.attachment_cancel_download)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n mRoom.cancelEventSending(event);\n\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mAdapter.notifyDataSetChanged();\n }\n });\n }\n })\n .setNegativeButton(R.string.no, null)\n .show();\n }\n });\n } else if (action == R.id.ic_action_vector_quote) {\n Activity attachedActivity = getActivity();\n\n if ((null != attachedActivity) && (attachedActivity instanceof VectorRoomActivity)) {\n // Quote all paragraphs instead\n String[] messageParagraphs = textMsg.split(\"\\n\\n\");\n String quotedTextMsg = \"\";\n for (int i = 0; i < messageParagraphs.length; i++) {\n if (!messageParagraphs[i].trim().equals(\"\")) {\n quotedTextMsg += \"> \" + messageParagraphs[i];\n }\n\n if (!((i + 1) == messageParagraphs.length)) {\n quotedTextMsg += \"\\n\\n\";\n }\n }\n ((VectorRoomActivity) attachedActivity).insertQuoteInTextEditor(quotedTextMsg + \"\\n\\n\");\n }\n } else if ((action == R.id.ic_action_vector_share) || (action == R.id.ic_action_vector_forward) || (action == R.id.ic_action_vector_save)) {\n //\n Message message = JsonUtils.toMessage(event.getContent());\n\n String mediaUrl = null;\n String mediaMimeType = null;\n EncryptedFileInfo encryptedFileInfo = null;\n\n if (message instanceof ImageMessage) {\n ImageMessage imageMessage = (ImageMessage) message;\n\n mediaUrl = imageMessage.getUrl();\n mediaMimeType = imageMessage.getMimeType();\n encryptedFileInfo = imageMessage.file;\n } else if (message instanceof VideoMessage) {\n VideoMessage videoMessage = (VideoMessage) message;\n\n mediaUrl = videoMessage.getUrl();\n encryptedFileInfo = videoMessage.file;\n\n if (null != videoMessage.info) {\n mediaMimeType = videoMessage.info.mimetype;\n }\n } else if (message instanceof FileMessage) {\n FileMessage fileMessage = (FileMessage) message;\n\n mediaUrl = fileMessage.getUrl();\n mediaMimeType = fileMessage.getMimeType();\n encryptedFileInfo = fileMessage.file;\n }\n\n // media file ?\n if (null != mediaUrl) {\n onMediaAction(action, mediaUrl, mediaMimeType, message.body, encryptedFileInfo);\n } else if ((action == R.id.ic_action_vector_share) || (action == R.id.ic_action_vector_forward) || (action == R.id.ic_action_vector_quote)) {\n // use the body\n final Intent sendIntent = new Intent();\n\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, textMsg);\n sendIntent.setType(\"text/plain\");\n\n if (action == R.id.ic_action_vector_forward) {\n CommonActivityUtils.sendFilesTo(getActivity(), sendIntent);\n } else {\n startActivity(sendIntent);\n }\n }\n } else if (action == R.id.ic_action_vector_permalink) {\n SystemUtilsKt.copyToClipboard(getActivity(), PermalinkUtils.createPermalink(event));\n } else if (action == R.id.ic_action_vector_report) {\n onMessageReport(event);\n } else if ((action == R.id.ic_action_view_source) || (action == R.id.ic_action_view_decrypted_source)) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n View view = getActivity().getLayoutInflater().inflate(R.layout.dialog_event_content, null);\n TextView textview = view.findViewById(R.id.event_content_text_view);\n\n Gson gson = new GsonBuilder()\n .disableHtmlEscaping()\n .setPrettyPrinting()\n .create();\n\n textview.setText(gson.toJson(JsonUtils.toJson((action == R.id.ic_action_view_source) ? event : event.getClearEvent())));\n\n new AlertDialog.Builder(getActivity())\n .setView(view)\n .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n })\n .show();\n }\n });\n } else if (action == R.id.ic_action_device_verification) {\n onE2eIconClick(event, mAdapter.getDeviceInfo(event.eventId));\n } else if (action == R.id.ic_action_re_request_e2e_key) {\n mSession.getCrypto().reRequestRoomKeyForEvent(event);\n\n mReRequestKeyDialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.e2e_re_request_encryption_key_dialog_title)\n .setMessage(R.string.e2e_re_request_encryption_key_dialog_content)\n .setPositiveButton(R.string.ok, null)\n .setOnDismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialog) {\n mReRequestKeyDialog = null;\n }\n })\n .show();\n }\n }",
"abstract protected String performAction(String input);",
"public int getAction() {\n return action_;\n }",
"@Override\n\t\t\tpublic void dealWithCustomAction(Context context, UMessage msg)\n\t\t\t{\n\t\t\t}",
"void handleActionEvent(ActionEvent event);",
"String getOnAction();",
"public CompletionStage<JsonValue> dispatch(String action, JsonValue payload) {\n\t\tJsonObjectBuilder builder = Json.createObjectBuilder(FinBeanUtils.toJsonObject(this.routingInfo))\n\t\t\t\t.add(\"providerIdentity\", FinBeanUtils.toJsonObject(providerIdentity))\n\t\t\t\t.add(\"action\", action);\n\t\tif (payload != null) {\n\t\t\tbuilder.add(\"payload\", payload);\n\t\t}\n\t\treturn this.finConnection.sendMessage(\"send-channel-message\", builder.build()).thenApply(ack->{\n\t\t\tif (ack.isSuccess()) {\n\t\t\t\treturn ack.getData().asJsonObject().get(\"result\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(\"error invoking action, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}",
"public abstract void addAction(Context context, NAAction action);",
"@Override\n protected void hookUpActionListeners() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"public void setAction(@NotNull Action action) {\n this.action = action;\n }",
"public int getAction()\n {\n return m_action;\n }",
"public interface Action {\n String execute(GameController gameController);\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 actionPerformed(ActionEvent actionEvent) {\n\t\t\tforwardActionEvent(actionEvent);\n\t\t}",
"public void setAction(String action) {\n\t\tthis.action.set(action);\n\t}",
"public void addAction(Action action) {\n\t\t\n\t}"
] | [
"0.71305996",
"0.6788807",
"0.66836107",
"0.65999764",
"0.6598301",
"0.6534034",
"0.65116256",
"0.64670956",
"0.64602816",
"0.64452505",
"0.6393709",
"0.638783",
"0.63648796",
"0.6353296",
"0.62863755",
"0.6277574",
"0.62746674",
"0.6265788",
"0.62282604",
"0.62097675",
"0.619109",
"0.6182749",
"0.61752194",
"0.6173729",
"0.6164764",
"0.6158595",
"0.6111101",
"0.61082363",
"0.6092223",
"0.6084068",
"0.60682535",
"0.60682535",
"0.60620683",
"0.6058995",
"0.6056833",
"0.6051809",
"0.60502696",
"0.6019186",
"0.60115004",
"0.5989311",
"0.5989311",
"0.59875494",
"0.598236",
"0.59780586",
"0.5975182",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5971603",
"0.5949629",
"0.59276336",
"0.59227765",
"0.592058",
"0.59169126",
"0.59112483",
"0.58915156",
"0.58906764",
"0.5864273",
"0.5860775",
"0.5852819",
"0.5836299",
"0.58355224",
"0.5833675",
"0.5830378",
"0.58202696",
"0.58029956",
"0.580042",
"0.5787207",
"0.57858974",
"0.57829607",
"0.57822585",
"0.5767111",
"0.5759038",
"0.5750371",
"0.57478255",
"0.57472295",
"0.5732916",
"0.57305115",
"0.5727536",
"0.5720835",
"0.5712937",
"0.57093704",
"0.5700861",
"0.56991124",
"0.5698902",
"0.5697895",
"0.56967026",
"0.56967026",
"0.56967026",
"0.5680833",
"0.56699306",
"0.56569356",
"0.5634191",
"0.56225157",
"0.56201345",
"0.5617593"
] | 0.5737458 | 80 |
The firing cycle has ended, the actions can be sent | void flush(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void finish() {\n if ( actor.hasActions() )\r\n actor.getActions().first().act(100000);\r\n // remove any remaining actions\r\n actor.clearActions();\r\n }",
"public void run() {\n long startTime = 0;\n if (action.getClass().getName().contains(\"TooAction\")) {\n startTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sending a ToO alert...\");\n }\n\n action.doTriggerAction(change, handback);\n\n // Record the end time and warn if it took too long.\n if (startTime != 0) {\n long curTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sent ToO alert\");\n\n long elapsed = curTime - startTime;\n if (elapsed > 5000) {\n LOG.log(Level.WARNING, \"Long delay sending ToO alert: \" + elapsed);\n }\n }\n\n }",
"protected void fireActionPerformed()\n {\n ActionEvent actionEvent = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, this.command);\n\n for (final ActionListener actionListener : this.listenerList.getListeners(ActionListener.class))\n {\n actionListener.actionPerformed(actionEvent);\n }\n\n actionEvent = null;\n }",
"public abstract void userActionEnds(long ms);",
"@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }",
"private void act() {\n\t\tmyAction.embodiment();\n\t}",
"public void fire() {\n // operation finished\n dfStatus |= DF_STATUS_READY;\n }",
"public void setEndAction(String anAction) { _endAction = anAction; }",
"public void onComplete() {\r\n\r\n }",
"@Override\n\t\tpublic void onComplete() {\n\t\t\tSystem.out.println(\"onComplete\");\n\t\t}",
"public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }",
"public abstract void fire();",
"public abstract void fire();",
"public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }",
"public void endPhase(){\n if(this.actionPhase) {\n this.buyPhase = true;\n this.actionPhase = false;\n }else{\n endTurn();\n }\n }",
"@Override\n\tprotected void execute() {\n\t\tRobot.collector.setMawOpen(Robot.oi.getCollectorOpen());\n\t\tRobot.collector.setIntakeSpeed(Robot.oi.getCollectorSpeed());\n\t\tRobot.collector.setWristStageOneRetracted(Robot.oi.getWristStageOneRetracted());\n\t\tRobot.collector.setWristStageTwoRetracted(Robot.oi.getWristStageTwoRetracted());\n\t}",
"@Override\r\n\tpublic void actionFly() {\n\t\tSystem.out.println(\"날 수 있다.\");\r\n\t}",
"@Override\n public void onComplete() {\n System.out.println (\"Suree onComplete\" );\n }",
"protected void fireActionEvent() {\n if (actionListener != null) {\n ActionEvent ae = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, command);\n actionListener.actionPerformed(ae);\n }\n }",
"@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}",
"public void act()\n\t{\n\t\tif(getFirstDriver().isAtPump())\n\t\t{\n\t\t\tif(!getFirstDriver().isDoneRefilling())\n\t\t\t{\n\t\t\t\tgetFirstDriver().act(priceOfFuel);\n\t\t\t}\n\t\t}\n\t\telse if(getFirstDriver().isDone())\n\t\t{\n\t\t\tremoveDriver();\n\t\t}\n\t}",
"public void fireIntermediateEvents() {\n fireActionPerformed();\n }",
"public boolean actionCompleted() {\n return !mAttacking;\n }",
"public void postActionEvent() {\n fireActionPerformed();\n }",
"public void end(){\r\n\t\tsetResult( true ); \r\n\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onComplete() {\n\t\t\t\t\r\n\t\t\t}",
"private void handleAutomatonEnded() {\n Platform.runLater(() -> {\n canvas.scheduleUpdate();\n goEndState();\n alertAutomatonEnded();\n });\n }",
"@Override\r\n\tpublic final void beginAction() {\r\n\t\tframesPassed = 0;\r\n\t\trecentFrame = -1;\r\n\t\ttarget = getEntity().getAttackTarget();\r\n\t\tMinecraftForge.EVENT_BUS.post(new ActionSelectionEvent(this, getEntity()));\r\n\t\tresetAction();\r\n\t\tinitializeExecutionRandomness();\r\n\t\tbeginExecution();\r\n\t}",
"public void action() {\n action.action();\n }",
"public void executeAction()\n\t{\t\t\n\t\tthis.getUser().setHealth(this.getUser().getHealth()+HEALTH);\n\t}",
"public abstract void interactionEnds(long ms);",
"public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"@Override\n protected void doAct() {\n }",
"@Override\n\t\t\t\t\tpublic void onComplete() {\n\t\t\t\t\t}",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"protected void fireActionPerformed() {\n // Guaranteed to return a non-null array\n Object[] listeners = listenerList.getListenerList();\n ActionEvent e = new ActionEvent(this, ActionEvent.ACTION_PERFORMED,\n (command != null) ? command : getText());\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length-2; i>=0; i-=2) {\n if (listeners[i]==ActionListener.class) {\n ((ActionListener)listeners[i+1]).actionPerformed(e);\n } \n }\n }",
"protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }",
"public String getEndAction() { return _endAction; }",
"@Override\n\tprotected void done()\n\t{\n\t\tgetController().done();\n\t}",
"private void handleGoalFinishedEvent() {\n Collection<RGoal> agentActiveGoals = internalFeature.getCapability().getGoals();\n\n // Iterate goal instances stored in my active goal map to find if we have record of goal which is no longer active\n for (String myActiveGoalKey : myActiveGoals.keySet()) {\n\n boolean isStillActive = false;\n\n // Iterate currently active access goals\n for (IGoal goal : agentActiveGoals) {\n\n // If goal instance stored in my active goal map is still currently active access goal break and continue\n // with testing next goal instance stored in my active goal map\n if (myActiveGoalKey.equals(goal.toString())) {\n isStillActive = true;\n break;\n }\n }\n\n // If goal instance stored in my active goal map is no longer currently active access goal fire goal finished emotional event\n if (!isStillActive) {\n\n IGoal goal = myActiveGoals.get(myActiveGoalKey);\n\n // Remove no longer active goal instance from my active goal map to avoid multiple goal finished events for one goal instance\n myActiveGoals.remove(myActiveGoalKey);\n\n // Get objectValue\n String elementName = goal.getModelElement().getDescription();\n Element element = engine.getElement(elementName, R.GOAL);\n\n // Create emotional event\n EmotionalEvent emotionalEvent = new EmotionalEvent();\n\n // Get goal result for emotional event processing\n int goalResult;\n if (goal.isSucceeded()) {\n goalResult = R.RESULT_SUCCESS;\n } else {\n goalResult = R.RESULT_FAILURE;\n }\n\n // Set emotional event values\n emotionalEvent.setElementName(elementName);\n emotionalEvent.setEventType(R.EVT_GOAL_FINISHED);\n emotionalEvent.setResultType(goalResult);\n emotionalEvent.setUserParameters(params.getGoalUserParameterValues((RGoal) goal, JBDIEmo.UserGoalParams\n .get(engine.getAgentName()).get(elementName).value()));\n emotionalEvent.setSystemParameters(params.getSystemParameterValues(element));\n\n // Fire emotional event\n element.processEmotionalEvent(emotionalEvent);\n }\n }\n }",
"@Override\n public void doAction() {\n checkRep();\n if (!storedBalls.isEmpty()) {\n Ball ballToShootOut = storedBalls.remove();\n ballToShootOut.setVelocity(new Vect(0,STOREDBALLVELOCITY));\n ballToShootOut.setActive(true);\n }\n checkRep();\n }",
"protected void fireActionPerformed(ActionEvent e){\n Object[] listeners=listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for(int i=listeners.length-2;i>=0;i-=2){\n if(listeners[i]==ActionListener.class){\n ((ActionListener)listeners[i+1]).actionPerformed(e);\n }\n }\n }",
"public void setEnded(){\n\t\tended=true;\n\t}",
"public void mo42329d() {\n this.f36205a.onComplete();\n }",
"@Override\n\tpublic void execute() {\n\t\tempfaengerA.doAction1();\n\t\tempfaengerA.doAction2();\n\t\tempfaengerA.doAction3();\n\n\t}",
"public void act() {\n\t}",
"protected void onCycle() {\n\n }",
"public abstract void systemActionEnds(long ms);",
"protected abstract String endActionString();",
"protected void _notifyInteractionEnded() {\n for (int i=0; i < _listeners.size(); i++) {\n ((InteractionsListener)_listeners.get(i)).interactionEnded();\n }\n }",
"private void doActivation() {\n OnFieldActivated activateEvent = new OnFieldActivated(this::finishReset);\n activateEvent.beginTask();\n DefenceField.getShrineEntity().send(activateEvent);\n activateEvent.finishTask();\n }",
"public void act() \n {\n // Add your action code here.\n tempoUp();\n }",
"private void fire() {\n\t\tlog.finer(\"Firing node\");\n\t\t\n\t\tplay();\n\t\taddAnimation(new NodeEcho(parent, pos, diam, diam + 15));\n\t}",
"@Override\n public void onSequenceFinish() {\n // Yay\n }",
"public void actionSuccessful() {\n System.out.println(\"Action performed successfully!\");\n }",
"@Override\n public void act() {\n }",
"protected void onEnd() {}",
"public void execute() {\n setExecuted(true);\n }",
"public void execute() {\n\t\tString userID = clientMediator.getUserName();\n\t\tString id = reactToController.communicateWith(userID);\n\t\tif(id != null){\n\t\t\tclientMediator.setReactTo(id);\n\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\tString message = reactToController.reactToEntity(id,userID);\n\t\t\tString result = \"You just interacted with \" + id + \", so you \" + message + \" at \" + df.format(new Date()).toString();\n\t\t\tclientMediator.setReactResult(result);\n\t\t\tclientMediator.getEventQueue().add(new ReactToEvent(id,userID));\n\t\t}\n\t}",
"public void onTurnEnd() {\n\n\t}",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\n public void onComplete() {\n }",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}",
"public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }",
"public void mo42330e() {\n this.f36205a.onComplete();\n }",
"public void notifyEnd() {\n\n\t}",
"@Override\n\tpublic void fire() throws Exception {\n\t\tsuper.fire();\n\t}",
"public void finishPassing() {\n\t\n\tmyGlass = null;\n controller.donePass();\n // System.out.println(\"done animating\");\n}",
"protected void end() {\n \tif (waitForMovement) Robot.intake.setHopperTracker(deploy ? Status.deployed : Status.stowed);\n }",
"protected void onCompleteFadeOut() { }",
"public void act() {\n boolean willMove = canMove();\n if (isEnd && !hasShown) {\n String msg = stepCount.toString() + \" steps\";\n JOptionPane.showMessageDialog(null, msg);\n hasShown = true;\n } else if (willMove) {\n move();\n stepCount++;\n }\n }",
"protected void onCompleteFadeIn() { }",
"@Override\n\tprotected void fireFinishWar() {\n\t\t\n\t}",
"@Override\n protected void triggerNextIteration() throws IllegalActionException {\n }",
"@Override\n public void onSequenceFinish() {\n // Yay\n mShowingTour = false;\n mPresenter.showCaseFinished();\n }",
"private boolean triggered() {\n\t\treturn true;\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"@Override\n\tpublic void action() {\n\t\t_agj.addBehaviour(new RecibirDistritos(_agj));\n\t\t_agj.addBehaviour(new RecibirMonedas(_agj));\n\t}",
"void onComplete();",
"@Override\n\tpublic void startAction() {\n\t if (!balls.isEmpty() && firingBall == null) {\n\t gb.addToActiveList(this);\n\t //fire next ball\n\t firingBall = (Ball)balls.remove(0);\n\t firingBall.setAbsorbed(false);\n\t firingBall.setVy(-50*25);\n\t //align balls that are being held\n\t if (!balls.isEmpty()) setBalls();\n\t }\n\t}",
"public int onEnd() {\n\t\t\t\tflushMessageQueue();\n\t\t\t\treturn 0;\n\t\t\t}",
"public void endOfWork() {\n\t\tClientCom clientCom = new ClientCom(RunParameters.ArrivalQuayHostName, RunParameters.ArrivalQuayPort);\n\t\twhile (!clientCom.open()) {\n\t\t\tSystem.out.println(\"Arrival Quay not active yet, sleeping for 1 seccond\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tThread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t\t;\n\t\tPassenger passenger = (Passenger) Thread.currentThread();\n\t\tMessage pkt = new Message();\n\t\tpkt.setType(MessageType.SIM_ENDED);\n\t\tpkt.setId(passenger.getPassengerId());\n\n\t\tclientCom.writeObject(pkt);\n\t\tpkt = (Message) clientCom.readObject();\n\n\t\tpassenger.setCurrentState(pkt.getState());\n\t\tclientCom.close();\n\t}",
"protected void fireActionPerformed(ActionEvent e){\n Object[] listeners=listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for(int i=listeners.length-2;i>=0;i-=2){\n if(listeners[i]==ActionListener.class){\n // Lazily create the event:\n // if (changeEvent == null)\n // changeEvent = new ChangeEvent(this);\n ((ActionListener)listeners[i+1]).actionPerformed(e);\n }\n }\n }",
"public void action()\n {\n if(timeout > 0 && timeout < 2)\n {\n timeout = 0;\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n counter = 0;\n\n\n }\n //If this is the very first time getting to this state or if the timeout reset the counter to 0\n if(counter < 1)\n {\n //Clean the list of receivers in case there is something\n if(!receivers.isEmpty())\n receivers.removeAllElements();\n //Calculate the duration of the intro\n calculateDurationIntro();\n //Find a receiver\n findAllReceivers();\n constructACLMessage();\n introNegotiation = new IntroNegotiation(agent,msg);\n introNegotiation.setDataStore(getDataStore());\n agent.addBehaviour(introNegotiation);\n }\n\n\n //Handle where I'm heading to from here.\n switch (steps)\n {\n case 0:\n transition = 29;\n break;\n case 1:\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n transition = 17;\n\n }\n\n\n\n }",
"@Override\n\tpublic void onComplete() {\n\t\tSystem.out.println(\"Its Done!!!\");\n\t}",
"@Override\n\tpublic synchronized void fire() {\n\t}",
"public void fire() {\n \tintakeTalon1.set(1);\n \tintakeTalon2.set(1);\n }",
"@Override\r\n\tpublic void action() {\n\t\t\r\n\t}"
] | [
"0.6652162",
"0.6333839",
"0.61806417",
"0.6172758",
"0.60985804",
"0.60862875",
"0.6065532",
"0.5999622",
"0.59884244",
"0.5966431",
"0.5956225",
"0.59423447",
"0.59423447",
"0.59375584",
"0.59239626",
"0.5923387",
"0.59210724",
"0.59089994",
"0.59079874",
"0.5903304",
"0.5900681",
"0.5874855",
"0.587216",
"0.5869701",
"0.5849906",
"0.583632",
"0.583632",
"0.5828666",
"0.5820532",
"0.5814357",
"0.5807454",
"0.5800156",
"0.5788772",
"0.57879883",
"0.57834226",
"0.57765216",
"0.57745767",
"0.577233",
"0.57699203",
"0.5764922",
"0.576488",
"0.5754029",
"0.57469964",
"0.5746653",
"0.57458943",
"0.57362914",
"0.5715354",
"0.5714596",
"0.57071835",
"0.5706612",
"0.5706298",
"0.56982446",
"0.5695803",
"0.56915087",
"0.5690061",
"0.56865066",
"0.5684007",
"0.5676986",
"0.56740385",
"0.56710964",
"0.5666541",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.5661273",
"0.56605583",
"0.56605583",
"0.5649371",
"0.5649106",
"0.56443053",
"0.5631707",
"0.56208473",
"0.5617814",
"0.56149197",
"0.5602939",
"0.5602345",
"0.5600457",
"0.55966824",
"0.55963993",
"0.559373",
"0.5586061",
"0.5585574",
"0.5575917",
"0.5573103",
"0.5567636",
"0.556016",
"0.55565244",
"0.55552673",
"0.55545723",
"0.5553881",
"0.5552889",
"0.55518395",
"0.5541098"
] | 0.0 | -1 |
Throw an error message. | public UnityDaoException(String message) { super(message); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void error(String message);",
"public void error(String message) {\n\tSystem.err.println(\"Error: \" + message);\n\tthrow new Error(message);\n }",
"public void error(String message, Throwable throwable);",
"public void error(String message) {\n ui.say(\"ERROR: \" + message);\n }",
"void showError(String message);",
"void showError(String message);",
"static GitletException error(String msgFormat, Object... arguments) {\n return new GitletException(String.format(msgFormat, arguments));\n }",
"void error (String msg) throws RootException;",
"OOPExpectedException expectMessage(String msg);",
"public void message(String message, Throwable t);",
"public static void error(Object message) {\n\t\tSystem.out.print(\"! ERROR: \" + message);\n\t}",
"public SenhaInvalidaException(String message) {\n\t\tsuper(message);\n\t}",
"public void addError(String message);",
"String errorMessage();",
"public NotValidException(String message) {\r\n super(message);\r\n }",
"public static void illegalArgument(Object errorMessage) {\n throw new IllegalArgumentException(\"\" + errorMessage);\n }",
"void errorBox(String title, String message);",
"@Override\n\tpublic void error(CharSequence message, Throwable t) {\n\n\t}",
"abstract void errorLogMessage(String message);",
"public void sendError(String message) { \r\n this.send(\"Error:\" + message);\t//remember a String IS-A Object!\r\n }",
"private String formatError(String message) {\n return \"error : \" + message;\n }",
"@Test\n\tpublic void testExceptionMessage() {\n\n\t\ttry {\n\t\t\tnew LinkedList< Object >().get( 0 );\n\n\t\t\t//if no exception thrown the test will fail with the below message.\n//\t\t\tfail( \"Expected an IndexOutOfBoundsException to be thrown\" );\n\n\t\t} catch ( IndexOutOfBoundsException anIndexOutOfBoundsException ) {\n\n\t\t\t//if no exception message is not the same the test will fail with the below message.\n//\t\t\tassertThat( anIndexOutOfBoundsException.getMessage(), is( \"Index: 0, Size: 0\" ) );\n\t\t}\n\n\t}",
"void showError(String errorMessage);",
"private void error(String message) { \n Alert alert = new Alert(Alert.AlertType.ERROR, message);\n alert.setTitle(I18n.tr(\"imagesizedialog.error.title\"));\n alert.setContentText(message);\n alert.showAndWait();\n }",
"public IncorrectInputException(String message) {\r\n super(message);\r\n }",
"public void showError(String errorMessage);",
"@Override\n\tpublic void error(CharSequence message) {\n\n\t}",
"@Override\n\tpublic void error(Object message) {\n\n\t}",
"abstract void error(String error);",
"public void sendError(String message) { \n\t\tthis.send(\"Error:\" + message); //remember a String IS-A Object!\n\t}",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getErrorMessage();",
"java.lang.String getError();",
"java.lang.String getError();",
"java.lang.String getError();",
"void drawError(String message);",
"public void exception(String message) {\n JOptionPane.showMessageDialog(frame, message, \"exception\", JOptionPane.ERROR_MESSAGE);\n }",
"@Override\n\tpublic void error(Object message, Throwable t) {\n\n\t}",
"@Override\n void assertErrorMessage(String messageText) {\n }",
"public PlayException(String message) {\n super(message);\n }",
"void displayErrorMessage(String message);",
"public void showError(String error);",
"@Override\n\tpublic void error(Message msg, Throwable t) {\n\n\t}",
"protected static void throwOutputError(String msg)\n throws XMLStreamException\n {\n throw new XMLStreamException(msg);\n }",
"String getInvalidMessage();",
"void error (String msg, RootException ex) throws RootException;",
"public String error();",
"String getErrorMessage();",
"String getErrorMessage();",
"public static void error(String message) {\n LOGGER.error(message);\n }",
"private void errorMessage(String message) {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tAlertDialog dialog = builder.setMessage(message).setTitle(\"Error\").create();\n \tdialog.show();\n }",
"@Override\n\tpublic void showError(String message) {\n\t\t\n\t}",
"public void errorOccured(String errorMessage, Exception e);",
"protected static Exception throwError(Result result, String message) {\n // Javac re-throws exceptions wrapped by PropagatedException.\n throw new PropagatedException(new PluginException(result, message));\n }",
"public static void error(String message) {\n FacesContext.getCurrentInstance()\n .addMessage(null,\n new FacesMessage(FacesMessage.SEVERITY_ERROR,\n FacesUtils.getlocalizedString(ResourceBundles.GENERAL, \"error\") + \"!\",\n message));\n }",
"public DataDiFineTirocinioNonValidaException(String messaggio) {\r\n super(messaggio);\r\n }",
"private void errorMessage( String message )\n {\n logger.errorMessage( \"MidiChannel\", message, 0 );\n }",
"public ArithmeticaException (String message) {\n super(message);\n }",
"public notHumanBeingException(String message){// Message parameted created\n super(message);\n \n }",
"public InvalidInputException(String errMessage)\n\t{\n\t\tthis.errMessage = errMessage;\n\t}",
"private void throwFailedLoginException(String msg) throws FailedLoginException\n {\n System.out.println(\"Throwing FailedLoginException(\"+msg+\")\");\n throw new FailedLoginException(msg);\n }",
"@Then(\"^Mostrara mensaje de error$\")\n\tpublic void Mostrara_mensaje_de_error() throws Throwable {\n\t System.out.println(\"El email o la contrase�a es erronea\");\n\t assert(true);\n\t}",
"public void error();",
"public BadRequestException(String message) {\n super(message);\n if(!message.equals(\"\")){errorText = errorText.concat(\": \" + message);}\n }",
"public abstract RuntimeException getException(String message);",
"public void showNamedError(String message) {\n\t\ttextUI.showNamedError(this.name, message);\n\t}",
"public void showError(String message) {\n JOptionPane.showMessageDialog(this, message, \"Error!\", JOptionPane.ERROR_MESSAGE);\n }",
"public Neo4jException(String message) {\n this(\"N/A\", message);\n }",
"private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}",
"public void putError(String message) {\n errorData.postValue(message);\n }",
"public void error(final String message, final Object... args) {\n log.severe(supplier(message, args));\n }",
"public void throwCoreException(String message, Throwable exception) throws CoreException {\n IStatus status = new Status(IStatus.ERROR, HumantaskEditorConstants.PLUGIN_ID, IStatus.OK, message, exception);\n throw new CoreException(status);\n }",
"public void error(Exception e);",
"@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}",
"public HTTPErrorException(String message) {\n super(message);\n }",
"private void throwsError() throws OBException {\n }",
"public abstract void setError(String message);",
"protected abstract String insufficientParameterExceptionMessage(TransactionCommand transactionCommand);",
"static EnigmaException error(String msgFormat, Object... arguments) {\n return new EnigmaException(String.format(msgFormat, arguments));\n }",
"protected abstract void error(String err);",
"public static void\tfail(java.lang.String message) \r\n\t\t{\r\n\t\t\tfail(message,null);\r\n\t\t}",
"public void error(String message, String sysid, int line, int column)\n\t\t\t\tthrows Exception {\n\t\t\tif (sysid != null) {\n\t\t\t\tlogError(\"[\" + sysid + \"] \" + message);\n\t\t\t} else {\n\t\t\t\tlogError(message);\n\t\t\t}\n\t\t}",
"@Override\n\tprotected String generateMessage() {\n\t\treturn \"Script evaluation exception \" + generateSimpleMessage();\n\t}",
"protected void fail(String message) {\n Assert.fail(message);\n }",
"void showErrorMsg(String string);",
"public JDBFException (String message){\r\n super(Messages.message(message));\r\n }",
"public void showErrorMessage(String message){\n System.out.println(LocalTime.now() + \": Error: \" + message);\n }",
"public Error(String message) {\r\n \tsuper(message);\r\n \t}",
"public void fail(String message)\n {\n fail(message);\n }",
"public static void printError(String message) {\n\t\tprintMessage(\"ERROR: \" + message);\r\n\t}",
"public TeWeinigGeldException(String message) {\n this.message = message;\n }"
] | [
"0.71529675",
"0.70535046",
"0.6867079",
"0.6783481",
"0.6721653",
"0.6721653",
"0.65161926",
"0.6469953",
"0.64364517",
"0.6409285",
"0.63994735",
"0.6397791",
"0.6374994",
"0.63315344",
"0.62482023",
"0.6243924",
"0.6242904",
"0.6229413",
"0.62120116",
"0.61976403",
"0.6180759",
"0.6168464",
"0.6160862",
"0.615975",
"0.6153358",
"0.6139244",
"0.6138495",
"0.6103317",
"0.6101929",
"0.6101261",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.61007017",
"0.6085436",
"0.6085436",
"0.6085436",
"0.6081852",
"0.60817236",
"0.6081173",
"0.60744315",
"0.606296",
"0.605171",
"0.6051633",
"0.6041567",
"0.6039105",
"0.60107535",
"0.600366",
"0.5999712",
"0.5991114",
"0.5991114",
"0.59722745",
"0.5959837",
"0.5958527",
"0.5951063",
"0.59331673",
"0.5932649",
"0.59316844",
"0.59219605",
"0.5918078",
"0.591541",
"0.58995926",
"0.5893876",
"0.5893266",
"0.58924997",
"0.5892374",
"0.58819073",
"0.5879903",
"0.5876614",
"0.5876179",
"0.5870005",
"0.586954",
"0.58694965",
"0.5858417",
"0.58564436",
"0.5851775",
"0.5849636",
"0.5830116",
"0.5827687",
"0.58181113",
"0.58154726",
"0.5814039",
"0.58124894",
"0.5810945",
"0.5806949",
"0.5804576",
"0.58030564",
"0.5802891",
"0.5800773",
"0.5795173",
"0.5794045",
"0.57927763",
"0.57874423"
] | 0.0 | -1 |
Throw an error message and its cause. | public UnityDaoException(String message, Throwable cause) { super(message, cause); } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Throwable cause();",
"public void buildException(String message, Throwable cause) {\n\n // lanca a exception\n if (cause != null) {\n\n // mostra o stactrace\n cause.printStackTrace();\n throw new BuildException(message, cause);\n\n } else {\n\n // nao possui throwable\n throw new BuildException(message);\n }\n }",
"public ArithmeticaException (String message, Throwable cause) {\n super(message, cause);\n }",
"String getCauseException();",
"public OLMSException(String message, Throwable cause) {\r\n super(message, cause);\r\n }",
"public DslException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public SSHException(String message, Throwable cause) {\n super(message, cause);\n }",
"public SucheException(String message, Throwable cause) {\n super(message, cause);\n // TODO Auto-generated constructor stub\n }",
"public ConverterException(String message, Throwable cause) {\n super(message);\n this.cause = cause;\n }",
"public WriteException(String message, Throwable cause)\n {\n super(message, cause);\n }",
"public Neo4jException(String message, Throwable cause) {\n this(\"N/A\", message, cause);\n }",
"public TDLProException(String message, Throwable cause)\n {\n super(message, cause);\n }",
"public ExcelImportException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"OOPExpectedException expectMessage(String msg);",
"public CollisionSnakeException(String message, Throwable cause) {\n\n super(message, cause);\n }",
"public OperationException(String message, Throwable cause) {\n super(message, cause);\n }",
"public OCCIClientException( String message, Throwable cause )\r\n {\r\n super( message, cause );\r\n }",
"protected static Exception throwError(Result result, String message) {\n // Javac re-throws exceptions wrapped by PropagatedException.\n throw new PropagatedException(new PluginException(result, message));\n }",
"public TechnicalException(String message, Throwable cause) {\r\n super(message, cause);\r\n }",
"public Exception(String message, Throwable cause) {\n\t\t\tsuper(message, cause);\n\t\t}",
"public void error(String message, Throwable throwable);",
"public RenderingException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"public EmployeeException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public QueryException(String message, Throwable cause) {\n super(message, cause);\n }",
"public exceptiona(Throwable cause)\n {\n String Message = \" not in number system\";\n }",
"public JavaException(@Nullable String message, @Nullable Throwable cause)\r\n\t{\r\n\t\tsuper(message, cause);\r\n\t}",
"public ExecutionError(String message, Error cause) {\n/* 51 */ super(message, cause);\n/* */ }",
"public CanyonException( String message, Throwable t )\r\n {\r\n super( message );\r\n m_cause = t;\r\n }",
"public AgentException(String cause) {\n this.cause = cause;\n }",
"public DAOException(String message, Throwable cause) {\r\n super(message, cause);\r\n }",
"public OutputQueueException(String message, Throwable cause)\n {\n super(message, cause);\n }",
"public Twig4jException(String rawMessage, Throwable cause) {\n this.rawMessage = rawMessage;\n initCause(cause);\n }",
"public ValidationException(String userMessage, String logMessage, Throwable cause) {\r\n super(userMessage, logMessage, cause);\r\n }",
"public PlatformException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"public WorkflowException(Exception cause) {\n super(cause);\n }",
"public ServiceException(String message, Throwable cause){\n super(message, cause);\n }",
"public CustomException(String message, Throwable cause) {\n super(message, cause);\n }",
"public TypeConversionException(String message, Throwable cause) {\n super(message, cause);\n }",
"public AlfrescoServiceException(final String message, final Throwable cause) {\n super(message, cause);\n }",
"public JiraServiceException(String message, Throwable cause) {\r\n super(message, cause);\r\n }",
"public OperationFailedException(String message, Exception causeOfException){\n super(message, causeOfException);\n }",
"public TrafficspacesAPIException(Throwable cause, String reason) {\n super(reason);\n rootCause = cause;\n }",
"public ProgramInvocationException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"@Test\n public void testConstructorWithMessageAndCause()\n {\n final RuntimeException cause = new RuntimeException();\n final LoaderException e = new LoaderException(\"Custom message\", cause);\n assertEquals(\"Custom message\", e.getMessage());\n assertEquals(cause, e.getCause());\n }",
"public PascalTriangleException(String message, Throwable cause)\r\n {\r\n\tsuper(message, cause);\r\n }",
"public OLMSException(Throwable cause) {\r\n super(cause);\r\n }",
"public TechnicalException(final String message, final Throwable cause) {\n super(message, cause);\n }",
"public CommunicationException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"public TwoDAReadException(String message, Throwable cause){ super(message, cause); }",
"public IOExceptionWithCause(Throwable cause) {\n/* 63 */ super(cause);\n/* */ }",
"public KineticException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public void error(String message) {\n\tSystem.err.println(\"Error: \" + message);\n\tthrow new Error(message);\n }",
"public InvalidProcessException(String message, Throwable cause) {\n super(message, cause);\n }",
"public DAOException(String message, Throwable cause)\r\n {\r\n super(message, cause);\r\n }",
"public PetsValidationException(String message, Throwable cause) {\n super(message, cause);\n }",
"public CoderException(String message, Throwable cause) {\n super(message, cause);\n }",
"public SucheException(Throwable cause) {\n super(cause);\n // TODO Auto-generated constructor stub\n }",
"public RDISException(String msg, Exception cause) {\n\t\tmMessage = msg;\n\t\tmCause = cause;\n\t}",
"public SSAPMessageParseException(String message, Throwable cause) {\n\t\tsuper(message,cause);\n\t}",
"public CodecException(String msg, @Nullable Throwable cause) {\n\t\tsuper(msg, cause);\n\t}",
"public LogIllegalStateException(String message, Throwable cause) {\r\n super(message, cause);\r\n }",
"public ValidationException(String msgKey, Throwable cause) {\r\n\t\tsuper(getMessageValue(msgKey), cause);\r\n\t}",
"public void message(String message, Throwable t);",
"public QueryException(Throwable cause) {\n super(cause);\n }",
"public IORuntimeException(String message, Throwable cause) {\n super(message, cause);\n }",
"public String getMessage() {\n\t\tif (iCause == null) { return super.getMessage(); }\n\t\treturn super.getMessage() + \"; nested exception is: \\n\\t\" + iCause.toString();\n\t}",
"public StreamException(Throwable cause) {\n super(cause);\n }",
"public ProgramInvocationException(String message, JobID jobID, Throwable cause) {\n\t\tsuper(message + \" (JobID: \" + jobID + \")\", cause);\n\t}",
"public void throwCoreException(String message, Throwable exception) throws CoreException {\n IStatus status = new Status(IStatus.ERROR, HumantaskEditorConstants.PLUGIN_ID, IStatus.OK, message, exception);\n throw new CoreException(status);\n }",
"@Override\n public Exception getCause()\n {\n return this.cause;\n }",
"public ContextException(final String message, final Throwable cause) {\n super(message, cause);\n }",
"public InvalidAlgException( String message, Throwable cause ) {\n super( message, cause );\n }",
"public NEOLoggerException(String message, Throwable cause)\n {\n super(message, cause);\n }",
"public OperationException(Throwable cause) {\n super(cause);\n }",
"public DataAccessLayerException(final String message, final Throwable cause) {\n super(message, cause);\n }",
"public YardException(String reason, Throwable cause) {\n super(reason, cause);\n }",
"public ConceptPersistException( String msg, Exception cause )\r\n {\r\n super( msg, cause );\r\n }",
"public XFormsErrorIndication(String message, Exception cause, EventTarget target, Object info) {\n super(message, cause);\n this.target = target;\n this.info = info;\n }",
"public SSBDatasetException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"public ExecutionError(Error cause) {\n/* 58 */ super(cause);\n/* */ }",
"private RedisSMQException validationException(String cause) {\n\t\treturn new RedisSMQException(\"Value \" + cause);\n\t}",
"@ParametersAreNonnullByDefault\n\tpublic ApplicationException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public CompilationFailedException(int phase, ProcessingUnit unit, Throwable cause) {\n super(Phases.getDescription(phase) + \" failed\", cause);\n this.phase = phase;\n this.unit = unit;\n }",
"public Exception(Throwable cause) {\n\t\t\tsuper(cause);\n\t\t}",
"public CacheException(String message, Throwable cause) {\r\n\t\tsuper(message, cause);\r\n\t}",
"public TDLProException(Throwable cause)\n {\n super(cause);\n }",
"public TechnicalException(Throwable cause) {\n this(EXPRESSION_PROCESS_ERROR, null, cause);\n }",
"public CustomException(Throwable cause) {\n super(cause == null ? null : cause.toString(), cause);\n }",
"public ExcelImportException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}",
"public PreparationException(final String message, final Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"public ToolbarMenu_ArquitectureException(String message, Throwable cause) {\n super(message, cause);\n }",
"public Neo4jException(String code, String message, Throwable cause) {\n super(message, cause);\n this.code = code;\n }",
"public MessageParseException(String message, Throwable cause) {\n super(message);\n initCause(cause);\n }",
"public InvalidJsonException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}",
"protected InvalidXMLException(String message, Throwable cause){\n super(message, cause);\n }",
"public ValidationException(String userMessage, String logMessage, Throwable cause, String context) {\r\n super(userMessage, logMessage, cause);\r\n \tsetContext(context);\r\n }",
"public OLMSException(String message, String code, Throwable cause) {\r\n super(message, cause);\r\n }",
"public MessageParseException(Throwable cause) {\n initCause(cause);\n }",
"public abstract RuntimeException getException(String message);",
"public MyCustomException( String message, Throwable cause )\n {\n\n\t// Why are we doing this??\n super( message, cause );\n }"
] | [
"0.7253281",
"0.6827928",
"0.66463244",
"0.654304",
"0.65357846",
"0.65208596",
"0.6470054",
"0.6462778",
"0.64494926",
"0.6445952",
"0.6433264",
"0.6427783",
"0.64119256",
"0.6361745",
"0.63234633",
"0.6295232",
"0.629144",
"0.62817967",
"0.62731063",
"0.62645286",
"0.6254497",
"0.62253237",
"0.62250423",
"0.6209729",
"0.6190021",
"0.61856467",
"0.6182277",
"0.6178338",
"0.61736715",
"0.6135792",
"0.6132347",
"0.6123787",
"0.6110625",
"0.61094666",
"0.6101393",
"0.61003405",
"0.6091174",
"0.6087087",
"0.6087074",
"0.60839796",
"0.6076462",
"0.60738087",
"0.60721505",
"0.6068854",
"0.6068261",
"0.60672337",
"0.60658854",
"0.60619646",
"0.6051903",
"0.60447115",
"0.60352486",
"0.6031495",
"0.6031388",
"0.60185623",
"0.59857565",
"0.5980422",
"0.5975957",
"0.5975838",
"0.5973795",
"0.59737545",
"0.5967162",
"0.59453756",
"0.5941791",
"0.5928504",
"0.5920501",
"0.59033793",
"0.5902306",
"0.5899762",
"0.58943",
"0.589072",
"0.5890507",
"0.58858395",
"0.5873056",
"0.5872087",
"0.5871505",
"0.58618516",
"0.58580464",
"0.58558255",
"0.58526033",
"0.58510023",
"0.584503",
"0.5835526",
"0.58309186",
"0.58305186",
"0.5823611",
"0.58093244",
"0.58083326",
"0.5807343",
"0.58030194",
"0.5798309",
"0.57969254",
"0.5794326",
"0.5793642",
"0.57876337",
"0.57847685",
"0.5783461",
"0.5766446",
"0.5763953",
"0.5756753",
"0.5756728"
] | 0.6020567 | 53 |
the following method will place nummines (a final variable defined above) mines on the board in random locations. | public void assignmines() {
for(int row = 0; row < mineBoard.length; row++) {
for(int col = 0; col < mineBoard[0].length; col++) {
mineBoard[row][col] = 0;
}
}
int minesPlaced = 0;
Random t = new Random();
while(minesPlaced < nummines) {
int row = t.nextInt(10);
int col = t.nextInt(10);
if(mineBoard[row][col] == Empty) {
setmine(true);
mineBoard[row][col] = Mine;
minesPlaced++;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void placeMines() {\n\t\t Random rand = new Random();\n\t\t if(levelOption == 0) {\n\t\t\t rowCoordinates = new int[10];\n\t\t\t cowCoordinates = new int[10];\n\t\t\t numberOfMines = 10;\n\t\t }\n\t\t else if(levelOption == 1) {\n\t\t\t rowCoordinates = new int[45];\n\t\t\t cowCoordinates = new int[45];\n\t\t\t numberOfMines = 45;\n\t\t }\n\t\t else {\n\t\t\t rowCoordinates = new int[99];\n\t\t\t cowCoordinates = new int[99];\n\t\t\t numberOfMines = 99;\n\t\t }\n\t\t for(int i = 0 ; i < numberOfMines; i++) {\n\t\t\t int randomNumber = rand.nextInt(board[0].length-1)+1;\n\t\t\t int randomNumber2 = rand.nextInt(board[1].length-1)+1;\n\t\t\t rowCoordinates[i] = randomNumber;\n\t\t\t cowCoordinates[i] = randomNumber2;\n\t\t } \n\t\t System.out.println(Arrays.toString(rowCoordinates));\n\t\t System.out.println(Arrays.toString(cowCoordinates));\t \n\t}",
"private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }",
"public void setMinePositions(int numberOfMines, int numberOfColumns, int numberOfRows) {\n mine = new int[numberOfMines + 1][3];\n int mineNumber = 1;\n while (mineNumber <= numberOfMines) {\n mine = generateRandomCoordinate(mineNumber, numberOfColumns, numberOfRows);\n if (mineNumber > 1) {\n int mineComparedTo = 1;\n while (mineComparedTo < mineNumber) {\n if (mine[mineNumber][1] == mine[mineComparedTo][1]\n && mine[mineNumber][2] == mine[mineComparedTo][2]) {\n mine = generateRandomCoordinate(mineNumber, numberOfColumns, numberOfRows);\n } else if (mine[mineNumber][1] != mine[mineComparedTo][1]\n || mine[mineNumber][2] != mine[mineComparedTo][2]) {\n mineComparedTo++;\n }\n }\n }\n mineNumber++;\n }\n System.out.println(\"\\n\");\n }",
"@Override\n public void createBoard(int width, int height, int numMines) {\n // Clamp the dimensions and mine numbers\n dims = new Point(Util.clamp(width, MIN_DIM_X, MAX_DIM_X),\n Util.clamp(height, MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Step 1\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n List<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), false));\n }\n cells.add(oneRow);\n }\n\n // Step 2\n int minesPlaced = 0;\n while (minesPlaced < this.numMines) {\n int randX = ThreadLocalRandom.current().nextInt((int) dims.getX());\n int randY = ThreadLocalRandom.current().nextInt((int) dims.getY());\n\n if (!cells.get(randY).get(randX).isMine()) {\n cells.get(randY).get(randX).setNumber(-1);\n minesPlaced++;\n }\n }\n\n // Step 3\n updateCellNumbers();\n }",
"public MineBoard(){\r\n\t\t\r\n\t\t// Local Vars\r\n\t\tint numberMines = 0;\r\n\t\tRandom generator = new Random();\r\n\t\t\r\n\t\t// Dummy Positioning\r\n\t\tString[][] position = new String[10][10];\r\n\t\t\r\n\t\twhile(numberMines < 10) //create the mines\r\n\t\t{\r\n\t\t\t// Create Mine\r\n\t\t\tMines[numberMines] = new Mine(generator.nextInt(9), generator.nextInt(9));\r\n\t\t\t\r\n\t\t\t// Cols and rows\r\n\t\t\tint col = generator.nextInt(9);\r\n\t\t\tint row = generator.nextInt(9);\r\n\t\t\r\n\t\t\t{\r\n\t\t\t// Assign bomb\r\n\t\t\tposition[col][row]=\"bomb\";\r\n\t\t\t\r\n\t\t\t// Check if item already has a bomb\r\n\t\t\tif (Mines[numberMines].Col > 0 && Mines[numberMines].Row > 0 && position[Mines[numberMines].Col][Mines[numberMines].Row] != \"bomb\")\r\n\t\t\t\tnumberMines++;\r\n\t\t\t\t\r\n\t}\r\n\t\t\t\r\n\t\t}}",
"private void initCells()\n {\n this.minesweeperCells = new MinesweeperCell[ROWS_COLUMNS][ROWS_COLUMNS];\n int k = 0;\n mines = new ArrayList<>();\n while(k < N_MINES)\n {\n int randomRow, randomColumn;\n randomRow = (int) (Math.random() *this.minesweeperCells.length);\n randomColumn = (int) (Math.random() *this.minesweeperCells[0].length);\n Point mine = new Point(randomRow, randomColumn);\n if(!mines.contains(mine))\n {\n mines.add(mine);\n k++;\n }\n }\n // init the cells\n for(int i = 0; i < this.minesweeperCells.length; i++)\n {\n for(int j = 0; j < this.minesweeperCells[i].length; j++)\n {\n this.minesweeperCells[i][j] = new MinesweeperCell(false, true, getMineCount(i,j), i, j);\n }\n }\n this.minesweeperCustomView.setArray(this.minesweeperCells);\n }",
"public void addMines() {\n int xs=0;\n int ys=0;\n\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n if(difficulty==0) {\n for(int x=0;x<15;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==INSANE) {\n System.out.println(\"HELLO AGAIN OBIWAN\");\n for(int x=0;x<97;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==EZPZ) {\n for(int x=0;x<5;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==1) {\n for(int x=0;x<40;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n board[xs][ys].setMine(true);\n }\n\n\n spotsx.clear();\n spotsy.clear();\n }\n else if(difficulty==2) {\n for(int x=0;x<100;x++) {\n while(!checkSpotIsGood(ys,xs)) {\n\n xs=(int)(Math.random()*board.length);\n ys=(int)(Math.random()*board[0].length);\n }\n\n board[xs][ys].setMine(true);\n }\n\n spotsx.clear();\n spotsy.clear();\n }\n }",
"public Grid initMines(int length, int width, int minesNumber) {\n Grid gridWithMines = new Grid(length, width);\n\n Random rand = new Random();\n while(minesNumber > 0){\n int randomRow = rand.nextInt(length-1);\n int randomColumn = rand.nextInt(width-1);\n Position position = new Position(randomRow, randomColumn);\n\n if(!gridWithMines.isMine(position)) {\n gridWithMines.addMine(position);\n\n //update grid with computed adjacent mines\n List<Position> adjacents = gridWithMines.getAdjacents(new Position(randomColumn, randomRow));\n for (Position adjacent : adjacents) {\n if(!gridWithMines.isMine(adjacent)){\n gridWithMines.updateAdjacentOfMine(adjacent);\n }\n }\n minesNumber--;\n }\n }\n return gridWithMines;\n }",
"public void populateGrid(int grid_size,int [][] mine_positions,int tot_mines){\n\t\tfor(int row=0;row<grid_size;row++){\n\t\t\tfor(int col=0;col<grid_size;col++){\n\t\t\t\n\t\t\t\tfor(int k=0;k<tot_mines;k++){\n\t\t\t\t\tif(row==mine_positions[k][0]&&col==mine_positions[k][1]){\n\t\t\t\t\t\tgrid[row][col].content='M';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint mine_ctr=0;\n\t\t//Populating all cells\n\t\tfor(int row=0;row<grid_size;row++){\n\t\t\tfor(int col=0;col<grid_size;col++){\n\t\t\t\t\n\t\t\t\tmine_ctr=0;\n\t\t\t\t//Checking number of mines surrounding each cell\n\t\t\t\tif(grid[row][col].content=='M'){\n\t\t\t\t\tgrid[row][col].no_of_mines=0;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t//Top left\n\t\t\t\t\tif(grid[row][col].top_left==1&&grid[row-1][col-1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\n\t\t\t\t\t//Top \n\t\t\t\t\tif(grid[row][col].top==1&&grid[row-1][col].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\n\t\t\t\t\t//Top right\n\t\t\t\t\tif(grid[row][col].top_right==1&&grid[row-1][col+1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\n\t\t\t\t\t//Left\n\t\t\t\t\tif(grid[row][col].left==1&&grid[row][col-1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\n\t\t\t\t\t//Right\n\t\t\t\t\tif(grid[row][col].right==1&&grid[row][col+1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\n\t\t\t\t\t//Bottom left\n\t\t\t\t\tif(grid[row][col].bottom_left==1&&grid[row+1][col-1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\t\t\n\t\t\t\t\t//Bottom\n\t\t\t\t\tif(grid[row][col].bottom==1&&grid[row+1][col].content=='M')\n\t\t\t\t\t\tmine_ctr++;\t\n\t\t\t\t\t\n\t\t\t\t\t//Bottom right\n\t\t\t\t\tif(grid[row][col].bottom_right==1&&grid[row+1][col+1].content=='M')\n\t\t\t\t\t\tmine_ctr++;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgrid[row][col].no_of_mines=mine_ctr;\n\t\t\t}\n\t\t}\n\t}",
"public void setGrid(int[][] mine, int numberOfMines, int numberOfColumns, int numberOfRows) {\n int mineNumber = 1;\n point = new int[numberOfColumns + 1][numberOfRows + 1];\n int rowNumber = 1;\n while (rowNumber <= numberOfRows) {\n int columnNumber = 1;\n while (columnNumber <= numberOfColumns) {\n if (mineNumber <= numberOfMines) {\n while (mineNumber <= numberOfMines) {\n if (columnNumber == mine[mineNumber][1] && rowNumber == mine[mineNumber][2]) {\n point[columnNumber][rowNumber] = 9;\n }\n mineNumber++;\n }\n mineNumber = 1;\n } else {\n point[columnNumber][rowNumber] = 0;\n }\n columnNumber++;\n }\n rowNumber++;\n }\n point = getPlotNumbers(point, numberOfMines, numberOfColumns, numberOfRows);\n }",
"public void randomize() {\r\n\t\tRandom random = new Random();// random generator used to get random int\r\n\t\tint r;// will hold the random int\r\n\t\tint num;// will hold the filtered random int that determines with entity to use for a tile\r\n\t\tfor (int i = 0; i < WIDTH_TILES; i++) {// loops x-coords\r\n\t\t\tfor (int j = 0; j < HEIGHT_TILES; j++) {// loops y-coords\r\n\t\t\t\tr = random.nextInt(32);// gets random int from 0 to 32\r\n\t\t\t\tif (r < 4) num = 0; else if (r < 8) num = 1; else if (r < 31) num = 2; else num = 3;// distributes different objects\r\n\t\t\t\tif (nodes[i * WIDTH_TILES + j].isOccupied() == false) {// if tile empty or random chosen\r\n\t\t\t\t\tnodes[i * WIDTH_TILES + j] = new Node(new Point(i * BOARD_WIDTH / WIDTH_TILES, j * BOARD_WIDTH / HEIGHT_TILES), new ImageIcon(icons[num]).getImage(), true, occupants[num]);// creates random tile\r\n\t\t\t\t}// if (random)\r\n\t\t\t}// for (j)\r\n\t\t}// for (i)\r\n\t}",
"private void layMineField ( int n , int pct)\n { \n Random generator = new Random( n );\n \n for ( int r = 0 ; r < rows ; r++ )\n {\n for ( int c = 0; c < cols ; c++ ) \n {\n if ( generator.nextInt( 100 ) < pct )\n theMines[ r ][ c ] = 1; \n else\n theMines[ r ][ c ] = 0;\n }\n }\n }",
"public void initLogicBoard() {\n int numOfBombs = 0;\n while (numOfBombs<bombs) {\n int randX = (int) (Math.random() * (rows - 1));\n int randY = (int) (Math.random() * (cols - 1));\n if (allTiles[randX][randY].getType() != 10) {\n allTiles[randX][randY].setType(10);\n\n for (int m = randX - 1; m <= randX + 1; m++) {\n for (int n = randY - 1; n <= randY + 1; n++) {\n if ((m < rows && n < cols) && (m >= 0 && n >= 0)) {\n if (allTiles[m][n].getType() != 10)\n allTiles[m][n].setType(allTiles[m][n].getType() + 1);\n }\n }\n }\n numOfBombs++;\n\n }\n }\n }",
"public void setSpawns() {\n List<Tile> spawns = this.board.getSpawns();// get all the possible spawns from board\n List<Tile> usedSpawns = new ArrayList<Tile>();// empty list used to represent all the spawns that have been used so no playerPiece gets the same spawn\n for (PlayerPiece playerPiece : this.playerPieces) { // for each playerPiece\n boolean hasSpawn = false; // boolean to represent whether the playerPiece has a spawn and used to initiate and stop the following while loop.\n while (!hasSpawn) { // while hasSpawn is false.\n int random_int = (int) (Math.random() * spawns.size());// get random number with max number of the total possible tiles the pieces can spawn from\n Tile spawn = spawns.get(random_int); // get spawn from spawns list using the random int as an index\n if (!usedSpawns.contains(spawn)) {// if the spawn isn't in the usedSpawn list\n playerPiece.setLocation(spawn);// set the location of the playerPiece to the spawn\n usedSpawns.add(spawn);//add the spawn to usedSpawns\n hasSpawn = true; // set the variable to true so the while loop stops.\n }\n }\n }\n }",
"void create(){\n // I assign zero value to each element of the array.\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n array[i][j]= 0;\n }\n }\n // I create random values for mines indexes\n int min = 0;\n int max = this.row;\n Random random = new Random();\n int randRow, randColumn, count=0;\n //I generate random mines quarter of the size of the array and assign it into the array.\n while(count != (this.row*this.column/4)){\n randRow = random.nextInt(max + min) + min;\n randColumn = random.nextInt(max + min) + min;\n if (array[randRow][randColumn] != -1){\n array[randRow][randColumn]= -1;\n count++;\n }\n }\n // I show the all minesweeper map\n for (int i = 0;i< this.row; i++){\n for (int j = 0; j< this.column; j++){\n if (array[i][j]==0)\n System.out.print(\"0 \");\n else\n System.out.print(\"* \");\n }\n System.out.println();\n }\n }",
"private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }",
"private void initMushrooms() {\n\t\tRandom r = new Random();\n\t\tint numMushrooms = 600;\n\t\tint topDist = 48;\n\t\tint leftDist = 80;\n\t\tint xCoord = 0;\n\t\tint yCoord = 0;\n\n\t\tfor (int i = 0; i < 14; i++) {//goes through each row 1-15\n\n\t\t\tint numShrooms = r.nextInt(6);\n\t\t\tfor (int j = 0; j < numShrooms; j++) {//goes through each column 1 - 15\n\t\t\t\tyCoord = i * 32 + topDist;\n\t\t\t\t//int k = 0;\n\t\t\t\tdo {\n\t\t\t\t\t//finds a new point and checks for good placement via a HashMap\n\t\t\t\t\txCoord = r.nextInt(15) * 32 + leftDist;\n\t\t\t\t\t//System.out.printf(\"%d x and %d y for %d line %d\\n\", xCoord, yCoord, k++, i);\n\t\t\t\t} while (!checkValidMushroom(xCoord, yCoord));\n\t\t\t\tmushrooms.add(new Mushroom(xCoord, yCoord));\n\t\t\t\tif (--numMushrooms == 0) {//breaks when max number of mushrooms has been reached\n\t\t\t\t\ti = 15;\n\t\t\t\t\tj = 6;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void addRandomTile()\n {\n int count = 0;\n //runs through row first, column second\n for ( int i=0; i < this.grid.length; i++) {\n for ( int j=0; j < this.grid[i].length; j++) {\n // checks to see if the value at the point in the grid is zero\n if ( this.grid[i][j] == 0 ) {\n //increases count to check how many of your tiles equal zero\n count++;\n }\n }\n } \n if ( count == 0 ) {\n // exits method if count is zero because there is nowhere to add a tile\n return;\n }\n int location = random.nextInt(count);\n int percent = 100;\n int value = random.nextInt(percent);\n int mostLikely = 2;\n int lessLikely = 4;\n count = -1;\n // runs through row first, column second\n for ( int i=0; i< this.grid.length; i++ ) {\n for ( int j=0; j< this.grid[i].length; j++ ) {\n if ( this.grid[i][j] == 0 ) {\n count++;\n // checks to see if your value for count is the same as the random\n // integer location\n if ( count == location ) {\n // 90% of the time, the random tile placed will be a two\n if ( value < TWO_PROBABILITY && value >=0 ) {\n this.grid[i][j] = mostLikely;\n }\n else {\n this.grid[i][j] = lessLikely;\n }\n }\n } \n }\n } \n }",
"public void Populate(int bombs) {\n\t\tint row = 0,col = 0,randnumber = 0;\n\t\tRandom rnd = new Random();\n\t\t\n\t\t// array list of every position on grid\n\t\tcoordinate = new ArrayList<Integer>(height*width);\n\t\tfor(int i = 0;i<height*width;i++) {\n\t\t\tcoordinate.add(i);\n\t\t}\n\t\t\n\t\tfor(int i = 0;i<bombs;i++) {\n\t\t\t// randomly chooses a position to put a bomb in\n\t\t\trandnumber = rnd.nextInt(coordinate.size());\n\t\t\tbomblocate[i] = coordinate.get(randnumber);\n\t\t\trow = coordinate.get(randnumber)/width;\n\t\t\tcol = coordinate.get(randnumber)%width;\n\t\t\tgrid[row][col] = 9;\n\t\t\t\n\t\t\tUpdateSurround(row,col);\n\t\t\t\n\t\t\t// removes the possible position from array list\n\t\t\tcoordinate.remove(randnumber);\n\t\t}\n\t}",
"protected void putMonsters() {\n\t\tRandom rand = new Random();\n\t\tfor (int monsterCount = 0; monsterCount < 4; monsterCount++){\n\t\t\tint x, y;\n\t\t\tdo {\n\t\t\t\tx = rand.nextInt(xSize);\n\t\t\t\ty = rand.nextInt(ySize);\n\t\t\t} while((levelSetup[x][y] instanceof SimpleRoom) && (x == 0 & y == 0) && !levelSetup[x][y].hasItem());\n\t\t\tlevelSetup[x][y].putMonster(new BasicMonster());\n\t\t}\n\t}",
"private void fillBoard() {\n\t\tint randomRow, randomColumn;\n\t\t\n\t\tfor (int i = 0; i < bombs; ++i) {\n\t\t\trandomRow = (int)(Math.random() * rows);\n\t\t\trandomColumn = (int)(Math.random() * columns);\n\t\t\tboard[randomRow][randomColumn] = -1;\n\t\t}\n\t\t\n\t\tfor (int r = 0; r < rows; ++r) {\n\t\t\tfor (int c = 0; c < columns; ++c) {\n\t\t\t\tif (board[r][c] == -1) {\n\t\t\t\t\tincreaseFreeCells(r, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void setNumbers() {\n\t\tint w = worldWidth;\n\t\tint h = worldHeight;\n\t\tfor (int x = 0; x <= w - 1; x++) {\n\t\t\tfor (int y = 0; y <= h - 1; y++) {\n\t\t\t\tint numbers = 0;\n\n\t\t\t\tint right = x + 1;\n\t\t\t\tint left = x - 1;\n\t\t\t\tint up = y - 1;\n\t\t\t\tint down = y + 1;\n\n\t\t\t\tif (left < 0) {\n\t\t\t\t\tleft = 0;\n\t\t\t\t}\n\t\t\t\tif (up < 0) {\n\t\t\t\t\tup = 0;\n\t\t\t\t}\n\t\t\t\tif (down >= h) {\n\t\t\t\t\tdown = h - 1;\n\t\t\t\t}\n\t\t\t\tif (right >= w) {\n\t\t\t\t\tright = w - 1;\n\t\t\t\t}\n\n\t\t\t\tfor (int m = left; m <= right; m++) {\n\t\t\t\t\tfor (int n = up; n <= down; n++) {\n\t\t\t\t\t\tif (!(m == x && n == y)) {\n\t\t\t\t\t\t\tif (tileArr[m][n].hasBomb()) {\n\t\t\t\t\t\t\t\tnumbers++;\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\ttileArr[x][y].setNeighbors(numbers);\n\t\t\t}\n\n\t\t}\n\n\t}",
"public void addMine()\n {\n int randomRow = random.nextInt(rows);\n int randomColumn = random.nextInt(columns);\n Integer[] randomLocation = {randomRow, randomColumn};\n\n while (mineLocations.contains(randomLocation))\n {\n randomRow = random.nextInt(rows);\n randomColumn = random.nextInt(columns);\n randomLocation[0] = randomRow;\n randomLocation[1] = randomColumn;\n }\n\n mineLocations.add(randomLocation);\n }",
"public static void makeGrid (Species map[][], int numSheepStart, int numWolfStart, int numPlantStart, int sheepHealth, int plantHealth, int wolfHealth, int plantSpawnRate) {\n \n // Declare coordinates to randomly spawn species\n int y = 0;\n int x = 0;\n \n // Initialise plants\n Plant plant;\n \n // Spawn plants\n for (int i = 0; i < numPlantStart; i++) {\n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Choose a random plant (50% chance healthy, 25% poisonous or energizing)\n int plantChoice = (int) Math.ceil(Math.random() * 100);\n \n // Create the new plants\n if ((plantChoice <= 100) && (plantChoice >= 50)) {\n plant = new HealthyPlant(plantHealth, x, y, plantSpawnRate);\n } else if ((plantChoice < 50) && (plantChoice >= 25)) {\n plant = new EnergizingPlant(plantHealth, x, y, plantSpawnRate);\n } else {\n plant = new PoisonousPlant(plantHealth, x, y, plantSpawnRate);\n }\n \n // Set plant coordinates\n plant.setX(x);\n plant.setY(y);\n map[y][x] = plant;\n \n // No space\n } else { \n i -= 1;\n }\n \n }\n \n // Spawn sheep\n for (int i = 0; i < numSheepStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) {\n \n // Create new sheep\n Sheep sheep = new Sheep(sheepHealth, x, y, 5); \n \n // Set sheep coordinates\n sheep.setX(x);\n sheep.setY(y);\n map[y][x] = sheep;\n \n // No space\n } else { \n i -= 1; \n }\n \n }\n \n // Spawn wolves\n for (int i = 0; i < numWolfStart; i++) { \n \n // Choose random coordinates to spawn\n y = (int)(Math.random() * map[0].length); \n x = (int)(Math.random() * map.length);\n \n // Checks for an empty space\n if (map[y][x] == null) { \n \n // Create new wolf\n Wolf wolf = new Wolf(wolfHealth, x, y, 5); \n \n // Set wolf coordinates\n wolf.setX(x);\n wolf.setY(y);\n map[y][x] = wolf; \n \n // No space\n } else { \n i -= 1; \n }\n }\n \n }",
"public NatsMinesweeper(int height, int width, int numMines)\n {\n //Create and set up the window.\n super(\"Nat's Minesweeper\");\n setSize(2*MARGIN_SIZE + width*SQUARE_SIZE, \n \tTITLE_BAR_HEIGHT + 3*MARGIN_SIZE + H + height*SQUARE_SIZE);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n gameWon = false;\n gameLost = false;\n \t\n \t//Create and set up a blank panel to fill the window, on which all other panels will be placed.\n JPanel panel = new JPanel();\n panel.setSize(getWidth(), getHeight());\n panel.setBackground(Color.WHITE);\n panel.setLayout(null);\n add(panel);\n \n \t//Create and set up a MineCounter in the top left of the window to keep track of the mines left.\n this.numMines = numMines;\n minesFound = 0;\n mineCounter = new MineCounter(numMines);\n panel.add(mineCounter);\n mineCounter.setLocation(MARGIN_SIZE, MARGIN_SIZE);\n \n \t//Create and set up a TimerDisplay in the top right of the window to display the elapsed time.\n timerDisplay = new TimerDisplay();\n panel.add(timerDisplay);\n timerDisplay.setLocation(panel.getWidth() - MARGIN_SIZE - W, MARGIN_SIZE);\n \n \t//Create and set up a ResetButton to reset the game.\n resetButton = new ResetButton();\n panel.add(resetButton);\n resetButton.setLocation(panel.getWidth()/2 - H/2, MARGIN_SIZE);\n \n \t//Create a board panel to hold all the game squares in a grid pattern, \n \t//then fill the board (and grid) with GameSquares.\n JPanel board = new JPanel(new GridLayout(height, width));\n board.setSize(width*SQUARE_SIZE, height*SQUARE_SIZE);\n panel.add(board);\n board.setLocation(MARGIN_SIZE, H + 2*MARGIN_SIZE);\n grid = new GameSquare[height][width];\n for (int r = 0; r < height; r++)\n {\n for (int c = 0; c < width; c++)\n {\n grid[r][c] = new GameSquare(r, c);\n board.add(grid[r][c]);\n }\n }\n \n setVisible(true); //Finally, display the window, allowing the game to begin.\n }",
"public void createNew(int xSize, int ySize, int countOfMines);",
"public void placeRandomNumbers() {\n\t\t\n\t\tArrayList<HexLocation> locations = getShuffledLocations();\n\t\tint[] possibleNumbers = new int[] {2, 3, 3, 4, 4, 5, 5, 6, 6, 8, 8, 9, 9, 10, 10, 11, 11, 12};\n\t\t\n\t\tfor (int i = 0; i < possibleNumbers.length; i++)\n\t\t\tnumbers.get(possibleNumbers[i]).add(locations.get(i));\n\t}",
"public MineCounter(int numMines)\n {\n super();\n minesLeft = numMines;\n }",
"public void reset(int width, int height, int mines) {\n boardWidth = width;\n boardHeight = height;\n this.mines = mines;\n safeRemaining = boardWidth * boardHeight;\n minesRemaining = 0;\n\n pixelWidth = boardWidth * 30;\n pixelHeight = boardHeight * 30;\n\n pixelTopX = (FRAME_WIDTH - pixelWidth) / 2;\n pixelTopY = (FRAME_HEIGHT - pixelHeight - 50) / 2 + 50;\n\n mineLocation = new boolean[width * height];\n minefield = new Grid[height][width];\n surroundingMines = new int[width * height];\n while (minesRemaining < mines) {\n int location = r.nextInt(width * height);\n if (!mineLocation[location]) {\n mineLocation[location] = true;\n minesRemaining++;\n safeRemaining--;\n addSurrounding(location);\n }\n\n }\n\n playing = true;\n\n timer.start();\n timeElapsed = 0;\n\n repaint();\n\n mineLabel.setVisible(true);\n timeLabel.setVisible(true);\n }",
"public void populateGrid() {\n for (int i=0; i<5; i++) {\n int chance = (int) random(10);\n if (chance <= 3) {\n int hh = ((int) random(50) + 1) * pixelSize;\n int ww = ((int) random(30) + 1) * pixelSize;\n\n int x = ((int) random(((width/2)/pixelSize))) * pixelSize + width/4;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n\n new Wall(w/2, 190, hh, ww).render();\n }\n }\n\n int fewestNumberOfPowerUps = 3;\n int greatesNumberOfPowerUps = 6;\n int wSize = 2;\n int hSize = 2;\n\n powerUps = new ArrayList <PowerUp> ();\n createPowerUps (fewestNumberOfPowerUps, greatesNumberOfPowerUps, wSize, hSize);\n}",
"public Board(int boardSize, Random random)\n {\n this.random = random;\n GRID_SIZE = boardSize; \n this.grid = new int[boardSize][boardSize];\n for ( int i=0; i < NUM_START_TILES; i++) {\n this.addRandomTile();\n }\n }",
"public void generate(Pair safeCell, int mineCount) {\n\t\tthis.mineCount = mineCount;\n\n\t\tboard = randomGenerator.generate(boardSize, mineCount, safeCell);\n\t\tmineList = getAllMines();\n\n\t\tboardGenerated = true;\n\t}",
"public void setMines(int mines)\n {\n this.mines = mines;\n }",
"public void setRandomSpawn(final Random random)\r\n {\r\n final List<Double> rows = new ArrayList<>();\r\n \r\n final double column;\r\n \r\n //get a random true/false result\r\n if (random.nextBoolean())\r\n {\r\n //here we will do west\r\n column = 0.5;\r\n }\r\n else\r\n {\r\n //here we will do east\r\n column = COLUMNS - 0.5;\r\n }\r\n \r\n for (double row=0; row < ROWS; row++)\r\n {\r\n //if platform exists add this as a possibility\r\n if (getObject(Type.Platform, (int)column, row) != null)\r\n rows.add(row);\r\n }\r\n \r\n super.setCol(column);\r\n \r\n final int index = random.nextInt(rows.size());\r\n super.setRow(rows.get(index) + 0.5);\r\n }",
"public void genField() {\n\t\tint mines = (int)(height * width * .1);\r\n\t\tRandom random = new Random();\r\n\t\tint x;\r\n\t\tint y;\r\n\t\tint i = 0;\r\n\t\twhile(i < mines) {\r\n\t\t\tx = random.nextInt(width);\r\n\t\t\ty = random.nextInt(height);\r\n\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\tcells.get(x).get(y).setValue(-1);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(x = 0; x < width; x++) {\r\n\t\t\tfor(y = 0; y < height; y++) {\r\n\t\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\t\tprocessCell(x, y); //generate cell number\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }",
"private void placeEnemyShips() {\n\t\tint s51 = (int) (Math.random() * 6); // mostly random numbers\n\t\tint s52 = (int) (Math.random() * 10);\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tpgrid[s51 + i][s52] = 1;\n\n\t\t// Places the ship of length 3\n\t\tint s31 = (int) (Math.random() * 10);\n\t\tint s32 = (int) (Math.random() * 8);\n\t\twhile (pgrid[s31][s32] == 1 || pgrid[s31][s32 + 1] == 1 // prevents\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overlaps\n\t\t\t\t|| pgrid[s31][s32 + 2] == 1) {\n\t\t\ts31 = (int) (Math.random() * 10);\n\t\t\ts32 = (int) (Math.random() * 8);\n\t\t}\n\t\tpgrid[s31][s32] = 1;\n\t\tpgrid[s31][s32 + 1] = 1;\n\t\tpgrid[s31][s32 + 2] = 1;\n\n\t\t// Places the ship of length 1\n\t\tint s21 = (int) (Math.random() * 10);\n\t\tint s22 = (int) (Math.random() * 9);\n\t\twhile (pgrid[s21][s22] == 1 || pgrid[s21][s22 + 1] == 1) { // prevents\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// overlaps\n\t\t\ts21 = (int) (Math.random() * 10);\n\t\t\ts22 = (int) (Math.random() * 9);\n\t\t}\n\t\tpgrid[s21][s22] = 1;\n\t\tpgrid[s21][s22 + 1] = 1;\n\n\t}",
"@Override\n public void initializeBoard(int r, int c) {\n\n grid = new Tile[HEIGHT][WIDTH];\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Tile(Tile.BLANK, row, col);\n }\n }\n\n Random random = new Random();\n for (int i = 0; i < numMines; i++) {\n int row = random.nextInt(HEIGHT);\n int col = random.nextInt(WIDTH);\n if ((row == r && col == c) || grid[row][col].getType() == Tile.MINE || grid[row][col].getType() == Tile.NUMBER) {\n i--;\n } else {\n grid[row][col] = new Tile(Tile.MINE, row, col);\n }\n }\n\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (getNumNeighboringMines(row, col) > 0 && grid[row][col].getType() != Tile.MINE) {\n Tile tile = new Tile(Tile.NUMBER, getNumNeighboringMines(row, col), row, col);\n grid[row][col] = tile;\n }\n }\n }\n }",
"public void fillBoard() {\n List<Integer> fifteen = ArrayUtils.intArrayToList(SOLVED_BOARD);\n Collections.shuffle(fifteen, this.random);\n this.emptyTileIndex = fifteen.indexOf(0);\n this.matrix = fifteen.stream().mapToInt(i -> i).toArray();\n }",
"private static void mineInitialization(){\n\t\tfor (int m = 0; m < BOARD_SIZE; m++)\n\t\t{\n\t\t\tmX = RNG.nextInt(BOARD_SIZE);\n\t\t\tmY = RNG.nextInt(BOARD_SIZE);\n\t\t\tif(gameBoard[mX][mY].equals(Spaces.Empty))\n\t\t\t{\n\t\t\t\tgameBoard[mX][mY] = Spaces.Mine;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tm--;\n\t\t\t}\n\t\t}\n\t}",
"public int triggerNextMole() {\n // Rehabilita a todos los jugadores para pegar\n for (Player p : players)\n p.setHitDisabled(false);\n // Obtiene la nueva posicion\n molePosition = random.nextInt(MyConstants.MOLES_AREA_SIZE * MyConstants.MOLES_AREA_SIZE);\n return molePosition;\n }",
"private void addEnemyPowerUps() {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint x = (int) (Math.random() * 10);\n\t\t\tint y = (int) (Math.random() * 10);\n\n\t\t\twhile (egrid[x][y] != 0) { // prevents overlaps\n\t\t\t\tx = (int) (Math.random() * 10);\n\t\t\t\ty = (int) (Math.random() * 10);\n\t\t\t}\n\n\t\t\tegrid[x][y] = 2;\n\t\t}\n\t}",
"public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}",
"public static int weaponSpawnLocation(int cellCount)\r\n\t{\r\n\t\tRandom rng = new Random ();\t\r\n\t\treturn rng.nextInt(cellCount);\r\n\t}",
"public void populateMineField(int row, int col) {\n\t /*reset the mineField with no mines*/\n\t resetEmpty();\n\t \n\t for(int i = 0; i < this.numMines; i++) {\n\t\t /*put mines in the mineField randomly*/\n\t\t mineField = randomLoc(row, col, mineField.length, mineField[0].length, this.mineField);\n\t }\n\t \n\t \n }",
"void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static int[][] generateMap(int mines, int width, int height, int fcX, int fcY) {\n\t\tif(mines>width*height-1){\n\t\t\treturn null;\n\t\t}\n\t\tint[][] meowfield = new int[height][width];\n\t\tmeowfield[fcY][fcX] = (int)Math.random()*10;\n\t\tint[] RNGesus = new int[mines];\n\t\tfor(int i=0; i<meowfield.length;i++){\t\n\t\t\tArrays.fill(meowfield[i], -1);\n\t\t}\n\t\tArrays.fill(RNGesus, -1);\n\t\tfor (int i = 0; i < mines; i++) {\n\t\t\tint ranNum = (int) (Math.random() * width * height);\n\t\t\tSystem.out.println(ranNum);\n\t\t\tif (!contains(RNGesus, ranNum)) {\n\t\t\t\tRNGesus[i] = ranNum;\n\t\t\t} else {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Arrays.toString(RNGesus));\n\t\tfor (int i = 0; i < RNGesus.length; i++) {\n\t\t\tmeowfield[RNGesus[i] %width][RNGesus[i]/height] = 10;\n\t\t}\n\t\treturn meowfield;\n\t}",
"private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public void reproduce() {\n if (getSelfCount() >= getMinMates() && getLocation()\n .getEmptyCount() >= getMinEmpty()\n && getFoodCount() >= getMinFood() && dayCountDown != 0) {\n int index = RandomGenerator.nextNumber(getLocation()\n .getEmptyCount());\n Cell selectedCell = getLocation().getEmptyArray().get(index);\n createLife(selectedCell).init();\n \n }\n \n }",
"public void spawnApples() {\n int rowsPlace = randomGenerator(0, rows-1);\n int collsPlace = randomGenerator(0, colls-1);\n if(board[rowsPlace][collsPlace] == ' '){\n board[rowsPlace][collsPlace] = '@';\n } else {\n spawnApples();\n }\n }",
"public void placeBombs(int difficulty){\r\n int randomRow;\r\n int randomCol;\r\n int maxBombs;\r\n if(difficulty == 1){\r\n maxBombs = 12;\r\n bombDifficulty(maxBombs);\r\n\r\n }\r\n if(difficulty == 2){\r\n maxBombs = 41;\r\n bombDifficulty(maxBombs);\r\n }\r\n if(difficulty == 3){\r\n maxBombs = 102;\r\n bombDifficulty(maxBombs);\r\n }\r\n\r\n }",
"void initializeGrid() {\n int maxBombs = GridHelper.getMaxBombs((int)Math.pow(hiddenGrid.length, 2.0)); // A: How many bombs CAN this have?\n bombsPlaced = 0; // B: How many bombs DOES this have?\n int cycleCap = randomCycleCap(); // C: Sets cycleCap to a randomly generated number between 0 and 15,\n int cycleCellCount = 0; // D: cycleCap starts at zero and goes up\n\n for (int i = 0; i < hiddenGrid.length; i++) {\n for (int j = 0; j < hiddenGrid[i].length; j++) {\n\n if (hiddenGrid[i][j] == null) {\n setCell(i, j, 0); // a: initializes the null value to 0\n }\n if((cycleCellCount == cycleCap) && (bombsPlaced < maxBombs)){\n placeBomb(i, j, -1); // a: turns this cell into a bomb, increments cells around it\n cycleCellCount = 0; // b: Restarts the 'cycle counter'\n cycleCap = randomCycleCap(); // c: Gives us a new number to 'count down' to, to place the next bomb\n } else{\n ++cycleCellCount; // a. Moves to the next cell in the 'cycle' having done nothing\n }\n }\n }\n System.out.println(\"Bombs placed: \" + bombsPlaced);\n }",
"private int[][] makeBoard() {\r\n int[][] gridBoard = new int[gridSize][gridSize];\r\n int remainingPlacedBombs = numBombs;\r\n \r\n for (int i = 0; i < gridBoard.length; i++) {\r\n for (int j = 0; j < gridBoard[i].length; j++) {\r\n gridBoard[i][j] = 0;\r\n }\r\n } \r\n while (remainingPlacedBombs > 0) {\r\n int row = (int) (Math.random() * gridSize);\r\n int col = (int) (Math.random() * gridSize);\r\n if (gridBoard[row][col] == 0) {\r\n gridBoard[row][col] = 1;\r\n remainingPlacedBombs--;\r\n } \r\n } \r\n return gridBoard;\r\n }",
"@Override\n public void createBoard(List<List<Boolean>> mines) {\n dims = new Point(\n Util.clamp(mines.get(0).size(), MIN_DIM_X, MAX_DIM_X),\n Util.clamp(mines.size(), MIN_DIM_Y, MAX_DIM_Y));\n int maxMines = (int) ((dims.getX() - 1) * (dims.getY() - 1));\n this.numMines = Util.clamp(numMines, MIN_MINES, maxMines);\n\n // Create Cells based on mines\n cells = new ArrayList<>();\n for (int i = 0; i < dims.getY(); i++) {\n ArrayList<Cell> oneRow = new ArrayList<>();\n for (int j = 0; j < dims.getX(); j++) {\n oneRow.add(new CellImpl(this, new Point(j, i), mines.get(i).get(j)));\n }\n cells.add(oneRow);\n }\n\n updateCellNumbers();\n }",
"public void randomize() {\n // randomize the position/number of alive and dead cells by looping through each cell\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n // get a random number(between 0 and 1)\n double randomNum = Math.random();\n // cell is live if the random number is greater than 0.7\n // (0.7 gives a greater chance of a dead cell so that the grid isn't too full)\n if (randomNum > 0.7) {\n game.grid[i][j] = true;\n } else {\n game.grid[i][j] = false;\n }\n }\n }\n // repaint so that the cells show up regardless of if the program has started or not\n repaint();\n }",
"private void exploreMines(int option) {\n\t\tfor(int i = 0; i < numberOfMines; i++) {\n\t\t\tboard[rowCoordinates[i]][cowCoordinates[i]] = \"*\";\n\t\t}\n\t\toutputBoard();\n\t\tif(option == 1) {\n\t\t\tSystem.out.println(\"YOU LOSE!\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"YOU WIN!\");\n\t\t}\n\t}",
"public MinesweeperModel(int[] args) {\n this.WIDTH = args[0];\n this.HEIGHT = args[1];\n this.numMines = args[2];\n numMinesLeft = numMines;\n numMinesMarked = 0;\n gameOver = false;\n numberOfMoves = 0;\n initializeBoard();\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"This is a 10 * 10 map, x axis and y axis start from 0 - 9.\");\n\t\tSystem.out.println(\"There are totally \"+MINE_NUMBER+\" mines, and your task is to find all the mines.\");\n\n\t\t// generate 10*10 grid\n\t\t/*\n\t\t * 0: not mine 1: mine 2: mine found 3: not mine shot\n\t\t * \n\t\t */\n\t\tint[][] map = new int[10][10];\n\t\t// repeated at least 5 times generate 5 mines\n\t\tint i = 0;\n\t\twhile (i < MINE_NUMBER) {\n\t\t\t// generate mines generally\n\t\t\tint x = (int) (Math.random() * 10); // 0-9\n\t\t\tint y = (int) (Math.random() * 10); // 0-9\n\t\t\tif (map[x][y] == 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmap[x][y] = 1;\n\t\t\ti++;\n\t\t}\n\n\t\t// ready to accept user input\n\t\tScanner input = new Scanner(System.in);\n\t\t// how many mines been found\n\t\tint find = 0;\n\n\t\t// start to accept user input\n\t\twhile (find < MINE_NUMBER) {\n\t\t\tint clickX, clickY;\n\t\t\tSystem.out.println(\"please enter the x axis of mine\");\n\t\t\tclickX = input.nextInt();\n\t\t\tSystem.out.println(\"please enter the y axis of mine \");\n\t\t\tclickY = input.nextInt();\n\n\t\t\tif (map[clickX][clickY] == 1) {\n\t\t\t\tmap[clickX][clickY] = 2;\n\t\t\t\tfind++;\n\t\t\t\tSystem.out.println(\"You find a mine! Now you found \" + find + \" mines and \" + (MINE_NUMBER - find) + \" left!\");\n\n\t\t\t} else if (map[clickX][clickY] == 2) {\n\t\t\t\tSystem.out.println(\"You have found this target, try again!\");\n\t\t\t} else {\n\t\t\t\tmap[clickX][clickY] = 3;\n\t\t\t\tSystem.out.println(\"You miss!\");\n\t\t\t\thint(map, clickX, clickY);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"You found all the mines! You win!\");\n\t\tinput.close();\n\t}",
"@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }",
"void lowerNumberOfStonesOnBoard();",
"public int getNumMines() {\n return numMines;\n }",
"private void addPowerUps() {\n\t\tfor (int i = 0; i < 4; i++) {\n\n\t\t\tint x = (int) (Math.random() * 10);\n\t\t\tint y = (int) (Math.random() * 10);\n\n\t\t\twhile (pgrid[x][y] != 0) { // prevents overlaps\n\t\t\t\tx = (int) (Math.random() * 10);\n\t\t\t\ty = (int) (Math.random() * 10);\n\t\t\t}\n\n\t\t\tpgrid[x][y] = 2;\n\t\t}\n\t}",
"private void initMatrix() {\n\t\ttry {\n\t\t\tRandom random = new Random();\n\t\t\tfor (int row=0; row<_numRows; ++row) {\n\t\t\t\tfor (int column=0; column<_numColumns; ++column) {\n\t\t\t\t\t// generate alive cells, with CHANCE_OF_ALIVE chance\n\t\t\t\t\tboolean value = (random.nextInt(100) < CHANCE_OF_ALIVE);\n\t\t\t\t\t_matrix.setCellValue(row, column, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// This is not supposed to happend because we use only legal row and column numbers\n\t\t}\n\t}",
"private void createRiver(Square[][]Squares, int rows, int columns, int[][] terrainLoc)\n {\n // create a seed location for the river to start\n int riverRand = (int )(Math.random() * columns);\n \n // making sure the river will not start too close to the borders\n if (riverRand < columns/6 || riverRand > columns/1.2)\n {\n for(;riverRand > columns/6 && riverRand < columns/1.2 && riverRand < columns - 2;)\n {\n riverRand = (int )(Math.random() * columns + 1);\n }\n }\n // place the river seeds\n Squares[0][riverRand].setTerrain(3);\n Squares[1][riverRand].setTerrain(3);\n terrainLoc[0][riverRand] = 3;\n terrainLoc[1][riverRand] = 3;\n \n // start building the river downward \n \n // the grid will be looped horizontally for every second row to find a river tile, from top to bottom,\n // and place an extension to it either to its left or to its right side, which is three blocks long\n for(int a = 1;a<rows;a=a+2)\n {\n for (int b = 0; b<columns-1 ; b++)\n { \n if (terrainLoc[a][b] == 3)\n { \n int rand = (int)(Math.random() * 2 +1);\n \n switch(rand)\n {\n case 1: \n { \n if (b == columns -1)\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n { \n Squares[a+1][b-1].setTerrain(3);\n terrainLoc[a+1][b-1] = 3;\n }\n if (a == rows -2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n else\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n { \n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n }\n \n case 2: \n { \n if (b == 0)\n {\n Squares[a][b+1].setTerrain(3);\n terrainLoc[a][b+1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b+1] = 3;\n Squares[a+1][b+1].setTerrain(3);\n }\n \n if(a<rows-2)\n {\n terrainLoc[a+2][b+1] = 3;\n Squares[a+2][b+1].setTerrain(3);\n }\n }\n \n else\n {\n Squares[a][b-1].setTerrain(3);\n terrainLoc[a][b-1] = 3;\n \n if(a!=rows-1)\n {\n terrainLoc[a+1][b-1] = 3;\n Squares[a+1][b-1].setTerrain(3);\n }\n if(a<rows-2)\n {\n terrainLoc[a+2][b-1] = 3;\n Squares[a+2][b-1].setTerrain(3);\n }\n }\n \n // ifs to hop the iterator over previously created rivers to avoid adding multiple\n // river extensions on the same row \n if (b<=columns-3)\n {\n b=b+2;\n }\n if (b==columns-2)\n {\n b++;\n }\n break;\n } \n }\n }\n } \n } \n }",
"public void PlaceRandomBoard(){\r\n\r\n\t\tString whichShip;\r\n\t\tString coordinate;\r\n\t\t\r\n\t\t\t// Display the random board and the random board menu \r\n\t\t// DISPLAY BOARDS!!!!!\r\n\t\tint whichInput=0;\r\n\t\tShip temp = new Ship();\r\n\t\tRandom generator = new Random();\r\n\t\tint randomIndex = generator.nextInt();\r\n\t\twhile (!this.myBoard.carrier.placed || !this.myBoard.battleship.placed\r\n\t\t\t\t|| !this.myBoard.cruiser.placed || !this.myBoard.submarine.placed\r\n\t\t\t\t|| !this.myBoard.patrolboat.placed) {\r\n\r\n\t\t\twhichInput++;\r\n\r\n\t\t\twhichShip = String.valueOf(whichInput);\r\n\t\t\t\r\n\t\t\tint direction=0;\r\n\r\n\t\t\tboolean placed = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\trandomIndex = generator.nextInt(10);\r\n\t\t\t\tcoordinate = this.indexToLetter(randomIndex);\r\n\t\t\t\tcoordinate += String.valueOf(generator.nextInt(10)+1);\r\n\t\t\t\tdirection = generator.nextInt(4) + 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch (Integer.parseInt(whichShip)) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttemp = new Carrier();\r\n\t\t\t\t\ttemp.name=\"Carrier\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttemp = new Battleship();\r\n\t\t\t\t\ttemp.name=\"Battleship\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttemp = new Cruiser();\r\n\t\t\t\t\ttemp.name=\"Cruiser\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\ttemp = new Submarine();\r\n\t\t\t\t\ttemp.name=\"Submarine\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\ttemp = new PatrolBoat();\r\n\t\t\t\t\ttemp.name=\"Patrol Boat\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tplaced = this.validateShipPlacement(temp, coordinate, direction);\r\n\r\n\t\t\t\tif (placed) {\r\n\t//\t\t\t\tSystem.out.println(\"Success\");\r\n\t\t\t\t\tthis.placeShip(temp, coordinate, direction);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t//\t\t\t\tdisplay.scroll(\"Invalid coordinate, please enter another\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"void makeMoreRooms() {\n\t\twhile(rooms.size() < size.maxRooms) {\n\t\t\t\tRoom made;\n\t\t\t\tint height = baseHeight;\n\t\t\t\tint x = random.nextInt(size.width);\n\t\t\t\tint z = random.nextInt(size.width);\n\t\t\t\tint xdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tint zdim = random.nextInt(size.maxRoomSize - 5) + 6;\n\t\t\t\tif(bigRooms.use(random)) {\n\t\t\t\t\txdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t\tzdim += random.nextInt((size.maxRoomSize / 2)) + (size.maxRoomSize / 2);\n\t\t\t\t}\n\t\t\t\tint ymod = (xdim <= zdim) ? (int) Math.sqrt(xdim) : (int) Math.sqrt(zdim);\n\t\t\t\tint roomHeight = random.nextInt((verticle.value / 2) + ymod + 1) + 2;\n\t\t\t\tmade = new PlaceSeed(x, height, z).growRoom(xdim, zdim, roomHeight, this, null, null);\n\t\t\t}\t\t\n\t\t//DoomlikeDungeons.profiler.endTask(\"Adding Extra Rooms (old)\");\n\t\t}",
"public void generateNextGeneration() {\n int neighbours;\n int minimum = Integer.parseInt(PreferencesActivity\n .getMinimumVariable(this._context));\n int maximum = Integer.parseInt(PreferencesActivity\n .getMaximumVariable(this._context));\n int spawn = Integer.parseInt(PreferencesActivity\n .getSpawnVariable(this._context));\n\n minimum = 2;\n maximum = 3;\n spawn = 3;\n\n int[][] nextGenerationLifeGrid = new int[HEIGHT][WIDTH];\n\n\n\n for (int h = 0; h < HEIGHT; h++) {\n for (int w = 0; w < WIDTH; w++) {\n neighbours = calculateNeighbours(h, w);\n\n\n if (_lifeGrid[h][w] != 0) {\n if ((neighbours >= minimum) && (neighbours <= maximum)) {\n nextGenerationLifeGrid[h][w] = neighbours;\n }\n\n } else {\n if (neighbours == spawn) {\n nextGenerationLifeGrid[h][w] = spawn;\n\n }\n }\n\n }\n\n }\n\n copyGrid(nextGenerationLifeGrid, _lifeGrid);\n\n }",
"public void generaBuits() {\r\n\r\n //FIX PARA EL OUT OF BOUNDS DE la columna 9 \r\n //int cellId = randomGenerator(N*N) - 1;\r\n //QUITAR \r\n //if (j != 0)\r\n //j = j - 1;\r\n int count = K;\r\n while (count != 0) {\r\n int cellId = generadorAleatoris(N * N) - 1;\r\n\r\n //System.out.println(cellId); \r\n // extract coordinates i and j \r\n int i = (cellId / N);\r\n int j = cellId % 9;\r\n\r\n // System.out.println(i+\" \"+j); \r\n if (mat[i][j] != 0) {\r\n count--;\r\n mat[i][j] = 0;\r\n }\r\n }\r\n }",
"private void generateMap(){\n int[] blockStepX = {X_STEP, 0, -X_STEP, -X_STEP, 0, X_STEP};\n int[] blockStepY = {Y_STEP_ONE, Y_STEP_TWO, Y_STEP_ONE, -Y_STEP_ONE, -Y_STEP_TWO, -Y_STEP_ONE};\n int blockSpecialValue = 0;\n int cellSpecial = 0;\n\n mapCells[origin.x/10][origin.y/10] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n cellGrid[0][0][0] = new EschatonCell(new CellPosition(0, 0, 0),\n new Point(origin.x, origin.y), blockSpecialValue);\n\n for (int distanceFromOrigin = 0; distanceFromOrigin < config.getSizeOfMap();\n distanceFromOrigin++){\n\n int[] blockXVals = {origin.x,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x + X_STEP * distanceFromOrigin,\n origin.x,\n origin.x - X_STEP * distanceFromOrigin,\n origin.x - X_STEP * distanceFromOrigin};\n\n int[] blockYVals = {origin.y - Y_STEP_TWO * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y + Y_STEP_TWO * distanceFromOrigin,\n origin.y + Y_STEP_ONE * distanceFromOrigin,\n origin.y - Y_STEP_ONE * distanceFromOrigin};\n\n blockSpecialValue = getRandomNumber(distanceFromOrigin, 0, 0);\n\n for (int block = 0; block < NUMBER_OF_BLOCKS; block ++){\n\n int blockXOrdinal = blockXVals[block];\n int blockYOrdinal = blockYVals[block];\n\n for (int blockSize = 0; blockSize < distanceFromOrigin; blockSize++){\n if(blockSpecialValue == blockSize){\n cellSpecial = getRandomNumber(2, 1, 1);\n }else {\n cellSpecial = 0;\n }\n cellGrid [distanceFromOrigin][block+1][blockSize+1] = makeNewCell(\n new CellPosition(distanceFromOrigin,block+1, blockSize+1),\n new Point(blockXOrdinal + blockStepX[block] * (blockSize + 1),\n blockYOrdinal + blockStepY[block] * (blockSize + 1)), cellSpecial);\n }\n }\n }\n }",
"public void randomMove(){\n ArrayList<Hole> availableHoles = availableMoves(nextToPlay);\n int holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n ArrayList<Korgool> korgools = availableHoles.get(holeIndex).getKoorgools();\n while(korgools.size() == 0){\n holeIndex = (int)(Math.random() * (((availableHoles.size()-1) - 0) + 1)) + 0;\n korgools = availableHoles.get(holeIndex).getKoorgools();\n }\n redistribute(availableHoles.get(holeIndex).getHoleIndex());\n }",
"public void genNewGame() {\n Random rand = new Random();\n int num = 0;\n\n int[] row = new int[9];\n\n for (int i = 0; i < 9; i++) {\n while (isInRow(row, num)) {\n num = rand.nextInt(9) + 1;\n }\n row[i] = num;\n }\n\n setRow(board, row, 0);\n shiftRow(row, 3);\n setRow(board, row, 1);\n shiftRow(row, 3);\n setRow(board, row, 2);\n\n shiftRow(row, 1);\n setRow(board, row, 3);\n shiftRow(row, 3);\n setRow(board, row, 4);\n shiftRow(row, 3);\n setRow(board, row, 5);\n\n shiftRow(row, 1);\n setRow(board, row, 6);\n shiftRow(row, 3);\n setRow(board, row, 7);\n shiftRow(row, 3);\n setRow(board, row, 8);\n\n }",
"public void generateCells() {\n\t\tfor(int x = 0; x < width; x++) {\n\t\t\tfor(int y = 0; y < height; y++) {\n\t\t\t\tboolean alive;\n\t\t\t\tif(livingYSpaceTop > y || height - livingYSpaceBottom < y || livingXSpaceLeft > x || width - livingXSpaceRight < x) {\n\t\t\t\t\talive = true;\n\t\t\t\t}\n\t\t\t\telse if(deadYSpaceTop > y || height - deadYSpaceBottom < y || deadXSpaceLeft > x || width - deadXSpaceRight < x) {\n\t\t\t\t\talive = false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\talive = UpWardUtils.randomFloat() < chanceToStartAlive;\n\t\t\t\t}\n\t\t\t\tcellMatrix[x][y] = alive ? 1 : 0;\n\t\t\t}\n\t\t}\n\t}",
"private void addNewRandomRabbit() {\n int countLimit = 10 * gridSize ^ 2;\n boolean foundFreeCell = false;\n int count = 0;\n while (!foundFreeCell && count < countLimit) {\n int x = (int) (Math.random() * gridSize);\n int y = (int) (Math.random() * gridSize);\n if (addNewRabbit(x, y)) {\n foundFreeCell = true;\n }\n count++;\n }\n }",
"public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }",
"private void initPosition() {\r\n while (true) {\r\n int x = RandomUtil.nextInt(boardLength);\r\n int y = RandomUtil.nextInt(boardLength);\r\n if (board.isSimple(x, y)) {\r\n heroTeam.setPosition(x, y);\r\n board.setTeamPosition(x, y);\r\n break;\r\n }\r\n }\r\n }",
"private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void positionShipsRandomly() {\r\n\t\tfor(Ship ship:ships) {\r\n\t\t\tpositionShipRandomly(ship,occupiedFields);\r\n\t\t}\r\n\t}",
"public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}",
"int getMines() {return mines;}",
"void updateCellNumbers() {\n cells.stream().forEach(row -> row.stream().filter(cell -> !cell.isMine()).forEach(cell -> {\n int numNeighbouringMines =\n (int) getNeighboursOf(cell).stream().filter(neighbour -> neighbour.isMine()).count();\n cell.setNumber(numNeighbouringMines);\n }));\n }",
"public Board()\n {\n ArrayList<String[]> dies = new ArrayList<String[]>();\n dies.add(Die0);\n dies.add(Die1);\n dies.add(Die2);\n dies.add(Die3);\n dies.add(Die4);\n dies.add(Die5);\n dies.add(Die6);\n dies.add(Die7);\n dies.add(Die8);\n dies.add(Die9);\n dies.add(Die10);\n dies.add(Die11);\n dies.add(Die12);\n dies.add(Die13);\n dies.add(Die14);\n dies.add(Die15);\n \n \n \n Random rand = new Random();\n int a = rand.nextInt(16);\n int b = rand.nextInt(15);\n int c = rand.nextInt(14);\n int d = rand.nextInt(13);\n int e = rand.nextInt(12);\n int f = rand.nextInt(11);\n int g = rand.nextInt(10);\n int h = rand.nextInt(9);\n int i = rand.nextInt(8);\n int j = rand.nextInt(7);\n int k = rand.nextInt(6);\n int l = rand.nextInt(5);\n int m = rand.nextInt(4);\n int n = rand.nextInt(3);\n int o = rand.nextInt(2);\n int p = rand.nextInt(1);\n row0.add(new Tile(dies.get(a)[rand.nextInt(6)].charAt(0),0,0));\n dies.remove(a);\n row0.add(new Tile(dies.get(b)[rand.nextInt(6)].charAt(0),0,1));\n dies.remove(b);\n row0.add(new Tile(dies.get(c)[rand.nextInt(6)].charAt(0),0,2));\n dies.remove(c);\n row0.add(new Tile(dies.get(d)[rand.nextInt(6)].charAt(0),0,3));\n dies.remove(d);\n row1.add(new Tile(dies.get(e)[rand.nextInt(6)].charAt(0),1,0));\n dies.remove(e);\n row1.add(new Tile(dies.get(f)[rand.nextInt(6)].charAt(0),1,1));\n dies.remove(f);\n row1.add(new Tile(dies.get(g)[rand.nextInt(6)].charAt(0),1,2));\n dies.remove(g);\n row1.add(new Tile(dies.get(h)[rand.nextInt(6)].charAt(0),1,3));\n dies.remove(h);\n row2.add(new Tile(dies.get(i)[rand.nextInt(6)].charAt(0),2,0));\n dies.remove(i);\n row2.add(new Tile(dies.get(j)[rand.nextInt(6)].charAt(0),2,1));\n dies.remove(j);\n row2.add(new Tile(dies.get(k)[rand.nextInt(6)].charAt(0),2,2));\n dies.remove(k);\n row2.add(new Tile(dies.get(l)[rand.nextInt(6)].charAt(0),2,3));\n dies.remove(l);\n row3.add(new Tile(dies.get(m)[rand.nextInt(6)].charAt(0),3,0));\n dies.remove(m);\n row3.add(new Tile(dies.get(n)[rand.nextInt(6)].charAt(0),3,1));\n dies.remove(n);\n row3.add(new Tile(dies.get(o)[rand.nextInt(6)].charAt(0),3,2));\n dies.remove(o);\n row3.add(new Tile(dies.get(p)[rand.nextInt(6)].charAt(0),3,3));\n dies.remove(p);\n tiles.add(row0);\n tiles.add(row1);\n tiles.add(row2);\n tiles.add(row3);\n \n }",
"private void generateMap() {\n\n\t\t//Used to ensure unique locations of each Gameboard element\n\t\tboolean[][] spaceUsed = new boolean[12][12];\n\n\t\t//A running total of fences generated\n\t\tint fencesGenerated = 0;\n\n\t\t//A running total of Mhos generated\n\t\tint mhosGenerated = 0;\n\n\t\t//Fill the board with spaces and spikes on the edge\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\tif (i == 0 || i == 11 || j ==0 || j == 11) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t\tspaceUsed[i][j] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Generate 20 spikes in unique locations\n\t\twhile (fencesGenerated < 20) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Fence(x, y, board);\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\tfencesGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate 12 mhos in unique locations\n\t\twhile (mhosGenerated < 12) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Mho(x, y, board);\n\n\t\t\t\tmhoLocations.add(x);\n\t\t\t\tmhoLocations.add(y);\n\n\t\t\t\tspaceUsed[x][y] = true;\n\n\t\t\t\tmhosGenerated++;\n\t\t\t}\n\t\t}\n\n\t\t//Generate a player in a unique location\n\t\twhile (true) {\n\t\t\tint x = 1+(int)(Math.random()*10);\n\t\t\tint y = 1+(int)(Math.random()*10);\n\n\t\t\tif(spaceUsed[x][y]==false) {\n\t\t\t\tmap[x][y] = new Player(x, y, board);\n\t\t\t\tplayerLocation[0] = x;\n\t\t\t\tplayerLocation[1] = y;\n\t\t\t\tnewPlayerLocation[0] = x;\n\t\t\t\tnewPlayerLocation[1] = y;\n\t\t\t\tspaceUsed[x][y] = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}",
"public void randomizeLocations() {\n\t// Get a seeded pseudo random-number generator\n\tDate today = new Date();\n\tRandom random = new Random(today.getTime());\n\t// Reset our min and max values\n\tresetNodes();\n\n\tfor (LayoutNode node: nodeList) {\n\n\t if (!node.isLocked()) {\n\t\tdouble x = random.nextDouble() * width;\n\t\tdouble y = random.nextDouble() * height;\n\t\tnode.setLocation(x, y);\n\t\tupdateMinMax(x, y);\n\t } else {\n\t\tupdateMinMax(node.getX(), node.getY());\n\t }\n\t}\n }",
"public void setBoard() {\n for (int i = 0; i < 10 ; i++) {\n board[i] = coordinator.holes[i].getNumberOfMarbleBalls();\n }\n }",
"void setRandomNumbersUp() {\n\t\tInteger[] numbers = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tInteger[] numbers2 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};\n\t\tList<Integer> numsList = Arrays.asList(numbers);\n\t\tCollections.shuffle(numsList);\n\t\tList<Integer> numsList2 = Arrays.asList(numbers2);\n\t\tCollections.shuffle(numsList2);\n\t\tList<Integer> combinedList = Stream.of(numsList, numsList2).flatMap(Collection::stream).collect(Collectors.toList());\n\t\t\n\t\t\n\t\tint counter = 0;\n\t\tfor (Node node : SquaresBoard.getChildren()) {\n\t\t\n\t\t\tif (node instanceof Label) {\n\t\t\t\t((Label) node).setText(combinedList.get(counter).toString());\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t}",
"private void bombDifficulty(int maxBombs) {\r\n int randomRow;\r\n int randomCol;\r\n for(int bombAmount = 0; bombAmount < maxBombs;){\r\n randomRow = rand.nextInt(map.length-1);\r\n randomCol = rand.nextInt(map[0].length-1);\r\n if(map[randomRow][randomCol].getSafe() == false){\r\n //Do nothing. Checks if same row col is not chosen again\r\n }\r\n else {\r\n map[randomRow][randomCol].setSafe(false);\r\n if (TESTING_MODE) {\r\n map[randomRow][randomCol].setVisual(bomb);\r\n\r\n }\r\n bombAmount++;\r\n }\r\n }\r\n }",
"public static void setUpGameComp() {\r\n for (int i = 0; i < fleet.length; i++) {\r\n int random = (int)(Math.random() * 10);\r\n \r\n if (random < 5) {\r\n placeShipHorzRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n else {\r\n placeShipVertRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n }\r\n \r\n System.out.print(\" Computer is finished!\");\r\n //displayBoard(gameBoardComp);\r\n \r\n }",
"public static int getRandCell() {\n int num = (int) (Math.random() * 10); // Generate random numbers\n int randCell = 1;\n if (num >= MARG_FIRST && num <= MARG_LAST) { // Set boundaries\n randCell = num;\n }\n return randCell;\n }",
"@Override\n\tprotected void placeStones(int numStones) {\n\n\t\tShape pitBounds = this.getShape();\n\t\tdouble pitW = pitBounds.getBounds().getWidth();\n\t\tdouble pitH = pitBounds.getBounds().getHeight();\n\t\t\n\n\t\tint stoneWidth = this.stoneIcon.getIconWidth();\n\t\tint stoneHeight = this.stoneIcon.getIconHeight();\n\n\t\t\t\n\t\tfor (int i = 0; i < numStones; i++){\n\t\t\tboolean locationFound = false;\n\t\t\tdo{\n\t\t\t\tfloat x = (float) Math.random();\n\t\t\t\tfloat y = (float) Math.random();\n\n\t\t\t\tx *= pitW;\n\t\t\t\ty *= pitH;\n\t\t\t\t\n\t\t\t\tEllipse2D.Float stoneBounds = new Ellipse2D.Float((float) (x+pitBounds.getBounds().getX()), (float) (y+pitBounds.getBounds().getY()), (float) (stoneWidth), (float) (stoneHeight));\n\n\t\t\t\tSystem.out.println(stoneBounds.getBounds());\n\t\t\t\tpitBounds.getBounds().setLocation(0, 0);\n\t\t\t\tArea pitArea = new Area(pitBounds);\n\t\t\t\tArea pendingStoneLocation = new Area(stoneBounds);\n\t\t\t\tArea intersectionArea = (Area) pitArea.clone();\n\t\t\t\tintersectionArea.add(pendingStoneLocation);\n\t\t\t\tintersectionArea.subtract(pitArea);\n\t\t\t\t\n\t\t\t\tif(intersectionArea.isEmpty() ){\n\t\t\t\t\tlocationFound = true;\n\t\t\t\t\tPoint2D p = new Point2D.Float((float) (x/pitW), (float) (y/pitH));\n\t\t\t\t\trelativeStoneLocations.add(p);\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} while(!locationFound);\n\t\n\t\t}\n\t}",
"void createWires() {\n this.splitBoard(new Posn(0, 0), this.height, this.width);\n int counter = 0;\n for (int i = 0; i < this.width; i++) {\n for (int j = 0; j < this.height; j++) {\n nodes.set(counter, this.board.get(i).get(j));\n counter++;\n }\n }\n }",
"public void addOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY) {\n assert maxY > minY : \"The maximum Y must be greater than the Minimum Y\";\n assert maxX > 0 && maxX <= 16 : \"addOreSpawn: The Maximum X must be greater than 0 and less than 16\";\n assert minY > 0 : \"addOreSpawn: The Minimum Y must be greater than 0\";\n assert maxY < 256 && maxY > 0 : \"addOreSpawn: The Maximum Y must be less than 256 but greater than 0\";\n assert maxZ > 0 && maxZ <= 16 : \"addOreSpawn: The Maximum Z must be greater than 0 and less than 16\";\n \n int diffBtwnMinMaxY = maxY - minY;\n for (int x = 0; x < chancesToSpawn; x++) {\n int posX = blockXPos + random.nextInt(maxX);\n int posY = minY + random.nextInt(diffBtwnMinMaxY);\n int posZ = blockZPos + random.nextInt(maxZ);\n (new WorldGenMinable(block, maxVeinSize)).generate(world, random, posX, posY, posZ);\n }\n }",
"@Override\n public void placeShips(Fleet fleet, Board board) {\n foundPosition = new boolean[sizeX][sizeY];\n for (int i = fleet.getNumberOfShips() - 1; i >= 0; i--) {\n Ship s = fleet.getShip(i);\n boolean vertical = rnd.nextBoolean();\n Position pos;\n if (vertical) {\n int x = rnd.nextInt(sizeX);\n int y = rnd.nextInt(sizeY - (s.size()));\n\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x = rnd.nextInt(sizeX);\n y = rnd.nextInt(sizeY - (s.size()));\n break;\n }\n }\n if (check == false) {\n break;\n }\n /* int counter = 0;\n if (counter > 1) {\n y = rnd.nextInt(sizeY - (s.size()));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x][y + j]) {\n check = true;\n x++;\n if (x >= sizeX) {\n x = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x][y + j] = true;\n }\n pos = new Position(x, y);\n } else {\n int x = rnd.nextInt(sizeX - (s.size()));\n int y = rnd.nextInt(sizeY);\n while (true) {\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n x = rnd.nextInt(sizeX - (s.size()));\n y = rnd.nextInt(sizeY);\n }\n }\n if (check == false) {\n break;\n }\n /*int counter = 0;\n if (counter > 1) {\n x = rnd.nextInt(sizeX - (s.size() - 1));\n }\n boolean check = false;\n for (int j = 0; j < s.size(); j++) {\n if (foundPosition[x + j][y]) {\n check = true;\n y++;\n if (y >= sizeX) {\n y = 0;\n }\n }\n }\n if (check == false) {\n break;\n }\n counter++;\n }*/\n }\n for (int j = 0; j < s.size(); j++) {\n foundPosition[x + j][y] = true;\n }\n pos = new Position(x, y);\n }\n board.placeShip(pos, s, vertical);\n }\n }",
"public void generateNewBoardAfterWin() {\n if(appleCount % 15 == 0) {\n System.out.println(\"CONGRATULATIONS YOU HAVE PASSED THE MAGICAL NUMBER OF: \" + appleCount);\n System.out.println(\"THIS MEANS YOU GET TO GO TO A NEW BOARD AND CONTINUE YOUR GAME - ENJOY!\");\n snakePartList.clear();\n snakeEnemyPartList.clear();\n SnakePartMaxID = 0;\n startSnake();\n }\n }",
"@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }",
"private void plantMushroom(){\r\n\t\tif (rand.nextInt(200) < this.BIRTH_RATE){\r\n\t\t\tint plant = rand.nextInt(5);\r\n\r\n\t\t\tMushroom mush = null;\r\n\r\n\t\t\tswitch (plant){\r\n\t\t\tcase 0:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * These while functions make sure that the mushrooms are not spawned on top of any\r\n\t\t\t\t\t\t * other mushroom or on top of the snake itself.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tshrooms.add(mush);\t//it adds the crated mushroom to the list of mushrooms\r\n\t\t}\r\n\t}",
"private void setNumberMines(int setNumberMines)\n\t{\n\t\tif(setNumberMines <= 0) myNumberMines = 1;\n\t\telse if(setNumberMines > ((mySizeX * mySizeY)-9))\n\t\t\tmyNumberMines = (mySizeX * mySizeY) - 9;\n\t\telse myNumberMines = setNumberMines;\n\t}",
"private void randomBuildings(int numB)\n\t{\n\t\t/* Create buildings of a reasonable size for this map */\n\t\tint bldgMaxSize = width/6;\n\t\tint bldgMinSize = width/50;\n\n\t\t/* Produce a bunch of random rectangles and fill in the walls array */\n\t\tfor(int i=0; i < numB; i++)\n\t\t{\n\t\t\tint tx, ty, tw, th;\n\t\t\ttx = Helper.nextInt(width);\n\t\t\tty = Helper.nextInt(height);\n\t\t\ttw = Helper.nextInt(bldgMaxSize) + bldgMinSize;\n\t\t\tth = Helper.nextInt(bldgMaxSize) + bldgMinSize;\n\n\t\t\tfor(int r = ty; r < ty + th; r++)\n\t\t\t{\n\t\t\t\tif(r >= height)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor(int c = tx; c < tx + tw; c++)\n\t\t\t\t{\n\t\t\t\t\tif(c >= width)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\twalls[c][r] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public String[][] getBoard() {\n ArrayList<Point<Integer,Integer>> bomb_positions = new ArrayList<>(this.NUMBOMBS);\n\n int size=0;\n while ( size < this.NUMBOMBS) {\n int x=(int)Math.floor(Math.random()*this.SIZE);\n int y=(int)Math.floor(Math.random()*this.SIZE);\n if (!bomb_positions.contains(new Point<>(x,y))) {\n bomb_positions.add(new Point<>(x,y));\n size++;\n }\n }\n // [ , , , ]\n // [ ,cnrXY, , ]\n // [ , ,Bomb, ]\n // [ , , , ]\n for (Point<Integer,Integer> bomb:\n bomb_positions) {\n int cornerX = bomb.getX()-1;\n int cornerY= bomb.getY()-1;\n for (int i = cornerX; i < cornerX+3 ; i++) {\n for (int j = cornerY; j < cornerY+3; j++) {\n if(i>=0 && i<SIZE && j>=0 && j< SIZE){\n if ((new Point<>(i,j)).equals(bomb)){\n board[i][j]=\"B\";\n }else {\n if (!board[i][j].equals(\"B\") && board[i][j].equals(\" \")){\n board[i][j] = \"1\";\n }else if (!board[i][j].equals(\"B\") && !board[i][j].equals(\" \")){\n int n = Integer.parseInt(board[i][j]);\n n=n+1;\n board[i][j] = String.valueOf(n);\n }\n }\n\n }\n }\n }\n }\n return board;\n }",
"public void initGame() {\n\t\tfor (int i = 0; i < gameSize; i++) {\n\t\t\tfor (int j = 0; j < gameSize; j++) {\n\t\t\t\tgrid[i][j] = new GridNode(GridNode.NodeType.EMPTY);\n\t\t\t\tgridLocker[i][j] = -1;\n\t\t\t}\n\t\t}\n\n\t\t// Snakes are placed into start positions here\n\t\tfor (int i = 0; i < snakesList.size(); i++) {\n\t\t\tint x = (int) (Math.random() * 1000) % gameSize;\n\t\t\tint y = (int) (Math.random() * 1000) % gameSize;\n\t\t\tif (grid[x][y].nodeType == GridNode.NodeType.EMPTY) {\n\t\t\t\tSnake currentSnake = snakesList.get(i);\n\t\t\t\tgrid[x][y].SnakeID = currentSnake.snakeID;\n\t\t\t\tcurrentSnake.initalizeSnakeLocation(x, y, gameSize);\n\t\t\t\tgrid[x][y].nodeType = GridNode.NodeType.SNAKEHEAD;\n\t\t\t} else {\n\t\t\t\t// Every snake has to be allocated a spot so go back to the\n\t\t\t\t// index\n\t\t\t\t// of the snake to add and try again\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// Places some snake food randomly somewhere\n\t\tfor(int i = 0; i <4; i++) {\n\t\t\tplaceBonus();\n\t\t}\n\t}",
"void raiseNumberOfStonesOnBoard();"
] | [
"0.80514044",
"0.7848224",
"0.7245918",
"0.71104866",
"0.7000816",
"0.69901764",
"0.6943991",
"0.6856922",
"0.6814567",
"0.6734489",
"0.65657884",
"0.6535531",
"0.6513611",
"0.6500734",
"0.6468",
"0.6458931",
"0.64396346",
"0.6438536",
"0.64176744",
"0.64013773",
"0.6386537",
"0.6373344",
"0.6372519",
"0.6330731",
"0.6315501",
"0.6285749",
"0.6252854",
"0.62292683",
"0.6228326",
"0.621957",
"0.62037826",
"0.61796063",
"0.61655384",
"0.6160278",
"0.6159742",
"0.6122319",
"0.61048734",
"0.6104314",
"0.6091776",
"0.60902",
"0.6075121",
"0.6061012",
"0.6055102",
"0.60410553",
"0.60396165",
"0.60339797",
"0.6030863",
"0.60303384",
"0.60093194",
"0.5996148",
"0.599468",
"0.5985114",
"0.59640205",
"0.5953769",
"0.5952943",
"0.59318244",
"0.592108",
"0.59206426",
"0.59059924",
"0.5901181",
"0.58981055",
"0.5863318",
"0.58628464",
"0.5861076",
"0.5852628",
"0.5830248",
"0.582364",
"0.5819559",
"0.57940495",
"0.5784302",
"0.5782568",
"0.57791346",
"0.57772225",
"0.57648987",
"0.5753163",
"0.57530063",
"0.575119",
"0.5747084",
"0.57446134",
"0.5743156",
"0.57202715",
"0.57172316",
"0.57171166",
"0.57027173",
"0.5696517",
"0.5695317",
"0.56915206",
"0.56870025",
"0.56862223",
"0.5686048",
"0.5683213",
"0.5682297",
"0.5657438",
"0.5656923",
"0.5656912",
"0.56498545",
"0.56454295",
"0.5645197",
"0.56335086",
"0.5632426"
] | 0.7922503 | 1 |
This method tells the system what Characters the Values have. | static char getUserChar(int cellValue) {
if(cellValue == Mine) {
return 'X';
} else if( cellValue == Empty) {
return '+';
} else if (cellValue == Flag || cellValue == FlaggedMine) {
return 'F';
} else if (cellValue == UncoveredMine) {
return 'X';
} else { String adjMines = Integer.toString(cellValue);
return adjMines.charAt(0);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCharacters()\n\t{\n\t\treturn characters;\n\t}",
"private String getCharacterString()\n {\n String returnString = \"Characters:\\n\\t\";\n Set<String> keys = characters.keySet();\n if(characters.size() <= 0) {\n returnString += \"[None]\";\n return returnString;\n }\n for(String character : keys) {\n returnString += \" [\" + character + \"]\";\n }\n return returnString;\n }",
"public String toString()\n\t{\n\t\treturn \"Character: \" + characters + \" Frequency: \" + frequency;\n\t}",
"public char[] getCharacters() {\n return characters;\n }",
"public char charValue() {\n return value;\n }",
"public Integer[] getCharList() {\n\t\t\treturn charList;\n\t\t}",
"public char getValue()\n\t{\n\t\treturn value;\n\t}",
"public char getValue() {\n return value;\n }",
"public Character getCharacters() {\n\t\treturn characters;\n\t}",
"public int getCharacterSet() {\r\n return CharacterSet;\r\n }",
"public String getCharSet(){\n \treturn charSet;\n }",
"public String getCharacteristics() {\n return characteristics;\n }",
"public Set<String> getAllCharacters() {\n\t\treturn characterStates.keySet();\n\t}",
"public Iterator<Character> getDefinedChars() {\n\t\tSortedSet<Character> dest = new TreeSet<Character>();\n\t\tSet<Key<?>> keys = properties.keys(ObservableProperties.DEFAULT);\n\t\tfor (Key<?> key : keys) {\n\t\t\tObject t = properties.get(key);\n\t\t\tif (t instanceof WritingShape && key.toString().length() == 1) {\n\t\t\t\tdest.add(key.toString().charAt(0));\n\t\t\t}\n\t\t}\n\t\treturn dest.iterator();\n\t}",
"@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}",
"public int getCharno() {\n return charno;\n }",
"public Set<Character> getUniqueChars() {\n return uniqueChars;\n }",
"public String getCharName(){return charName;}",
"@Override\n public Collection<Character> getAll() {\n return characters;\n }",
"public char[] getContextInformationAutoActivationCharacters() {\n\t\treturn new char[] { '#' };\n\t}",
"public Character charRep() {\n return this.typeChar;\n }",
"public final char[] validChars() {\n\t\t\treturn VALID_ALPHABET;\n\t\t}",
"public char toChar() {\r\n//\t\t//Ant\r\n//\t\tif(hasAnt()){\r\n//\t\t\tif(this.ant.getColour() == 0){\r\n//\t\t\t\treturn '=';\r\n//\t\t\t}\r\n//\t\t\tif(this.ant.getColour() == 1){\r\n//\t\t\t\treturn '|';\r\n//\t\t\t}\r\n//\t\t}\r\n\t\t\r\n\t\t//Rock\r\n\t\tif(this.rocky){\r\n\t\t\treturn '#';\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Food\r\n\t\tif(this.food > 0){\r\n\t\t\t//Prints the food value,\r\n\t\t\t//if it is > 9, prints 9 instead\r\n\t\t\tif(this.anthill == 0){ //0 to 9\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn 48 + 9;\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (this.food + 48);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Otherwise, food must be in an anthill\r\n\t\t\t//so give unique char value that acknowledges this\r\n\t\t\t//Greek isn't recognised by Notepad or the console (prints '?' instead)\r\n\t\t\t//Minimum food value is 1, so -1 from ascii codes\r\n\t\t\tif(this.anthill == 1){ //Upper case, 65 for Latin, 913 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (64 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (64 + this.food);\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){ //Lower case, 97 for Latin, 945 for Greek\r\n\t\t\t\tif(this.food > 9){\r\n\t\t\t\t\treturn (char) (96 + 9);\r\n\t\t\t\t}\r\n\t\t\t\treturn (char) (96 + this.food);\r\n\t\t\t}\r\n\t\t\t//Else error, cannot be less than 0 or more than 2 anthills\r\n\t\t\tLogger.log(new WarningEvent(\"Cell anthill value not 0, 1 or 2\"));\r\n\t\t\treturn 0;\t//Null char value\r\n\t\t}\r\n\t\t\r\n\t\t//Anthill\r\n\t\tif(this.anthill > 0){\r\n\t\t\tif(this.anthill == 1){\r\n\t\t\t\treturn '+';\r\n\t\t\t}\r\n\t\t\tif(this.anthill == 2){\r\n\t\t\t\treturn '-';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n//\t\t//Markers\r\n//\t\tfor(int i = 0; i < this.markers.length; i++){\r\n//\t\t\tfor(boolean marker : this.markers[i]){\r\n//\t\t\t\tif(marker){\r\n//\t\t\t\t\tif(i == 0){\r\n//\t\t\t\t\t\treturn '[';\r\n//\t\t\t\t\t}else if(i == 1){\r\n//\t\t\t\t\t\treturn ']';\r\n//\t\t\t\t\t}else{\r\n//\t\t\t\t\t\treturn '?';\r\n//\t\t\t\t\t}\r\n//\t\t\t\t}\r\n//\t\t\t}\t\t\r\n//\t\t}\r\n\t\t\r\n\t\treturn '.';\r\n\t}",
"public String toString()\r\n {\n return super.getValue()+\" C\";\r\n }",
"public char[] info() {\n\t\treturn null;\r\n\t}",
"public String getCharSet() {\n\treturn strCharSet;\n }",
"public char[] getContextInformationAutoActivationCharacters() {\n return null;\r\n }",
"public char getopcion(){\n return opciones;\n }",
"public BasicChar getBasicChar() {\n return this.wotCharacter;\n }",
"public char[] getContextInformationAutoActivationCharacters() {\n\t\treturn null;\n\t}",
"public Integer getCharNum() {\n return charNum;\n }",
"public void getCharacterPickList() {\n\t\tfor (int i = 0; i < this.characters.size(); i++) {\n\t\t\tSystem.out.println((i) + (\" \") + (this.characters.get(i)));\n\t\t}\n\t}",
"public char[][] regenCharTable();",
"public char getChar();",
"public String getLetters()\n\t\t\t{\n\t\t\treturn letters;\n\t\t\t}",
"public char getSuit(){\n return Suits;\n }",
"@Override\n public String toString() {\n return \"\" + character;\n }",
"@Test\r\n\tpublic void testCheckCharacter() throws ConfuserException {\r\n\t\t// Check to make sure unknowns work by checking against basic ASCII\r\n\t\tfor (char ndx = 0x021; ndx < 0x007E; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Unknown, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure Hiragana pass\r\n\t\tfor (char ndx = 0x3041; ndx < 0x3096; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Hiragana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the katakana pass\r\n\t\tfor (char ndx = 0x30A1; ndx < 0x30FC; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Katakana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the kanji pass, note that we are checking the \r\n\t\t// full CJK range so this includes kanji that are not used in Japanese\r\n\t\tfor (char ndx = 0x4E00; ndx < 0x9FAF; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Kanji, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t}",
"public synchronized com.example.crystalgame.library.data.Character[] getGameCharacters() {\n\t\treturn InformationPresenter.getInstance().getCharacters();\n\t}",
"public int getSingleChar() {\n return c;\n }",
"static public char[] getDefaultChars() {\n return defaultCharArray;\n }",
"static char[] getAutoactivationChars() {\n\n // To enable content proposal on deleting a char\n \n String delete = new String(new char[] { 8 });\n String allChars = LCL + UCL + NUMS + delete;\n return allChars.toCharArray();\n }",
"public String getCharacterSequence();",
"public int getCharSet() {\n\t\treturn this.charSet;\n\t}",
"public String possibleValues(){\n int nbElement = 9-this.possibilities.size();\n String result = \"\";\n result = result+\"\"+this.value+\" (\";\n for(int i : this.possibilities){\n result = result+i;\n }\n for(int i = 0; i< nbElement ;i++){\n result = result+\".\";\n }\n result = result+\")\";\n return result;\n\n }",
"public int getSingleChar() {\n return -1;\n }",
"@Override\r\n\tpublic int length() {\n\t\treturn chars.length;\r\n\t}",
"@Override\n\tpublic String getCapacity() {\n\t\treturn \"ÔØÈËÊý£º\"+humanNum+\"ÈË\";\n\t}",
"public char[] getAsChars() {\n return (char[])data;\n }",
"@Override\n public String getChr() {\n return getContig();\n }",
"public String getLetters() {\r\n\t\treturn solution.getLetterSet();\r\n\t}",
"public String get(){\n\t\tString s = value%13+1+\"\"+suits[value/13]+\" \";\r\n\t\treturn s;\r\n\t}",
"public long getCharCount() {\n return charCount;\n }",
"public SpecialChar insertSpecialChar() {\n SpecialChar specialChar = new SpecialChar();\n specialChar.setId(4491);\n specialChar.setSpecialCharA(\"! ' , . / : ; ? ^ _ ` | \"\n + \" ̄ 、 。 · ‥ … ¨ 〃 ― ∥ \ ∼ ´ ~ ˇ \" + \"˘ ˝ ˚ ˙ ¸ ˛ ¡ ¿ ː\");\n specialChar.setSpecialCharB(\"" ( ) [ ] { } ‘ ’ “ ” \"\n + \" 〔 〕 〈 〉 《 》 「 」 『 』\" + \" 【 】\");\n specialChar.setSpecialCharC(\"+ - < = > ± × ÷ ≠ ≤ ≥ ∞ ∴\"\n + \" ♂ ♀ ∠ ⊥ ⌒ ∂ ∇ ≡ ≒ ≪ ≫ √ ∽ ∝ \"\n + \"∵ ∫ ∬ ∈ ∋ ⊆ ⊇ ⊂ ⊃ ∪ ∩ ∧ ∨ ¬ ⇒ \" + \"⇔ ∀ ∃ ∮ ∑ ∏\");\n specialChar\n .setSpecialCharD(\"$ % ₩ F ′ ″ ℃ Å ¢ £ ¥ ¤ ℉ ‰ \"\n + \"€ ㎕ ㎖ ㎗ ℓ ㎘ ㏄ ㎣ ㎤ ㎥ ㎦ ㎙ ㎚ ㎛ \"\n + \"㎜ ㎝ ㎞ ㎟ ㎠ ㎡ ㎢ ㏊ ㎍ ㎎ ㎏ ㏏ ㎈ ㎉ \"\n + \"㏈ ㎧ ㎨ ㎰ ㎱ ㎲ ㎳ ㎴ ㎵ ㎶ ㎷ ㎸ ㎹ ㎀ ㎁ ㎂ ㎃ ㎄ ㎺ ㎻ ㎼ ㎽ ㎾ ㎿ ㎐ ㎑ ㎒ ㎓ ㎔ Ω ㏀ ㏁ ㎊ ㎋ ㎌ ㏖ ㏅ ㎭ ㎮ ㎯ ㏛ ㎩ ㎪ ㎫ ㎬ ㏝ ㏐ ㏓ ㏃ ㏉ ㏜ ㏆\");\n specialChar.setSpecialCharE(\"# & * @ § ※ ☆ ★ ○ ● ◎ ◇ ◆ □ ■ △ ▲\"\n + \" ▽ ▼ → ← ↑ ↓ ↔ 〓 ◁ ◀ ▷ ▶ ♤ ♠ ♡ ♥ ♧ ♣ ⊙ ◈ ▣ ◐\"\n + \" ◑ ▒ ▤ ▥ ▨ ▧ ▦ ▩ ♨ ☏ ☎ ☜ ☞ ¶ † \"\n + \"‡ ↕ ↗ ↙ ↖ ↘♭ ♩ ♪ ♬ ㉿ ㈜ № ㏇ ™ ㏂ ㏘ ℡ ® ª º\");\n\n session.save(specialChar);\n\n return specialChar;\n }",
"int getStrValuesCount();",
"private void printchar(){\n temp = (inp).toString();\n count = (temp).length();\n System.out.println(\"Length = \"+(temp).length());\n }",
"public int characteristics() {\n/* 1680 */ return this.characteristics;\n/* */ }",
"public String getVchar1() {\n return vchar1;\n }",
"public String getChar() {\n\t\tString asciiCode = getProperty(key_delimiter);\n\t\tCharacter c = null;\n\t\tif (asciiCode == null) {\n\t\t\tc = '|';\n\t\t} else if (asciiCode != null && asciiCode.startsWith(\"#\")\n\t\t\t\t&& asciiCode.length() > 1) {\n\t\t\tint i = Integer.valueOf(asciiCode.substring(1));\n\t\t\tc = new Character((char) i);\n\t\t} else if (asciiCode.length() == 1) {\n\t\t\tc = asciiCode.charAt(0);\n\t\t}\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif (c != null){\n\t\t\tresult = String.valueOf(c);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public int getNumberOfCharacters() {\n return numberOfCharacters;\n }",
"public int getCharSet()\n {\n byte charset = font.getCharset();\n if(charset >= 0) {\n return (int)charset;\n } else {\n return charset + 256;\n }\n }",
"public static int getAtChar(){\r\n\t\treturn atChar;\r\n\t}",
"public String toString()\n\t\t{\n\t\t\treturn name + \"\\t\" + characterName;\n\t\t}",
"public char Get() {\n\t\treturn myChar;\n\t}",
"public String getQwWellChars() {\n\t\treturn qwWellChars;\n\t}",
"public int characteristics() {\n/* 1460 */ return this.characteristics;\n/* */ }",
"public char getCouleur(){\t\n\t\treturn couleur;\n\t}",
"public HiveChar getHiveChar() {\n return new HiveChar(value.toString(), -1);\n }",
"public String getBKC097() {\n return BKC097;\n }",
"public String toString(){\r\n\t\tString desc = \"[\";\r\n\t\tfor(Character c : used){\r\n\t\t\tdesc += c;\r\n\t\t\tSystem.out.println(\"hashCode of \" + c + \":\" + c.hashCode());\r\n\t\t}\r\n\t\treturn desc + \"]\";\r\n\t}",
"public static String getSymbol() {\n\t\t\t\n\t\t\treturn \"The Sequence has no characters...\";\n\t\t}",
"public String toString() {\n String info = values[value] + \" of \" + suits[suit];\n return info;\n }",
"private void setLevelUpChars() {\n /*\n * check this if you need more symbol set's\n * TODO do this right @me\n\t\t */\n String charset = KeyboardHandler.current_charset;\n if (charset.length() == 36) {\n for (int i = 0; i < 6; ++i) {\n characterAreas.get(i).setChars(\n charset.substring(i * 6, (i + 1) * 6));\n }\n }\n\n if (charset.length() == 40) {\n Log.d(\"main\",charset);\n characterAreas.get(0).setChars(charset.substring(0, 6));\n characterAreas.get(1).setChars(charset.substring(6, 14));\n characterAreas.get(2).setChars(charset.substring(14, 20));\n characterAreas.get(3).setChars(charset.substring(20, 26));\n characterAreas.get(4).setChars(charset.substring(26, 34));\n characterAreas.get(5).setChars(charset.substring(34, 40));\n }\n }",
"public boolean getCharCounter() {\n return getPolymerElement().getCharCounter();\n }",
"public int GetCaps();",
"public double[] getCharacteristics() {\r\n\t\treturn characteristics;\r\n\t}",
"private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}",
"@Test public void testGetCharacters() {\r\n new LinkedHashMap<Word, Character[]>() {\r\n private static final long serialVersionUID = 8037868849679212478L; {\r\n put(w2, new Character[] {\r\n new Character('T'),\r\n new Character('e'),\r\n new Character('s'),\r\n new Character('t')\r\n });\r\n put(w4, new Character[] {\r\n new Character('t'),\r\n new Character('e'),\r\n new Character('s'),\r\n new Character('t'),\r\n new Character('\\''),\r\n new Character('i'),\r\n new Character('n'),\r\n new Character('g')\r\n });\r\n }}.forEach((k, v) -> {\r\n Character[] characters = k.getCharacters();\r\n assertTrue(\"Expecting identical array sizes for \" + k.toString(),\r\n characters.length == v.length);\r\n for(int i = 0; i < characters.length; i++)\r\n assertTrue(\"Expecting to find \" + v[i].toString(), characters[i].toChar() == v[i].toChar());\r\n });\r\n }",
"public char getBadChar(){\n return badChar;\n }",
"public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_data(i) == (char)0) break;\n carr[i] = (char)getElement_data(i);\n }\n return new String(carr,0,i);\n }",
"public char getExtended()\n {\n return this.extended;\n }",
"protected String getCharValue(String name) throws UnsupportedEncodingException {\r\n\r\n APICharFieldDescription field = getCharFieldDescription(name);\r\n return getCharConverter().byteArrayToString(bytes, getAbsoluteFieldOffset(field), field.getLength());\r\n }",
"public void setNChar()\n/* */ {\n/* 1168 */ this.isNChar = true;\n/* */ }",
"public static void main(String[] args) {\n\t\t\r\n\r\n\t\tSystem.out.println(\"The Character Value of 65 is :---\"+(char)65);\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public abstract char getTextQualifier();",
"private String get_CHAR(int column) {\n if (ccsid_[column - 1] == 1200) {\n return getStringWithoutConvert(columnDataPosition_[column - 1], columnDataComputedLength_[column - 1]);\n }\n\n // check for null encoding is needed because the net layer\n // will no longer throw an exception if the server didn't specify\n // a mixed or double byte ccsid (ccsid = 0). this check for null in the\n // cursor is only required for types which can have mixed or double\n // byte ccsids.\n if (charset_[column - 1] == null) {\n throw new IllegalStateException(\"SQLState.CHARACTER_CONVERTER_NOT_AVAILABLE\");\n }\n\n int dataLength = columnDataComputedLength_[column - 1];\n if (maxFieldSize_ != 0 && maxFieldSize_ < dataLength)\n dataLength = maxFieldSize_;\n return dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n dataLength, charset_[column - 1]).toString();\n// String tempString = new String(dataBuffer_,\n// columnDataPosition_[column - 1],\n// columnDataComputedLength_[column - 1],\n// charset_[column - 1]);\n// return (maxFieldSize_ == 0) ? tempString :\n// tempString.substring(0, Math.min(maxFieldSize_,\n// tempString.length()));\n }",
"public String getCharacter()\n\t\t{\n\t\t\treturn characterName;\n\t\t}",
"static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}",
"private int getNucIndex(char c) {\n\t\tswitch(c) {\n\t\tcase 'A':\n\t\t\treturn 0;\n\t\tcase 'C':\n\t\t\treturn 1;\n\t\tcase 'G':\n\t\t\treturn 2;\n\t\tcase 'T':\n\t\t\treturn 3;\n\t\tcase '-':\n\t\t\treturn 4;\n\t\tdefault:\n\t\t\treturn 4;\n\t\t}\n\t}",
"public String getCharSet()\n\t{\n\t\tParameterParser parser = new ParameterParser();\n\t\tparser.setLowerCaseNames(true);\n\t\t// Parameter parser can handle null input\n\t\tMap<?, ?> params = parser.parse(getContentType(), ';');\n\t\treturn (String)params.get(\"charset\");\n\t}",
"@Test\n public void prodSpecCharValueUseTest() {\n // TODO: test prodSpecCharValueUse\n }",
"public int getStrValuesCount() {\n return strValues_.size();\n }",
"public char getChar() {\n return this.s;\n }",
"public int getStrValuesCount() {\n return strValues_.size();\n }",
"public String getCharacteristic() {\n return parameter.getCharacteristic().toString(HEXA_DECIMAL_BASE);\n }",
"public String getContextCharacters() {\r\n return this.text.toString();\r\n }",
"private static void initExtendedSet() {\r\n ESCAPE_CHARS.add(\"$\");\r\n ESCAPE_CHARS.add(\"/\");\r\n ESCAPE_CHARS.add(\"+\");\r\n ESCAPE_CHARS.add(\"%\");\r\n\r\n EXT_CHARS.put(new Character('\\000'), \"%U\");\r\n EXT_CHARS.put(new Character('\\001'), \"$A\");\r\n EXT_CHARS.put(new Character('\\002'), \"$B\");\r\n EXT_CHARS.put(new Character('\\003'), \"$C\");\r\n EXT_CHARS.put(new Character('\\004'), \"$D\");\r\n EXT_CHARS.put(new Character('\\005'), \"$E\");\r\n EXT_CHARS.put(new Character('\\006'), \"$F\");\r\n EXT_CHARS.put(new Character('\\007'), \"$G\");\r\n EXT_CHARS.put(new Character('\\010'), \"$H\");\r\n EXT_CHARS.put(new Character('\\011'), \"$I\");\r\n EXT_CHARS.put(new Character('\\012'), \"$J\");\r\n EXT_CHARS.put(new Character('\\013'), \"$K\");\r\n EXT_CHARS.put(new Character('\\014'), \"$L\");\r\n EXT_CHARS.put(new Character('\\015'), \"$M\");\r\n EXT_CHARS.put(new Character('\\016'), \"$N\");\r\n EXT_CHARS.put(new Character('\\017'), \"$O\");\r\n EXT_CHARS.put(new Character('\\020'), \"$P\");\r\n EXT_CHARS.put(new Character('\\021'), \"$Q\");\r\n EXT_CHARS.put(new Character('\\022'), \"$R\");\r\n EXT_CHARS.put(new Character('\\023'), \"$S\");\r\n EXT_CHARS.put(new Character('\\024'), \"$T\");\r\n EXT_CHARS.put(new Character('\\025'), \"$U\");\r\n EXT_CHARS.put(new Character('\\026'), \"$V\");\r\n EXT_CHARS.put(new Character('\\027'), \"$W\");\r\n EXT_CHARS.put(new Character('\\030'), \"$X\");\r\n EXT_CHARS.put(new Character('\\031'), \"$Y\");\r\n EXT_CHARS.put(new Character('\\032'), \"$Z\");\r\n EXT_CHARS.put(new Character('\\033'), \"%A\");\r\n EXT_CHARS.put(new Character('\\034'), \"%B\");\r\n EXT_CHARS.put(new Character('\\035'), \"%C\");\r\n EXT_CHARS.put(new Character('\\036'), \"%D\");\r\n EXT_CHARS.put(new Character('\\037'), \"%E\");\r\n EXT_CHARS.put(new Character('\\177'), \"%T\"); // Also %X, %Y, %Z\r\n\r\n EXT_CHARS.put(new Character('!'), \"/A\");\r\n EXT_CHARS.put(new Character('\"'), \"/B\");\r\n EXT_CHARS.put(new Character('#'), \"/C\");\r\n EXT_CHARS.put(new Character('$'), \"/D\");\r\n EXT_CHARS.put(new Character('%'), \"/E\");\r\n EXT_CHARS.put(new Character('&'), \"/F\");\r\n EXT_CHARS.put(new Character('\\''), \"/G\");\r\n EXT_CHARS.put(new Character('('), \"/H\");\r\n EXT_CHARS.put(new Character(')'), \"/I\");\r\n EXT_CHARS.put(new Character('*'), \"/J\");\r\n EXT_CHARS.put(new Character('+'), \"/K\");\r\n EXT_CHARS.put(new Character(','), \"/L\");\r\n EXT_CHARS.put(new Character('/'), \"/O\");\r\n EXT_CHARS.put(new Character(':'), \"/Z\");\r\n EXT_CHARS.put(new Character(';'), \"%F\");\r\n EXT_CHARS.put(new Character('\\u00AB'), \"%G\");\r\n EXT_CHARS.put(new Character('='), \"%H\");\r\n EXT_CHARS.put(new Character('>'), \"%I\");\r\n EXT_CHARS.put(new Character('?'), \"%J\");\r\n EXT_CHARS.put(new Character('@'), \"%V\");\r\n EXT_CHARS.put(new Character('['), \"%K\");\r\n EXT_CHARS.put(new Character('\\\\'), \"%L\");\r\n EXT_CHARS.put(new Character(']'), \"%M\");\r\n EXT_CHARS.put(new Character('^'), \"%N\");\r\n EXT_CHARS.put(new Character('_'), \"%O\");\r\n EXT_CHARS.put(new Character('`'), \"%W\");\r\n EXT_CHARS.put(new Character('{'), \"%P\");\r\n EXT_CHARS.put(new Character('|'), \"%Q\");\r\n EXT_CHARS.put(new Character('}'), \"%R\");\r\n EXT_CHARS.put(new Character('~'), \"%S\");\r\n\r\n EXT_CHARS.put(new Character('a'), \"+A\");\r\n EXT_CHARS.put(new Character('b'), \"+B\");\r\n EXT_CHARS.put(new Character('c'), \"+C\");\r\n EXT_CHARS.put(new Character('d'), \"+D\");\r\n EXT_CHARS.put(new Character('e'), \"+E\");\r\n EXT_CHARS.put(new Character('f'), \"+F\");\r\n EXT_CHARS.put(new Character('g'), \"+G\");\r\n EXT_CHARS.put(new Character('h'), \"+H\");\r\n EXT_CHARS.put(new Character('i'), \"+I\");\r\n EXT_CHARS.put(new Character('j'), \"+J\");\r\n EXT_CHARS.put(new Character('k'), \"+K\");\r\n EXT_CHARS.put(new Character('l'), \"+L\");\r\n EXT_CHARS.put(new Character('m'), \"+M\");\r\n EXT_CHARS.put(new Character('n'), \"+N\");\r\n EXT_CHARS.put(new Character('o'), \"+O\");\r\n EXT_CHARS.put(new Character('p'), \"+P\");\r\n EXT_CHARS.put(new Character('q'), \"+Q\");\r\n EXT_CHARS.put(new Character('r'), \"+R\");\r\n EXT_CHARS.put(new Character('s'), \"+S\");\r\n EXT_CHARS.put(new Character('t'), \"+T\");\r\n EXT_CHARS.put(new Character('u'), \"+U\");\r\n EXT_CHARS.put(new Character('v'), \"+V\");\r\n EXT_CHARS.put(new Character('w'), \"+W\");\r\n EXT_CHARS.put(new Character('x'), \"+X\");\r\n EXT_CHARS.put(new Character('y'), \"+Y\");\r\n EXT_CHARS.put(new Character('z'), \"+Z\");\r\n }",
"public String getInformation() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tencodingTable.forEach((c, s) -> {\n\t\t\tsb.append(c);\n\t\t\tsb.append(\" -> \");\n\t\t\tsb.append(s);\n\t\t\tsb.append('\\n');\n\t\t});\n\n\t\treturn sb.toString();\n\t}",
"char getInfo();",
"public java.lang.CharSequence getVar126() {\n return var126;\n }",
"public java.lang.CharSequence getVar126() {\n return var126;\n }"
] | [
"0.6733539",
"0.6385182",
"0.6288003",
"0.6250666",
"0.6240441",
"0.6140185",
"0.6134791",
"0.61099523",
"0.6084589",
"0.6040484",
"0.6012751",
"0.60035396",
"0.5977172",
"0.5965132",
"0.59257615",
"0.5904551",
"0.59038585",
"0.59023094",
"0.5871824",
"0.584439",
"0.58395755",
"0.5839352",
"0.5796043",
"0.5774521",
"0.5755577",
"0.575104",
"0.57387936",
"0.573641",
"0.57351947",
"0.5728667",
"0.5706476",
"0.5696905",
"0.56943744",
"0.5663639",
"0.56477654",
"0.5645666",
"0.56356514",
"0.5625036",
"0.56243163",
"0.5620477",
"0.5610266",
"0.56059164",
"0.55905986",
"0.55901563",
"0.5588703",
"0.5588225",
"0.55797195",
"0.55737066",
"0.55709785",
"0.5564187",
"0.55569404",
"0.5552938",
"0.5547747",
"0.5545185",
"0.55234534",
"0.5512828",
"0.5512567",
"0.5512112",
"0.55110395",
"0.5509957",
"0.5493978",
"0.5491912",
"0.54897904",
"0.5487397",
"0.54856485",
"0.54771525",
"0.5475364",
"0.5473885",
"0.5473728",
"0.5469097",
"0.5462202",
"0.5460779",
"0.54606515",
"0.54601234",
"0.54447013",
"0.54404014",
"0.5429431",
"0.5428203",
"0.5426558",
"0.5423228",
"0.54196614",
"0.5418104",
"0.54058045",
"0.53984386",
"0.539789",
"0.53867763",
"0.5381561",
"0.5378462",
"0.5373738",
"0.5372354",
"0.5370469",
"0.5368708",
"0.5362929",
"0.5359111",
"0.53543967",
"0.5352791",
"0.53513736",
"0.5344802",
"0.53419644",
"0.53414416",
"0.5332755"
] | 0.0 | -1 |
This method shows how many mines are around the spot that was clicked | static int numAdjMines(int[][] mineBoard, int row, int col) {
int numMines = 0;
for(int dr = -1; dr <= 1; dr ++) {
for(int dc = -1; dc <= 1; dc++) {
if(row + dr >= 0 && row + dr < mineBoard.length &&
col+ dc >= 0 && col + dc < mineBoard[0].length) {
if(mineBoard[row+dr][col+dc] == Mine ||
mineBoard[row+dr][col+dc] == FlaggedMine) {
numMines++;
}
}
}
}
return numMines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getActionPoints(Unit unit);",
"public void increaseCount()\n {\n minesLeft++;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true); //This could only trigger if the player had flagged too many squares,\n }\t\t\t\t\t\t//then went back and removed the erroneous ones.\n }",
"public void countAdjacentMines()\n {\n adjacentMines = 0;\n for (GameSquare square : getAdjacentSquares())\n {\n if (square.mine)\n {\n adjacentMines++;\n }\n }\n }",
"private void addMinigames(){\n Point a = new Point();\n getWindowManager().getDefaultDisplay().getSize(a);\n Log.d(\"XY\", Integer.toString(a.x)+\" \"+Integer.toString(a.y));\n\n\n\n generateMiniGames();\n\n addFlower();\n\n }",
"void raiseNumberOfStonesOnBoard();",
"public void reduceCount()\n {\n minesLeft--;\n repaint();\n if (minesLeft == 0 && minesFound == numMines)\n {\n endGame(true);\n }\n }",
"void calculateSpawnAmount();",
"public MineCounter(int numMines)\n {\n super();\n minesLeft = numMines;\n }",
"public int getNumMineNear() {\r\n\t\treturn numMineNear;\r\n\t}",
"int getNumberOfStonesLeftToPlace();",
"public int getNearbyMines(int i, int j) {\n int numberOfMines = 0;\n\n if (i > 0) { //IF there is space above\n if (game[i-1][j].equals(mine)) { //checks top\n numberOfMines++;\n }\n if (j > 0) {\n if (game[i-1][j-1].equals(mine)) { //checks top left\n numberOfMines++;\n }\n }\n if (j < column-1) {\n if ((game[i-1][j+1].equals(mine))) { //checks top right\n numberOfMines++;\n }\n }\n }\n\n if (i < row-1) { //IF there is space below\n if (game[i+1][j].equals(mine)) { //checks bottom\n numberOfMines++;\n }\n if (j > 0) {\n if (game[i+1][j-1].equals(mine)) { //checks bottom left\n numberOfMines++;\n }\n }\n if (j < column-1) {\n if (game[i+1][j+1].equals(mine)) { //checks bottom right\n numberOfMines++;\n }\n }\n }\n\n if (j > 0) { //IF there is space to the left\n if (game[i][j-1].equals(mine)) { //checks left\n numberOfMines++;\n }\n }\n if (j < column-1) { //IF there is space to the right\n if (game[i][j+1].equals(mine)) {\n numberOfMines++; //checks right\n }\n }\n return numberOfMines;\n }",
"public int getNumMines() {\n return numMines;\n }",
"public int triggerNextMole() {\n // Rehabilita a todos los jugadores para pegar\n for (Player p : players)\n p.setHitDisabled(false);\n // Obtiene la nueva posicion\n molePosition = random.nextInt(MyConstants.MOLES_AREA_SIZE * MyConstants.MOLES_AREA_SIZE);\n return molePosition;\n }",
"public void mouseClicked(){\n int x = mouseX/64;\n int y = mouseY/64;\n boolean placed = Grid.place(x, y, gridPlane, 10, 6, this.turn, this.players, 0);\n if(placed){\n Player prev_player = players.get(this.turn%2);\n players.get(this.turn%2).addNumMoves();\n this.turn+=1;\n while(true){\n if((players.get(this.turn%2).getNumMoves() > 0 && players.get(this.turn%2).getGridsOwned() == 0) || (players.get(this.turn%2).isLost() == true)){\n players.get(this.turn%2).lost();\n this.turn+=1;\n }else{\n break;\n }\n }\n if(players.get(this.turn%2).equals(prev_player)){\n this.finish = true;\n }\n }\n }",
"@Override\n public void paint(Graphics g) {\n if (flagged) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n int fl = fm.stringWidth(\"F\");\n g.setColor(new Color(170, 171, 167));\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n g.setColor(Color.WHITE);\n g.drawString(\"F\", size / 2 - fl / 2, size / 2 + a - h / 2);\n } else if (clicked) {\n //make the mines spots solid red squares\n if (mine) {\n g.setColor(Color.RED);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n } else {\n //if the spot has mines around it print the number in a specific color\n if (!numMines.equals(\"0\")) {\n Font f = new Font(\"Times\", Font.PLAIN, 30);\n g.setFont(f);\n FontMetrics fm = g.getFontMetrics();\n int a = fm.getAscent();\n int h = fm.getHeight();\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n int w = fm.stringWidth(numMines);\n switch (numMines) {\n case \"1\":\n g.setColor(Color.BLACK);\n break;\n case \"2\":\n g.setColor(Color.BLUE);\n break;\n case \"3\":\n g.setColor(Color.RED);\n break;\n case \"4\":\n g.setColor(Color.GREEN);\n break;\n case \"5\":\n g.setColor(Color.ORANGE);\n break;\n case \"6\":\n g.setColor(Color.YELLOW);\n break;\n case \"7\":\n g.setColor(Color.CYAN);\n break;\n case \"8\":\n g.setColor(Color.PINK);\n break;\n default:\n break;\n }\n g.drawString(numMines, size / 2 - w / 2, size / 2 + a - h / 2);\n //if the spot has no mines around it leave it blank\n } else {\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, size, size);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }\n //if the spot was not clicked or flagged print the normal color\n } else {\n g.setColor(new Color(170, 171, 167));\n g.fillRect(1, 1, size - 2, size - 2);\n g.setColor(Color.BLACK);\n g.drawRect(0, 0, size, size);\n }\n }",
"int getMines() {return mines;}",
"public void PointCount(int timeremain)\n\t{\n\n\t\tLog.e(\"Time\",\"\"+timeremain);\n\n\t\tif(timeremain<29 && timeremain>=25)\n\t\t{\n\t\t\tpoints=5;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\t\telse if(timeremain<25 && timeremain>=20)\n\t\t{\n\t\t\tpoints=3;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\n\t\telse if(timeremain<20 && timeremain>=1)\n\t\t{\n\t\t\tpoints=1;\n\t\t\ttxtpoint.setText(\"\" + points);\n\t\t\tdb.AddtoFavorite(new Pojo(allArrayQid[currentPosition], String.valueOf(points),Constant.ADD_LEVEL_IDD));\n\t\t}\n\t}",
"private void placeMines() {\n\t\t Random rand = new Random();\n\t\t if(levelOption == 0) {\n\t\t\t rowCoordinates = new int[10];\n\t\t\t cowCoordinates = new int[10];\n\t\t\t numberOfMines = 10;\n\t\t }\n\t\t else if(levelOption == 1) {\n\t\t\t rowCoordinates = new int[45];\n\t\t\t cowCoordinates = new int[45];\n\t\t\t numberOfMines = 45;\n\t\t }\n\t\t else {\n\t\t\t rowCoordinates = new int[99];\n\t\t\t cowCoordinates = new int[99];\n\t\t\t numberOfMines = 99;\n\t\t }\n\t\t for(int i = 0 ; i < numberOfMines; i++) {\n\t\t\t int randomNumber = rand.nextInt(board[0].length-1)+1;\n\t\t\t int randomNumber2 = rand.nextInt(board[1].length-1)+1;\n\t\t\t rowCoordinates[i] = randomNumber;\n\t\t\t cowCoordinates[i] = randomNumber2;\n\t\t } \n\t\t System.out.println(Arrays.toString(rowCoordinates));\n\t\t System.out.println(Arrays.toString(cowCoordinates));\t \n\t}",
"@Override\n public int howManyActivated(){\n return (gameboardPanel.howManyActivated() + leaderCardsPanel.howManyActivated());\n }",
"public int numMines() {\n\t /*return the total number of mines in the field*/\n return numMines; \n }",
"public abstract int getSpotsNeeded();",
"public void showMazeSize(int size);",
"public int getHitPoints() {\n return this.counter;\n }",
"public void setMines(int mines)\n {\n this.mines = mines;\n }",
"@Override\n public int getRemainingMines() {\n int numPlacedFlags = cells.stream()\n .mapToInt(b -> (int) b.stream().filter(c -> c.getFlagState() == 1).count()).sum();\n return numMines - numPlacedFlags;\n }",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tint clickX = e.getX();\n\t\tint clickY = e.getY();\n\t\tint row = clickX/cellSize;\n\t\tint col = clickY/cellSize;\n\t\tgameLogic.setElement(row, col, 1);\n\t}",
"public void mouseClicked(MouseEvent e) {\n if (playing) {\n Point p = e.getPoint();\n int col = (p.x - pixelTopX) / 30;\n int row = (p.y - pixelTopY) / 30;\n\n if (row >= 0 && col >= 0 && col < boardWidth && row < boardHeight) {\n if (SwingUtilities.isLeftMouseButton(e)) {\n if (isRightPressed) {\n if (minefield[row][col] instanceof SafeGrid) {\n SafeGrid currentGrid = (SafeGrid) minefield[row][col];\n if (checkFlagged(row, col, currentGrid.getSurrounding())) {\n reveal(row, col, true);\n }\n }\n } else {\n reveal(row, col, false);\n }\n\n } else if (SwingUtilities.isRightMouseButton(e)) {\n minesRemaining = minefield[row][col].mark(minesRemaining);\n }\n if (safeRemaining == 0) {\n gameEnd(true);\n }\n }\n repaint();\n }\n }",
"public void actionPerformed ( ActionEvent e) {\n\n\t\t\ti = new Integer(e.getActionCommand().split(\";\")[0]);\n\t\t\tj = new Integer(e.getActionCommand().split(\";\")[1]);\n\n\t\t\tnumPiece = new Integer(terrain[i][j].getActionCommand().split(\";\")[2]);\n\n\t\t\tSystem.out.print(\"Coordonnees: (\" + i + \",\" + j + \")\" );\n\t\t\tSystem.out.println(\"\\tPiece numero: (\" + numPiece + \")\" );\n\n\t\t}",
"public void actionPerformed(ActionEvent e){\n if(e.getSource()==plusButton && nbInitial<5){\n nbInitial++;\n } else if(e.getSource()==minusButton && nbInitial>1){\n nbInitial=nbInitial-1;\n } else if(e.getSource()==launchButton){\n dispose(); // Closes the Title window\n new Window(nbInitial);\n }\n nbPlanetArea.setText(String.valueOf(nbInitial));\n }",
"int getNumberOfStonesOnBoard();",
"private int getMineCount(int row, int column)\n {\n if(mines.contains(new Point(row, column)))\n {\n return -1;\n }\n else\n {\n int mineCount = 0;\n for(int i = -1; i < 2; i++)\n {\n for(int j = -1; j < 2; j++)\n {\n if(row+i < 0 || row+i > this.minesweeperCells.length ||\n column+j < 0 || column+j > this.minesweeperCells.length)\n {\n continue;\n }\n if(mines.contains(new Point(row+i,column+j)))\n {\n mineCount++;\n }\n }\n }\n return mineCount;\n }\n }",
"public void click(int deltaMins){\n map.put(deltaMins,map.getOrDefault(deltaMins,0)+1);\n }",
"int getRemainPoints();",
"public int numberOfBoxesInPile()\n {\n if (aboveBox != null)\n {\n return 1 + aboveBox.numberOfBoxesInPile();\n }\n else\n {\n return 1;\n }\n }",
"public int getNumberOfMoves();",
"private void RedWin() {\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 9; col++) {\n buttons[row][col].setClickable(false);\n }\n }\n redPoints++;\n Toast redWins = Toast.makeText(this, \"Red Wins!\", Toast.LENGTH_SHORT);\n redWins.setGravity(Gravity.TOP, 0, 200);\n redWins.show();\n updatePoints();\n reset();\n }",
"private void exploreMines(int option) {\n\t\tfor(int i = 0; i < numberOfMines; i++) {\n\t\t\tboard[rowCoordinates[i]][cowCoordinates[i]] = \"*\";\n\t\t}\n\t\toutputBoard();\n\t\tif(option == 1) {\n\t\t\tSystem.out.println(\"YOU LOSE!\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"YOU WIN!\");\n\t\t}\n\t}",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"public int getPoints(){\r\n\t\treturn this.points;\r\n\t}",
"int getSlotsCount();",
"public int distBonus(){\n Player currentplayer = state.getCurrentPlayer();\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n ArrayList<GameObject> listObjectsOnCurrentCell;\n GameObject objectOnCell;\n int distTmp;\n int dist= tabcells.length+tabcells[0].length;\n for(int i=0;i<tabcells.length;i++){\n for(int j=0;j<tabcells[0].length;j++){\n listObjectsOnCurrentCell = tabcells[i][j].getGameObjects();\n for(GameObject object: listObjectsOnCurrentCell){\n if(object instanceof Bonus || object instanceof BonusWall){\n distTmp = manhattan(object,currentplayer);\n if(distTmp<dist){\n dist = distTmp;\n }\n }\n }\n }\n }\n return dist;\n }",
"public void incrementNumMoves() {\n\t\tthis.moveMade = true;\n\t\tthis.numMoves++;\n\t}",
"public int getPoints();",
"public void onMouseClicked(Posn pos) {\r\n if (this.worklist.size() == 0) {\r\n if (this.currTurn < this.maxTurn) {\r\n if ((pos.x >= 100 && pos.x <= 100 + Cnst.boardWidth)\r\n && (pos.y >= 200 && pos.y <= 200 + Cnst.boardHeight)) {\r\n int x = (pos.x - 100) * this.blocks / Cnst.boardWidth;\r\n int y = (pos.y - 200) * this.blocks / Cnst.boardHeight;\r\n ACell chosenCell = this.indexHelp(x, y);\r\n ACell topLeft = this.indexHelp(0, 0);\r\n chosenCell.clickHelp(this, topLeft);\r\n }\r\n }\r\n }\r\n }",
"public int getSpins() {\n return spinsLeft;\n }",
"int getHitpoints(Unit unit);",
"public int getMines()\n {\n return mines;\n }",
"public int getEatPoints() {\n return localEatPoints;\n }",
"int numOfPillars() {\n // there are one more coordinate line than blocks in each direction\n // since each block must be hinged on a coordinate line on each side\n return (ni+1) * (nj+1);\n }",
"@Override\r\n\tpublic final void calculateSpawnAmount() {\r\n\t\tthis.spawnsRequired = 0;\r\n\t\tfor (final Genome genome : this.members) {\r\n\t\t\tthis.spawnsRequired += genome.getAmountToSpawn();\r\n\t\t}\r\n\r\n\t}",
"final public int getPoints() {\r\n\t\tif (wildcard) {\r\n\t\t\treturn 20;\r\n\t\t}\r\n\t\t\r\n\t\tif (isJoker()) {\t\t\t\r\n\t\t\treturn 50;\r\n\t\t}\r\n\t\t\r\n\t\treturn face;\r\n\t}",
"public int getNumMinesLeft() {\n return numMinesLeft;\n }",
"public int moves() {\n return moveMin;\n }",
"public int getPoints() {\r\n\t\treturn levelManager.getPoints();\r\n\t}",
"public void increaseEntered() {\n numTimesEntered++;\n }",
"public int numAdjacentMines(int row, int col) {\n\t /*create a integer variable*/\n\t int adjacent = 0;\n\t /*count how many mines are there surrounding the square*/\n\t\tfor(int i = row-1; i < row+2; i++) {\n\t\t\tfor(int j = col-1; j < col+2; j++) {\n\t\t\t\tif(inRange(i, j)) {\n\t\t\t\t\t/*skip the loop if the location is the square itself*/\n\t\t\t\t\tif(i==row && j ==col) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t/*when detect mine, adjacent plus 1*/\n\t\t\t\t\t\tif(hasMine(i, j)) {\n\t\t\t\t\t\t\tadjacent++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t/*return the number of adjacent mines*/\n\t\treturn adjacent;\n }",
"int getPointsCount();",
"private int totalBeginning(int row, int col) { //function that determines number of moves\n int count = 0;\n for (int i = 0; i < OPTIONS.length; i += 2) {\n int newRow = row + OPTIONS[i];\n int newCol = col + OPTIONS[i + 1];\n if (newRow >= 0 && newRow < rows && newCol >= 0 && newCol < cols) {\n count++;\n }\n }\n return count;\n }",
"int getUsedPoints();",
"int getUsedPoints();",
"int getUsedPoints();",
"private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }",
"public int getPoints() {\n return this.difficulty;\n }",
"public Difficulty(int xAxis, int yAxis, int numOfMines) {\r\n\t\tthis.xAxis = xAxis;\r\n\t\tthis.yAxis = yAxis;\r\n\t\tthis.numOfMines = numOfMines;\r\n\t}",
"public int jetMenu() {\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tfor (; index < jets.size(); index++) {\n\t\t\tSystem.out.println(\" \" + (index + 1) + \" : \" + jets.get(index).toString() );\n\t\t}\n\t\t\n\t\treturn index + 1;\n\t}",
"private Integer getMines(Integer xOpen, Integer yOpen){\n int counter=0;\r\n // System.out.println(\"getMines() [\"+xOpen+\"][\"+yOpen+\"]\");\r\n for(int i=xOpen-1; i<=(xOpen+1) ; i++){\r\n for(int j=yOpen-1; j<=(yOpen+1) ; j++){\r\n if(isValidCell(i,j) && grid[i][j].isMine()){ //split y && le quite uno\r\n counter++; //solo un operador and \r\n }\r\n }\r\n }\r\n// System.out.println(\" getMines().result = \"+counter);\r\n return counter; //contador de minas, el mismo no puede ser una mina \r\n }",
"public int points() {\n\t\treturn cards[0].points() + cards[1].points() + cards[2].points();\n\t}",
"private int getNumberOfBoxesOfAllShips() {\r\n int count = 30;\r\n return count;\r\n }",
"private int findNumOpenSpots(Point p) {\n boolean[][] visited = new boolean[17][17];\n Queue<Point> queue = new LinkedList<Point>();\n queue.add(p);\n\n int numEmpty = 0;\n while (!queue.isEmpty()) {\n Point cp = queue.poll();\n if (gameState[cp.x][cp.y] == States.EMPTY && !visited[cp.x][cp.y]) {\n numEmpty++;\n visited[cp.x][cp.y] = true;\n\n if (cp.x - 1 > 0) {\n queue.add(new Point(cp.x - 1, cp.y));\n }\n if (cp.x + 1 < 16) {\n queue.add(new Point(cp.x + 1, cp.y));\n }\n if (cp.y - 1 > 0) {\n queue.add(new Point(cp.x, cp.y - 1));\n }\n if (cp.y + 1 < 16) {\n queue.add(new Point(cp.x, cp.y + 1));\n }\n }\n }\n return numEmpty;\n }",
"public int getPoints() { return points; }",
"@Override\n public int getNumNeighboringMines(int row, int col) {\n int count = 0, rowStart = Math.max(row - 1, 0), rowFinish = Math.min(row + 1, grid.length - 1), colStart = Math.max(col - 1, 0), colFinish = Math.min(col + 1, grid[0].length - 1);\n\n for (int curRow = rowStart; curRow <= rowFinish; curRow++) {\n for (int curCol = colStart; curCol <= colFinish; curCol++) {\n if (grid[curRow][curCol].getType() == Tile.MINE) count++;\n }\n }\n return count;\n }",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tint po=0;\n\t\t\n\t\tif(pos<=5)\n\t\t{\n\t\t\tplayer=false;\n\t\t}\n\t\tint i=pos+1;\n\t\tint amount= scores.get(pos);\n\t\tboolean t= true;\n\t\tif(pos==0)\n\t\t{\n\t\t\ti=6;\n\t\t\tif(player==false)\n\t\t\t{\n\t\t\t\tamount--;\n\t\t\t\tif(amount>0)\n\t\t\t\t{\n\t\t\t\t\tboard.add1();\n\t\t\t\t\tcontainer.setIcon(board);\n\t\t\t\t\tcontainer.repaint();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(pos==11)\n\t\t{\n\t\t\ti=5;\n\t\t\tt=false;\n\t\t\tif(player==true)\n\t\t\t{\n\t\t\t\tamount--;\n\t\t\t\tif(amount>0)\n\t\t\t\t{\n\t\t\t\t\tboard.add2();\n\t\t\t\t\tcontainer.setIcon(board);\n\t\t\t\t\tcontainer.repaint();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(pos<=5)\n\t\t{\n\t\t\tt=false;\n\t\t\ti=pos-1;\n\t\t}\n\t\tthis.move(pos);\n\t\twhile(amount>0)\n\t\t{\n\t\t\t pitList.get(i).add();\n\t\t\t labelList.get(i).setIcon(pitList.get(i));\n\t\t pits.add(labelList.get(i));\n\t\t labelList.get(i).repaint();\n\t\t scores.set(i,scores.get(i)+1);\n\t\t \n\t\t\tif(i==11)\n\t\t\t{\n\t\t\t\ti=6;\n\t\t\t\tt=false;\n\t\t\t\tif(player==true)\n\t\t\t\t{\n\t\t\t\t\tamount--;\n\t\t\t\t\tif(amount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tboard.add2();\n\t\t\t\t\t\tcontainer.setIcon(board);\n\t\t\t\t\t\tcontainer.repaint();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i==0)\n\t\t\t{\n\t\t\t\ti=5;\n\t\t\t\tt=true;\n\t\t\t\tif(player==false)\n\t\t\t\t{\n\t\t\t\t\tamount--;\n\t\t\t\t\tif(amount>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tboard.add1();\n\t\t\t\t\t\tcontainer.setIcon(board);\n\t\t\t\t\t\tcontainer.repaint();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(t==true)\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ti--;\n\t\t\t}\n\t\t\tamount--;\n\t\t}\n\t\tfor(int f=0;f<12;f++)\n\t\t{\n\t\t\tif(scores.get(f)==0)\n\t\t\t{\n\t\t\t\tpo++;\n\t\t\t}\n\t\t\tif(po==12)\n\t\t\t{\n\t\t\t\tif(board.possible.size()>board.possible2.size())\n\t\t\t\t{\n\t\t\t\t\tJFrame pop = new JFrame();\n\t\t\t\t\tpop.add(new JTextField(\"Player B WON!!!!!\"));\n\t\t\t\t\tpop.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t\t pop.pack();\n\t\t\t pop.setVisible(true);\n\t\t\t main.setBackground(Color.GREEN);\n\t\t\t return;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJFrame pop = new JFrame();\n\t\t\t\t\tpop.add(new JTextField(\"Player A WON!!!!!\"));\n\t\t\t\t\tpop.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n\t\t\t pop.pack();\n\t\t\t pop.setVisible(true);\n\t\t\t main.setBackground(Color.red);\n\t\t\t return;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"public int nbEnemiesAlive(){\n return state.getPlayers().size()-1;\n }",
"private int clickOnWaypoint(int a_x, int a_y)\n {\n Vector2d click = new Vector2d(a_x,a_y);\n int drawRadius = Ship.SHIP_RADIUS * Waypoint.RADIUS;\n for(int i = 0; i < m_waypoints.size(); ++i)\n {\n Vector2d v = m_waypoints.get(i);\n if(click.dist(v) < drawRadius * 0.5)\n {\n return i;\n }\n\n }\n return -1;\n }",
"public int getActionPoints() {\n\t\treturn actionPoints;\n\t}",
"public void incrMine() {\r\n\t\tthis.mineCount++;\r\n\t}",
"@Override\n\tpublic void mousePressed(MouseEvent e) {\n\t\tint[] position = new int[2];\n\t\tposition = db.MovableHumanPiecePosition(p);\n\t\t\n\t\t// show possible moves of the selected piece in the board\n\t\tif(position[0] < 6){\n\t\t\ttry{\n\t\t\t\tif(db.isPlayed() == false){\n\t\t\t\t\tdb.displayPossibleMoveSquare(position);\n\t\t\t}\n\t\t\t}catch(Exception e1){\n\t\t\t\te1.toString();\n\t\t\t}\n\t\t}\t\n\t\t\n\t}",
"public int getNumFaceDown(){\n int faceDown = 0;\n for(int i = 0; i < pilePlace; i++){\n if(pile[i].getFace() == \"Down\"){\n faceDown++;\n }\n }\n return faceDown;\n }",
"public int getPoints()\n {\n return (10000 - this.points);\n }",
"void increaseStarsBy(final int amount);",
"void object_on_eyes_level_calc(){\n down_angle=Math.abs(down_angle);\n up_angle=Math.abs(up_angle);\n angle_with_ground=90-angle_with_ground;\n distance_from_object=human_length*Math.tan(Math.toRadians(angle_with_ground));\n double part_down=distance_from_object*Math.tan(Math.toRadians(down_angle));\n double part_up=distance_from_object*Math.tan(Math.toRadians(up_angle));\n length_of_object=part_down+part_up;\n object_height_from_ground=human_length-part_down;\n ORI.setText(\"length_of_object :\\n\" +String.valueOf(String.format(\"%.2f\",(length_of_object/100)))\n +\" M\"+ \"\\n\" + \"distance_from_object :\\n\" + String.valueOf(String.format(\"%.2f\",(distance_from_object/100)))+\n \" M\" + \"\\n\"+\"height_from_ground :\\n\" + String.valueOf(String.format(\"%.2f\",(object_height_from_ground/100)))+\" M\");\n ORI.setVisibility(View.VISIBLE);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n bonus.add(new Rectangle((int)((Math.random()*500)/10)*10,(int)((Math.random()*400)/10)*10,10,10));\n repaint();\n }",
"int getPoints();",
"public int getPoints(){\n\t\t//add the player socres(including monster killing, powerUp points and winning points\n\t\tint points = this.player.getScore() + 200*this.player.getHealth();\n\t\t\n\t\t//since the better the less time used, we use 600 seconds to minus the total seconds being used\n\t\t//and add it to the points\n\t\t//600 seconds is 10 minutes, which is definity long enough\n\t\t//if exceeds 10 minutes, we will subtract total score\n\t\tif(this.player.win()){\t//only if the player wins will we calculate the time\n\t\t\tpoints += (int)(3600 - (this.time / 1000000000));\n\t\t}\n\t\t\n\t\tthis.totalLabel.setText(String.valueOf(points));\t//set the value of the JLabel\n\t\t\n\t\treturn points;\n\t\t\n\t}",
"public void click(int row, int col) {\n if(mineBoard[row][col] == Mine) {\n buttons[row][col].setText(Character.toString(getUserChar(mineBoard[row][col])));\n lose();\n } else {\n score += 1;\n updatescore();\n buttons[row][col].setText(\"\" + numAdjMines(mineBoard, row, col));\n mineBoard[row][col] = UncoveredEmpty;\n //buttons[row][col].setText(Character.toString(getUserChar(mineBoard[row][col])));\n if(numAdjMines(mineBoard, row, col) == Empty) {\n for(int dr = -1; dr <= 1; dr ++) {\n for(int dc = -1; dc <= 1; dc++) {\n if(row+dr >= 1 && row+dr < 10 &&\n col+dc >= 1 && col+dc < 10) {\n if(mineBoard[row+dr][col+dc] == Empty) {\n click(row+dr,col+dc);\n }\n }\n }\n }\n }\n }\n }",
"public int getPublicVictoryPoints() {\n \t\tint points = towns + 2 * cities;\n \n \t\tif (board.hasLongestRoad(this))\n \t\t\tpoints += 2;\n \n \t\tif (board.hasLargestArmy(this))\n \t\t\tpoints += 2;\n \n \t\treturn points;\n \t}",
"public int getMazeSize() \r\n\t{\r\n\t\treturn this.size;\r\n\t}",
"public int getHitPoints() {\n return hitPoints;\n }",
"public int getPoints() {\n return this.points;\n }",
"int getNeedPoints();",
"public int getNumNotHit()\n {\n return shipCoordinates.size() - hitCoordinates.size();\n }",
"public final int getHitPoints () {\n return this.currentHitPoints;\n }",
"public NatsMinesweeper(int height, int width, int numMines)\n {\n //Create and set up the window.\n super(\"Nat's Minesweeper\");\n setSize(2*MARGIN_SIZE + width*SQUARE_SIZE, \n \tTITLE_BAR_HEIGHT + 3*MARGIN_SIZE + H + height*SQUARE_SIZE);\n setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n setResizable(false);\n gameWon = false;\n gameLost = false;\n \t\n \t//Create and set up a blank panel to fill the window, on which all other panels will be placed.\n JPanel panel = new JPanel();\n panel.setSize(getWidth(), getHeight());\n panel.setBackground(Color.WHITE);\n panel.setLayout(null);\n add(panel);\n \n \t//Create and set up a MineCounter in the top left of the window to keep track of the mines left.\n this.numMines = numMines;\n minesFound = 0;\n mineCounter = new MineCounter(numMines);\n panel.add(mineCounter);\n mineCounter.setLocation(MARGIN_SIZE, MARGIN_SIZE);\n \n \t//Create and set up a TimerDisplay in the top right of the window to display the elapsed time.\n timerDisplay = new TimerDisplay();\n panel.add(timerDisplay);\n timerDisplay.setLocation(panel.getWidth() - MARGIN_SIZE - W, MARGIN_SIZE);\n \n \t//Create and set up a ResetButton to reset the game.\n resetButton = new ResetButton();\n panel.add(resetButton);\n resetButton.setLocation(panel.getWidth()/2 - H/2, MARGIN_SIZE);\n \n \t//Create a board panel to hold all the game squares in a grid pattern, \n \t//then fill the board (and grid) with GameSquares.\n JPanel board = new JPanel(new GridLayout(height, width));\n board.setSize(width*SQUARE_SIZE, height*SQUARE_SIZE);\n panel.add(board);\n board.setLocation(MARGIN_SIZE, H + 2*MARGIN_SIZE);\n grid = new GameSquare[height][width];\n for (int r = 0; r < height; r++)\n {\n for (int c = 0; c < width; c++)\n {\n grid[r][c] = new GameSquare(r, c);\n board.add(grid[r][c]);\n }\n }\n \n setVisible(true); //Finally, display the window, allowing the game to begin.\n }",
"@Override\n public void actionPerformed(ActionEvent e)\n {\n xPos += movementX;\n yPos += movementY;\n\n if (xPos < 0) {\n xPos = 0;\n } else if (xPos + squareSize > xBound) {\n xPos = xBound - squareSize;\n }\n if (yPos < 0) {\n yPos = 0;\n } else if (yPos + squareSize > yBound) {\n yPos = yBound - squareSize;\n }\n\n // Redraw the square when something happens\n repaint();\n }",
"public void actionPerformed(ActionEvent event) {\n\n\t\t\tfor (Point spot : pointList) { // assigns a random X&Y values\n\n\t\t\t\tspot.x += randomXY[pointList.indexOf(spot)][0];\n\t\t\t\tspot.y += randomXY[pointList.indexOf(spot)][1];\n\n\t\t\t\tif (spot.x <= 0 + SIZE || spot.x >= WIDTH - SIZE)\n\t\t\t\t\trandomXY[pointList.indexOf(spot)][0] *= -1; // Boundary Checker\n\n\t\t\t\tif (spot.y <= 0 + SIZE || spot.y >= HEIGHT - (SIZE + dotSpeedPanel.getHeight()))\n\t\t\t\t\trandomXY[pointList.indexOf(spot)][1] *= -1;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * \n\t\t\t\t * if(spot.x > WIDTH || spot.y > HEIGHT || spot.x < -5 || spot.y < -5)\n\t\t\t\t * spot.setLocation(HEIGHT/2, WIDTH/2);\n\t\t\t\t * \n\t\t\t\t */\n\n\n\t\t\t\trepaint();\n\t\t\t}\n\t\t}",
"public void mousePressed(MouseEvent e) {\n xinitial = e.getX() / 5; //get the x value\r\n yinitial = e.getY() / 5; //get the y value\r\n }",
"@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }",
"public int[][] getPlotNumbers(int[][] point, int numberOfMines, int numberOfColumns,\n int numberOfRows) {\n int mineNumber = 1;\n while (mineNumber <= numberOfMines) {\n int columnNumber = mine[mineNumber][1];\n int rowNumber = mine[mineNumber][2];\n\n if (columnNumber == 1 && rowNumber == 1) { // top left corner\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && (rowNumber != 1 && rowNumber != numberOfRows)) { // left edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == 1 && rowNumber == numberOfRows) { // bottom left corner\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && rowNumber == 1) {\n // top edge\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == 1) { // top right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && (rowNumber != 1 && rowNumber != numberOfRows)) {\n // right edge\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n } else if (columnNumber == numberOfColumns && rowNumber == numberOfRows) {\n // bottom right corner\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && rowNumber == numberOfRows) {\n // bottom edge\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n } else if ((columnNumber != 1 && columnNumber != numberOfColumns)\n && (rowNumber != 1 && rowNumber != numberOfRows)) { // not on the edge or corner\n if (point[columnNumber - 1][rowNumber - 1] != 9) {\n point[columnNumber - 1][rowNumber - 1]++;\n }\n if (point[columnNumber][rowNumber - 1] != 9) {\n point[columnNumber][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber - 1] != 9) {\n point[columnNumber + 1][rowNumber - 1]++;\n }\n if (point[columnNumber + 1][rowNumber] != 9) {\n point[columnNumber + 1][rowNumber]++;\n }\n if (point[columnNumber + 1][rowNumber + 1] != 9) {\n point[columnNumber + 1][rowNumber + 1]++;\n }\n if (point[columnNumber][rowNumber + 1] != 9) {\n point[columnNumber][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber + 1] != 9) {\n point[columnNumber - 1][rowNumber + 1]++;\n }\n if (point[columnNumber - 1][rowNumber] != 9) {\n point[columnNumber - 1][rowNumber]++;\n }\n }\n mineNumber++;\n }\n return point;\n }",
"public GameSquare(int r, int c)\n {\n super();\n setBorder(BorderFactory.createLineBorder(Color.BLACK));\n adjacentMines = 0;\n mine = false;\n revealed = false;\n flagged = false;\n this.row = r;\n this.col = c;\n addMouseListener(\n new MouseAdapter() //Yet another anonymous class, extending MouseAdapter, created in line here.\n {\n public void mousePressed(MouseEvent e) //Called whenever this square is clicked on.\n {\n if (gameWon || gameLost) {return;} //Clicking squares does nothing if the game is over.\n if (revealed) //Double clicking a revealed square, if it is already touching the correct\n {\t\t\t\t //number of flags, will reveal everything else around it.\n if (e.getClickCount() >= 2 && countAdjacentFlags() == adjacentMines)\n {\n for (GameSquare square : getAdjacentSquares())\n {\n square.reveal();\n }\n }\n }\n else if (e.isControlDown() || SwingUtilities.isRightMouseButton(e)) //right click\n {\n if (numRevealed == 0) {return;} //Game has not begun yet.\n flagged = !flagged;\n if (flagged) //just placed a flag\n {\n if (mine)\n {\t\n minesFound++;\n }\n mineCounter.reduceCount();\n }\n else //just removed a flag\n {\n if (mine)\n {\n minesFound--;\n }\n mineCounter.increaseCount();\n }\n repaint();\n }\n else //left click\n {\n if (numRevealed == 0) //The game begins here.\n {\n ArrayList<Integer> squares = new ArrayList<Integer>();\n for (int ii = 0; ii < grid.length * grid[0].length; ii++)\n {\n squares.add(ii); //This list contains an integer representing each square in the board.\n }\n squares.remove(row * grid[0].length + col); //This protects the first click from being a mine.\n for (int ii = 0; ii < numMines; ii++)\n {\n\t\t\t\t\t\t\t\t\t\t//Randomly select a mine, numMines times.\n Integer choice = squares.remove((int) (squares.size() * Math.random()));\n grid[choice / grid[0].length][choice % grid[0].length].setMine();\n }\n for (Integer notMine : squares)\n {\n\t\t\t\t\t\t\t\t\t\t//All non-mines must know how many mines they are touching.\n grid[notMine / grid[0].length][notMine % grid[0].length].countAdjacentMines();\n }\n countAdjacentMines(); //Including the one originally clicked.\n timerDisplay.start();\n }\n if (!flagged)\n {\n reveal();\n }\n }\n }\n });\t\t\t\t\n }",
"private int getIdx(MouseEvent e) {\n Point p = e.getPoint();\n p.translate(-BORDER_SIZE, -BORDER_SIZE);\n int x = p.x / CELL_SIZE;\n int y = p.y / CELL_SIZE;\n if (0 <= x && x < GUI.SIZE[1] && 0 <= y && y < GUI.SIZE[1]) {\n return GUI.SIZE[1] * x + y;\n } else {\n return -1;\n }\n }",
"public static void setCoordinates(JButton currentButton, int numPlayers, JButton tile[][] ) {\n\t\t if(currentButton.getIcon()==Player1.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t //System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i; \n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player1.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 1's \" + Player1.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[0].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[1].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[2].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[3].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(currentButton.getIcon()==Player2.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 2's \" + Player2.playersTeam.teamPieces[4].name);\n\t\t\t for (int i=0; i<tile.length; i++) {\n \t\t\t for(int j=0; j<tile[i].length; j++) {\n \t\t\t\t if (currentButton == tile[i][j]) {\n \t\t\t\t\t pieceYCoord = i;\n \t\t\t\t\t pieceXCoord = j;\n \t\t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n \t\t\t\t }\n \t\t\t }\n \t\t }\n\t\t }\n\t\t if(numPlayers==4) {\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[0].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[1].name);\n\t\t\t \tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player3.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 3's \" + Player3.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[0]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[0].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[1]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[1].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[2]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[2].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[3]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[3].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t }\n\t\t\t if(currentButton.getIcon()==Player4.PieceImages[4]) {\n\t\t\t //System.out.println(\"This is player 4's \" + Player4.playersTeam.teamPieces[4].name);\n\t\t\t\tfor (int i=0; i<tile.length; i++) {\n\t\t\t \t\tfor(int j=0; j<tile[i].length; j++) {\n\t\t\t \t\t\tif (currentButton == tile[i][j]) {\n\t\t\t \t\t\t\tpieceYCoord = i;\n\t\t\t \t\t\t\tpieceXCoord = j;\n\t\t\t \t\t\t\t//System.out.println(pieceYCoord + \"\" + pieceXCoord);\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 }\n\n\t}"
] | [
"0.6463989",
"0.64267135",
"0.6219371",
"0.60139334",
"0.598323",
"0.5974006",
"0.58612895",
"0.5821764",
"0.57561255",
"0.5751025",
"0.57299674",
"0.57266057",
"0.56794137",
"0.5658314",
"0.56559396",
"0.56380516",
"0.56352806",
"0.56158507",
"0.5584912",
"0.55830157",
"0.5582895",
"0.55511564",
"0.55229735",
"0.5514906",
"0.5509107",
"0.54920894",
"0.5473097",
"0.5468871",
"0.5468712",
"0.5447364",
"0.54315096",
"0.5426017",
"0.5423369",
"0.5416028",
"0.5387351",
"0.5383113",
"0.53753793",
"0.5367383",
"0.5367383",
"0.5365615",
"0.53643644",
"0.53620744",
"0.536192",
"0.5355011",
"0.5343981",
"0.53423953",
"0.534237",
"0.53384423",
"0.5335787",
"0.53323704",
"0.5329513",
"0.5321068",
"0.53200525",
"0.53184265",
"0.53137106",
"0.53131545",
"0.5312166",
"0.5310846",
"0.53094625",
"0.53094625",
"0.53094625",
"0.53059804",
"0.5302439",
"0.5297196",
"0.52920336",
"0.52913475",
"0.52832973",
"0.5282924",
"0.52797765",
"0.5273886",
"0.52673835",
"0.5263932",
"0.5261242",
"0.52560437",
"0.5255667",
"0.5255023",
"0.5251556",
"0.5246664",
"0.5240722",
"0.52365595",
"0.5236146",
"0.5228572",
"0.52252954",
"0.52236724",
"0.5220713",
"0.52176297",
"0.5209712",
"0.52088815",
"0.5205792",
"0.52037066",
"0.51966166",
"0.5196578",
"0.51957",
"0.51946676",
"0.5188222",
"0.51762795",
"0.5172674",
"0.5167992",
"0.5164676",
"0.5163971",
"0.516099"
] | 0.0 | -1 |
This method takes in an x and y value and defines what should happen when the user clicks there. | public void click(int row, int col) {
if(mineBoard[row][col] == Mine) {
buttons[row][col].setText(Character.toString(getUserChar(mineBoard[row][col])));
lose();
} else {
score += 1;
updatescore();
buttons[row][col].setText("" + numAdjMines(mineBoard, row, col));
mineBoard[row][col] = UncoveredEmpty;
//buttons[row][col].setText(Character.toString(getUserChar(mineBoard[row][col])));
if(numAdjMines(mineBoard, row, col) == Empty) {
for(int dr = -1; dr <= 1; dr ++) {
for(int dc = -1; dc <= 1; dc++) {
if(row+dr >= 1 && row+dr < 10 &&
col+dc >= 1 && col+dc < 10) {
if(mineBoard[row+dr][col+dc] == Empty) {
click(row+dr,col+dc);
}
}
}
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void click(int x, int y)\n {\n\n if(!clicked)\n {\n if(game.setFirstClickCords(x/50,y/50))\n clicked = true;\n }\n else\n {\n game.move(x/50,y/50);\n clicked = false;\n \n }\n \n repaint();\n }",
"@Override\n public void clicked(InputEvent e, float x, float y) {\n }",
"void mouseClicked(double x, double y, MouseEvent e );",
"public void mouseClicked(int mouseX, int mouseY, int mouse) {}",
"protected void handleClickEvent(int x, int y) {\n // empty on purpose\n }",
"@Override\n public void onClick(int x, int y)\n {\n }",
"public void mouseClicked(int ex, int ey, int button) {\r\n\t}",
"public void select(int _x, int _y){\n\t\tselect();\n\t\t\n\t\txClicked = _x - x;\n\t\tyClicked = _y - y;\n\t}",
"Point userClickPoint();",
"void click(int x, int y, Keys... modifiers);",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(this.chance==1)\r\n\t\t{\r\n\t\t\tmouseX = arg0.getX();\r\n\t\t\tmouseY= arg0.getY();\r\n\t\t\tclick=1;\r\n\t\t}\r\n\t}",
"public void mouseClicked() {\n\t\tswitch(screen) {\n\t\t\n\t\t// Pantalla Home\n\t\tcase 0:\n\t\t\tif((mouseX > 529 && mouseY > 691) && (mouseX < 966 & mouseY < 867)) {\n\t\t\t\t//si hace click adentro del boton de jugar\n\t\t\t\tscreen = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t// Pantalla Instrucciones\n\t\tcase 1:\n\t\t\t//si hace click adentro de la pantalla\n\t\t\tscreen = 2;\n\t\t\tbreak;\n\t\t}\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 }",
"void mousePressed(double x, double y, MouseEvent e );",
"void onMouseClicked(MouseEventContext mouseEvent);",
"@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 }",
"@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tif(secondClick == false) {\n\t\t\tx1 = arg0.getX();\n\t\t\ty1 = arg0.getY();\n\t\t\tsecondClick = true;\n\t\t}else {\n\t\t\tx2 = arg0.getX();\n\t\t\ty2 = arg0.getY();\n\t\t\tsecondClick = false;\n\t\t\tboundaryList.add(new Boundary(x1, y1, x2, y2));\n\t\t\trepaint();\n\t\t}\n\t}",
"void mouseClicked(MouseEvent mouseEvent);",
"public void mouseClicked( MouseEvent event ){}",
"public abstract void mouseClicked(MouseEvent e);",
"public void mouseClickPositionSensor(int x, int y)\n\t{\n\t\t\n\t\tsensorActive = true;\n\t\tsensorX_Coordinate = x;\n\t\tsensorY_Coordinate = y;\n\n\t\tupdateCanvas();\n\t}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent e) {}",
"public void mouseClicked(MouseEvent event){}",
"public void handlePress(double x, double y){\n xDistanceFromCorner = x - getX();\n yDistanceFromCorner = y - getY();\n }",
"public void mouseClicked(MouseEvent e) {\n \t\t\r\n \t}",
"public void press(int x, int y, int state);",
"@Override\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tx=e.x;\r\n\t\t\t\ty=e.y;\t\t\t\t\r\n\r\n\t\t\t}",
"@Override\n\tboolean isClicked(double x, double y) {\n\n\t\tif (segment.ptLineDist(x, y) < 10 && segment.ptLineDist(x, y) > -10) {\n\t\t\tthis.setColor(Color.BLUE);\n\t\t\tAssignment.frame.repaint();\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.setColor(Color.BLACK);\n\t\t\tAssignment.frame.repaint();\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"@Override\r\n public void clicked(InputEvent event, float x, float y) {\n\r\n \t\tGameDataInterface gameData = GameDataUtils.getInstance();\r\n \t\t\r\n \t\t/*\r\n \t\t * hardcoded a instance to send to the gameDataInterface\r\n \t\t */\r\n \t\tInstance instance = new Instance();\r\n \t\tinstance.setBoardId(1);\r\n \t\tinstance.setInstanceId(2);\r\n \t\tinstance.setMissionId(1);\r\n \t\tinstance.setTurnId(1);\r\n \t\t\r\n \t\tgameData.loadInstance(game,instance); \r\n \t\tgame.setScreen(game.board);\r\n }",
"public boolean clickedInside( int x, int y ) {\n\t\tif ( x > this.x ) {\n\t\t\tif ( y > this.y ) {\n\t\t\t\tif ( x < ( this.x + this.width ) ) {\n\t\t\t\t\tif ( y < ( this.y + this.height ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }",
"public UIMouseListener doMouse(String action, double x, double y) {\n // System.out.println(action);\n if (action.equals(ACTION[0])) {\n System.out.println(x + \"\\t\" + y);\n UI.println(x + \"\\t\" + y);\n double correctX = x - GRAPH_LEFT;\n double correctY = ZERO_LINE - y;\n\n UI.println(\"CorreXY:\" + correctX + \"\\t\" + correctY);\n mousePerformed(action, correctX, correctY);\n }\n return null;\n }",
"public void mouseClicked( MouseEvent e )\n {\n x = e.getX(); y = e.getY();\n System.out.println(\"click at x=\"+x+\" y=\"+y);\n repaint();\n }",
"@Override\n\tpublic void mouseClicked(int arg0, int arg1, int arg2, int arg3) {\n\n\t}",
"@Override\n public void clicked(int localX, int localY) {\n synchronized (this) {\n if (state == State.CHECKED) {\n state = State.UNCHECKED;\n } else {\n state = State.CHECKED;\n }\n }\n }",
"public void mouseClicked(MouseEvent arg0) {\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\n\t\t}",
"public void mousePressed(MouseEvent evt) {\n Location x = new Location( evt.getX(), evt.getY() );\n pond.checkAxis( x );\n\n }",
"public void mouseClicked (MouseEvent e)\r\n\t{\r\n\t\tx = e.getX ();\r\n\t\ty = e.getY ();\r\n\t\t//Rules screen photo button 'PLAY'\r\n\t\tif ((screen == 0 || screen == 4 || screen == 5) && (x > 250 && x < 320) && (y > 360 && y < 395)){ \r\n\t\t\tscreen = 1;\r\n\t\t\trepaint();\r\n\t\t}\r\n\t\t//Game screen photo button 'Press to Start'\r\n\t\telse if (screen == 1 || screen == 2 || screen == 3){ \r\n\t\t\tif ((x > 10 && x < 180) && (y > 80 && y < 105)) \r\n\t\t\t\tnewGame();\r\n\t\t\tanimateButtons ();\r\n\t\t}\r\n\t\t\r\n\r\n\t}",
"public boolean mouseClicked(gb gui, int mousex, int mousey, int button) {\n/* 233 */ if (button == 0)\n/* 234 */ return transferRect(gui, false); \n/* 235 */ if (button == 1) {\n/* 236 */ return transferRect(gui, true);\n/* */ }\n/* 238 */ return false;\n/* */ }",
"public void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}",
"public boolean mouseClicked(MouseEvent e)\r\n {\r\n double x = e.getX();\r\n double y = e.getY();\r\n \r\n //find if coordinates are in a \"button\"\r\n for (int i = 0; i < towerButtons.length; i++)\r\n {\r\n if (towerButtons[i].contains(x,y))\r\n {\r\n display.setUnit(dummyList.get(i));\r\n selectedIndex = i;\r\n }\r\n }\r\n \r\n //within bounds\r\n if ((new Rectangle2D.Double(initX, 0, width, height)).contains(x,y))\r\n return true;\r\n return false;\r\n }",
"public void mouseClicked(MouseEvent e) { \r\n }",
"public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e) \t{\n\t\t\t\t\r\n\t\t\t}",
"public int cellClicked(Board source, int cellX, int cellY);",
"@Override\n\tpublic void mousePressed(MouseEvent arg0) {\n\t\tgraphics.panel.requestFocus();\n\t\tx=arg0.getX();\n\t\ty=arg0.getY();\n\t}",
"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}",
"@Override\npublic void mouseClicked(MouseEvent e)\n{\n\tSystem.out.println(e.getX() + \" :: \" + e.getY());\n}",
"public void mouseClicked(MouseEvent e)\n {}",
"@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 e) {\n\t\t\t\t\n\t\t\t}",
"private int clickOnWaypoint(int a_x, int a_y)\n {\n Vector2d click = new Vector2d(a_x,a_y);\n int drawRadius = Ship.SHIP_RADIUS * Waypoint.RADIUS;\n for(int i = 0; i < m_waypoints.size(); ++i)\n {\n Vector2d v = m_waypoints.get(i);\n if(click.dist(v) < drawRadius * 0.5)\n {\n return i;\n }\n\n }\n return -1;\n }",
"@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}",
"@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}",
"void onViewTap(View view, float x, float y);",
"@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\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\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 abstract void mouseClicked(MouseClickedEvent event);",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"public void mouseClicked(MouseEvent e) {\n\n }",
"public boolean wasClicked(int mouseX, int mouseY) {\n\t\t// If this is the blank piece, we leave immediately\n\t\t// because it can't be swapped\n\t\tif(num == 1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Checks to see if the user's click location is within the \n\t\t// square location of this Piece\n\t\tif(mouseX > x && mouseX < (x + size) && mouseY > y && mouseY < (y + size)) {\n\t\t\treturn true;\n\t\t} \n\t\t\n\t\treturn false;\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\tpunto1.setFilled(true);\n\t\t\t\tpunto1.setColor(Color.red);\n\t\t\t\t\tif(numClicks == 0) {\n\t\t\t\t\t\tadd(punto1, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setStartPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(engorgio1, e.getX(),e.getY());\n\n\t\t\t\t\t}\n\t\t//final\n\t\t\t\t\telse if(numClicks == 1) {\n\t\t\t\t\t\tpunto2.setFilled(true);\n\t\t\t\t\t\tpunto2.setColor(Color.blue);\n\t\t\t\t\t\tadd(punto2, e.getX(),e.getY());\n\t\t\t\t\t\tnumClicks++;\n\t\t\t\t\t\taprox.setEndPoint(e.getX(), e.getY());\n\t\t\t\t\t\tadd(aprox);\n\t\t\t\t\t\tadd(engorgio2, e.getX(),e.getY());\n\t\t\t\t\t}\n\t\t}",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\n\t}",
"@Override\n public void mouseClicked(MouseEvent e) {\n System.out.println(\"MouseClicked\");\n //kwadrat.clicked();\n trojkat.clicked();\n //kolo.clicked();\n //square.clicked();\n }",
"public void mouseClicked(MouseEvent e) {\n\n }",
"@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}",
"public void mouseClicked(MouseEvent evt) {\r\n }",
"public void mouseClicked(MouseEvent e) {\r\n\t}",
"public void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}",
"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 event) { \n\t\t\n\t}",
"@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tint x = e.getX();\n\t\tint y = e.getY();\n\t\tSystem.out.println(x);\n\t\tSystem.out.println(y);\n\t}",
"public void mouseClickInField(int x, int y)\n\t{\n\t\t\n\t\tint xCellCoordinate = (int) Math.floor(x / xPixelCellRatio);\n\t\tint yCellCoordinate = (int) Math.floor(y / yPixelCellRatio);\n\t\t\n\t\tint cellNumber = (yCellCoordinate * ycount) + xCellCoordinate;\n\t\tSystem.out.println(\"zelle nummer:\" + cellNumber);\n\t\t\n\t\tCell cell = field.get(cellNumber);\n\t\tcell.changePressure(1.0);\n\t\t\n\t\tupdateCanvas();\n\t}",
"public void mouseClicked(MouseEvent evt) {\n }",
"public void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}"
] | [
"0.7988782",
"0.78223526",
"0.7778523",
"0.77370405",
"0.76945955",
"0.76595986",
"0.74496514",
"0.73412734",
"0.717095",
"0.71571964",
"0.71099347",
"0.7001471",
"0.6995293",
"0.69870263",
"0.6984565",
"0.6983729",
"0.69614416",
"0.6958368",
"0.6950887",
"0.69405675",
"0.6932952",
"0.6920638",
"0.6920638",
"0.6920638",
"0.6920638",
"0.690746",
"0.69058836",
"0.68697846",
"0.68630326",
"0.68463594",
"0.6834622",
"0.68289644",
"0.68289644",
"0.68289644",
"0.68275636",
"0.6810109",
"0.68064654",
"0.6804973",
"0.6781095",
"0.67764634",
"0.6773523",
"0.67641544",
"0.67346966",
"0.67346966",
"0.67345536",
"0.67310303",
"0.6729839",
"0.6728339",
"0.6728167",
"0.6724798",
"0.67120004",
"0.67120004",
"0.67017794",
"0.66994536",
"0.669476",
"0.66906065",
"0.66905826",
"0.6687395",
"0.66866827",
"0.66866827",
"0.66866827",
"0.66866827",
"0.66866827",
"0.66866827",
"0.66866827",
"0.6686674",
"0.6685175",
"0.66839796",
"0.66839796",
"0.6682752",
"0.6682752",
"0.6673441",
"0.6668744",
"0.6668744",
"0.6668744",
"0.6666176",
"0.6659545",
"0.6651572",
"0.6651243",
"0.6651243",
"0.6651243",
"0.6650247",
"0.6646477",
"0.6635472",
"0.66343486",
"0.66343486",
"0.6633331",
"0.6633331",
"0.66300553",
"0.66278315",
"0.662722",
"0.662493",
"0.66219586",
"0.6617205",
"0.65959644",
"0.65839607",
"0.658344",
"0.65825236",
"0.65815145",
"0.6579253",
"0.6579116"
] | 0.0 | -1 |
a method to update the score, when the score gets to 80 points, you win! | public void updatescore() {
scorelabel.setText("" + score + " points");
if (100 - score <= 10) win();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }",
"public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}",
"public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }",
"public void updateScore(int score){ bot.updateScore(score); }",
"public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }",
"public static void incrementScore() {\n\t\tscore++;\n\t}",
"private void updateHighscore() {\n if(getScore() > highscore)\n highscore = getScore();\n }",
"@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }",
"public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}",
"public void updateScore(){\n scoreChange++;\n if(scoreChange % 2 == 0){\n if(score_val < 999999999)\n score_val += 1;\n if(score_val > 999999999)\n score_val = 999999999;\n score.setText(\"Score:\" + String.format(\"%09d\", score_val));\n if(scoreChange == 10000)\n scoreChange = 0;\n }\n }",
"private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }",
"public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }",
"public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"@Override\npublic void update(int score) {\n\t\n}",
"@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}",
"public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }",
"public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}",
"private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}",
"public void addScore()\n {\n score += 1;\n }",
"public void setBonusScore() {\r\n count = count+50;\r\n }",
"public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}",
"public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}",
"void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }",
"public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}",
"public void updateScore(Player player, Piece piece, Move move) {\n var newScore = player.getScore();\n newScore += Math.abs(move.getSource().x() - move.getDestination().x());\n newScore += Math.abs(move.getSource().y() - move.getDestination().y());\n player.setScore(newScore);\n System.out.println(\"score \" + newScore);\n }",
"private void updateHighScore() {\n\t\tif (pacman.getCurrentCell().getContainsFood() == true) {\n\t\t\tpacman.getCurrentCell().setContainsFood(false);\n\t\t\thighScore.update(10);\n\t\t}\n\t\tif (highScore.getScore() / 2440 == actualLevel) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tinitNewLevel();\n\t\t\t++actualLevel;\n\t\t}\n\t}",
"public synchronized void setScore(Integer score) {\n this.score += score;\n }",
"public void setScore(int score) { this.score = score; }",
"public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }",
"public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }",
"public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }",
"public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }",
"public void setScore(int score) {this.score = score;}",
"public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }",
"public void awardPoints(int points)\n {\n score += points ;\n }",
"void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }",
"public void setScore (int newScore)\n {\n this.score = newScore;\n }",
"public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}",
"void addPointsToScore(int points) {\n score += points;\n }",
"private void updateScore(double distance){\n\t\tint baseScore = 100 * difficulty;\n\t\tdouble distanceMultiplier = 1 + (distance / 370.0);\n\t\tdouble fastModeMultiplier = (fastMode)?1.99 + (currentLevel/100.0):1;\n\t\tdouble streakMultiplier = 1 + (streak/20.0);\n\t\tSystem.out.println(\"Total multiplier: \" + (distanceMultiplier * fastModeMultiplier * streakMultiplier));\n\t\tscore += baseScore * distanceMultiplier * fastModeMultiplier * streakMultiplier;\n\t\tstreak++;\n\n\t}",
"void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }",
"private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }",
"public void addOneToScore() {\r\n score++;\r\n }",
"private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }",
"public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }",
"public void addScore(int score) {\n currentScore += score;\n }",
"public void updateScore() {\n\t\tif (pellet.overlapsWith(avatar)) {\n\t\t\tavatar.addScore(1);\n\t\t\tpellet.removePellet(avatar.getLocation());\n\t\t\tSystem.out.println(\"collected pellet\");\n\t\t}\n\t}",
"private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }",
"private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }",
"private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }",
"public void addPoints(int earnedPoints) {score = score + earnedPoints;}",
"@Override\n\tpublic void checkScore() {\n\t\t\n\t}",
"@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}",
"public void setScore(double score) {\r\n this.score = score;\r\n }",
"public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }",
"public static void adjustScoreIncrement() {\n\t\tint extraPoints = 0;\n\t\tif (!Snake.warpWallOn) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Block.blocksOn) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Snake.snakeGrowsQuickly) {\n\t\t\textraPoints++;\n\t\t}\n\t\tif (Snake.snakeGrowsReallyQuickly) {\n\t\t\textraPoints+=3;\n\t\t}\n\t\t// increment equals all the bonuses, starting at a minimum of 1. This decreases if user switches to easier modes. Bigness and Fastness are reduced by 1 each here to keep the amount of increase down; it could be pumped up for a really high-scoring game\n\t\tincrement = extraPoints + SnakeGame.getBigness()-1 + SnakeGame.getFastness()-1 + Snake.snakeSize/10 ;\n\t}",
"public void updateScore(double d) {\n\t\tscore+=d;\t\n\t}",
"public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}",
"public void addToScore(int score)\n {\n this.score += score;\n }",
"public void setScore(int score)\n {\n this.score = score;\n }",
"void setScore(long score);",
"public void incrementScore(int increment) {\n score = score + increment;\n }",
"public void updateGame() \n\t{\n\t\tif (bet <= credit && bet <=500) // Verify that the bet is valid. \n\t\t{\n\t\t\tcredit = credit - bet; // Decrement the credit by the amount bet\n\t\t\tgamesPlayed++;\n\t\t\tif (ourWin == \"Royal Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\t\t\t\t//Increment the amount of games won\n\t\t\t\tcurrentWin = 250 *bet; // Determine the current win\n\t\t\t\tcredit+= currentWin;\t// Add the winnings to the player's credit\n\t\t\t\twinnings+= currentWin;\t// Keep a tally of all the winnings to this point\n\t\t\t\tcreditValue.setText(String.valueOf(credit)); // Update the credit value.\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 50 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Four of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 25 *bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Full House\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin+= 9* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Flush\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 6 * bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Straight\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 4* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Three of a Kind\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 3* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Two Pair\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= 2* bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse if (ourWin == \"Jacks or Better\")\n\t\t\t{\n\t\t\t\tgamesWon++;\n\t\t\t\tcurrentWin= bet;\n\t\t\t\tcredit+= currentWin;\n\t\t\t\twinnings+= currentWin;\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcreditValue.setText(String.valueOf(credit));\n\t\t\t\tgamesLost++;\n\t\t\t\tlosses+= bet;\n\t\t\t\tourWinLabel.setText(ourWin);\n\t\t\t}\n\t\t\t//Update the remaining statistics\n\t\t\tplayedValue.setText(String.valueOf(gamesPlayed));\n\t\t\twonValue.setText(String.valueOf(gamesWon));\n\t\t\tlostValue.setText(String.valueOf(gamesLost));\n\t\t\twinningsValue.setText(String.valueOf(winnings));\n\t\t\tlossesValue.setText(String.valueOf(losses));\n\t\t}\t\n\t}",
"public void setScore(int score) {\r\n this.score = score;\r\n }",
"public void setScore(int score) {\r\n this.score = score;\r\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}",
"public static void win()\n\t{\n\t\tGame.setMoney(Game.getMoney()+bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tif(Game.getMoney()>Game.getHighScore())\n\t\t{\n\t\t\tGame.setHighScore(Game.getMoney());\n\t\t\tlblHighScore.setText(String.valueOf(Game.getHighScore()));\n\t\t}\n\t\tlblUpdate.setText(\"You win!\");\n\n\t}",
"public void incrementScore(int val) {\n score += val;\n }",
"public void setScore(Double score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(int score) {\n this.score = score;\n }",
"public void setScore(float score) {\n this.score = score;\n }",
"public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}",
"public void setScore(int paScore) {\n this.score = paScore;\n }",
"@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }",
"public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}",
"public abstract Scoreboard update(Player player);",
"public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}",
"public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}",
"public void setScore(Float score) {\n this.score = score;\n }",
"public void setScore(int score){\n\t\tthis.score = score;\n\t}",
"@Override\n\tpublic void inputScore() {\n\n\t}",
"public void incrementWin(){wins += 1;}",
"public void addScore(int s) {\n setScore(getScore() + s);\n }",
"public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}",
"public void addScore(int score);",
"private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }",
"public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}",
"public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}",
"public void setScore(float value) {\n this.score = value;\n }",
"void setScoreValue(int scoreValue);",
"void onScoresChanged(int scores);",
"public void calculateScore(){\n\n score.setText(Integer.toString(80));\n\n\n }",
"float getScore();",
"float getScore();",
"public void setNewScore(String player, int score) {\n\t\t\n\t}",
"public void setAwayScore(int a);"
] | [
"0.8074336",
"0.8007877",
"0.8005602",
"0.7945351",
"0.78544563",
"0.7717442",
"0.76447064",
"0.75620323",
"0.74972355",
"0.74855286",
"0.7470002",
"0.74509245",
"0.74416035",
"0.74330217",
"0.74156404",
"0.74032396",
"0.73629904",
"0.73433554",
"0.7244882",
"0.72418857",
"0.7221741",
"0.7216567",
"0.7195383",
"0.71904516",
"0.71817017",
"0.7175339",
"0.7165984",
"0.71428233",
"0.71279913",
"0.71226656",
"0.7110933",
"0.70929927",
"0.7086455",
"0.7073182",
"0.70666826",
"0.7055522",
"0.705448",
"0.7044554",
"0.7036049",
"0.70276356",
"0.70268255",
"0.7026697",
"0.70212495",
"0.700867",
"0.7007957",
"0.7004911",
"0.6971995",
"0.69574",
"0.69255763",
"0.69185394",
"0.69162506",
"0.6904226",
"0.6899396",
"0.68949634",
"0.688803",
"0.6876457",
"0.6863429",
"0.6862511",
"0.68489426",
"0.68424344",
"0.68326247",
"0.6824946",
"0.6815397",
"0.6812434",
"0.6812434",
"0.6799933",
"0.6793949",
"0.6793904",
"0.67803496",
"0.67742866",
"0.6773439",
"0.6773439",
"0.6773439",
"0.6773439",
"0.67724913",
"0.67690164",
"0.67531425",
"0.6749626",
"0.67458254",
"0.67322123",
"0.6726493",
"0.67125076",
"0.6712325",
"0.67098033",
"0.67079145",
"0.67054844",
"0.6700324",
"0.6698114",
"0.668844",
"0.6686505",
"0.6683941",
"0.6673021",
"0.6669829",
"0.66675425",
"0.66668034",
"0.66620326",
"0.6654735",
"0.6654735",
"0.665046",
"0.6647358"
] | 0.84324163 | 0 |
this method updates the status text to explain that you lost, and then change the instance variable that states that the game is going, and make it false | public void lose() {
status.setText("You're finished");
gamegoing = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setGameStatus() {\n this.gameStatus = false;\n }",
"public void lostGame(){\n\t\tSystem.out.println(\"Schade, du hast verloren. Möchtest du es noch einmal versuchen?\");\n\t\tif(!singleplayer){\n\t\t\tif(player.getLifes() == 0){\n\t\t\t\tSystem.out.println(\"Spieler 2 gewinnt!\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Spieler 1 gewinnt!\");\n\t\t\t}\n\t\t\n\t\t}\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 0;\n\t\tpaintMenu();\n\t}",
"private void updateStatusText() {\n Piece.Color playerColor = board.getTurnColor();\n\n if(board.isGameOver()) {\n if(board.isDraw()) {\n tvShowStatus.setTextColor(Color.BLUE);\n tvShowStatus.setText(\"DRAW\");\n }\n else if (board.getWinnerColor() == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK WINS\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE WINS\");\n }\n }\n else if(playerColor == Piece.Color.Black) {\n tvShowStatus.setTextColor(Color.BLACK);\n tvShowStatus.setText(\"BLACK\");\n }\n else {\n tvShowStatus.setTextColor(Color.WHITE);\n tvShowStatus.setText(\"WHITE\");\n }\n }",
"public void checkGameStatus() {\n everyTenthGoalCongrats();\n randomPopUpBecauseICan();\n }",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"public void statusChanged(GameStatusEvent e) {\n gameRunning = false;\n if(e.isGameOver()) {\n gameWon = false;\n hauptfenster.getSounds().playGameOver(); // abspielen der Sounds\n } else if(e.isGameWon()) {\n gameWon = true;\n hauptfenster.getSounds().playGameWon(); // abspielen der Sounds\n }\n hauptfenster.getSpielfeld().drawNew(); // Spielfeld neu zeichnen\n hauptfenster.getToolbar().updateToolbar(hauptfenster.getDionaRapModel().getShootAmount(), hauptfenster.getDionaRapModel().getScore(), hauptfenster.getProgress());\n hauptfenster.getSpielfeld().gameStatusEnd(hauptfenster.getPlayer(), gameWon); // das Icon bei gewonnen oder verloren setzen\n hauptfenster.getToolbar().setEnabled(); // den \"Neues Spiel\"-Button auf aktiv setzen\n hauptfenster.getMenubar().setGameSettingsEnabled(); // den \"Spieleinstellungen\"-Button auf aktiv setzen\n\n int end_position = HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE;\n try{\n end_position = HighScoreFile.getInstance().getScorePosition(hauptfenster.getDionaRapModel().getScore()); // auslesen der Position\n } catch (IOException ex) {\n System.err.println(\"File kann nicht gelesen werden: \" + ex);\n }\n if(end_position != HighScoreFile.SCORE_TO_LOW_FOR_HIGHSCORE && gameWon) {\n addBestlist(); // Bestenliste Dialog zeichnen\n }\n addDialog(gameWon); // den Dialog zeichnen\n }",
"public void notifyGameOver() {\n this.myStatusString.setText(\"Game Over\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"public void GameOver(){\n\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Sorry!! You Lost.\\nLet's Try to Play Again!\");\n\t\tplayAgain.setVisible(true);\n\t\trevealLabel.setText(\"The mystery word was:\");\n\t\trevealLabel.setVisible(true);\n\t\twordDashes.setText(mysteryWord);\n\t}",
"private void gameOver(final int status) {\n // Play R.raw.robot_bleep\n soundPool.play(this.soundIds[2], 1, 1, 3, 0, (float) 1.0);\n this.gameOverDisplayed = true;\n ((PongGame) context).gameState = PongGame.GAME_OVER;\n this.touchEnabled = false;\n\n ((PongGame) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n DialogInterface.OnDismissListener listener = new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(@NonNull DialogInterface dialog) {\n dialog.dismiss();\n }\n };\n GeneralFunctions.displayDialog(context, status, listener);\n }\n });\n }",
"public void wonGame(){\n\t\tSystem.out.println(\"Bravo, du hast gewonnen! Möchtest du noch einmal spielen?\");\n\t\tstopGame();\n\t\tstarted = false;\n\t\tspiel_status = 1;\n\t\tpaintMenu();\n\t}",
"private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }",
"private boolean checkGameStatus() {\n int res = model.getWinner();\n if (res == Model.DRAW) {\n draw();\n return false;\n } else if (res == Model.WHITE) {\n whiteScore++;\n view.getPrompt().setText(whiteName + \" win!\");\n prepareRestart();\n return false;\n } else if (res == Model.BLACK) {\n blackScore++;\n view.getPrompt().setText(blackName + \" win!\");\n prepareRestart();\n return false;\n }\n return true;\n }",
"public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}",
"public boolean gameWon(){\n return false;\n }",
"public void showStatus(){\n\t\tjlMoves.setText(\"\"+moves);\n\t\tjlCorrectMoves.setText(\"\"+correctMoves);\n\t\tjlWrongMoves.setText(\"\"+wrongMoves);\n\t\tjlOpenMoves.setText(\"\"+openMoves);\n\t\tjlNumberGames.setText(\"\"+numberGames);\n\t}",
"public void gameOver(boolean won){\r\n\t\tif(won){\r\n\t\t\tgameState = \"Won\";\r\n\t\t}else{\r\n\t\t\tgameState = \"Lost\";\r\n\t\t}\r\n\t\tb1.setVisible(true);\r\n\t\tb2.setText(\"Play Again\");\r\n\t\tb2.setVisible(true);\r\n\t}",
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}",
"private void endTurn(){\r\n String currentPlayer = cantStop.getGameBoard().getCurrentPlayer().getName();\r\n\t\tgameOver = cantStop.getGameBoard().endTurn(didBust);\r\n\t\t\r\n\t\tif(gameOver){\r\n\t\t\tstatusLabel.setText(currentPlayer + \r\n\t\t\t\t\t\" wins! Go again?\");\r\n\t\t\tupdate();\r\n\t\t} else {\r\n\t\t\tcantStop.getGameBoard().startNewTurn();\r\n\t\t\tallowNewRoll();\r\n\t\t}\r\n\t}",
"public static void lose()\n\t{\n\t\tGame.setMoney(Game.getMoney()-bet);\n\t\tremainingMoneyN.setText(String.valueOf(Game.getMoney()));\n\t\tbet=0;\n\t\ttfBet.setText(\"0\");\n\t\tlblUpdate.setText(\"The dealer wins\");\n\t\tif(Game.getMoney()<=0)\n\t\t{\n\t\t\tGame.setComplete(true);\n\t\t\tendGameSequence();\n\n\t\t}\n\t}",
"private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }",
"@Override\n public void endGameAsLoss()\n {\n // UPDATE THE GAME STATE USING THE INHERITED FUNCTIONALITY\n super.endGameAsLoss();\n \n // RECORD IT AS A loss\n ((MahjongSolitaireMiniGame)miniGame).getPlayerRecord().addLoss(currentLevel);\n ((MahjongSolitaireMiniGame)miniGame).savePlayerRecord();\n \n // DISPLAY THE loss DIALOG\n miniGame.getGUIDialogs().get(LOSS_DIALOG_TYPE).setState(VISIBLE_STATE); \n\n // AND PLAY THE LOSS AUDIO\n miniGame.getAudio().stop(MahjongSolitairePropertyType.SPLASH_SCREEN_SONG_CUE.toString()); \n miniGame.getAudio().stop(MahjongSolitairePropertyType.GAMEPLAY_SONG_CUE.toString());\n miniGame.getAudio().play(MahjongSolitairePropertyType.LOSS_AUDIO_CUE.toString(), false);\n }",
"void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }",
"@Override\n public void updateScreen(GameController game) {\n super.updateScreen(game);\n\n if (game.getCurrentState() == GameController.State.CROSS)\n currentTurn.setText(\"Other player\");\n else if (game.getCurrentState() == GameController.State.CIRCLE)\n currentTurn.setText(\"Your turn\");\n }",
"public void GameWin () {\n\t\t\n\t\twordDashes.setText(mysteryWord);\n\t\tguessBttn.setVisible(false);\n\t\tguessFullWord.setVisible(false);\n\t\tAnswerBox.setDisable(true); //can no longer use the text box\n\t\tresultMessage.setText(\" Great Job!!\\nYou Guessed the Word!!\");\n\t\tplayAgain.setVisible(true); \n\t\t\n\t}",
"@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}",
"public void doUpdateStatus() throws GameException\r\n {\n \r\n }",
"public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }",
"@Override\n public void gameOver() {\n messagePanel.showMessage(image);\n setEnabled(false);\n }",
"public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }",
"public void endGame() {\n\t\t// If Avengers lose and Loki wins\n\t\tif (!avengersAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n G A M E O V E R \\n\");\n\t\t\ttextArea.append(\"Oh no! Avengers lost... Loki conquered earth...\");\n\t\t}\n\t\t\n\t\t// If Loki loses and Avengers win\n\t\telse if (!lokiAlive()) {\n\t\t\tca_attack.setEnabled(false);\n\t\t\the_attack.setEnabled(false);\n\t\t\tbw_attack.setEnabled(false);\n\t\t\thulk_attack.setEnabled(false);\n\t\t\tthor_attack.setEnabled(false);\n\t\t\tloki_attack.setEnabled(false);\n\t\t\ttextArea.append(\"\\n Y O U W O N \\n\");\n\t\t\ttextArea.append(\"Yay! Avengers saved the world from Loki! Nice work!\");\n\t\t}\n\t}",
"public void notifyGameOn() {\n this.myStatusString.setText(\"Game is On\");\n final LineBorder line = new LineBorder(Color.GREEN, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.GREEN);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE)); \n }",
"protected void quitGame() {\n gameOver = true;\n }",
"public static void endGame(){\n\t\tmainPanel.grid1.enabledGrid(false);\n\t\tif(speler.heleVlootKapot){\n\t\t\tmainPanel.melding2.setText(\"Helaas, de computer heeft gewonnen.\");\n\t\t}else{\n\t\t\tmainPanel.melding2.setText(\"Gefeliciteerd, u heeft gewonnen.\");\n\t\t}\n\t}",
"private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }",
"@Override\n public void gameOver(GameController game) {\n updateScreen(game);\n ((MultiplayerHostController) Main.game).updateClient();\n\n switch (game.getCurrentState()) {\n case END_DRAW:\n JOptionPane.showMessageDialog(this, \"Draw!\");\n break;\n case END_CIRCLE:\n JOptionPane.showMessageDialog(this, \"You won!\");\n break;\n case END_CROSS:\n JOptionPane.showMessageDialog(this, \"You lost!\");\n break;\n }\n stopGame();\n }",
"public void startGame() {\n status = Status.COMPLETE;\n }",
"@Override\n public boolean isGameOver() {\n //TODO Implement this method\n return false;\n }",
"public void gameOver(){ // will be more complex in processing (like a fadey screen or whatever, more dramatic)\n System.out.println();\n System.out.println(\"Three strikes and you're out! You're FIRED!\");\n gameOver = true;\n }",
"public void updateTurnNotification(boolean b){\n if(b){\n gameNotificationL.setText(\"It's your turn!\");\n }\n else\n gameNotificationL.setText(\"It's not your turn.\");\n }",
"private void setDefulatMessage(){\n message.setText(\" Chess game is ready to play! White's turn \");\n }",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"public void drawGameCompleteScreen() {\r\n PennDraw.clear();\r\n\r\n if (didPlayerWin()) {\r\n PennDraw.text(width / 2, height / 2, \"You Win!\");\r\n } else if (didPlayerLose()) {\r\n PennDraw.text(width / 2, height / 2, \"You have lost...\");\r\n }\r\n\r\n PennDraw.advance();\r\n }",
"public void displayMessage()\n{\n // game should continue\n if ( gameStatus == CONTINUE )\n showStatus( \"Roll again.\" );\n\n // game won or lost\n else {\n\n if ( gameStatus == WON )\n showStatus( \"Player wins. \" +\n \"Click Roll Dice to play again.\" );\n else \n showStatus( \"Player loses. \" + \n \"Click Roll Dice to play again.\" );\n \n // next roll is first roll of new game\n firstRoll = true; \n }\n}",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}",
"@Override\n public void run() {\n if(hp_value>0) {\n redball.setText(hp_value + \"\");\n hp_value--;\n }\n //you have lost and the game will reset\n else if(hp_value<=0)\n {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(lost);\n toast.show();\n //\n resetValues();\n }\n }",
"public void gameWon()\n {\n ScoreBoard endGame = new ScoreBoard(\"You Win!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public void updateGameProgression() {\n \tif (players.size() == 0) {\n \t\tSystem.out.println(\"Game over\");\n \t\tgameOver.set(true);\n \t}\n \tif (goal.checkGoalCompleted().get()) {\n \t\tdungeonCompleted.set(true);\n \t} else {\n \t\tdungeonCompleted.set(false);\n \t}\n }",
"public void playerMissedBall(){ active = false;}",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public void notifyGameEnded() {\n this.myStatusString.setText(\"Game Ended\");\n final LineBorder line = new LineBorder(Color.RED, 2, true);\n this.myStatusString.setBorder(line);\n this.myStatusString.setForeground(Color.RED);\n this.myStatusString.setFont(new Font(FONT_TIMES, Font.BOLD, NUM_FONT_SIZE_BIG));\n \n }",
"public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }",
"public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}",
"void lose() {\n System.out.println(\"You have lost the game!!!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.exit(0);\n\n }",
"public void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\r\n\t\tif (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {\r\n\t\t\tthis.mc.thePlayer.closeScreen();\r\n\t\t}\r\n\t}",
"protected void ifLost(){\n canvas.add(titleBorder);\n canvas.add(titleBox);\n Image lostText = new Image(213, 400, \"124-hw4/BreakoutText/lostText.png\");\n canvas.add(lostText);\n }",
"public void winGame() {\n this.isWinner = true;\n }",
"public boolean lose() { return lost; }",
"@Override\n public void endGame(){\n gameOver = true;\n }",
"private void updateGUIStatus() {\r\n\r\n }",
"public void showLoseMessage() {\n\t\tsetStatusBar(LOSE_MSG);\n\t}",
"public void setInGame() {\n this.inGame = true;\n }",
"private void gameOver() {\n\t\t\n\t}",
"public void displayGameOver() {\n\t\tthis.theScreen.setFont(Preferences.GAME_OVER_FONT);\n\t\tthis.theScreen.setColor(Preferences.GAME_OVER_COLOR);\n\t\tthis.theScreen.drawString(Preferences.GAME_OVER_TEXT,\n\t\t\t\tPreferences.GAME_OVER_X, Preferences.GAME_OVER_Y);\n\t}",
"@Override\n public void gameStateChanged()\n {\n update();\n \n // check for \"game over\" or \"game won\"\n if ( game.getState() == GameState.LOST )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getLoseMessage(), \"Game over!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if ( game.getState() == GameState.WON )\n {\n JOptionPane.showMessageDialog(\n this, \n game.getWinMessage(), \"Well Done!\",\n JOptionPane.INFORMATION_MESSAGE);\n game.createNewGame();\n }\n else if (game.messageForPlayer())\n {\n JOptionPane.showMessageDialog(\n this, \n game.getPlayerMessage(), \"Important Information\",\n JOptionPane.INFORMATION_MESSAGE); \n }\n }",
"public void notifyGameOver() {\n\t\tgameOver = true;\n\t}",
"public void setUnstable() {\n this.unstable = true;\n this.unstableTimeline.play();\n if (this.online == true) {\n this.statusLed.setStatus(\"alert\");\n this.statusLed.setFastBlink(true);\n }\n }",
"private void setWonOrLossViews() {\n if (success) {\n TextView message = findViewById(R.id.winText);\n message.setText(R.string.flashWin1);\n } else {\n player.loseALife();\n\n TextView message = findViewById(R.id.winLoss);\n message.setText(R.string.flashLoss);\n\n TextView minusOne = findViewById(R.id.minus1);\n minusOne.setText(\"-1\");\n }\n }",
"public void triggerEndGame()\n\t{\n\t\tif(livesRemaining <= 0)\n\t\t{\n\t\t\tmP[0].stop();\n\t\t\tmP[1].stop();\n\t\t\tmP[2].stop();\n\t\t\tendGame = new Alert(AlertType.CONFIRMATION);\n\t\t\tendGame.setTitle(\"1942\");\n\t\t\tendGame.setHeaderText(null);\n\t\t\tendGame.getButtonTypes().clear();\n\t\t\tendGame.setContentText(\"You're dead! \\nYou finished with \" + p1Score + \" points. \\nWould you like to play again?\");\n\t\t\tendGame.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\t\tendGame.setGraphic(new ImageView(new Image(\"file:images/gameOver.png\")));\n\t\t\tspawnTimerTL.stop();\n\t\t\tmainTimer.stop();\n\t\t\tp1.getNode().setImage(null); //Removes player from screen\n\t\t\tOptional<ButtonType> result = endGame.showAndWait();\n\n\t\t\tif(result.get() == ButtonType.YES)\n\t\t\t{\n\t\t\t\tlivesRemaining = 3;\n\t\t\t\thealthRemaining = 10;\n\t\t\t\tivHealthBar.setImage(imgHealth[healthRemaining]);\n\t\t\t\tivLives.setImage(imgLives[livesRemaining]);\t\n\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\t\n\t\t\t\tlblHighScore.setText(Integer.toString(highScore));\n\t\t\t\tp1Score = 0;\n\t\t\t\tlblp1score.setText(Integer.toString(p1Score));\n\n\t\t\t\tp1.setDead(false);\n\t\t\t\tmainTimer.start();\n\t\t\t\tspawnTimerTL.play();\n\t\t\t\t\n\t\t\t\tfor(int k = 0; k < enemyPlanes.length; k++)\n\t\t\t\t{\n\t\t\t\t\tenemyPlanes[k].toggleIsDead(true);\n\t\t\t\t\tenemyPlanes[k].setY(2000);\n\t\t\t\t\tenemyPlanes[k].getNode().setLayoutY(enemyPlanes[k].getY());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (highScore < p1Score)\n\t\t\t\t\thighScore = p1Score;\n\t\t\t\ttry //Writes new high score and throws IO Exception\n\t\t\t\t{\n\t\t\t\tfileWriter = new FileWriter(highScoreSave);\n\t\t\t\tfileWriter.write(String.valueOf(highScore));\n\t\t\t\tfileWriter.close();\n\t\t\t\t}\n\t\t\t\tcatch(IOException e)\n\t\t\t\t{e.printStackTrace();}\n\t\t\t\tthankYou = new Alert(AlertType.INFORMATION);\n\t\t\t\tthankYou.setTitle(\"1942\");\n\t\t\t\tthankYou.setHeaderText(null);\n\t\t\t\tthankYou.setGraphic(new ImageView(new Image(\"file:images/plane.png\")));\n\t\t\t\tthankYou.setContentText(\"Thank you for playing.\\nGoodbye!\");\n\t\t\t\tthankYou.show();\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t}\n\t}",
"private void handleLose(){\n\t ButtonType goBackBtn = new ButtonType(\"Go back to menu\");\n\t Alert alert = new Alert(Alert.AlertType.INFORMATION,\n \"You've lost the game, retry?\", ButtonType.YES, goBackBtn);\n\t alert.setTitle(\"Lost\");\n Optional<ButtonType> result = alert.showAndWait();\n if(!result.isPresent())\n return;\n if(result.get() == ButtonType.YES){\n Screen screen = new Screen(stage, \"Dungeon\", \"View/DungeonPlayScreen.fxml\");\n try {\n Map reloadedMap = Map.loadFromFile(new FileInputStream(\n \"map/\" + map.getMapName() + \".dungeon\"));\n screen.display(new DungeonPlayController(stage, reloadedMap));\n } catch (FileNotFoundException e){\n e.printStackTrace();\n }\n }\n if(result.get() == goBackBtn){\n handleModeScreenButton();\n }\n }",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"public void hasLost() {\n\t\tthis.hasLost = true;\n\t}",
"@Override\r\n\tpublic boolean doesGuiPauseGame() {\r\n\t\treturn false;\r\n\t}",
"public void lose() {\n displayErrorMessage(\"You Lose!\");\n if(controller.aiGame && !controller.loggedIn()){\n controller.switchToLogin();\n } else\n controller.switchToLobby();\n }",
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public boolean doesGuiPauseGame()\n {\n return false;\n }",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}",
"private void updateStatus() {\n \tif (!status.getText().equals(\"\")) {\n\t\t\tif (currentProfile != null) {\n\t\t\t\tcurrentProfile.setStatus(status.getText());\n\t\t\t\tcanvas.displayProfile(currentProfile);\n\t\t\t\tcanvas.showMessage(\"Status updated to \" + status.getText());\n\t\t\t} else {\n\t\t\t\tcanvas.showMessage(\"Please select a profile to change status\");\n\t\t\t}\n\t\t}\n\t}",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"private void showStat() {\n\t\tSystem.out.println(\"=============================\");\n\t\tSystem.out.println(\"Your won! Congrates!\");\n\t\tSystem.out.println(\"The word is:\");\n\t\tSystem.out.println(\"->\\t\" + this.word.toString().replaceAll(\" \", \"\"));\n\t\tSystem.out.println(\"Your found the word with \" \n\t\t\t\t+ this.numOfWrongGuess + \" wrong guesses.\");\n\t}",
"public static void endGameSequence()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(false);\n\t\tbtnStay.setEnabled(false);\n\t\tbtnDouble.setEnabled(false);\n\t\tlblUpdate.setText(\"Game over! You are out of money!\");\n\t}",
"@Override\r\n\tpublic void update(Observable game, Object gameMessage) {\r\n\t\tGameMessage gm = (GameMessage) gameMessage;\r\n\t\t\r\n\t\tObstacle obstacle = gm.getObstacle();\r\n\t\tswitch(obstacle) {\r\n\t\tcase Blood:\r\n\t\t\tstatusLabel.setText(\"You smell something foul!\");\r\n\t\t\tbreak;\r\n\t\tcase Slime:\r\n\t\t\tstatusLabel.setText(\"You feel a draft.\");\r\n\t\t\tbreak;\r\n\t\tcase Goop:\r\n\t\t\tstatusLabel.setText(\"You smell something fould and feel a draft!\");\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tstatusLabel.setText(\"\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\tif(gm.getGameOver() == true) {\r\n\t\t\tswitch(gm.getGameOverReason()) {\r\n\t\t\t\tcase Wumpus:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"While you ponder over whether it was a good idea to go\"\r\n\t\t\t\t\t\t\t+ \" toe to toe with the Wumpus or not, The Wumpus is busy tearing your head off!\");\r\n\t\t\t\t\tstatusLabel.setText(\"Wumpus bit your head off!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase Pit:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You fall to your doom in a surprisingly deep pit.\");\r\n\t\t\t\t\tstatusLabel.setText(\"Fell down a pit!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ArrowHitWumpus:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Your arrow flies true and hits the Wumpus right between the eyes.\"\r\n\t\t\t\t\t\t\t+ \"He falls over dead and the day is done. Congratulations!\");\r\n\t\t\t\t\tstatusLabel.setText(\"The Wumpus is dead!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase ArrowHitHunter:\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You completely miss the Wumpus hitting yourself in the back of head!\");\r\n\t\t\t\t\tstatusLabel.setText(\"Arrow in the back of your head!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void FINAL_OUTCOME(boolean b) //the last state of the game. \r\n {\n if (b == true)\r\n System.out.println(\"Lucky you, you get another chance at life\");\r\n else\r\n System.out.println(\"I'm sorry but you for some reason can't get another chance at life.\");\r\n }",
"@Override\n\tpublic boolean isGameTied() {\t\n\t\treturn false;\n\t}",
"public void lose()\r\n {\r\n Alert inputConfirmation = new Alert(Alert.AlertType.INFORMATION);\r\n inputConfirmation.setTitle(\"Game Over!\");\r\n inputConfirmation.setHeaderText(\"You Lose!\");\r\n inputConfirmation.setGraphic(null);\r\n scoreBoard.gameTimer.gameTime.cancel();\r\n\r\n inputConfirmation.showAndWait();\r\n }",
"private void checkGame() {\n if (game.checkWin()) {\n rollButton.setDisable(true);\n undoButton.setDisable(true);\n this.dialogFlag = true;\n if (game.isDraw()) {\n showDrawDialog();\n return;\n }\n if (game.getWinner().getName().equals(\"Computer\")) {\n showLoserDialog();\n return;\n }\n showWinnerDialog(player1);\n }\n }",
"public void lostGame(){\n\t\tfor(int x = 0; x < width; x++){\n\t\t\tfor(int y = 0; y < height; y++){\n\t\t\t\tJButton currentButton = grid[x][y].getButton();\n\t\t\t\tif(currentButton.isEnabled()){\n\t\t\t\t\tif(!grid[x][y].isMine()){\n\t\t\t\t\t\tcurrentButton.setText(neighborCounts[x][y] + \"\");\n\t\t\t\t\t\tif(currentButton.getText().equals(\"0\")){\n\t\t\t\t\t\t\tcurrentButton.setText(\"\");\n\t\t\t\t\t\t\tcurrentButton.setBackground(Color.WHITE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrentButton.setOpaque(true);\n\t\t\t\t\t\tcurrentButton.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrentButton.setText(\"X\");\n\t\t\t\t\t\tcurrentButton.setBackground(Color.RED);\n\t\t\t\t\t\tcurrentButton.setOpaque(true);\n\t\t\t\t\t\tcurrentButton.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }",
"private void checkVictory()\n {\n if(throne.getEnemyHealth() <= 0)\n {\n System.out.println(\"Congrats! The land is now free from all chaos and destruction. You are now very rich and wealthy. Yay\");\n alive = false;\n }\n }",
"public void checkGame(){\r\n\t\tif (foodCounter == 0){ // all food is gone, win\r\n\t\t\tSystem.out.println(\"You won!\");\r\n\t\t\t//stops ghosts and pacman\r\n\t\t\tpacman.speed = 0;\r\n\t\t\tg1.speed = 0;\r\n\t\t\tg2.speed = 0;\r\n\t\t\tg3.speed = 0;\r\n\t\t\tlost = true; // return to menu \r\n\t\t}\r\n\t\t// if pacman collide with ghost, lose\r\n\t\tif (collision2(pacmansprite,g1.sprite) || collision2(pacmansprite,g2.sprite) || collision2(pacmansprite,g3.sprite)){\r\n\t\t\tSystem.out.println(\"You lost\");\r\n\t\t\tlost = true;\r\n\t\t}\r\n\t}",
"public void completedGame()\n\t{\n\t\tJOptionPane.showMessageDialog(this,\"Congratulations, you beat the game!\" + ship.getTotalScore(), \"Beat the Game\", JOptionPane.INFORMATION_MESSAGE);\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tsendScore();\n\t}",
"public void checkVisible(Status status) {\n if (status == Status.GAMEOVER) {\n this.exit.setVisible(true);\n this.name.setVisible(true);\n this.score.setVisible(true);\n this.text.setVisible(true);\n this.textField.setVisible(true);\n } else{\n this.exit.setVisible(false);\n this.name.setVisible(false);\n this.score.setVisible(false);\n this.text.setVisible(false);\n this.textField.setVisible(false);\n }\n }",
"public void setLost(boolean lost){\n this.lost = lost;\n }",
"public boolean isGameOver() {\r\n\treturn false;\r\n }",
"private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }",
"public void resetPlayerPassed() {\n d_PlayerPassed = false;\n }",
"private void endGame(boolean gameWon) {\n if (gameWon) {\n winloseLabel.setText(\"YOU WIN\");\n for (int i = 0;i < btArray.length;i++) {\n for (int j = 0; j < btArray[0].length; j++) {\n // if it's a mine\n if (mainField.getValue(i,j) == -1) {\n // turn the button green\n btArray[i][j].setStyle(\"-fx-background-color: #00FF00;\");\n }\n }\n }\n }\n else {\n winloseLabel.setText(\"YOU LOSE\");\n }\n // disables all of the buttons\n for (Button[] subArray : btArray) {\n for (Button button : subArray) {\n button.setDisable(true);\n }\n }\n }",
"public void toggleGameFinished() {\r\n\t\tsetGameFinished(!gameFinished);\r\n\t}",
"void statusUpdate(boolean invalid);"
] | [
"0.7612931",
"0.71041",
"0.69402736",
"0.6938017",
"0.68888056",
"0.68524665",
"0.68465704",
"0.68365675",
"0.6814691",
"0.6779111",
"0.6776302",
"0.676937",
"0.6755855",
"0.6724525",
"0.6707012",
"0.6683885",
"0.6656493",
"0.66223866",
"0.6620978",
"0.6613485",
"0.6588492",
"0.65871274",
"0.6570249",
"0.65673757",
"0.65592676",
"0.6515491",
"0.64885306",
"0.6482035",
"0.64532566",
"0.6448822",
"0.6438732",
"0.6435844",
"0.6415533",
"0.6415223",
"0.64030397",
"0.6401675",
"0.63911265",
"0.6386422",
"0.6383584",
"0.63819546",
"0.6379827",
"0.6369119",
"0.636587",
"0.63658446",
"0.6356728",
"0.6356335",
"0.6349432",
"0.6338229",
"0.63364166",
"0.6315456",
"0.6313257",
"0.6300981",
"0.62965137",
"0.6293358",
"0.62881774",
"0.6274818",
"0.6272671",
"0.62713724",
"0.6251919",
"0.6249404",
"0.6246506",
"0.6214514",
"0.62140703",
"0.6206721",
"0.62057334",
"0.62054664",
"0.6200262",
"0.61934835",
"0.6192303",
"0.61792046",
"0.61781365",
"0.61776316",
"0.6177342",
"0.6177108",
"0.6157447",
"0.6157151",
"0.6153018",
"0.61529654",
"0.6152749",
"0.61491513",
"0.6147333",
"0.6145675",
"0.6141051",
"0.61400574",
"0.6138243",
"0.6137552",
"0.6134281",
"0.6130916",
"0.61219496",
"0.6117829",
"0.61127543",
"0.6112251",
"0.6100683",
"0.60922325",
"0.6091442",
"0.60907906",
"0.60868275",
"0.60838455",
"0.6082747",
"0.6067371"
] | 0.80051124 | 0 |
/ The idea behind this algorithm 1. Build preliminary graphs that represent different connection types between variables. See `assignmentGraph`, `cloneGraph`, `arrayGraph`, `itemGraph`. 2. Build initial type sets where possible. See `types`. 3. Build additional info: casts, virtual invocations, exceptions. See `casts`, `exceptions`, `virtualCallSites`. 4. Build graph from set of preliminary paths 5. Find strongly connected components, collapse then into one nodes. 6. Calculate topological order of the DAG (let it be propagation path). Let resulting order be `propagationPath`. 7. Propagate types along calculated path; then propagate types using additional info. 8. Repeat 7 until it changes anything (i.e. calculate fixed point). | public void infer(Program program, MethodReference methodReference) {
types = new IntHashSet[program.variableCount() << 3];
overflowTypes = new boolean[program.variableCount() << 3];
nodeChanged = new boolean[types.length];
formerNodeChanged = new boolean[nodeChanged.length];
nodeMapping = new int[types.length];
for (int i = 0; i < types.length; ++i) {
nodeMapping[i] = i;
}
// See 1, 2, 3
MethodDependencyInfo thisMethodDep = dependencyInfo.getMethod(methodReference);
buildPreliminaryGraphs(program, thisMethodDep);
// Augment (2) with input types of method
for (int i = 0; i <= methodReference.parameterCount(); ++i) {
ValueDependencyInfo paramDep = thisMethodDep.getVariable(i);
if (paramDep != null) {
int degree = 0;
while (degree <= MAX_DEGREE) {
addTypesFrom(i, degree, paramDep);
if (!paramDep.hasArrayType()) {
break;
}
paramDep = paramDep.getArrayItem();
degree++;
}
}
}
// See 4
buildPropagationGraph();
// See 5
collapseSCCs();
// See 6
buildPropagationPath();
// See 7, 8
propagate(program);
// Cleanup
assignmentGraph = null;
graph = null;
cloneGraph = null;
arrayGraph = null;
itemGraph = null;
casts = null;
exceptions = null;
virtualCallSites = null;
propagationPath = null;
nodeChanged = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void collectLastDefsBeforeCall(CallerClass caller) {\n Map<String,Map<BytecodeInstruction,Map<Integer,Set<BasicBlock>>>> nodesForAllCouplingPaths = new HashMap<>();\n// Set<BytecodeInstruction> nodesForAllCouplingPaths = new HashSet<>();\n // method --> call_site --> variable --> Set<Edges>\n Map<String,Map<BytecodeInstruction,Map<String,Set<ControlFlowEdge>>>> edgesForAllCouplingPaths = new HashMap<>();\n// Set<ControlFlowEdge> edgesForAllCouplingPaths = new HashSet<>();\n\n// List<BytecodeInstruction> handled = new ArrayList<>();\n\n\n\n\n for (String method: caller.getInvolvedMethods()){\n Map<BytecodeInstruction,List<Type>> callSitesOfMethod = caller.getCallSitesOfMethod(method);\n if(callSitesOfMethod == null){\n LOG.info(\"method {} does not have call_site.\",method);\n continue;\n }\n nodesForAllCouplingPaths.put(method,new HashMap<>());\n edgesForAllCouplingPaths.put(method,new HashMap<>());\n for (Map.Entry<BytecodeInstruction, List<Type>> entry : callSitesOfMethod.entrySet()) {\n List<BytecodeInstruction> parents = new ArrayList<>();\n BytecodeInstruction call_site = entry.getKey();\n List<Type> types = entry.getValue();\n nodesForAllCouplingPaths.get(method).put(call_site,new HashMap<>());\n edgesForAllCouplingPaths.get(method).put(call_site,new HashMap<>());\n List<String> varNames = detectVariableNames(call_site,types,caller.getMethodCFG(call_site.getMethodName()));\n int varCounter = 0;\n for(String var : varNames){\n varCounter++;\n if(var == null){\n continue;\n }\n nodesForAllCouplingPaths.get(method).get(call_site).put(varCounter,new HashSet<>());\n edgesForAllCouplingPaths.get(method).get(call_site).put(var,new HashSet<>());\n // We perform this process for each varName\n parents.clear();\n parents.add(call_site);\n while(!parents.isEmpty()){\n // get the candidate node\n BytecodeInstruction currentNode = parents.remove(0);\n if(currentNode.getMethodName().equals(method)){\n nodesForAllCouplingPaths.get(method).get(call_site).get(varCounter).add(currentNode.getBasicBlock());\n\n if(currentNode.isDefinition() && currentNode.getVariableName().equals(var)){\n // This node is a last_definition for the current variable\n LOG.info(\"Node {} is the last definition for variable {} which is parameter #{} for call_site {}\",currentNode,var,varCounter,call_site);\n continue;\n }\n }\n\n for (BytecodeInstruction parent: caller.getMethodCFG(method).getParents(currentNode)){\n if(nodesForAllCouplingPaths.get(method).get(call_site).get(varCounter).contains(parent)){\n continue;\n }\n if(!parent.getMethodName().equals(method)){\n parents.add(parent);\n continue;\n }\n ControlFlowEdge edgeToParent = caller.getMethodCFG(method).getEdge(parent,currentNode);\n edgesForAllCouplingPaths.get(method).get(call_site).get(var).add(edgeToParent);\n parents.add(parent);\n }\n }\n }\n }\n }\n\n\n IntegrationDefUsePool.getInstance().registerCallSitesLastDef(caller.getClassName(),nodesForAllCouplingPaths);\n }",
"public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n\n Graph myGraph = new Graph();\n myGraph.addNode(\"8\");\n myGraph.addNode(\"1\");\n myGraph.addNode(\"2\");\n myGraph.addNode(\"9\");\n myGraph.addNode(\"7\");\n myGraph.addNode(\"5\");\n myGraph.addEdge(\"8\" , \"1\" , 50);\n myGraph.addEdge(\"5\" , \"1\" , 70);\n myGraph.addEdge(\"7\" , \"5\", 20);\n myGraph.addEdge(\"8\" , \"9\", 100);\n myGraph.addEdge(\"8\" , \"2\", 40);\n String[] trip = {\"8\" , \"1\" , \"5\"};\n String[] trip2 = {\"8\" , \"5\"};\n String[] trip3 = {\"8\" , \"1\" , \"5\" , \"7\" , \"5\" , \"1\" , \"8\" , \"9\"};\n String[] trip4 = {\"8\" , \"9\" , \"5\" };\n String[] trip5 = {\"8\"};\n String[] trip6 = {\"8\" , \"2\"};\n// System.out.println(myGraph);\n// System.out.println(myGraph.getNodes());\n// System.out.println(myGraph.getNeighbors(\"8\"));\n// System.out.println(myGraph.getNeighbors(\"7\"));\n// System.out.println(myGraph.getNeighbors(\"5\"));\n// System.out.println(myGraph.size());\n// System.out.println(myGraph.breadthFirst(\"8\"));\n// System.out.println(myGraph.weightList);\n// System.out.println(myGraph.breadthFirst(\"7\"));\n// System.out.println(myGraph.breadthFirst(\"5\"));\n// System.out.println(myGraph.businessTrip(\"8\",trip));\n// System.out.println(myGraph.businessTrip(\"8\",trip2));\n// System.out.println(myGraph.businessTrip(\"8\",trip3));\n// System.out.println(myGraph.businessTrip(\"8\",trip4));\n// System.out.println(myGraph.businessTrip(\"8\",trip5));\n// System.out.println(myGraph.businessTrip(\"8\",trip6));\n System.out.println(myGraph.depthFirst(\"8\"));\n }",
"public void buildPointPetriNet(){\n\t\tcreatePlace(pnet, \"int\", 3);\n\t\tcreatePlace(pnet, \"Point\", 2);\n\t\tcreatePlace(pnet, \"MyPoint\", 2);\n\t\tcreatePlace(pnet, \"void\", 2);\n\t\t\n\t\t// Create transitions for the petri-net\n\t\tpnet.createTransition(\"int<-getX(Point)\");\n\t\tpnet.createTransition(\"int<-getY(Point)\");\n\t\tpnet.createTransition(\"void<-setX(Point,int)\");\n\t\tpnet.createTransition(\"void<-setY(Point,int)\");\n\t\tpnet.createTransition(\"Point<-Point(void)\");\n\t\t\n\t\tpnet.createTransition(\"int<-getX(MyPoint)\");\n\t\tpnet.createTransition(\"int<-getY(MyPoint)\");\n\t\tpnet.createTransition(\"MyPoint<-MyPoint(int,int)\");\n\t\t\n\t\t// Create clone transitions for the petri-net\n\t\tpnet.createTransition(\"int<-clone(int)\");\n\t\tpnet.createTransition(\"Point<-clone(Point)\");\n\t\tpnet.createTransition(\"MyPoint<-clone(MyPoint)\");\n\t\tpnet.createTransition(\"void<-clone(void)\");\n\t\t\n\t\t// Create flows for the petri-net\n\t\tpnet.createFlow(\"Point\",\"int<-getX(Point)\",1);\n\t\tpnet.createFlow(\"int<-getX(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"int<-getY(Point)\",1);\n\t\tpnet.createFlow(\"int<-getY(Point)\",\"int\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setX(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setX(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"Point\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"int\",\"void<-setY(Point,int)\",1);\n\t\tpnet.createFlow(\"void<-setY(Point,int)\",\"void\",1);\n\t\tpnet.createFlow(\"void\",\"Point<-Point(void)\",1);\n\t\tpnet.createFlow(\"Point<-Point(void)\",\"Point\",1);\n\t\t\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getX(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getX(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"MyPoint\",\"int<-getY(MyPoint)\",1);\n\t\tpnet.createFlow(\"int<-getY(MyPoint)\",\"int\",1);\n\t\tpnet.createFlow(\"int\",\"MyPoint<-MyPoint(int,int)\",2);\n\t\tpnet.createFlow(\"MyPoint<-MyPoint(int,int)\",\"MyPoint\",1);\n\t\t\n\t\t// Create flows for the clone edges\n\t\tpnet.createFlow(\"int\",\"int<-clone(int)\",1);\n\t\tpnet.createFlow(\"int<-clone(int)\",\"int\",2);\n\t\tpnet.createFlow(\"Point\",\"Point<-clone(Point)\",1);\n\t\tpnet.createFlow(\"Point<-clone(Point)\",\"Point\",2);\n\t\tpnet.createFlow(\"MyPoint\",\"MyPoint<-clone(MyPoint)\",1);\n\t\tpnet.createFlow(\"MyPoint<-clone(MyPoint)\",\"MyPoint\",2);\n\t\tpnet.createFlow(\"void\",\"void<-clone(void)\",1);\n\t\tpnet.createFlow(\"void<-clone(void)\",\"void\",2);\n\t\t\n\t}",
"private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}",
"public interface ProgramDependenceGraph extends MutableEdgeLabelledDirectedGraph {\n\n\t/**\n\t * @return A List of weak regions, generated by RegionAnalysis for the corresponding\n\t * control flow graph (These are Regions and not PDGRegions.)\n\t */\n\tpublic List<Region> getWeakRegions();\n\t/**\n\t * @return A List of strong regions, generated when constructing the program dependence graph\n\t * (These are Regions and not PDGRegions.)\n\t */\n\tpublic List<Region> getStrongRegions();\n\t/**\n\t * This method returns the list of PDGRegions computed by the construction method.\n\t * @return The list of PDGRegions\n\t */\n\tpublic List<PDGRegion> getPDGRegions();\n\t/**\n\t * @return The root region of the PDG.\n\t */\n\tpublic IRegion GetStartRegion();\n\n\t/**\n\t * @return The root node of the PDG, which is essentially the same as the start region\n\t * but packaged in its PDGNode, which can be used to traverse the graph, etc.\n\t */\n\tpublic PDGNode GetStartNode();\n\n\t/**\n\t * This method determines if node1 is control-dependent on node2 in this PDG.\n\t * @param node1\n\t * @param node2\n\t * @return returns true if node1 is dependent on node2\n\t */\n\tpublic boolean dependentOn(PDGNode node1, PDGNode node2);\n\t/**\n\t * This method returns the list of all dependents of a node in the PDG.\n\t * @param node is the PDG node whose dependents are desired.\n\t * @return a list of dependent nodes\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic List getDependents(PDGNode node);\n\n\n\t/**\n\t * This method returns the PDGNode in the PDG corresponding to the given\n\t * CFG node. Note that currently the CFG node has to be a Block.\n\t * @param cfgNode is expected to be a node in CFG (currently only Block).\n\t * @return The node in PDG corresponding to cfgNode.\n\t */\n\n\tpublic PDGNode getPDGNode(Object cfgNode);\n\n\t/**\n\t *\n\t * @return A human readable description of the PDG.\n\t */\n\tpublic String toString();\n\n}",
"public static DAG creatBigFireDectectorModel(Attributes attributes, int nRooms){\n\n /********** Model Definition ************/\n //Create the object handling the random variables of the model\n Variables variables = new Variables();\n\n //Create the random variables of the model.\n // Some of them are associated to one attribute to retrieve its observed values from the data set.\n Variable temperatureBuilding = variables.newGaussianVariable(\"TemperatureBuilding\");\n\n Variable[] fire = new Variable[nRooms];\n Variable[] temperature = new Variable[nRooms];\n Variable[] smoke = new Variable[nRooms];\n Variable[] sensorT1 = new Variable[nRooms];\n Variable[] sensorT2 = new Variable[nRooms];\n Variable[] sensorSmoke = new Variable[nRooms];\n\n for (int i = 0; i < nRooms; i++) {\n fire[i] = variables.newMultinomialVariable(attributes.getAttributeByName(\"Fire_\"+i));\n temperature[i] = variables.newGaussianVariable(\"Temperature_\"+i);\n smoke[i] = variables.newMultinomialVariable(\"Smoke_\"+i, 2);\n sensorT1[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorTemp1_\"+i));\n sensorT2[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorTemp2_\"+i));\n sensorSmoke[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorSmoke_\"+i));\n }\n\n //Create the directed acyclic graph object encoding the conditional independence relationship among the variables of the model.\n DAG dag = new DAG(variables);\n for (int i = 0; i < nRooms; i++) {\n //Define the parent set for each random variable\n dag.getParentSet(sensorT1[i]).addParent(temperature[i]);\n dag.getParentSet(sensorT2[i]).addParent(temperature[i]);\n\n dag.getParentSet(sensorSmoke[i]).addParent(smoke[i]);\n\n dag.getParentSet(temperature[i]).addParent(fire[i]);\n dag.getParentSet(smoke[i]).addParent(fire[i]);\n\n dag.getParentSet(temperature[i]).addParent(temperatureBuilding);\n }\n\n //Print the defined DAG\n System.out.println(dag);\n\n return dag;\n }",
"public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"@Test\n\tpublic void testDAG() {\n\t\tDirectedGraph<Integer, DirectedEdge<Integer>> directedGraph = new DirectedGraph<Integer, DirectedEdge<Integer>>();\n\t\tdirectedGraph.addNode(1);\n\t\tdirectedGraph.addNode(2);\n\t\tdirectedGraph.addNode(3);\n\t\tdirectedGraph.addNode(4);\n\t\tdirectedGraph.addNode(5);\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 2));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(1, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(2, 3));\n\t\tdirectedGraph.addDirectedEdge(new DirectedEdge<Integer>(4, 5));\n\t\t\n\t\t// tested method calls\n\t\tSet<Integer> reachableNodesFrom1 = service.getReachableNodes(directedGraph, 1);\n\t\tSet<Integer> reachableNodesFrom2 = service.getReachableNodes(directedGraph, 2);\n\t\tSet<Integer> reachableNodesFrom3 = service.getReachableNodes(directedGraph, 3);\n\t\tSet<Integer> reachableNodesFrom4 = service.getReachableNodes(directedGraph, 4);\n\t\tSet<Integer> reachableNodesFrom5 = service.getReachableNodes(directedGraph, 5);\n\t\t\n\t\t// assertions\n\t\tassertEquals(ImmutableSet.of(2, 3), reachableNodesFrom1);\n\t\tassertEquals(ImmutableSet.of(3), reachableNodesFrom2);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom3);\n\t\tassertEquals(ImmutableSet.of(5), reachableNodesFrom4);\n\t\tassertEquals(ImmutableSet.of(), reachableNodesFrom5);\n\t}",
"public static void main(String[] args) {\n /* *************** */\n /* * QUESTION 7 * */\n /* *************** */\n /* *************** */\n\n for(double p=0; p<1; p+=0.1){\n for(double q=0; q<1; q+=0.1){\n int res_1 = 0;\n int res_2 = 0;\n for(int i=0; i<100; i++){\n Graph graph_1 = new Graph();\n graph_1.generate_full_symmetric(p, q, 100);\n //graph_2.setVertices(new ArrayList<>(graph_1.getVertices()));\n Graph graph_2 = (Graph) deepCopy(graph_1);\n res_1+=graph_1.resolve_heuristic_v1().size();\n res_2+=graph_2.resolve_heuristic_v2();\n }\n res_1/=100;\n System.out.format(\"V1 - f( %.1f ; %.1f) = %s \\n\", p, q, res_1);\n res_2/=100;\n System.out.format(\"V2 - f( %.1f ; %.1f) = %s \\n\", p, q, res_2);\n }\n }\n\n }",
"@Test\n public void getLocallyExecutableNodes() {\n final String LOCUS_KEY = \"locus\";\n final String EARTH_KEY = \"earth\";\n final String MOON_KEY = \"moon\";\n final String SKY_LABS_KEY = \"sky-labs\";\n AnalysisGraph graph =\n new AnalysisGraph() {\n /*\n ------------------\n | CPU |\n | | |\n | \\|/ |\n | EARTH |\n |-------|---------|\n | |\n | |\n | |\n | |\n -------|---------- |\n | \\|/ | |\n | MOON | |\n | | |\n |-----------------| |\n \\ |\n \\ |\n \\ |\n \\ |\n \\ |\n \\ |\n |------\\--|--------|\n | cpu \\ | |\n | \\ \\| |\n | \\/ \\/ | Skylabs consumes the locally generated metric\n | skylabs | CPU and also the metrics from remote nodes moon\n |------------------| and earth.\n\n In this graph:\n IntentFlow:\n - Moon -> Earth\n - SkyLabs -> Earth\n - SkyLabs -> Moon\n DataFlow:\n - Earth -> Moon\n - Earth -> SkyLabs\n - Moon -> Skylabs\n The following code tests this.\n */\n\n @Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }\n };\n\n RcaConf earthConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, EARTH_KEY);\n }\n };\n }\n };\n\n RcaConf moonConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, MOON_KEY);\n }\n };\n }\n };\n\n RcaConf skyLabsConf =\n new RcaConf() {\n @Override\n public Map<String, String> getTagMap() {\n return new HashMap<String, String>() {\n {\n this.put(LOCUS_KEY, SKY_LABS_KEY);\n }\n };\n }\n };\n\n class WireHopperDerived extends WireHopper {\n DataMsg dataMsg;\n List<IntentMsg> intentMsgs;\n int intextIdx = 0;\n\n private WireHopperDerived(IntentMsg intentMsg, DataMsg dataMsg) {\n this(Collections.singletonList(intentMsg), dataMsg);\n }\n\n private WireHopperDerived(List<IntentMsg> intentMsg, DataMsg dataMsg) {\n super(null, null, null, null, null, new AppContext());\n this.intentMsgs = intentMsg;\n this.dataMsg = dataMsg;\n }\n\n @Override\n public void sendData(DataMsg msg) {\n assertEquals(msg.getSourceGraphNode(), this.dataMsg.getSourceGraphNode());\n AssertHelper.compareLists(msg.getDestinationGraphNodes(), this.dataMsg.getDestinationGraphNodes());\n }\n\n @Override\n public void sendIntent(IntentMsg intentMsg) {\n assertEquals(\n intentMsg.getRequesterGraphNode(), this.intentMsgs.get(intextIdx).getRequesterGraphNode());\n assertEquals(\n intentMsg.getDestinationGraphNode(), this.intentMsgs.get(intextIdx).getDestinationGraphNode());\n intextIdx++;\n }\n }\n\n List<ConnectedComponent> connectedComponents = RcaUtil.getAnalysisGraphComponents(graph);\n\n class RCASchedulerTaskMock extends RCASchedulerTask {\n private RCASchedulerTaskMock(RcaConf conf, WireHopper wireHopper) {\n super(\n 100,\n Executors.newFixedThreadPool(2),\n connectedComponents,\n null,\n null,\n conf,\n wireHopper,\n new AppContext());\n }\n }\n\n RCASchedulerTaskMock earthTask =\n new RCASchedulerTaskMock(\n earthConf,\n new WireHopperDerived(\n Collections.emptyList(),\n new DataMsg(\n EARTH_KEY,\n new ArrayList<String>() {\n {\n add(MOON_KEY);\n add(SKY_LABS_KEY);\n }\n },\n null)));\n\n RCASchedulerTaskMock moonTask =\n new RCASchedulerTaskMock(\n moonConf,\n new WireHopperDerived(\n new IntentMsg(MOON_KEY, EARTH_KEY, null),\n new DataMsg(\n MOON_KEY,\n new ArrayList<String>() {\n {\n add(SKY_LABS_KEY);\n }\n },\n null)));\n RCASchedulerTaskMock skyLabsTask =\n new RCASchedulerTaskMock(\n skyLabsConf,\n new WireHopperDerived(\n new ArrayList<IntentMsg>() {\n {\n add(new IntentMsg(SKY_LABS_KEY, EARTH_KEY, null));\n add(new IntentMsg(SKY_LABS_KEY, MOON_KEY, null));\n }\n },\n null));\n\n earthTask.run();\n\n moonTask.run();\n\n skyLabsTask.run();\n }",
"@Test\n public void cyclicalGraphs3Test() throws Exception {\n // Test graphs with multiple loops. g1 has two different loops, which\n // have to be correctly matched to g2 -- which is build in a different\n // order but is topologically identical to g1.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop1 in g1, with the first 4 nodes.\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop2 in g1, with the last 2 nodes, plus the initial node.\n g1Nodes.get(0).addTransition(g1Nodes.get(4), Event.defTimeRelationStr);\n g1Nodes.get(4).addTransition(g1Nodes.get(5), Event.defTimeRelationStr);\n g1Nodes.get(5).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g1, 0);\n\n // //////////////////\n // Now create g2, by generating the two identical loops in the reverse\n // order.\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"b\", \"c\" });\n\n // Create loop2 in g2, with the last 2 nodes, plus the initial node.\n g2Nodes.get(0).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n g2Nodes.get(4).addTransition(g2Nodes.get(5), Event.defTimeRelationStr);\n g2Nodes.get(5).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n // Create loop1 in g2, with the first 4 nodes.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n\n exportTestGraph(g2, 1);\n\n // //////////////////\n // Now test that the two graphs are identical for all k starting at the\n // initial node.\n\n for (int k = 1; k < 7; k++) {\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), k);\n }\n }",
"public abstract int numOfSameTypeNeighbourToReproduce();",
"public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }",
"public static void main(String args[]) {\n int V = 4;\n Graph g = new Graph(V);\n g.addEdge(0, 1);\n g.addEdge(0, 2);\n g.addEdge(1, 2);\n g.addEdge(2, 0);\n g.addEdge(2, 3);\n g.addEdge(3, 3);\n\n int src = 1;\n int dest = 3;\n boolean[] visited = new boolean[V];\n\n // To store the complete path between source and destination\n Stack<Integer> path1 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path1)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path1);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n src = 3;\n dest = 1;\n // To store the complete path between source and destination\n Stack<Integer> path2 = new Stack<>();\n\n if (hasPathDFS(g, src, dest, visited, path2)) System.out.println(\"There is a path from \" + src + \" to \" + dest);\n else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n // total number of nodes in the graph (labeled from 0 to 7)\n int n = 8;\n\n // List of graph edges as per the above diagram\n Graph g2 = new Graph(n);\n /**\n * There is a path from 1 to 3\n * The complete path is [1, 2, 3]\n * There is no path from 3 to 1\n * There is a path from 0 to 7\n * The complete path is [0, 3, 4, 6, 7]\n */\n\n g2.addEdge(0, 3);\n g2.addEdge(1, 0);\n g2.addEdge(1, 2);\n g2.addEdge(1, 4);\n g2.addEdge(2, 7);\n g2.addEdge(3, 4);\n g2.addEdge(3, 5);\n g2.addEdge(4, 3);\n g2.addEdge(4, 6);\n g2.addEdge(5, 6);\n g2.addEdge(6, 7);\n\n // source and destination vertex\n src = 0;\n dest = 7;\n\n // To store the complete path between source and destination\n Stack<Integer> path = new Stack<>();\n boolean[] visited2 = new boolean[n];\n\n if (hasPathDFS(g2, src, dest, visited2, path)) {\n System.out.println(\"There is a path from \" + src + \" to \" + dest);\n System.out.println(\"The complete path is \" + path);\n } else System.out.println(\"There is no path from \" + src + \" to \" + dest);\n\n\n }",
"public void buildGraph(){\n\t}",
"private List<Set<GraphChange>> findChanges(Map<Collection<Node>, List<PossibleDConnectingPath>> paths) {\n List<Set<GraphChange>> pagChanges = new ArrayList<>();\n\n Set<Map.Entry<Collection<Node>, List<PossibleDConnectingPath>>> entries = paths.entrySet();\n /* Loop through each entry, ie each conditioned set of variables. */\n for (Map.Entry<Collection<Node>, List<PossibleDConnectingPath>> entry : entries) {\n Collection<Node> conditions = entry.getKey();\n List<PossibleDConnectingPath> dConnecting = entry.getValue();\n\n /* loop through each path */\n for (PossibleDConnectingPath possible : dConnecting) {\n List<Node> possPath = possible.getPath();\n /* Created with 2*# of undirectedPaths as appoximation. might have to increase size once */\n Set<GraphChange> pathChanges = new HashSet<>(2 * possPath.size());\n\n /* find those conditions which are not along the path (used in colider) */\n List<Node> outsidePath = new ArrayList<>(conditions.size());\n for (Node condition : conditions) {\n if (!possPath.contains(condition))\n outsidePath.add(condition);\n }\n\n /* Walk through path, node by node */\n for (int i = 0; i < possPath.size() - 1; i++) {\n Node current = possPath.get(i);\n Node next = possPath.get(i + 1);\n GraphChange gc;\n\n /* for each pair of nodes, add the operation to remove their edge */\n gc = new GraphChange();\n gc.addRemove(possible.getPag().getEdge(current, next));\n pathChanges.add(gc);\n\n /* for each triple centered on a node which is an element of the conditioning\n * set, add the operation to orient as a nonColider around that node */\n if (conditions.contains(current) && i > 0) {\n gc = new GraphChange();\n Triple nonColider = new Triple(possPath.get(i - 1), current, next);\n gc.addNonCollider(nonColider);\n pathChanges.add(gc);\n }\n\n /* for each node on the path not in the conditioning set, make a colider. It\n * is necessary though to ensure that there are no undirectedPaths implying that a\n * conditioned variable (even outside the path) is a decendant of a colider */\n if ((!conditions.contains(current)) && i > 0) {\n Triple colider = new Triple(possPath.get(i - 1), current, next);\n\n if (possible.getPag().isUnderlineTriple(possPath.get(i - 1), current, next))\n continue;\n\n Edge edge1 = possible.getPag().getEdge(colider.getX(), colider.getY());\n Edge edge2 = possible.getPag().getEdge(colider.getZ(), colider.getY());\n\n if (edge1.getNode1().equals(colider.getY())) {\n if (edge1.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge1.getNode2().equals(colider.getY())) {\n if (edge1.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n if (edge2.getNode1().equals(colider.getY())) {\n if (edge2.getEndpoint1().equals(Endpoint.TAIL)) {\n continue;\n }\n } else if (edge2.getNode2().equals(colider.getY())) {\n if (edge2.getEndpoint2().equals(Endpoint.TAIL)) {\n continue;\n }\n }\n\n /* Simple case, no conditions outside the path, so just add colider */\n if (outsidePath.size() == 0) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* ensure nondecendency in possible path between getModel and each conditioned\n * variable outside the path */\n for (Node outside : outsidePath) {\n\n /* list of possible decendant undirectedPaths */\n\n List<PossibleDConnectingPath> decendantPaths = new ArrayList<>();\n decendantPaths\n = PossibleDConnectingPath.findDConnectingPaths\n (possible.getPag(), current, outside, new ArrayList<Node>());\n\n if (decendantPaths.isEmpty()) {\n gc = new GraphChange();\n gc.addCollider(colider);\n pathChanges.add(gc);\n continue;\n }\n\n /* loop over each possible path which might indicate decendency */\n for (PossibleDConnectingPath decendantPDCPath : decendantPaths) {\n List<Node> decendantPath = decendantPDCPath.getPath();\n\n /* walk down path checking orientation (path may already\n * imply non-decendency) and creating changes if need be*/\n boolean impliesDecendant = true;\n Set<GraphChange> colideChanges = new HashSet<>();\n for (int j = 0; j < decendantPath.size() - 1; j++) {\n Node from = decendantPath.get(j);\n // chaneges from +1\n Node to = decendantPath.get(j + 1);\n Edge currentEdge = possible.getPag().getEdge(from, to);\n\n if (currentEdge.getEndpoint1().equals(Endpoint.ARROW)) {\n impliesDecendant = false;\n break;\n }\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addRemove(currentEdge);\n colideChanges.add(gc);\n\n gc = new GraphChange();\n gc.addCollider(colider);\n gc.addOrient(to, from);\n colideChanges.add(gc);\n }\n if (impliesDecendant)\n pathChanges.addAll(colideChanges);\n }\n }\n }\n }\n\n pagChanges.add(pathChanges);\n }\n }\n return pagChanges;\n }",
"@Test\n public void cyclicalGraphs1Test() throws Exception {\n // NOTE: we can't use the parser to create a circular graph because\n // vector clocks are partially ordered and do not admit cycles. So we\n // have to create circular graphs manually.\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"a\",\n \"a\" });\n // Create a loop in g1, with 3 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"a\" });\n // Create a loop in g2, with 2 nodes\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n\n ChainsTraceGraph g3 = new ChainsTraceGraph();\n List<EventNode> g3Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n // Create a loop in g3, from a to itself\n g3Nodes.get(0).addTransition(g3Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g3, 2);\n\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g3Nodes.get(0), g2Nodes.get(0), 3);\n\n ChainsTraceGraph g4 = new ChainsTraceGraph();\n List<EventNode> g4Nodes = addNodesToGraph(g2, new String[] { \"a\" });\n exportTestGraph(g4, 2);\n\n testKEqual(g4Nodes.get(0), g2Nodes.get(0), 1);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 2);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 3);\n testNotKEqual(g4Nodes.get(0), g2Nodes.get(0), 4);\n }",
"public static void main (String[] args){\n\n Graph test = new Graph(30,\"/main/graphs/test30\");\n Graph test2 = new Graph(5,\"/main/graphs/graph5\");\n Graph g1 = new Graph(30,\"/main/graphs/graph30\");\n Graph g2 = new Graph(50,\"/main/graphs/graph50\");\n Graph g3 = new Graph(55,\"/main/graphs/graph55\");\n Graph g4 = new Graph(60,\"/main/graphs/graph60\");\n Graph g5 = new Graph(65,\"/main/graphs/graph65\");\n Graph g6 = new Graph(70,\"/main/graphs/graph70\");\n Graph g7 = new Graph(75,\"/main/graphs/graph75\");\n Graph g8 = new Graph(80,\"/main/graphs/graph80\");\n Graph g9 = new Graph(85,\"/main/graphs/graph85\");\n Graph g10 = new Graph(90,\"/main/graphs/graph90\");\n Graph g11= new Graph(100,\"/main/graphs/graph100\");\n Graph g12= new Graph(200,\"/main/graphs/graph200\");\n Graph g13= new Graph(200,\"/main/graphs/graph200_2\");\n\n Algo algo = new Algo(test);\n System.out.println(\"Graphe test : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g1);\n System.out.println(\"Graphe a 30 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,30/2))));\n\n algo = new Algo(g2);\n System.out.println(\"Graphe a 50 sommets : \" +algo.runNtimes((int) (10*Math.pow(2,50/2))));\n\n algo = new Algo(g3);\n System.out.println(\"Graphe a 55 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,55/2))));\n\n algo = new Algo(g4);\n System.out.println(\"Graphe a 60 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,60/2))));\n\n algo = new Algo(g5);\n System.out.println(\"Graphe a 65 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,65/2))));\n\n algo = new Algo(g6);\n System.out.println(\"Graphe a 70 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,70/2))));\n\n algo = new Algo(g7);\n System.out.println(\"Graphe a 75 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,75/2))));\n\n algo = new Algo(g8);\n System.out.println(\"Graphe a 80 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,80/2))));\n\n algo = new Algo(g9);\n System.out.println(\"Graphe a 85 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,85/2))));\n\n algo = new Algo(g10);\n System.out.println(\"Graphe a 90 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,90/2))));\n\n algo = new Algo(g11);\n System.out.println(\"Graphe a 100 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,100/2))));\n\n algo = new Algo(g12);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n algo = new Algo(g13);\n System.out.println(\"Graphe a 200 sommets : \" + algo.runNtimes((int) (10*Math.pow(2,200/2))));\n\n }",
"@Test\n public void testBuildGraph_FactorArr_booleanArrArr() {\n\n char[][] adjacency = new char[][]{\n {0, 0, 0, 0, 0, 0, 0, 1, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 1, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 1, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 1, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 1, 0, 0, 0},\n {1, 0, 0, 0, 0, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 1, 0, 0, 0, 0},\n {0, 0, 0, 0, 0, 0, 0, 0, 1, 0},\n };\n\n CostFunction[][] factors = new CostFunction[][]{\n {factory.buildCostFunction( new Variable[]{v[0],v[7]}, 0 )},\n {},\n {factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[3]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3],v[4]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[1],v[5]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[6]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[6],v[7]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[6]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[3],v[7]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[4],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[8]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8]}, 0 )},\n {factory.buildCostFunction( new Variable[]{v[2],v[5],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[5],v[6],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[4],v[7],v[9]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[8],v[9]}, 0 )},\n };\n\n GdlFactory gf = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(gf, factors, adjacency);\n //System.out.println(result);\n }",
"public List<Graph> search() {\n\n long start = System.currentTimeMillis();\n TetradLogger.getInstance().log(\"info\", \"Starting ION Search.\");\n logGraphs(\"\\nInitial Pags: \", this.input);\n TetradLogger.getInstance().log(\"info\", \"Transfering local information.\");\n long steps = System.currentTimeMillis();\n\n /*\n * Step 1 - Create the empty graph\n */\n List<Node> varNodes = new ArrayList<>();\n for (String varName : variables) {\n varNodes.add(new GraphNode(varName));\n }\n Graph graph = new EdgeListGraph(varNodes);\n\n /*\n * Step 2 - Transfer local information from the PAGs (adjacencies\n * and edge orientations)\n */\n // transfers edges from each graph and finds definite noncolliders\n transferLocal(graph);\n // adds edges for variables never jointly measured\n for (NodePair pair : nonIntersection(graph)) {\n graph.addEdge(new Edge(pair.getFirst(), pair.getSecond(), Endpoint.CIRCLE, Endpoint.CIRCLE));\n }\n TetradLogger.getInstance().log(\"info\", \"Steps 1-2: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n System.out.println(\"step2\");\n System.out.println(graph);\n\n /*\n * Step 3\n *\n * Branch and prune step that blocks problematic undirectedPaths, possibly d-connecting undirectedPaths\n */\n steps = System.currentTimeMillis();\n Queue<Graph> searchPags = new LinkedList<>();\n // place graph constructed in step 2 into the queue\n searchPags.offer(graph);\n // get d-separations and d-connections\n List<Set<IonIndependenceFacts>> sepAndAssoc = findSepAndAssoc(graph);\n this.separations = sepAndAssoc.get(0);\n this.associations = sepAndAssoc.get(1);\n Map<Collection<Node>, List<PossibleDConnectingPath>> paths;\n// Queue<Graph> step3PagsSet = new LinkedList<Graph>();\n HashSet<Graph> step3PagsSet = new HashSet<>();\n Set<Graph> reject = new HashSet<>();\n // if no d-separations, nothing left to search\n if (separations.isEmpty()) {\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(graph);\n step3PagsSet.add(graph);\n }\n // sets length to iterate once if search over path lengths not enabled, otherwise set to 2\n int numNodes = graph.getNumNodes();\n int pl = numNodes - 1;\n if (pathLengthSearch) {\n pl = 2;\n }\n // iterates over path length, then adjacencies\n for (int l = pl; l < numNodes; l++) {\n if (pathLengthSearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path lengths: \" + l + \" of \" + (numNodes - 1));\n }\n int seps = separations.size();\n int currentSep = 1;\n int numAdjacencies = separations.size();\n for (IonIndependenceFacts fact : separations) {\n if (adjacencySearch) {\n TetradLogger.getInstance().log(\"info\", \"Braching over path nonadjacencies: \" + currentSep + \" of \" + numAdjacencies);\n }\n seps--;\n // uses two queues to keep up with which PAGs are being iterated and which have been\n // accepted to be iterated over in the next iteration of the above for loop\n searchPags.addAll(step3PagsSet);\n recGraphs.add(searchPags.size());\n step3PagsSet.clear();\n while (!searchPags.isEmpty()) {\n System.out.println(\"ION Step 3 size: \" + searchPags.size());\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n // deques first PAG from searchPags\n Graph pag = searchPags.poll();\n // Part 3.a - finds possibly d-connecting undirectedPaths between each pair of nodes\n // known to be d-separated\n List<PossibleDConnectingPath> dConnections = new ArrayList<>();\n // checks to see if looping over adjacencies\n if (adjacencySearch) {\n for (Collection<Node> conditions : fact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, fact.getX(), fact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, fact.getX(), fact.getY(), conditions));\n }\n }\n } else {\n for (IonIndependenceFacts allfact : separations) {\n for (Collection<Node> conditions : allfact.getZ()) {\n // checks to see if looping over path lengths\n if (pathLengthSearch) {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPathsOfLength\n (pag, allfact.getX(), allfact.getY(), conditions, l));\n } else {\n dConnections.addAll(PossibleDConnectingPath.findDConnectingPaths\n (pag, allfact.getX(), allfact.getY(), conditions));\n }\n }\n }\n }\n // accept PAG go to next PAG if no possibly d-connecting undirectedPaths\n if (dConnections.isEmpty()) {\n// doFinalOrientation(pag);\n// Graph p = screenForKnowledge(pag);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(pag);\n continue;\n }\n // maps conditioning sets to list of possibly d-connecting undirectedPaths\n paths = new HashMap<>();\n for (PossibleDConnectingPath path : dConnections) {\n List<PossibleDConnectingPath> p = paths.get(path.getConditions());\n if (p == null) {\n p = new LinkedList<>();\n }\n p.add(path);\n paths.put(path.getConditions(), p);\n }\n // Part 3.b - finds minimal graphical changes to block possibly d-connecting undirectedPaths\n List<Set<GraphChange>> possibleChanges = new ArrayList<>();\n for (Set<GraphChange> changes : findChanges(paths)) {\n Set<GraphChange> newChanges = new HashSet<>();\n for (GraphChange gc : changes) {\n boolean okay = true;\n for (Triple collider : gc.getColliders()) {\n\n if (pag.isUnderlineTriple(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n\n }\n if (!okay) {\n continue;\n }\n for (Triple collider : gc.getNoncolliders()) {\n if (pag.isDefCollider(collider.getX(), collider.getY(), collider.getZ())) {\n okay = false;\n break;\n }\n }\n if (okay) {\n newChanges.add(gc);\n }\n }\n if (!newChanges.isEmpty()) {\n possibleChanges.add(newChanges);\n } else {\n possibleChanges.clear();\n break;\n }\n }\n float starthitset = System.currentTimeMillis();\n Collection<GraphChange> hittingSets = IonHittingSet.findHittingSet(possibleChanges);\n recHitTimes.add((System.currentTimeMillis() - starthitset) / 1000.);\n // Part 3.c - checks the newly constructed graphs from 3.b and rejects those that\n // cycles or produce independencies known not to occur from the input PAGs or\n // include undirectedPaths from definite nonancestors\n for (GraphChange gc : hittingSets) {\n boolean badhittingset = false;\n for (Edge edge : gc.getRemoves()) {\n Node node1 = edge.getNode1();\n Node node2 = edge.getNode2();\n Set<Triple> triples = new HashSet<>();\n triples.addAll(gc.getColliders());\n triples.addAll(gc.getNoncolliders());\n if (triples.size() != (gc.getColliders().size() + gc.getNoncolliders().size())) {\n badhittingset = true;\n break;\n }\n for (Triple triple : triples) {\n if (node1.equals(triple.getY())) {\n if (node2.equals(triple.getX()) ||\n node2.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n if (node2.equals(triple.getY())) {\n if (node1.equals(triple.getX()) ||\n node1.equals(triple.getZ())) {\n badhittingset = true;\n break;\n }\n }\n }\n if (badhittingset) {\n break;\n }\n for (NodePair pair : gc.getOrients()) {\n if ((node1.equals(pair.getFirst()) && node2.equals(pair.getSecond())) ||\n (node2.equals(pair.getFirst()) && node1.equals(pair.getSecond()))) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (!badhittingset) {\n for (NodePair pair : gc.getOrients()) {\n for (Triple triple : gc.getNoncolliders()) {\n if (pair.getSecond().equals(triple.getY())) {\n if (pair.getFirst().equals(triple.getX()) &&\n pag.getEndpoint(triple.getZ(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n\n }\n if (pair.getFirst().equals(triple.getZ()) &&\n pag.getEndpoint(triple.getX(), triple.getY()).equals(Endpoint.ARROW)) {\n badhittingset = true;\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n if (badhittingset) {\n break;\n }\n }\n }\n if (badhittingset) {\n continue;\n }\n Graph changed = gc.applyTo(pag);\n // if graph change has already been rejected move on to next graph\n if (reject.contains(changed)) {\n continue;\n }\n // if graph change has already been accepted move on to next graph\n if (step3PagsSet.contains(changed)) {\n continue;\n }\n // reject if null, predicts false independencies or has cycle\n if (predictsFalseIndependence(associations, changed)\n || changed.existsDirectedCycle()) {\n reject.add(changed);\n }\n // makes orientations preventing definite noncolliders from becoming colliders\n // do final orientations\n// doFinalOrientation(changed);\n // now add graph to queue\n\n// Graph p = screenForKnowledge(changed);\n// if (p != null) step3PagsSet.add(p);\n step3PagsSet.add(changed);\n }\n }\n // exits loop if not looping over adjacencies\n if (!adjacencySearch) {\n break;\n }\n }\n }\n TetradLogger.getInstance().log(\"info\", \"Step 3: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n Queue<Graph> step3Pags = new LinkedList<>(step3PagsSet);\n\n /*\n * Step 4\n *\n * Finds redundant undirectedPaths and uses this information to expand the list\n * of possible graphs\n */\n steps = System.currentTimeMillis();\n Map<Edge, Boolean> necEdges;\n Set<Graph> outputPags = new HashSet<>();\n\n while (!step3Pags.isEmpty()) {\n Graph pag = step3Pags.poll();\n necEdges = new HashMap<>();\n // Step 4.a - if x and y are known to be unconditionally associated and there is\n // exactly one trek between them, mark each edge on that trek as necessary and\n // make the tiples on the trek definite noncolliders\n // initially mark each edge as not necessary\n for (Edge edge : pag.getEdges()) {\n necEdges.put(edge, false);\n }\n // look for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n List<List<Node>> treks = treks(pag, fact.x, fact.y);\n if (treks.size() == 1) {\n List<Node> trek = treks.get(0);\n List<Triple> triples = new ArrayList<>();\n for (int i = 1; i < trek.size(); i++) {\n // marks each edge in trek as necessary\n necEdges.put(pag.getEdge(trek.get(i - 1), trek.get(i)), true);\n if (i == 1) {\n continue;\n }\n // makes each triple a noncollider\n pag.addUnderlineTriple(trek.get(i - 2), trek.get(i - 1), trek.get(i));\n }\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // Part 4.b - branches by generating graphs for every combination of removing\n // redundant undirectedPaths\n boolean elimTreks;\n // checks to see if removing redundant undirectedPaths eliminates every trek between\n // two variables known to be nconditionally assoicated\n List<Graph> possRemovePags = possRemove(pag, necEdges);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n for (Graph newPag : possRemovePags) {\n elimTreks = false;\n // looks for unconditional associations\n for (IonIndependenceFacts fact : associations) {\n for (List<Node> nodes : fact.getZ()) {\n if (nodes.isEmpty()) {\n if (treks(newPag, fact.x, fact.y).isEmpty()) {\n elimTreks = true;\n }\n // stop looping once the empty set is found\n break;\n }\n }\n }\n // add new PAG to output unless a necessary trek has been eliminated\n if (!elimTreks) {\n outputPags.add(newPag);\n }\n }\n }\n outputPags = removeMoreSpecific(outputPags);\n// outputPags = applyKnowledge(outputPags);\n\n TetradLogger.getInstance().log(\"info\", \"Step 4: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n\n /*\n * Step 5\n *\n * Generate the Markov equivalence classes for graphs and accept only\n * those that do not predict false d-separations\n */\n steps = System.currentTimeMillis();\n Set<Graph> outputSet = new HashSet<>();\n for (Graph pag : outputPags) {\n Set<Triple> unshieldedPossibleColliders = new HashSet<>();\n for (Triple triple : getPossibleTriples(pag)) {\n if (!pag.isAdjacentTo(triple.getX(), triple.getZ())) {\n unshieldedPossibleColliders.add(triple);\n }\n }\n\n PowerSet<Triple> pset = new PowerSet<>(unshieldedPossibleColliders);\n for (Set<Triple> set : pset) {\n Graph newGraph = new EdgeListGraph(pag);\n for (Triple triple : set) {\n newGraph.setEndpoint(triple.getX(), triple.getY(), Endpoint.ARROW);\n newGraph.setEndpoint(triple.getZ(), triple.getY(), Endpoint.ARROW);\n }\n doFinalOrientation(newGraph);\n }\n for (Graph outputPag : finalResult) {\n if (!predictsFalseIndependence(associations, outputPag)) {\n Set<Triple> underlineTriples = new HashSet<>(outputPag.getUnderLines());\n for (Triple triple : underlineTriples) {\n outputPag.removeUnderlineTriple(triple.getX(), triple.getY(), triple.getZ());\n }\n outputSet.add(outputPag);\n }\n }\n }\n\n// outputSet = applyKnowledge(outputSet);\n outputSet = checkPaths(outputSet);\n\n output.addAll(outputSet);\n TetradLogger.getInstance().log(\"info\", \"Step 5: \" + (System.currentTimeMillis() - steps) / 1000. + \"s\");\n runtime = ((System.currentTimeMillis() - start) / 1000.);\n logGraphs(\"\\nReturning output (\" + output.size() + \" Graphs):\", output);\n double currentUsage = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();\n if (currentUsage > maxMemory) maxMemory = currentUsage;\n return output;\n }",
"@Test\n public void solveTest5() throws ContradictionException {\n\n Set<ConstraintInfo> constraints = new HashSet<>();\n Set<Position> vars = new HashSet<>();\n Position[] varArr = new Position[]{\n this.grid.getVariable(0, 6),\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(3, 6),\n this.grid.getVariable(4, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(6, 6),\n this.grid.getVariable(7, 6),\n this.grid.getVariable(7, 5),\n this.grid.getVariable(7, 4),\n this.grid.getVariable(7, 3),\n this.grid.getVariable(7, 2),\n this.grid.getVariable(6, 2),\n this.grid.getVariable(5, 2),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 0)\n };\n vars.addAll(Arrays.asList(varArr));\n ArrayList<Set<Position>> cArr = new ArrayList<>();\n for (int i = 0; i < 14; i++) cArr.add(new HashSet<>());\n add(cArr.get(0), varArr[0], varArr[1]);\n add(cArr.get(1), varArr[0], varArr[1], varArr[2]);\n add(cArr.get(2), varArr[3], varArr[1], varArr[2]);\n add(cArr.get(3), varArr[3], varArr[4], varArr[2]);\n add(cArr.get(4), varArr[3], varArr[4], varArr[5]);\n add(cArr.get(5), varArr[6], varArr[4], varArr[5]);\n add(cArr.get(6), varArr[6], varArr[7], varArr[5], varArr[8], varArr[9]);\n add(cArr.get(7), varArr[8], varArr[9], varArr[10]);\n add(cArr.get(8), varArr[9], varArr[10], varArr[11], varArr[12], varArr[13]);\n add(cArr.get(9), varArr[12], varArr[13]);\n add(cArr.get(10), varArr[13]);\n add(cArr.get(11), varArr[13], varArr[14]);\n add(cArr.get(12), varArr[13], varArr[14], varArr[15]);\n add(cArr.get(13), varArr[14], varArr[15]);\n\n int[] cVal = new int[] { 1,2,2,1,1,1,2,1,2,1,1,2,3,2 };\n for (int i = 0; i < 14; i++) {\n constraints.add(new ConstraintInfo(cArr.get(i), cVal[i]));\n }\n\n MSModel model = new MSModel(constraints, vars);\n\n Set<Position> expectedBombs = new HashSet<>();\n expectedBombs.addAll(Arrays.asList(\n this.grid.getVariable(1, 6),\n this.grid.getVariable(2, 6),\n this.grid.getVariable(5, 6),\n this.grid.getVariable(5, 0),\n this.grid.getVariable(5, 1),\n this.grid.getVariable(5, 2)\n ));\n Set<Position> expectedNoBombs = new HashSet<>();\n expectedNoBombs.addAll(Arrays.asList(\n this.grid.getVariable(6,2),\n this.grid.getVariable(0,6),\n this.grid.getVariable(3,6),\n this.grid.getVariable(4,6),\n this.grid.getVariable(6,6)\n ));\n\n for (Position pos : vars) {\n if (expectedBombs.contains(pos)) {\n assertTrue(model.hasBomb(pos));\n } else {\n assertFalse(model.hasBomb(pos));\n }\n\n if (expectedNoBombs.contains(pos)) {\n assertTrue(model.hasNoBombs(pos));\n } else {\n assertFalse(model.hasNoBombs(pos));\n }\n }\n\n /*\n 00002x???\n 00003x???\n 00002xxx?\n 0000112x?\n 0000001x?\n 1221112x?\n xxxxxxxx?\n ?????????\n */\n }",
"private void CreatingBeautyContent(int count,int typeSymmetry, int methodSearch) {\n\t\t\tConstraintsPlacement objConstraints= new ConstraintsPlacement(this);\r\n\t\t\t//Creating array with states\r\n\t\t\tArrayList<BlockNode> states = new ArrayList<BlockNode>();\r\n\t\t\t//Building the graph in a deph way\r\n\t \tGraphBuilder objGrapB= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB2= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB3= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB3a= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB4= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB5= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB6= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB7= new GraphBuilder(1);\r\n\t \tGraphBuilder objGrapB8= new GraphBuilder(1);\r\n\t \t\r\n\t \tobjGrapB.setWparamether(wParamether);\r\n\t \tobjGrapB2.setWparamether(wParamether);\r\n\t \tobjGrapB3.setWparamether(wParamether);\r\n\t \tobjGrapB3a.setWparamether(wParamether);\r\n\t \tobjGrapB4.setWparamether(wParamether);\r\n\t \tobjGrapB5.setWparamether(wParamether);\r\n\t \tobjGrapB6.setWparamether(wParamether);\r\n\t \tobjGrapB7.setWparamether(wParamether);\r\n\t \tobjGrapB8.setWparamether(wParamether);\r\n\t \t\r\n\t \tint numElements=objElem.getNumberObjects();\r\n\t \tint numEnemies=objElem.getNumberObjectsEnemies();\r\n\t \tint globalControlSearch=0;\r\n\t \t\r\n\t \tdouble time6=0;\r\n\t \tdouble time7=0;\r\n\t \tdouble time3=0;\r\n\t \tdouble time4=0;\r\n\t \tdouble time5=0;\r\n\t \tdouble time8=0;\r\n\t \t\r\n\t \tdouble startTime=0;\r\n\t \tdouble stopTime=0;\r\n\t \t\r\n\t \tdouble sum3=0;\r\n\t \tdouble sum4=0;\r\n\t \tdouble sum5=0;\r\n\t \tdouble sum6=0;\r\n\t \tdouble sum7=0;\r\n\t \tdouble sum8=0;\r\n\r\n\t \t\r\n\t \t//Beststates=objGrapB.basicDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem);\r\n\t \t//Beststates=objGrapB.relativePositionDepthSearch(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+2,mediumStraight-2,floorTileHeight,0,0,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.relativeTransPositionDepthSearch(mediumStraight,height,numElements,numElements,states,objConstraints, objElem.getFinalList(),objElem,-mediumStraight+1,mediumStraight-1,floorTileHeight,0,0,currentState,hTable);\r\n\t \t//Beststates=objGrapB.DepthSearchCenterFrame(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,1,mediumStraight-2,floorTileHeight,0,0,numEnemies,random,globalControlSearch);\r\n\t \t//Beststates=objGrapB.DepthSearchPruningAlt(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,1,mediumStraight-2,floorTileHeight,0,0,numEnemies,random,globalControlSearch);\r\n\t \t\r\n\t \r\n\r\n\t \r\n\t //3.3) Brute-force search\r\n\t //objElem.setFinalList(objElem.getFinalListNoOrder());\r\n\t \tfor(int i=0;i<1;i++)\r\n\t \t{\r\n\t \t\tstartTime = System.currentTimeMillis();\r\n\t \t\tBeststates3=objGrapB3.DepthSearchCenterFrameNoPruningNoRegionsNoObjects(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,0,mediumStraight-2,floorTileHeight,0,0,numEnemies,random,globalControlSearch,8,typeSymmetry);\r\n\t \t\tstopTime = System.currentTimeMillis();\r\n\t \t\ttime3 = stopTime - startTime;\r\n//\t \t\tround(time3,2);\r\n//\t \t\tdouble nodes3=round((double)objGrapB3.getCounterIDs(),2);\r\n//\t \t\tSystem.out.println(objGrapB3.bestSymmetryV+\" \"+time3+\" \"+((objGrapB3.getCounterIDs())));\r\n\t \t\tsum3=sum3+time3;\r\n\t \t}\r\n\t \ttime3=sum3/1;\r\n\t \ttime3=round(time3,2);\r\n\t //System.out.println(\"Time Brute-force search \"+elapsedTime);\r\n\t \t\r\n\t \r\n\t \r\n\t //3.7) B&B+heuristic\r\n\t //objElem.setFinalList(objElem.getFinalListNoOrder());\r\n\t \tfor(int i=0;i<1;i++)\r\n\t \t{\r\n\t \t\tstartTime = System.currentTimeMillis();\r\n\t \t\tBeststates7=objGrapB7.depthSearchBBHeuristic(mediumStraight,height,numElements-numEnemies,numElements-numEnemies,states,objConstraints, objElem.getFinalList(),objElem,0,mediumStraight-2,floorTileHeight,0,0,numEnemies,random,globalControlSearch,8,typeSymmetry);\r\n\t \t\tstopTime = System.currentTimeMillis();\r\n\t \t\ttime7 = stopTime - startTime;\r\n//\t \t\tround(time7,2);\r\n//\t \t\tdouble nodes7=round((double)objGrapB3.getCounterIDs(),2);\r\n//\t \t\tSystem.out.println(objGrapB6.bestSymmetryV+\" \"+time6+\" \"+((objGrapB6.getCounterIDs())));\r\n\t \t\tsum7=sum7+time7;\r\n\t \t}\r\n\t \ttime7=sum7/1;\r\n\t \ttime7=round(time7,2);\r\n\t //System.out.println(\"Time B&B+heuristic + region ordering \"+elapsedTime);\r\n\t \t\r\n\t \t\r\n\t \t\r\n//\t \tif(objGrapB3.bestSymmetryV<objGrapB5.bestSymmetryV)\r\n//\t \t{\r\n//\t \t\tdouble bestSYmmetry=objGrapB3.bestSymmetryV;\r\n//\t \t\t//System.out.println(\"bestSym \"+bestSYmmetry);\r\n//\t \t\tBestGlobalstates=Beststates3;\r\n//\t \t\t\r\n//\t \t}\r\n//\t \telse\r\n//\t \t{\r\n//\t \t\tdouble bestSYmmetry=objGrapB5.bestSymmetryV;\r\n//\t \t\t//System.out.println(\"bestSym \"+bestSYmmetry);\r\n//\t \t\tBestGlobalstates=Beststates5;\r\n//\t \t}\r\n\t \t\r\n\t \tBestGlobalstates=Beststates7;\r\n\t \r\n\t \r\n\t \t//**System.out.println(\"Simetry 0-> Brute-force search order \"+objGrapB3a.bestSymmetryV);\t\r\n\t \t//System.out.println(\"Simetry 1-> Brute-force search \"+objGrapB3.bestSymmetryV);\t \t\r\n\t \t//System.out.println(\"Simetry 2-> B&B+oldheuristic \"+objGrapB4.bestSymmetryV);\r\n\t \t//**System.out.println(\"Simetry 3-> B&B+heuristic + object ordering \"+objGrapB2.bestSymmetryV);\t \t\r\n\t \t//System.out.println(\"Simetry 4-> B&B+ region + leviheuristic\"+objGrapB5.bestSymmetryV);\r\n\t \t//**System.out.println(\"Simetry 5-> B&B+heuristic + region ordering + object ordering \"+objGrapB.bestSymmetryV);\r\n\t \t//System.out.println(\"Simetry 6-> B&B+heuristic + leviheuristic \"+objGrapB6.bestSymmetryV);\r\n\t \t//System.out.println(\"Simetry 7-> B&B+oldoldheuristic \"+objGrapB7.bestSymmetryV);\r\n\t \t\r\n\t \t//**System.out.println( \"States 0 \"+objGrapB3a.getCounterIDs() );\r\n\t \t//System.out.println( \"States 1 \"+objGrapB3.getCounterIDs() );\r\n\t \t//System.out.println( \"States 2 \"+objGrapB4.getCounterIDs() );\r\n\t \t//**System.out.println( \"States 3 \"+objGrapB2.getCounterIDs() );\t \t\t \t\r\n\t \t//System.out.println( \"States 4 \"+objGrapB5.getCounterIDs() );\r\n\t \t//**System.out.println( \"States 5 \"+objGrapB.getCounterIDs() );\r\n\t \t//System.out.println( \"States 6 \"+objGrapB6.getCounterIDs() );\r\n\t \t//System.out.println( \"States 7 \"+objGrapB7.getCounterIDs() );\r\n\t \t\r\n\t \tdouble TimeRate7=time3/time7;\r\n\t \tdouble TimeRate6=time3/time6;\r\n\t \tdouble TimeRate5=time3/time5;\r\n\t \t\r\n\t \tTimeRate7=round(TimeRate7,2);\r\n\t \tTimeRate6=round(TimeRate6,2);\r\n\t \tTimeRate5=round(TimeRate5,2);\r\n\t \t\r\n\t \tdouble NodesRate7=(double)objGrapB3.getCounterIDs()/(double)objGrapB7.getCounterIDs();\r\n\t \tdouble NodesRate6=(double)objGrapB3.getCounterIDs()/(double)objGrapB6.getCounterIDs();\r\n\t \tdouble NodesRate5=(double)objGrapB3.getCounterIDs()/(double)objGrapB5.getCounterIDs();\r\n\t \t\r\n\t \tNodesRate7=round(NodesRate7,2);\r\n\t \tNodesRate6=round(NodesRate6,2);\r\n\t \tNodesRate5=round(NodesRate5,2);\r\n\r\n\t \t\r\n\t \t\r\n\r\n\t //imprimiendo los estados visitados\r\n\t /*\r\n\t Iterator<BlockNode> nombreIterator = states.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \tSystem.out.print(elemento.getID()+\" / \");\r\n\t }*/\r\n\t \r\n\t //here we are painting as the best branch founded\r\n\t \r\n\t //System.out.println(\"nene \"+BestGlobalstates.size());\r\n\t Iterator<BlockNode> nombreIterator = BestGlobalstates.iterator();\r\n\t while(nombreIterator.hasNext()){\r\n\t \tBlockNode elemento = nombreIterator.next();\r\n\t \t//System.out.print(elemento.getID()+\"(\"+elemento.getX()+\" \"+elemento.getY()+\" ) - \"+elemento.getType()+\" \"+elemento.getIdElement()+ \" / \");\r\n\t }\r\n\t \r\n\t \r\n\t //Here we will put the elements on the tile\r\n\t try {\r\n\t Level levelScreen=PaintElements(BestGlobalstates,this);\r\n\t Screen objScreen=new Screen();\r\n\t\t\tobjScreen.SaveScreen(levelScreen,odds,objElem);\r\n \t\tInformacoesTelas info = new InformacoesTelas();\r\n\t CopiaArquivos copiador = new CopiaArquivos();\r\n\t \r\n\t info = info.carregaInfoTela(\"infoTela\");\r\n\t\t\tinfo.setOutrasVariaveis(0, 0); // Salva outras informacoes da Tela\r\n\t\t\tinfo.salvaInfoTela(\"infoTela\", info);\t\t\t\t\t\r\n\t\t\tcopiador.copy(\"\" + count, \"Screens/\");\r\n\t\t\t\r\n\t } catch (ClassNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}",
"@Test\n public void shouldOptimizeVisualizationOfThePipelineDependencyGraph() {\n\n String acceptance = \"acceptance\";\n String plugins = \"plugins\";\n String gitPlugins = \"git-plugins\";\n String cruise = \"cruise\";\n String gitTrunk = \"git-trunk\";\n String hgTrunk = \"hg-trunk\";\n String deployGo03 = \"deploy-go03\";\n String deployGo02 = \"deploy-go02\";\n String deployGo01 = \"deploy-go01\";\n String publish = \"publish\";\n\n ValueStreamMap graph = new ValueStreamMap(acceptance, null);\n graph.addUpstreamNode(new PipelineDependencyNode(plugins, plugins), null, acceptance);\n graph.addUpstreamNode(new PipelineDependencyNode(gitPlugins, gitPlugins), null, plugins);\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, plugins);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(gitTrunk, gitTrunk, \"git\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, cruise, new MaterialRevision(null));\n graph.addUpstreamNode(new PipelineDependencyNode(cruise, cruise), null, acceptance);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(hgTrunk, hgTrunk, \"hg\"), null, acceptance, new MaterialRevision(null));\n\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo03, deployGo03), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(publish, publish), deployGo03);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), publish);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo02, deployGo02), acceptance);\n graph.addDownstreamNode(new PipelineDependencyNode(deployGo01, deployGo01), deployGo02);\n\n List<List<Node>> nodesAtEachLevel = graph.presentationModel().getNodesAtEachLevel();\n\n assertThat(nodesAtEachLevel.size(), is(7));\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(0), 0, gitTrunk, hgTrunk);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(1), 1, gitPlugins, cruise);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(2), 2, plugins);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(3), 0, acceptance);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(4), 0, deployGo03, deployGo02);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(5), 1, publish);\n VSMTestHelper.assertThatLevelHasNodes(nodesAtEachLevel.get(6), 0, deployGo01);\n\n MatcherAssert.assertThat(graph.findNode(gitTrunk).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(hgTrunk).getDepth(), is(3));\n MatcherAssert.assertThat(graph.findNode(gitPlugins).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(cruise).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(deployGo03).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo02).getDepth(), is(2));\n MatcherAssert.assertThat(graph.findNode(publish).getDepth(), is(1));\n MatcherAssert.assertThat(graph.findNode(deployGo01).getDepth(), is(1));\n }",
"public static void main(String[] args) {\n\t\tint[][] edges = {{0,1},{1,2},{1,3},{4,5}};\n\t\tGraph graph = createAdjacencyList(edges, true);\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) unDirected : \"+getNumberOfConnectedComponents(graph));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency List) Directed: \"+getNumberOfConnectedComponents(createAdjacencyList(edges, false)));\n\t\t\n\t\t//Shortest Distance & path\n\t\tint[][] edgesW = {{0,1,1},{1,2,4},{2,3,1},{0,3,3},{0,4,1},{4,3,1}};\n\t\tgraph = createAdjacencyList(edgesW, true);\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(graph, 0, 3));\n\t\t\n\t\t//Graph represented in Adjacency Matrix\n\t\tint[][] adjacencyMatrix = {{0,1,0,0,1,0},{1,0,1,1,0,0},{0,1,0,1,0,0},{0,1,0,0,0,0},{0,0,0,0,0,0},{0,0,0,0,0,0}};\n\t\t\n\t\t// Connected components or Friends circle\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Recursive: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\t\tSystem.out.println(\"Number of connected graphs(Adjacency Matrix) unDirected Iterative: \"+getNumberOfConnectedComponents(adjacencyMatrix));\n\n\t\tSystem.out.println(\"Shortest distance : \"+ getShortestDistance(adjacencyMatrix, 0, 3));\n\t\t\n\t\t// Number of Islands\n\t\tint[][] islandGrid = {{1,1,0,1},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Recursive: \"+ getNumberOfIslands(islandGrid));\n\t\t// re-initialize\n\t\tint[][] islandGridIterative = {{1,1,0,0},{0,1,0,0},{0,0,1,1},{0,1,1,0}};\n\t\tSystem.out.println(\"Number of islands Iterative: \"+ getNumberOfIslandsIterative(islandGridIterative));\n\n\n\t}",
"public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }",
"private void setGraphParameters()\r\n\t{\r\n\r\n\t\tlogger.info(\"Setting graph parameters.\");\r\n\t\tlogger.info(\"Treating the graph as undirected.\");\r\n\r\n\t\t// Diameter is the maximum of all shortest path lengths\r\n\t\t// Average shortest path length is (as the name says) the average of the\r\n\t\t// shortest path length between all node pairs\r\n\r\n\t\tdouble maxPathLength = 0.0;\r\n\t\tdouble shortestPathLengthSum = 0.0;\r\n\t\tdouble degreeSum = 0.0;\r\n\t\tdouble clusterCoefficientSum = 0.0;\r\n\r\n\t\t// iterate over all node pairs\r\n\t\tCollection<Entity> nodes = undirectedGraph.getVertices();\r\n\r\n\t\t// a hashset of the nodes which have been the start node of the\r\n\t\t// computation process\r\n\t\t// for such nodes all path lengths have been already computed\r\n\t\tSet<Entity> wasSource = new HashSet<Entity>();\r\n\r\n\t\tint progress = 0;\r\n\t\tfor (Entity node : nodes) {\r\n\r\n\t\t\tprogress++;\r\n\t\t\tLoggingUtils.printProgressInfo(progress, nodes.size(), 100,\r\n\t\t\t\t\tLoggingUtils.ProgressInfoMode.TEXT,\r\n\t\t\t\t\t\"Getting graph parameters\");\r\n\r\n\t\t\tint nodeDegree = getDegree(node);\r\n\t\t\t// degreeSum += nodeDegree;\r\n\r\n\t\t\t// logger.info(\"Updating degree distribution.\");\r\n\t\t\t// updateDegreeDistribution(nodeDegree);\r\n\r\n\t\t\t// cluster coefficient C_v of a node v is the fraction of the\r\n\t\t\t// connections that exist between the\r\n\t\t\t// neighbor nodes (k_v) of this node and all allowable connections\r\n\t\t\t// between the neighbors (k_v(k_v -1)/2)\r\n\t\t\t// for degrees 0 or 1 there is no cluster coefficient, as there can\r\n\t\t\t// be no connections between neighbors\r\n\t\t\tif (nodeDegree > 1) {\r\n\t\t\t\tdouble numberOfNeighborConnections = getNumberOfNeighborConnections(node);\r\n\t\t\t\tclusterCoefficientSum += (numberOfNeighborConnections / (nodeDegree * (nodeDegree - 1)));\r\n\t\t\t}\r\n\r\n\t\t\t// Returns the new shortestPathLengthSum and the new maxPathLength.\r\n\t\t\t// They are returned as an double array for performance reasons.\r\n\t\t\t// I do not want to create an object, as this function is called\r\n\t\t\t// *very* often\r\n\t\t\t// logger.info(\"Computing shortest path lengths.\");\r\n\t\t\tdouble[] returnValues = computeShortestPathLengths(node,\r\n\t\t\t\t\tshortestPathLengthSum, maxPathLength, wasSource);\r\n\t\t\tshortestPathLengthSum = returnValues[0];\r\n\t\t\tmaxPathLength = returnValues[1];\r\n\r\n\t\t\t// save the info that the node was already used as the source of\r\n\t\t\t// path computation\r\n\t\t\twasSource.add(node);\r\n\t\t}\r\n\r\n\t\tif (nodes.size() > 1) {\r\n\t\t\tthis.averageShortestPathLength = shortestPathLengthSum\r\n\t\t\t\t\t/ (nodes.size() * (nodes.size() - 1) / 2);\r\n\t\t\t// sum of path lengths / (number of node pairs)\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.averageShortestPathLength = 0; // there is only one node\r\n\t\t}\r\n\t\tthis.diameter = maxPathLength;\r\n\t\tthis.averageDegree = degreeSum / nodes.size();\r\n\t\tthis.clusterCoefficient = clusterCoefficientSum / nodes.size();\r\n\t}",
"public void test4_c() {/*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0},\n\t\t\t\t{ 0, 1, -1},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + 7) \n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 7},\n\t\t\t\t{ 0, 0, 1}\n });\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(2, 0, new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, -1},\n\t\t\t\t{ 0, 1, -1}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(false);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"@Override\n\tpublic void solve() {\n\t\tlong startTime = System.nanoTime();\n\n\t\twhile(!unvisitedPM.isEmpty()){\n\t\t\tProblemModel current = findCheapestNode();\n\t\n\t\t\tfor(ProblemModel pm : current.getSubNodes()){\n\t\t\n\t\t\t\tif(!visited.contains(pm) && !unvisitedPM.contains(pm)){\n\t\t\t\t\t\n\t\t\t\t\tunvisitedPM.add(pm);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(current.getSideStart().isEmpty()){\n\t\t\t\tSystem.out.print( \"\\n\"+ \"StartSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideStart()){\n\t\t\t\t\tSystem.out.print( \" \" +r) ;\n\t\t\t\t}\n\t\t\t\tSystem.out.print( \"\\n\" + \"EndSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideEnd()){\n\t\t\t\t\tSystem.out.print( \" \" + r);\n\t\t\t\t}\n\n\t\t\t\tprintPathTaken(current);\n\t\t\t\tSystem.out.print( \"\\n\" + \"------------done--------------\");\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tlong duration = ((endTime - startTime)/1000000);\n\t\t\t\tSystem.out.print( \"\\n\" + \"-AS1 Time taken: \" + duration + \"ms\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tvisited.add(current);\n\t\t\n\t\t}\n\t\t\n\n\t}",
"public interface TestData {\n NumberVertex[] VERTICES = {new NumberVertex(0), new NumberVertex(1), new NumberVertex(2), new NumberVertex(3),\n new NumberVertex(4), new NumberVertex(5), new NumberVertex(6), new NumberVertex(7), new NumberVertex(8)};\n\n DirectedEdge[] DIRECTED_EDGES ={\n new DirectedEdge(VERTICES[0], VERTICES[7]),\n new DirectedEdge(VERTICES[1], VERTICES[0]),\n new DirectedEdge(VERTICES[0], VERTICES[2]),\n new DirectedEdge(VERTICES[0], VERTICES[3]),\n new DirectedEdge(VERTICES[2], VERTICES[4]),\n new DirectedEdge(VERTICES[2], VERTICES[5]),\n new DirectedEdge(VERTICES[2], VERTICES[0]),\n new DirectedEdge(VERTICES[4], VERTICES[6]),\n new DirectedEdge(VERTICES[4], VERTICES[7]),\n new DirectedEdge(VERTICES[6], VERTICES[0]),\n new DirectedEdge(VERTICES[6], VERTICES[8]),\n new DirectedEdge(VERTICES[8], VERTICES[1])};\n\n UndirectedEdge[] UNDIRECTED_EDGES ={\n new UndirectedEdge(VERTICES[1], VERTICES[0]),\n new UndirectedEdge(VERTICES[0], VERTICES[2]),\n new UndirectedEdge(VERTICES[0], VERTICES[3]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[4]),\n new UndirectedEdge(VERTICES[2], VERTICES[5]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[6]),\n new UndirectedEdge(VERTICES[4], VERTICES[7]),\n new UndirectedEdge(VERTICES[6], VERTICES[0]),\n new UndirectedEdge(VERTICES[6], VERTICES[8]),\n new UndirectedEdge(VERTICES[8], VERTICES[1])};\n}",
"@Test\n public void testComplexGraph() {\n CFGCreator<Character> cfgCreator = new CFGCreator<>();\n CharGrammarParser parser = new CharGrammarParser(cfgCreator);\n SLPOp<Character> slpOp = new SLPOp();\n CFGOp<Character> cfgOp = new CFGOp<>();\n\n // L(G) = {(ab)^1 : i >= 1}\n String text =\n \"S -> bAs \\n\" +\n \"A -> iBa \\n\" +\n \"B -> aCi \\n\" +\n \"C -> sd \\n\" +\n \"D -> SSESS \\n\" +\n \"E -> zSSESSr \\n\" +\n \"E -> uu \\n\";\n\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> f = new HashMap<>();\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> g = new HashMap<>();\n\n IJezSymbol<Character> a = cfgCreator.lookupSymbol('a', true);\n IJezSymbol<Character> b = cfgCreator.lookupSymbol('b', true);\n IJezSymbol<Character> d = cfgCreator.lookupSymbol('d', true);\n IJezSymbol<Character> i = cfgCreator.lookupSymbol('i', true);\n IJezSymbol<Character> s = cfgCreator.lookupSymbol('s', true);\n IJezSymbol<Character> r = cfgCreator.lookupSymbol('r', true);\n IJezSymbol<Character> u = cfgCreator.lookupSymbol('u', true);\n IJezSymbol<Character> z = cfgCreator.lookupSymbol('z', true);\n\n IJezSymbol<Character> one = cfgCreator.lookupSymbol('1', true);\n IJezSymbol<Character> two = cfgCreator.lookupSymbol('2', true);\n IJezSymbol<Character> three = cfgCreator.lookupSymbol('3', true);\n\n f.put(a, Arrays.asList(one, two));\n f.put(b, Arrays.asList(three, two));\n f.put(d, Arrays.asList(one, one, one, two));\n f.put(i, Arrays.asList(two));\n f.put(s, Arrays.asList(one, one, two));\n f.put(r, Arrays.asList(r));\n f.put(u, Arrays.asList(u));\n f.put(z, Arrays.asList(z));\n\n\n g.put(a, Arrays.asList(one, two, one));\n g.put(b, Arrays.asList(three));\n g.put(d, Arrays.asList(one, one, one));\n g.put(i, Arrays.asList(two, two));\n g.put(s, Arrays.asList(one, two));\n g.put(r, Arrays.asList(r));\n g.put(u, Arrays.asList(u));\n g.put(z, Arrays.asList(z));\n\n\n Set<Production<Character>> productions = parser.createProductions(text);\n Set<IJezSymbol<Character>> axiom = new HashSet<>();\n axiom.add(cfgCreator.lookupSymbol('D', false));\n\n\n Set<Production<Character>> wCNFProductions = cfgOp.toWeakCNF(productions, axiom, cfgCreator);\n MorphismEQSolver<Character, Character> morphismEQSolver = new MorphismEQSolver<>(cfgCreator.createCFG(wCNFProductions, axiom), cfgCreator, new CFGCreatorFactory<>(), new CFGCreatorFactory<>());\n\n GenDefaultMorphism<Character> morphism1 = new GenDefaultMorphism<>(f::get);\n GenDefaultMorphism<Character> morphism2 = new GenDefaultMorphism<>(g::get);\n long ms = System.currentTimeMillis();\n assertTrue(morphismEQSolver.equivalentOnMorphisms(morphism1, morphism2));\n logger.info(\"Running time: \" + (System.currentTimeMillis() - ms) + \"[ms]\");\n }",
"private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }",
"public void topologicalSort() {\n HashMap<Integer, Integer> inDegrees = new HashMap<>();\n Queue<Integer> queue = new LinkedList<>();\n int numTotalNodes = 0;\n\n // Build the inDegree HashMap\n for (Entry<Integer, LinkedList<Edge<Integer>>> entry : g.adj.entrySet()) {\n LinkedList<Edge<Integer>> vList = entry.getValue();\n int currentVertex = entry.getKey();\n\n inDegrees.put(currentVertex, inDegrees.getOrDefault(currentVertex, 0));\n for (Edge<Integer> e : vList) {\n inDegrees.put(e.dest, inDegrees.getOrDefault(e.dest, 0) + 1);\n numTotalNodes++;\n }\n }\n\n // Add Elements with inDegree zero toe the queue\n for (int v : inDegrees.keySet()) {\n if (inDegrees.get(v) > 0)\n continue;\n queue.add(v);\n }\n\n int visitedNodes = 0;\n\n while (!queue.isEmpty()) {\n int v = queue.remove();\n System.out.print(v + \" \");\n for (int u : g.getNeighbors(v)) {\n int inDeg = inDegrees.get(u) - 1;\n if (inDeg == 0)\n queue.add(u);\n inDegrees.put(u, inDeg);\n }\n visitedNodes++;\n }\n\n if (visitedNodes != numTotalNodes) {\n System.out.println(\"Graph is not a DAG\");\n }\n }",
"@Test\n public void testBuildGraph_FactorArr() {\n // And now factors\n CostFunction[] factors = new CostFunction[]{\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[1]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[0],v[4]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[2]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[1],v[3]}, 0 ),\n factory.buildCostFunction( new Variable[]{v[3],v[4]}, 0 ),\n };\n\n MCS mcs = new MCS(Arrays.asList(factors));\n UPFactory f = new GdlFactory();\n UPGraph result = JunctionTreeAlgo.buildGraph(f, mcs.getFactorDistribution(), mcs.getAdjacency());\n System.out.println(result);\n }",
"public static void main(String[] args) {\n\n G g = new G(6, true, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 0}, {3, 5} });\n\n g.print();\n g.dfs();\n g.bfs();\n\n System.out.println();\n System.out.println();\n\n // 1 -> 2\n // 0 / \\/\n // \\ 4 -> 3 -> 5\n\n G gDirected = new G(6, false, new int[][] { {0, 1}, {1, 2}, {2, 3}, {3, 5}, {0, 4}, {4, 3} });\n\n gDirected.print();\n gDirected.dfs();\n gDirected.bfs();\n gDirected.topoSort();\n }",
"private void transferLocal(Graph graph) {\n Set<NodePair> nonadjacencies = nonadjacencies(graph);\n for (Graph pag : input) {\n for (Edge edge : pag.getEdges()) {\n NodePair graphNodePair = new NodePair(graph.getNode(edge.getNode1().getName()), graph.getNode(edge.getNode2().getName()));\n if (nonadjacencies.contains(graphNodePair)) {\n continue;\n }\n if (!graph.isAdjacentTo(graphNodePair.getFirst(), graphNodePair.getSecond())) {\n graph.addEdge(new Edge(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint1(), edge.getEndpoint2()));\n continue;\n }\n Endpoint first = edge.getEndpoint1();\n Endpoint firstCurrent = graph.getEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst());\n if (!first.equals(Endpoint.CIRCLE)) {\n if ((first.equals(Endpoint.ARROW) && firstCurrent.equals(Endpoint.TAIL)) ||\n (first.equals(Endpoint.TAIL) && firstCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getSecond(), graphNodePair.getFirst(), edge.getEndpoint1());\n }\n }\n Endpoint second = edge.getEndpoint2();\n Endpoint secondCurrent = graph.getEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond());\n if (!second.equals(Endpoint.CIRCLE)) {\n if ((second.equals(Endpoint.ARROW) && secondCurrent.equals(Endpoint.TAIL)) ||\n (second.equals(Endpoint.TAIL) && secondCurrent.equals(Endpoint.ARROW))) {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), Endpoint.CIRCLE);\n } else {\n graph.setEndpoint(graphNodePair.getFirst(), graphNodePair.getSecond(), edge.getEndpoint2());\n }\n }\n }\n for (Triple triple : pag.getUnderLines()) {\n Triple graphTriple = new Triple(graph.getNode(triple.getX().getName()), graph.getNode(triple.getY().getName()), graph.getNode(triple.getZ().getName()));\n if (graphTriple.alongPathIn(graph)) {\n graph.addUnderlineTriple(graphTriple.getX(), graphTriple.getY(), graphTriple.getZ());\n definiteNoncolliders.add(graphTriple);\n }\n }\n }\n }",
"private ExtList makeGraph(ExtList criteria, Object process, ExtList tuples, int aeth, ExtList result) {\n//\t\tSystem.out.println(\"propa\"+System.getProperty(\"java.library.path\"));\n\t\tLog.out(\"criteria \" + criteria);\n\t\tLog.out(\"process \" + process);\n\t\tLog.out(\"tuples \" + tuples);\n\t\tLog.out(\"aeth \" + aeth);\n\t\tLog.out(\"result \" + result);\n\t\t\n\t\tExtList buffer = new ExtList();\n\t\tExtList tuples_buffer = new ExtList();\n\t\tExtList tmp = new ExtList();\n\n\t\tExtList x;\n\t\tExtList y;\n\t\tboolean flag = true;\n\n\t\tString target_x;\n\t\tString target_y;\n\t\tString aeth_type = \"\";\n\n\n\n\t\tRengine engine;\n\n\t\tresult.clear();\n\n\t\tif (!Preprocessor.isR()) {\n\t\t\tengine = new Rengine(new String[]{\"--vanilla\"}, false, null);\n\t\t\tnew Preprocessor().setR();\n\n\t\t} else {\n\t\t\tengine = Rengine.getMainEngine();\n\t\t}\n\t\tengine.eval(\"setwd(\\\"\" + GlobalEnv.getOutputDirPath() + \"\\\")\");\n//\t\tengine.eval(\".libPaths(\\\"\" + path + \"/lib/site-library\\\")\");\n//\t\tengine.eval(\".libPaths(\\\"/Users/otawa/Documents/workspace/NewSSQL/lib/site-library\\\")\");\n//\t\tengine.eval(\".libPaths(\\\"/usr/local/lib/R/4.0/site-library\\\")\");\t\t\t//TODO_old -> おそらく無しでOK\n\t\tengine.eval(\"library(tidyverse)\");\n\t\tengine.eval(\"library(plotly)\");\n\t\tengine.eval(\"Sys.setlocale(\\\"LC_CTYPE\\\", \\\"ja_JP.UTF-8\\\")\");\n\n\t\ttarget_x = process.toString().split(\" \")[0];\n\t\ttarget_y = process.toString().split(\" \")[1];\n\t\tLog.info(\"process: \" + process.toString());\n\t\twhile (tuples.size() > 0) {\n\n\t\t\t/* find tuples with the same criteria */\n\n\t\t\tx = (ExtList)(tuples.get(0));\n\t\t\t//System.out.println(x+\" \"+x.size()+\" \"+tuples.size());\n//\t\t\tif (x.size()<2) {\n//\t\t\t\tbreak;\n//\t\t\t}\n\t\t\tfor (int i = 1; i < tuples.size(); i++) {\n\t\t\t\ty = (ExtList)(tuples.get(i));\n\t\t\t\t//Log.out(\"criteria: \" + criteria);\n\t\t\t\t//Log.out(\"criteria_size: \" + criteria.size());\n\t\t\t\t//Log.out(\"break x: \" + x + \" size: \" + x.size() + \" tuples.size\" + tuples.size());\n\t\t\t\t//Log.out(\"break y: \" + y + \" size: \" + y.size() + \" tuples.size\" + tuples.size());\n\t\t\t\t\n\t\t\t\tfor (int k = 0; k < criteria.size(); k++) {\n\t\t\t\t\t\n\t\t\t\t\tif (!(x.get(Integer.parseInt(criteria.get(k).toString())).equals\n\t\t\t\t\t (y.get(Integer.parseInt(criteria.get(k).toString()))))) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbuffer.add(y);\n\t\t\t\t\ttuples.remove(i--);\n\t\t\t\t} else {\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbuffer.add(x);\n//\t\t\tSystem.out.println(\"buffer:\"+buffer);\n\t\t\ttuples.remove(0);\n\n\n\t\t\tList<String> buffer_x = new ArrayList<String>();\n\t\t\tList<String> buffer_y = new ArrayList<String>();\n\t\t\tList<String> buffer_aeth = new ArrayList<String>();\n\n\t\t\tfor (int i = 0; i < buffer.size(); i++) {\n\t\t\t\t//Log.out(\"2.break i: \" + i + \" target_x: \" + target_x);\n\t\t\t\t//Log.out(\"2.break i: \" + i + \" target_y: \" + target_y);\n\t\t\t\t//Log.out(\"2.break size of buffer \" + buffer.size());\n\t\t\t\tbuffer_x.add(buffer.getExtListString(i, Integer.parseInt(target_x)));\n\t\t\t\tbuffer_y.add(buffer.getExtListString(i, Integer.parseInt(target_y)));\n\t\t\t\tif (aeth > 0)\n\t\t\t\t\tbuffer_aeth.add(buffer.getExtListString(i, aeth));\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tint result_x[] = new int[buffer_x.size()];\n\t\t\t\tfor (int i = 0; i < buffer_x.size(); i++) {\n\t\t\t\t\tresult_x[i] = Integer.parseInt(buffer_x.get(i));\n\t\t\t\t\tLog.out(\"result_x(int): \" + result_x);\n\t\t\t\t}\n\t\t\t\tengine.assign(\"result_x\", result_x);\n\t\t\t} catch(NumberFormatException e) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble result_x[] = new double[buffer_x.size()];\n\t\t\t\t\tfor (int i = 0; i < buffer_x.size(); i++) {\n\t\t\t\t\t\tresult_x[i] = Double.parseDouble(buffer_x.get(i));\n\t\t\t\t\t\tLog.out(\"result_x(double): \" + result_x);\n\t\t\t\t\t}\n\t\t\t\t\tengine.assign(\"result_x\", result_x);\n\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\tString result_x[] = new String[buffer_x.size()];\n\t\t\t\t\t\n\t\t\t\t\tfor (int i = 0; i < buffer_x.size(); i++) {\n\t\t\t\t\t\tresult_x[i] = buffer_x.get(i);\n\t\t\t\t\t}\n\t\t\t\t\t//Log.out(\"result_x(string): \" + Arrays.toString(result_x));\n\t\t\t\t\t//added by li to check date\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\tfor (int i = 0; i < buffer_x.size(); i++) {\n\t\t\t\t\t\t\tresult_x[i] = buffer_x.get(i);\n\t\t\t\t\t\t\tDate date = sdFormat.parse(result_x[i]);\n\t\t\t\t\t\t\tLog.out(\"Is Date :\" + date);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tengine.assign(\"result_x\", result_x);\n\t\t\t\t\t\t//added by li\n\t\t\t\t\t\tengine.eval(\"result_x <- as.Date(result_x)\");\n\t\t\t\t\t} catch(ParseException e2) {\n\t\t\t\t\t\t//Log.out(\"Result_x is not a date.\");\n\t\t\t\t\t\tengine.assign(\"result_x\", result_x);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tint result_y[] = new int[buffer_y.size()];\n\t\t\t\tfor (int i = 0; i < buffer_y.size(); i++) {\n\t\t\t\t\tresult_y[i] = Integer.parseInt(buffer_y.get(i));\n\t\t\t\t}\n\t\t\t\tengine.assign(\"result_y\", result_y);\n\t\t\t\t//Log.out(\"result_y: \" + result_y);\n\t\t\t} catch(NumberFormatException e) {\n\t\t\t\ttry {\n\t\t\t\t\tdouble result_y[] = new double[buffer_y.size()];\n\t\t\t\t\tfor (int i = 0; i < buffer_y.size(); i++) {\n\t\t\t\t\t\tresult_y[i] = Double.parseDouble(buffer_y.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tengine.assign(\"result_y\", result_y);\n\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\tString result_y[] = new String[buffer_y.size()];\n\t\t\t\t\tfor (int i = 0; i < buffer_y.size(); i++) {\n\t\t\t\t\t\tresult_y[i] = buffer_y.get(i);\n\t\t\t\t\t}\n\t\t\t\t\t//added by li to check date\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\tfor (int i = 0; i < buffer_x.size(); i++) {\n\t\t\t\t\t\t\tresult_y[i] = buffer_x.get(i);\n\t\t\t\t\t\t\tDate date = sdFormat.parse(result_y[i]);\n\t\t\t\t\t\t\tLog.out(\"Is Date :\" + date);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tengine.assign(\"result_y\", result_y);\n\t\t\t\t\t\t//added by li\n\t\t\t\t\t\tengine.eval(\"result_y <- as.Date(result_y)\");\n\t\t\t\t\t} catch(ParseException e2) {\n\t\t\t\t\t\tLog.out(\"Error!Result_y is not a date.\");\n\t\t\t\t\t\tengine.assign(\"result_y\", result_y);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (aeth > 0) {\n\t\t\t\ttry {\n\t\t\t\t\tint result_aeth[] = new int[buffer_aeth.size()];\n\t\t\t\t\tfor (int i = 0; i < buffer_aeth.size(); i++) {\n\t\t\t\t\t\tresult_aeth[i] = Integer.parseInt(buffer_aeth.get(i));\n\t\t\t\t\t}\n\t\t\t\t\tengine.assign(\"result_aeth\", result_aeth);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdouble result_aeth[] = new double[buffer_aeth.size()];\n\t\t\t\t\t\tfor (int i = 0; i < buffer_aeth.size(); i++) {\n\t\t\t\t\t\t\tresult_aeth[i] = Double.parseDouble(buffer_aeth.get(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tengine.assign(\"result_aeth\", result_aeth);\n\t\t\t\t\t} catch (NumberFormatException e1) {\n\t\t\t\t\t\tString result_aeth[] = new String[buffer_aeth.size()];\n\t\t\t\t\t\tfor (int i = 0; i < buffer_aeth.size(); i++) {\n\t\t\t\t\t\t\tresult_aeth[i] = buffer_aeth.get(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tengine.assign(\"result_aeth\", result_aeth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tString r_html_filename = GlobalEnv.getfilename3()+\"_graph\";\n\t\t\ttry {\n\t\t\t\tr_html_filename += \"_\" + buffer.getExtListString(0, Integer.parseInt(criteria.getExtListString(0)));\n\t\t\t\tfor (int i = 1; i < criteria.size(); i++) {\n\t\t\t\t\tr_html_filename += \"_\" + buffer.getExtListString(0, Integer.parseInt(criteria.getExtListString(i)));\n\t\t\t\t}\n\t\t\t} catch (Exception e) { }\n\n\n//\t\t\tSystem.out.println(process);\n\t\t\tint n = process.toString().split(\":\").length;\n\n\n\n\t\t\tif (aeth > 0) {\n\t\t\t\tengine.eval(\"frame <- data.frame(X=result_x, Y=result_y, AETH=result_aeth)\");\n\t\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"color\") && !process.toString().split(\":\")[i].contains(\"\\\"\") ) {\n\t\t\t\t\t\taeth_type = process.toString().split(\":\")[i].substring(0, process.toString().split(\":\")[i].indexOf(\"=\") + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"fill\") && !process.toString().split(\":\")[i].contains(\"\\\"\") ) {\n\t\t\t\t\t\taeth_type = process.toString().split(\":\")[i].substring(0, process.toString().split(\":\")[i].indexOf(\"=\") + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"size\") && !process.toString().split(\":\")[i].contains(\"\\\"\") ) {\n\t\t\t\t\t\taeth_type = process.toString().split(\":\")[i].substring(0, process.toString().split(\":\")[i].indexOf(\"=\") + 1);\n\t\t\t\t\t}\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"group\") && !process.toString().split(\":\")[i].contains(\"\\\"\") ) {\n\t\t\t\t\t\taeth_type = process.toString().split(\":\")[i].substring(0, process.toString().split(\":\")[i].indexOf(\"=\") + 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tengine.eval(\"graph <- ggplot(data = frame, aes(x = X, y = Y, \" + aeth_type +\"AETH))\");\n\t\t\t\t//engine.eval(\"graph <- ggplot(subset(data = frame, !is.na(x,y)), aes(x = X, y = Y, \" + aeth_type +\"AETH))\");\n\t\t\t} else {\n\t\t\t\tengine.eval(\"frame <- data.frame(X=result_x, Y=result_y)\");\n\t\t\t\t//engine.eval(\"frame <- subset(data.frame(X=result_x, Y=result_y), !is.na(x,y))\");\n\t\t\t\tengine.eval(\"graph <- ggplot(data = frame, aes(x = X, y = Y))\");\n\t\t\t\t//engine.eval(\"graph <- ggplot(data = subset(frame, !is.na(X), !is.na(Y)), aes(x = X, y = Y))\");\n\t\t\t}\n\n\t\t\tfor (int i = 1; i < n; i++) {\n\t\t\t\tif((process.toString().split(\":\")[i].contains(\"color\") ||\n\t\t\t\t\tprocess.toString().split(\":\")[i].contains(\"fill\") ||\n\t\t\t\t\tprocess.toString().split(\":\")[i].contains(\"size\") ||\n\t\t\t\t\tprocess.toString().split(\":\")[i].contains(\"group\") ||\n\t\t\t\t\tprocess.toString().split(\":\")[i].contains(\"width\") ||\n\t\t\t\t\tprocess.toString().split(\":\")[i].contains(\"height\"))\n\t\t\t\t\t&& !process.toString().split(\":\")[i].contains(\"\\\"\")) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"geom_bar\") ) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_bar(stat = 'identity', \" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_bar(stat = 'identity')\");\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\tengine.eval(\" graph <- graph + \" + process.toString().split(\":\")[i].split(\"=\")[0] + \"(\" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t} else {\n\t\t\t\t\tengine.eval(\" graph <- graph + \" + process.toString().split(\":\")[i] + \"()\");\n\t\t\t\t}\n\n\n\n\t\t\t/*\tif (process.toString().split(\":\")[i].contains(\"geom_point\") ) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_point(\" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_point()\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"geom_line\") ) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_line(\" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_line()\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"geom_smooth\") ) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_smooth(\" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_smooth()\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"geom_bar\") ) {\n\t\t\t\t\tif (process.toString().split(\":\")[i].contains(\"=\")) {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_bar(stat = 'identity', \" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tengine.eval(\" graph <- graph + geom_bar(stat = 'identity')\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"coord_flip\") ) {\n\t\t\t\t\tengine.eval(\" graph <- graph + coord_flip()\");\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"coord_polar\") ) {\n\t\t\t\t\tengine.eval(\" graph <- graph + coord_polar()\");\n\t\t\t\t}\n\n\t\t\t\tif (process.toString().split(\":\")[i].contains(\"labs\") ) {\n\t\t\t\t\tengine.eval(\" graph <- graph + labs(\" + process.toString().split(\":\")[i].split(\"\\\"\")[1] + \")\");\n\t\t\t\t}\n\n////\t\t\t\tif (process.toString().split(\" \")[i].contains(\"errorbar\") ) {\n////\t\t\t\t\tengine.eval(\" graph <- graph + geom_errorbar()\");\n//\t\t\t\t} */\n\t\t\t}\n\n\t\t\tengine.eval(\"graph <- ggplotly(graph)\");\n\t\t\tLog.out(\"r: r_html_filename = \"+r_html_filename + \"_\" + count + \".html\");\n\t\t\t//engine.eval(\"htmlwidgets::saveWidget(as_widget(graph), \\\"\" + r_html_filename + \"_\" + count + \".html\\\")\");\n\t\t\tengine.eval(\"htmlwidgets::saveWidget(as_widget(graph), \\\"\" + r_html_filename + \"_\" + count + \".html\\\", selfcontained=FALSE)\");\n\t engine.end();\n\n//\t tmp = buffer.getExtList(0);\n//\t tmp.set(Integer.parseInt(target_x), \"ggplot\" + name + \".html\");\n//\t tmp.set(Integer.parseInt(target_y), name);\n//\t tuples_buffer.add(tmp);\n\n\t for (int i = 0; i < buffer.size(); i++) {\n\t \t\tbuffer.getExtList(i).set(Integer.parseInt(target_x), \"ggplot\" + r_html_filename + \"_\" + count + \".html\");\n\t \t\t//buffer.getExtList(i).set(Integer.parseInt(target_y), r_html_filename);\n\t \t\tbuffer.getExtList(i).set(Integer.parseInt(target_y), \"\");\n//\t \t\tSystem.out.println(buffer.getExtListString(i, Integer.parseInt(target_x)));\n//\t \t\tSystem.out.println(buffer.getExtListString(i, Integer.parseInt(target_y)));\n\t }\n//\t buffer.getExtList(0).set(Integer.parseInt(target_x), \"ggplot\" + name + \".html\");\n//\t buffer.getExtList(0).set(Integer.parseInt(target_y), name);\n\t tuples_buffer.addAll(buffer);\n\n\t result.add(buffer.getExtList(0));\n\t\t\tbuffer.clear();\n\n//\t\t\tcount++;\n//\t\t\tSystem.out.println(count);\n\n\t\t}\n\t\tcount++;\n\t\treturn tuples_buffer;\n\n\t}",
"private int[][] make_minimal_graph() {\n\n int[][] subs = new int[_subtypes.length][];\n for( int i=0; i<subs.length; i++ )\n subs[i] = _subtypes[i].clone();\n \n // For all types\n for( int i=0; i<subs.length; i++ ) {\n int[] subis = subs[i];\n // For all 'i' subtypes\n for( int j=0; j<subis.length && subis[j] != -1; j++ ) {\n int[] subjs = subs[subis[j]];\n // Pull out of subis all things found in subjs. We have a subtype isa\n // path from i->j by design of _subtypes, and the j->k list in subjs.\n // Remove any i->k as being redundant.\n int ix = j+1, ixx = j+1; // Index to read, index to keep non-dups\n int jx = 0; // Index to read the k's\n while( ix<subis.length && jx<subjs.length ) {\n int six = subis[ix];\n int sjx = subjs[jx];\n assert sjx != -1;\n if( six==-1 ) break; // Hit end-of-array sentinel\n if( six==sjx ) { ix++; jx++; } // i->j and j->sjx and i->sjx, skip both forward\n else if( six < sjx ) subis[ixx++] = subis[ix++]; // Keep and advance\n else jx++; // Advance\n }\n while( ixx < ix ) subis[ixx++] = -1; // Sentinel remaining unused elements\n }\n int ix = Util.find(subs[i],-1);\n if( ix != -1 ) subs[i] = Arrays.copyOfRange(subs[i],0,ix); // Compress extra elements\n }\n \n return subs;\n }",
"public static void main(String[] args) {\n Graph graph = new Graph();\n graph.addEdge(0, 1);\n graph.addEdge(0, 4);\n\n graph.addEdge(1,0);\n graph.addEdge(1,5);\n graph.addEdge(1,2);\n graph.addEdge(2,1);\n graph.addEdge(2,6);\n graph.addEdge(2,3);\n\n graph.addEdge(3,2);\n graph.addEdge(3,7);\n\n graph.addEdge(7,3);\n graph.addEdge(7,6);\n graph.addEdge(7,11);\n\n graph.addEdge(5,1);\n graph.addEdge(5,9);\n graph.addEdge(5,6);\n graph.addEdge(5,4);\n\n graph.addEdge(9,8);\n graph.addEdge(9,5);\n graph.addEdge(9,13);\n graph.addEdge(9,10);\n\n graph.addEdge(13,17);\n graph.addEdge(13,14);\n graph.addEdge(13,9);\n graph.addEdge(13,12);\n\n graph.addEdge(4,0);\n graph.addEdge(4,5);\n graph.addEdge(4,8);\n graph.addEdge(8,4);\n graph.addEdge(8,12);\n graph.addEdge(8,9);\n graph.addEdge(12,8);\n graph.addEdge(12,16);\n graph.addEdge(12,13);\n graph.addEdge(16,12);\n graph.addEdge(16,17);\n graph.addEdge(17,13);\n graph.addEdge(17,16);\n graph.addEdge(17,18);\n\n graph.addEdge(18,17);\n graph.addEdge(18,14);\n graph.addEdge(18,19);\n\n graph.addEdge(19,18);\n graph.addEdge(19,15);\n LinkedList<Integer> visited = new LinkedList();\n List<ArrayList<Integer>> paths = new ArrayList<ArrayList<Integer>>();\n int currentNode = START;\n visited.add(START);\n new searchEasy().findAllPaths(graph, visited, paths, currentNode);\n for(ArrayList<Integer> path : paths){\n for (Integer node : path) {\n System.out.print(node);\n System.out.print(\" \");\n }\n System.out.println();\n }\n }",
"@Test\n public void cyclicalGraphs2Test() throws Exception {\n // Test history tracking -- the \"last a\" in g1 and g2 below and\n // different kinds of nodes topologically. At k=4 this becomes apparent\n // with kTails, if we start at the first 'a'.\n\n ChainsTraceGraph g1 = new ChainsTraceGraph();\n List<EventNode> g1Nodes = addNodesToGraph(g1, new String[] { \"a\", \"b\",\n \"c\", \"d\" });\n // Create a loop in g1, with 4 nodes\n g1Nodes.get(0).addTransition(g1Nodes.get(1), Event.defTimeRelationStr);\n g1Nodes.get(1).addTransition(g1Nodes.get(2), Event.defTimeRelationStr);\n g1Nodes.get(2).addTransition(g1Nodes.get(3), Event.defTimeRelationStr);\n g1Nodes.get(3).addTransition(g1Nodes.get(0), Event.defTimeRelationStr);\n exportTestGraph(g1, 0);\n\n // g1.a is k-equivalent to g1.a for all k\n for (int k = 1; k < 6; k++) {\n testKEqual(g1Nodes.get(0), g1Nodes.get(0), k);\n }\n\n ChainsTraceGraph g2 = new ChainsTraceGraph();\n List<EventNode> g2Nodes = addNodesToGraph(g2, new String[] { \"a\", \"b\",\n \"c\", \"d\", \"a\" });\n // Create a chain from a to a'.\n g2Nodes.get(0).addTransition(g2Nodes.get(1), Event.defTimeRelationStr);\n g2Nodes.get(1).addTransition(g2Nodes.get(2), Event.defTimeRelationStr);\n g2Nodes.get(2).addTransition(g2Nodes.get(3), Event.defTimeRelationStr);\n g2Nodes.get(3).addTransition(g2Nodes.get(4), Event.defTimeRelationStr);\n exportTestGraph(g2, 1);\n\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 1);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 2);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 3);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 4);\n testKEqual(g1Nodes.get(0), g2Nodes.get(0), 5);\n\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 6);\n testNotKEqual(g1Nodes.get(0), g2Nodes.get(0), 7);\n }",
"public static void main(String[] args) {\n\n final Graph<UniformFanInShape, NotUsed> max3StaticGraph = GraphDSL.create(builder -> {\n // step 2 - define aux SHAPES\n final FanInShape2<Integer, Integer, Integer> max1 = builder.add(ZipWith.create(Math::max));\n final FanInShape2<Integer, Integer, Integer> max2 = builder.add(ZipWith.create(Math::max));\n // step 3\n builder.from(max1.out()).toInlet(max2.in0());\n\n final Inlet<Integer>[] inlets = asList(max1.in0(), max1.in1(), max2.in1()).toArray(new Inlet[3]);\n\n return new UniformFanInShape(max2.out(), inlets);\n });\n\n final Source<Integer, NotUsed> source1 = Source.range(1, 10);\n final Source<Integer, NotUsed> source2 = Source.range(1, 10).map(x -> 5);\n final Source<Integer, NotUsed> source3 = Source.range(10, 1, -1);\n\n final Sink<Integer, CompletionStage<Done>> sink = Sink.foreach(x -> printf(\"Max is: %s\\n\", x));\n\n // step 1\n final RunnableGraph<CompletionStage<Done>> max3RunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(sink,\n (builder, out) -> {\n // step 2: declaring components\n final UniformFanInShape max3Shape = builder.add(max3StaticGraph);\n // step 3: tying them together\n builder.from(builder.add(source1)).viaFanIn(max3Shape);\n builder.from(builder.add(source2)).viaFanIn(max3Shape);\n builder.from(builder.add(source3)).viaFanIn(max3Shape);\n\n builder.from(max3Shape).to(out);\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n //max3RunnableGraph.run(mat).whenComplete((d, t) -> system.terminate());\n\n /*\n Non-uniform fan out shape\n Processing bank transactions\n Txn suspicious if amount > 10000\n\n Streams component for txns\n - output1: let the transaction go through\n - output2: suspicious txn ids\n */\n @AllArgsConstructor\n @Getter\n @ToString\n class Transaction{ String id; String source; String recipient; Integer amount; Date date; }\n\n Source<Transaction, NotUsed> transactionSource = Source.from(List(\n new Transaction(\"5273890572\", \"Paul\", \"Jim\", 100, new Date()),\n new Transaction(\"3578902532\", \"Daniel\", \"Jim\", 100000, new Date()),\n new Transaction(\"5489036033\", \"Jim\", \"Alice\", 7000, new Date())\n ));\n\n final Sink<Transaction, CompletionStage<Done>> bankProcessor = Sink.foreach(API::println);\n final Sink<String, CompletionStage<Done>> suspiciousAnalysisService = Sink.foreach(txnId -> printf(\"Suspicious transaction ID: %s\\n\",txnId));\n\n // step 1\n final Graph<FanOutShape2, NotUsed> suspiciousTxnStaticGraph = GraphDSL.create(builder -> {\n // step 2 - define SHAPES\n final UniformFanOutShape<Transaction, Transaction> broadcast = builder.add(Broadcast.create(2));\n final FlowShape<Transaction, Transaction> suspiciousTxnFilter = builder.add(Flow.<Transaction>create().filter(txn -> txn.amount > 10000));\n final FlowShape<Transaction, String> txnIdExtractor = builder.add(Flow.fromFunction(txn -> txn.id));\n // step 3 - tie SHAPES\n builder.from(broadcast.out(0)).via(suspiciousTxnFilter).via(txnIdExtractor);\n\n return new FanOutShape2(broadcast.in(), broadcast.out(1), txnIdExtractor.out());\n });\n\n // step 1\n final RunnableGraph<NotUsed> suspiciousTxnRunnableGraph = RunnableGraph.fromGraph(\n GraphDSL.create(transactionSource,\n (builder, sourceShape) -> {\n // step 2: declaring components\n final FanOutShape2 suspiciousTxnShape = builder.add(suspiciousTxnStaticGraph);\n // step 3: tying them together\n builder.from(sourceShape).toInlet(suspiciousTxnShape.in());\n builder.from(suspiciousTxnShape.out0()).to(builder.add(bankProcessor));\n builder.from(suspiciousTxnShape.out1()).to(builder.add(suspiciousAnalysisService));\n // step 4\n return ClosedShape.getInstance();\n }\n )\n );\n\n suspiciousTxnRunnableGraph.run(mat);\n }",
"public void layout() {\n final int N = fNodes.length;\n final double k1 = 1.0;\n final double k2 = 100.0 * 100.0;\n\n double xc = 0.0;\n double yc = 0.0;\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n \n double xv = v.getX();\n double yv = v.getY();\n \n\t\t\tIterator uIter = fGraph.sourceNodeSet(v).iterator();\n\t\t\t\n double sumfx1 = 0.0;\n double sumfy1 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = Math.sqrt(dx * dx + dy * dy);\n d = (d == 0) ? .0001 : d;\n double c = k1 * (d - fEdgeLen) / d;\n sumfx1 += c * dx;\n sumfy1 += c * dy;\n }\n\n uIter = fGraph.iterator();\n double sumfx2 = 0.0;\n double sumfy2 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n if (u == v )\n continue;\n// System.out.println(\"electrical u = \" + u.name());\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = dx * dx + dy * dy;\n if (d > 0 ) {\n double c = k2 / (d * Math.sqrt(d));\n sumfx2 += c * dx;\n sumfy2 += c * dy;\n }\n }\n // System.out.println(\"sumfx2 = \" + sumfx2);\n // System.out.println(\"sumfy2 = \" + sumfy2);\n\n // store new positions\n fXn[i] = xv - Math.max(-5, Math.min(5, sumfx1 - sumfx2));\n fYn[i] = yv - Math.max(-5, Math.min(5, sumfy1 - sumfy2));\n\n // for determining the center of the graph\n xc += fXn[i];\n yc += fYn[i];\n }\n\n // offset from center of graph to center of drawing area\n double dx = fWidth / 2 - xc / N;\n double dy = fHeight / 2 - yc / N;\n\n // use only small steps for smooth animation\n dx = Math.max(-5, Math.min(5, dx));\n dy = Math.max(-5, Math.min(5, dy));\n\n // set new positions\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n // move each node towards center of drawing area and keep\n // it within bounds\n double x = Math.max(fMarginX, Math.min(fWidth - fMarginX, fXn[i] + dx));\n double y = Math.max(fMarginY, Math.min(fHeight - fMarginY, fYn[i] + dy));\n v.setPosition(x, y);\n }\n }",
"@SuppressWarnings(\"Main Logic\")\n void solve() {\n n = ii();\n m = ii();\n a = iia(n);\n int from[] = new int[n - 1];\n int to[] = new int[n - 1];\n for (int i = 0; i < n - 1; i++) {\n from[i] = ii() - 1;\n to[i] = ii() - 1;\n }\n g = packU(n, from, to, n - 1);\n int[][] pars = parents3(g, 0);\n par = pars[0];\n int[] ord = pars[1];\n dep = pars[2];\n spar = logstepParents(par);\n subTree = new int[n];\n dfs(0, -1);\n pointer = 1;\n baseArray = new int[n + 1];\n chainNo = 0;\n chainInHead = new int[n];\n Arrays.fill(chainInHead, -1);\n posInBase = new int[n];\n chainInInd = new int[n];\n HLD(0, -1);\n makeTree();\n out.println(Arrays.toString(baseArray));\n out.println(Arrays.toString(a));\n for (int q = 0; q < m; q++) {\n int type = ii();\n if (type == 1) {\n int u = ii() - 1, v = ii() - 1;\n query(u, v);\n out.println(\"DONE\");\n } else {\n int u = ii(), v = ii();\n // update\n }\n }\n }",
"public void testConvertTopo (Topology tp)\n {\n Node root = tp.getNodes().get(0);\n //root.setColor(Color.green);\n parcours(root, visitedlist, compo1);\n set.addAll(composante);\n ArrayList distinctList = new ArrayList(set);\n System.out.println(distinctList.size());\n for ( int i = 0; i < distinctList.size(); i++ )\n System.out.println(distinctList.get(i));\n ArrayList<Link> liste = connectedL(tp);\n /*for (int i = 0; i < liste.size(); i++)\n System.out.println(liste.get(i));*/\n Convert(liste);\n /*for ( int i = 0; i < listConvert.size(); i++ )\n System.out.println(listConvert.get(i));*/\n ConvertMinimiz(listConvert);\n minimisationConvCompo(distinctList);\n minimisationAllNeighbor(listConvert,tp);\n //minimisation4(listConvert,tp);\n }",
"private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}",
"@Test\n public void testComplex() {\n\n Map<Integer, String> dict = new HashMap<>();\n dict.put(0, \"x1\");\n dict.put(1, \"x3\");\n dict.put(2, \"x5\");\n dict.put(3, \"x2\");\n dict.put(4, \"x4\");\n dict.put(5, \"x6\");\n\n Map<String, Integer> rdict = new HashMap<>();\n rdict.put(\"x1\", 0);\n rdict.put(\"x3\", 1);\n rdict.put(\"x5\", 2);\n rdict.put(\"x2\", 3);\n rdict.put(\"x4\", 4);\n rdict.put(\"x6\", 5);\n\n BddManager manager = new BddManager(6);\n manager.variableString((x) -> x < 6 ? dict.get(x) : \"sink\");\n\n BddNode a13 = manager.create(rdict.get(\"x6\"), manager.One, manager.Zero);\n BddNode a12 = manager.create(rdict.get(\"x4\"), manager.One, a13);\n BddNode a11 = manager.create(rdict.get(\"x4\"), manager.One, manager.Zero);\n BddNode a10 = manager.create(rdict.get(\"x2\"), manager.One, manager.Zero);\n BddNode a9 = manager.create(rdict.get(\"x2\"), manager.One, a13);\n BddNode a8 = manager.create(rdict.get(\"x2\"), manager.One, a11);\n BddNode a7 = manager.create(rdict.get(\"x2\"), manager.One, a12);\n BddNode a6 = manager.create(rdict.get(\"x5\"), a13, manager.Zero);\n BddNode a5 = manager.create(rdict.get(\"x5\"), a12, a11);\n BddNode a4 = manager.create(rdict.get(\"x5\"), a9, a10);\n BddNode a3 = manager.create(rdict.get(\"x5\"), a7, a8);\n BddNode a2 = manager.create(rdict.get(\"x3\"), a5, a6);\n BddNode a1 = manager.create(rdict.get(\"x3\"), a3, a4);\n BddNode a0 = manager.create(rdict.get(\"x1\"), a1, a2);\n\n Map<String, Boolean> truth = buildThruthTable(manager, a0);\n\n System.out.println(manager.toDot(a0, (x) -> \"x\" + x.index() + \" (\" + x.refCount() + \")\", true));\n\n BddNode res = manager.sifting(a0);\n\n System.out.println(manager.toDot(res, (x) -> \"x\" + x.index() + \" (\" + x.refCount() + \")\", true));\n\n checkThruthTable(truth, res);\n\n int size = manager.size(res);\n Assert.assertEquals(8, size);\n }",
"public static void main(String[] args) {\n\t\tVertex v1, v2, v3, v4, v5, v6, v7;\n\t\tv1 = new Vertex(\"v1\");\n\t\tv2 = new Vertex(\"v2\");\n\t\tv3 = new Vertex(\"v3\");\n\t\tv4 = new Vertex(\"v4\");\n\t\tv5 = new Vertex(\"v5\");\n\t\tv6 = new Vertex(\"v6\");\n\t\tv7 = new Vertex(\"v7\");\n\n\t\tv1.addAdjacency(v2, 2);\n\t\tv1.addAdjacency(v3, 4);\n\t\tv1.addAdjacency(v4, 1);\n\n\t\tv2.addAdjacency(v1, 2);\n\t\tv2.addAdjacency(v4, 3);\n\t\tv2.addAdjacency(v5, 10);\n\n\t\tv3.addAdjacency(v1, 4);\n\t\tv3.addAdjacency(v4, 2);\n\t\tv3.addAdjacency(v6, 5);\n\n\t\tv4.addAdjacency(v1, 1);\n\t\tv4.addAdjacency(v2, 3);\n\t\tv4.addAdjacency(v3, 2);\n\t\tv4.addAdjacency(v5, 2);\n\t\tv4.addAdjacency(v6, 8);\n\t\tv4.addAdjacency(v7, 4);\n\n\t\tv5.addAdjacency(v2, 10);\n\t\tv5.addAdjacency(v4, 2);\n\t\tv5.addAdjacency(v7, 6);\n\n\t\tv6.addAdjacency(v3, 5);\n\t\tv6.addAdjacency(v4, 8);\n\t\tv6.addAdjacency(v7, 1);\n\n\t\tv7.addAdjacency(v4, 4);\n\t\tv7.addAdjacency(v5, 6);\n\t\tv7.addAdjacency(v6, 1);\n\n\t\tArrayList<Vertex> weightedGraph = new ArrayList<Vertex>();\n\t\tweightedGraph.add(v1);\n\t\tweightedGraph.add(v2);\n\t\tweightedGraph.add(v3);\n\t\tweightedGraph.add(v4);\n\t\tweightedGraph.add(v5);\n\t\tweightedGraph.add(v6);\n\t\tweightedGraph.add(v7);\n\t\t\n\t\tdijkstra( weightedGraph, v7 );\n\t\tprintPath( v1 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v2 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v3 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v4 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v5 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v6 );\n\t\tSystem.out.println(\"\");\n\t\tprintPath( v7 );\n\t\tSystem.out.println(\"\");\n\t}",
"public void test4_b_parametric() { // Schedule found: (m + 1)i + j + (-m - 2)\n\t\t/* RelTrafo1: (i, j) - (i, j - 1) = (0, 1)\n\t\t * RelTrafo2: (i, j) - (i - 1, j + m) = (1, -m)\n\t\t * (m + 1) - m + (-m - 2) = -m - 1\n\t\t *//*\n\t\tGDGraph gdGraph = new GDGraph();\n\t\tGDGVertex gdVertex = gdGraph.addVertex();\n\t\tGDGEdge gdEdge1 = gdGraph.addEdge(gdVertex, gdVertex);\n\t\tGDGEdge gdEdge2 = gdGraph.addEdge(gdVertex, gdVertex);\n\n\t\tgdEdge1.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i, j - 1) \n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1},\n\t\t\t\t{ 0, 0, 0, 1}\n });\n\t\tgdEdge1.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (0..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, 0},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdEdge2.dataDependence = convertIntTableToAffineTrafoRational(new int[][]{ // (i - 1, j + m) \n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 1, 0},\n\t\t\t\t{ 0, 0, 0, 1}\n });\t\t\n\t\tgdEdge2.producedDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 0..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, 0}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\n\t\tgdVertex.computationDomain = convertIntTableToPIPDRational(new int[][]{ // (1..+inf, 1..+inf)\n\t\t\t\t{ 1, 0, 0, -1},\n\t\t\t\t{ 0, 1, 0, -1}\n\t\t}, new int[][]{\n\t\t\t\t{ 1, 0}\n\t\t});\n\t\t\n\t\tgdGraph.calculateFeautrierSchedule(true, true);\n\t\n\t\tgdGraph.<Rational>codeGeneration(Rational.ZERO, Rational.ONE);\n\t*/}",
"public void topologicalSort() {\n\t\tboolean[] visited = new boolean[edges.length];\n\n\t\tfor (int i = 0; i < visited.length; i++) {\n\t\t\tif (visited[i] == false) {\n\t\t\t\tdfs(i, visited);\n\t\t\t}\n\t\t}\n\n\t}",
"private GraphPattern translateToGP(){\r\n\r\n\t\t//Generate the graph pattern object\r\n\t\tGraphPattern gp = new GraphPattern();\r\n\r\n\r\n\t\t//For each Node object, create an associated MyNode object\r\n\t\tint nodeCount = 0;\r\n\t\tfor (Node n : allNodes){\r\n\t\t\tMyNode myNode = new MyNode(nodeCount, \"PERSON\");\r\n\t\t\tnodesMap.put(n, myNode);\r\n\t\t\tgp.addNode(myNode);\r\n\r\n\t\t\tnodeCount++;\r\n\t\t}\r\n\r\n\t\t//For k random MyNodes add the id as an attribute/property.\r\n\t\t//This id is used for cypher queries.\r\n\t\t//This process uses simple random sampling\r\n\t\tif (rooted > allNodes.size()){\r\n\t\t\trooted = allNodes.size();\r\n\t\t}\r\n\r\n\t\tList<Node> allNodesClone = new ArrayList<Node>();\r\n\t\tallNodesClone.addAll(allNodes);\r\n\r\n\t\tfor (int i = 0; i < rooted; i++){\r\n\t\t\t//Pick a random node from allNodes and get it's corresponding MyNode\r\n\t\t\tint idx = random.nextInt(allNodesClone.size());\r\n\t\t\tNode node = allNodesClone.get(idx);\r\n\t\t\tMyNode myNode = nodesMap.get(node);\r\n\r\n\t\t\t//Add the property to myNode\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tmyNode.addAttribute(\"id\", node.getProperty(\"id\")+\"\");\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\t\t\t//Remove the node from allNodesClone list.\r\n\t\t\tallNodesClone.remove(idx);\r\n\t\t}\r\n\r\n\t\t//Process the relationships\r\n\t\tint relCount = 0;\r\n\t\tString relPrefix = \"rel\";\r\n\r\n\t\tfor (Relationship r : rels){\r\n\r\n\t\t\tMyNode source = null, target = null;\r\n\t\t\tRelType type = null;\r\n\r\n\t\t\t//For each relationship in rels, create a corresponding relationship in gp.\r\n\t\t\ttry (Transaction tx = graphDb.beginTx()){\r\n\t\t\t\tsource = nodesMap.get(r.getStartNode());\r\n\t\t\t\ttarget = nodesMap.get(r.getEndNode());\r\n\t\t\t\ttype = GPUtil.translateRelType(r.getType());\r\n\t\t\t\ttx.success();\r\n\t\t\t}\r\n\r\n\t\t\tMyRelationship rel = new MyRelationship(source, target, type, relCount);\r\n\t\t\trelCount++;\r\n\r\n\t\t\tif (relCount >= 25){\r\n\t\t\t\trelCount = 0;\r\n\t\t\t\trelPrefix = relPrefix + \"l\";\r\n\t\t\t}\r\n\r\n\t\t\tgp.addRelationship(rel);\r\n\t\t\trelsMap.put(r, rel);\r\n\t\t}\r\n\r\n\t\t//Set the attribute requirements\r\n\t\tattrsReq(gp, true);\r\n\t\tattrsReq(gp, false);\r\n\t\treturn gp;\r\n\t}",
"public ProcessingTarget buildGraph(){\n \t\tgetTibbrGraph();\n \n \t\t//Init a project - and therefore a workspace\n \t\tProjectController pc = Lookup.getDefault().lookup(ProjectController.class);\n \t\tpc.newProject();\n \t\tWorkspace workspace = pc.getCurrentWorkspace();\n \n \t\t//Get a graph model - it exists because we have a workspace\n \t\tGraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();\n \t\tAttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel();\n \t\tImportController importController = Lookup.getDefault().lookup(ImportController.class);\n \n \t\t//Import file \n \t\tContainer container;\n \t\ttry {\n \t\t\tFile f = new File(this.filename);\n \t\t\tcontainer = importController.importFile(f);\n \t\t\tcontainer.getLoader().setEdgeDefault(EdgeDefault.DIRECTED); //Force DIRECTED\n \t\t container.setAllowAutoNode(false); //Don't create missing nodes\n \t\t} catch (Exception ex) {\n \t\t\tex.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \n \t\t//Append imported data to GraphAPI\n \t\timportController.process(container, new DefaultProcessor(), workspace);\n \n \t\t//See if graph is well imported\n \t\t//DirectedGraph graph = graphModel.getDirectedGraph();\n \t\t//---------------------------\n \n \t\t//Layout for 1 minute\n \t\tAutoLayout autoLayout = new AutoLayout(5, TimeUnit.SECONDS);\n \t\tautoLayout.setGraphModel(graphModel);\n \t\t//YifanHuLayout firstLayout = new YifanHuLayout(null, new StepDisplacement(1f));\n \t\tForceAtlasLayout secondLayout = new ForceAtlasLayout(null);\n \t\tAutoLayout.DynamicProperty adjustBySizeProperty = AutoLayout.createDynamicProperty(\"forceAtlas.adjustSizes.name\", Boolean.TRUE, 0.1f);//True after 10% of layout time\n \t\tAutoLayout.DynamicProperty repulsionProperty = AutoLayout.createDynamicProperty(\"forceAtlas.repulsionStrength.name\", new Double(10000.), 0f);//500 for the complete period\n \t\t//autoLayout.addLayout( firstLayout, 0.5f );\n \t\tautoLayout.addLayout(secondLayout, 1f, new AutoLayout.DynamicProperty[]{adjustBySizeProperty, repulsionProperty});\n \t\tautoLayout.execute();\n \n \n \n \n \n \t\t//Rank color by Degree\n \t\tRankingController rankingController = Lookup.getDefault().lookup(RankingController.class);\n\t\tRanking<?> degreeRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, Ranking.DEGREE_RANKING);\n\t\tAbstractColorTransformer<?> colorTransformer = (AbstractColorTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_COLOR);\n \n \t\tcolorTransformer.setColors(new Color[]{new Color(0xFEF0D9), new Color(0xB30000)});\n \t\trankingController.transform(degreeRanking,colorTransformer);\n \n \t\t//Get Centrality\n \t\tGraphDistance distance = new GraphDistance();\n \t\tdistance.setDirected(true);\n \t\tdistance.execute(graphModel, attributeModel);\n \n \t\t//Rank size by centrality\n \t\tAttributeColumn centralityColumn = attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);\n\t\tRanking<?> centralityRanking = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> sizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.RENDERABLE_SIZE);\n \t\tsizeTransformer.setMinSize(3);\n \t\tsizeTransformer.setMaxSize(20);\n \t\trankingController.transform(centralityRanking,sizeTransformer);\n \n \t\t//Rank label size - set a multiplier size\n\t\tRanking<?> centralityRanking2 = rankingController.getModel().getRanking(Ranking.NODE_ELEMENT, centralityColumn.getId());\n\t\tAbstractSizeTransformer<?> labelSizeTransformer = (AbstractSizeTransformer<?>) rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT, Transformer.LABEL_SIZE);\n \t\tlabelSizeTransformer.setMinSize(1);\n \t\tlabelSizeTransformer.setMaxSize(3);\n \t\trankingController.transform(centralityRanking2,labelSizeTransformer);\n \n \t\tfloat[] positions = {0f,0.33f,0.66f,1f};\n \t\tcolorTransformer.setColorPositions(positions);\n \t\tColor[] colors = new Color[]{new Color(0x0000FF), new Color(0xFFFFFF),new Color(0x00FF00),new Color(0xFF0000)};\n \t\tcolorTransformer.setColors(colors);\n \n \t\t\n \t\t//---------------------------------\n \t\t//Preview configuration\n \t\tPreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);\n \t\tPreviewModel previewModel = previewController.getModel();\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.DIRECTED, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.BACKGROUND_COLOR, Color.BLACK);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS, Boolean.TRUE);\n \t\tpreviewModel.getProperties().putValue(PreviewProperty.NODE_LABEL_COLOR, new DependantOriginalColor(Color.YELLOW));\n \t\t\n \t\t\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_CURVED, Boolean.TRUE);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_OPACITY, 100);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_RADIUS, 1f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,0.2f);\n \t\t//previewModel.getProperties().putValue(PreviewProperty.ARROW_SIZE,0.2f);\n \n \t\tpreviewController.refreshPreview();\n \n \t\t//----------------------------\n \n \t\t//New Processing target, get the PApplet\n \t\tProcessingTarget target = (ProcessingTarget) previewController.getRenderTarget(RenderTarget.PROCESSING_TARGET);\n \t\t\n \t\tPApplet applet = target.getApplet();\n \t\tapplet.init();\n \n \t\t// Add .1 second delay to fix stability issue - per Gephi forums\n try {\n \t\t\t\tThread.sleep(100);\n \t\t\t} catch (InterruptedException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \n \t\t\n \t\t//Refresh the preview and reset the zoom\n \t\tpreviewController.render(target);\n \t\ttarget.refresh();\n \t\ttarget.resetZoom();\n \t\ttarget.zoomMinus();\n \t\ttarget.zoomMinus();\n \t\t\n \t\treturn target;\n \t\t\n \n \t}",
"public interface BdObjectGraph\r\n{\r\n // Object Graph is a tree representation of BD object.\r\n // From root node to sub child node to finally leaf object graph shows the location of object.\r\n // for example \r\n //root=station,\r\n //station has 3 clusters=Nodes\r\n // Clusters has many objects for example file objects,schedule objects \r\n // then sub-node=file object,schedule object \r\n //Each node has resource description allocator,for example if i want to get file object in clsuter1\r\n //in station1 then resource description allocator of Big Dinosaur gives me \r\n //stationname,clustername,filename as a query \r\n //the syntax for query has to be decided in what format\r\n // may be station:cluster:where:filename=\"big dinosaur u will rule \"\r\n //Challenges:On what interval of time the BdObjectGraph has to be persist or it is stored in file system or create object\r\n //in runtime \r\n//////////////////////////////////\r\n //May be representing tree in file system or in object \r\n \r\n //for Example Example 1\r\n // Bd has different types of object graph on the basis of object type\r\n // which tree as object graph to search is determined on the basis of query syntax\r\n // for example\r\n // Station:Abcbankclientstation(in sense it represent one machine virtually but is a collection of many physical clusters or virtual clusters)\r\n // this will search station tree object with key as Abcbankclientstation.It goes on traversing on tree until it gets Abcbankclientstation and gets space object allcoated for this client in sense of cluster \r\n\r\n //for Example Example 2\r\n //Now after transversing cluster object with allocated space is retirved then again i need to retirve file object from that cluster\r\n //then again the query is \r\n //Station:Abcbankclientstation:insurancestore:abishkar.txt\r\n //now again file object graph tree is traversed until i get abishkar.txt and goes on recusrsively\r\n //or \r\n //Station:Abcbankclientstation:insurancestore:insuranceObject\r\n //insurancestore has large no of insuranceObject kept as tree,so again insurancestore is traversed until\r\n //insuranceObject is retirved and goes on recusrsively \r\n \r\n \r\n //Object graph is continuously updated ot inserted by another program in continuous basis on the basis of tree type object\r\n \r\n}",
"public interface BaseGraphCollection<\n G extends GraphHead,\n V extends Vertex,\n E extends Edge,\n LG extends BaseGraph<G, V, E, LG, GC>,\n GC extends BaseGraphCollection<G, V, E, LG, GC>>\n extends GraphCollectionLayout<G, V, E>, BaseGraphCollectionOperators<G, V, E, LG, GC> {\n\n /**\n * Returns the Gradoop Flink configuration.\n *\n * @return the Gradoop Flink configuration\n */\n GradoopFlinkConfig getConfig();\n\n /**\n * Get the factory that is responsible for creating an instance of {@link GC}.\n *\n * @return a factory that can be used to create a {@link GC} instance\n */\n BaseGraphCollectionFactory<G, V, E, LG, GC> getFactory();\n\n /**\n * Get the factory that is responsible for creating an instance of {@link LG}.\n *\n * @return a factory that can be used to create a {@link LG} instance\n */\n BaseGraphFactory<G, V, E, LG, GC> getGraphFactory();\n\n //----------------------------------------------------------------------------\n // Base Graph / Graph Head Getters\n //----------------------------------------------------------------------------\n\n @Override\n default LG getGraph(final GradoopId graphID) {\n // filter vertices and edges based on given graph id\n DataSet<G> graphHead = getGraphHeads()\n .filter(new BySameId<>(graphID));\n DataSet<V> vertices = getVertices()\n .filter(new InGraph<>(graphID));\n DataSet<E> edges = getEdges()\n .filter(new InGraph<>(graphID));\n\n return getGraphFactory().fromDataSets(graphHead, vertices, edges);\n }\n\n @Override\n default GC getGraphs(final GradoopIdSet identifiers) {\n DataSet<G> newGraphHeads = this.getGraphHeads()\n .filter((FilterFunction<G>) graphHead -> identifiers.contains(graphHead.getId()));\n\n // build new vertex set\n DataSet<V> vertices = getVertices()\n .filter(new InAnyGraph<>(identifiers));\n\n // build new edge set\n DataSet<E> edges = getEdges()\n .filter(new InAnyGraph<>(identifiers));\n\n return getFactory().fromDataSets(newGraphHeads, vertices, edges);\n }\n\n //----------------------------------------------------------------------------\n // Utility methods\n //----------------------------------------------------------------------------\n\n @Override\n default DataSet<Boolean> isEmpty() {\n return getGraphHeads()\n .map(new True<>())\n .distinct()\n .union(getConfig().getExecutionEnvironment().fromElements(false))\n .reduce(new Or())\n .map(new Not());\n }\n}",
"@Test\n public void testSimplify2() {\n ControlFlowGraph graph = new ControlFlowGraph();\n\n ControlFlowNode branch1 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode branch2 = new ControlFlowNode(null, graph, BRANCH);\n ControlFlowNode node1 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode node2 = new ControlFlowNode(null, graph, STATEMENT);\n ControlFlowNode fictitious = new ControlFlowNode(null, graph, CONVERGE);\n ControlFlowNode fictitious2 = new ControlFlowNode(null, graph, CONVERGE);\n\n\n\n graph.addEdge(branch1, branch2);\n graph.addEdge(branch1, fictitious);\n graph.addEdge(branch2, node1);\n graph.addEdge(branch2, fictitious);\n graph.addEdge(node1, fictitious);\n graph.addEdge(fictitious, fictitious2);\n graph.addEdge(fictitious2, node2);\n\n graph.simplifyConvergenceNodes();\n\n assertTrue(graph.containsEdge(branch1, node2));\n assertTrue(graph.containsEdge(branch2, node2));\n assertTrue(graph.containsEdge(node1, node2));\n assertFalse(graph.containsVertex(fictitious));\n assertFalse(graph.containsVertex(fictitious2));\n }",
"void processGraphData(Graph aNodes);",
"public static void main(String[] args) throws IOException {\n File file = new File(\"tinyGex2.txt\");\n Scanner sc = new Scanner(file);\n Graph graph = new Graph(sc.nextInt());\n int temp = sc.nextInt();\n\n for(int i = 0; i < temp; i++){\n graph.addEdge(sc.nextInt(), sc.nextInt());\n }\n\n sc.close();\n\n //here is my test client for this portion of the homework. The implementation is super simple. I did have to add a 'contains' method to Sedgwick's Bag class. Found that a bit odd, but oh well.\n System.out.println(graph.hasEdge(10, 3));\n System.out.println(graph.hasEdge(11, 1));\n System.out.println(graph.hasEdge(9, 11));\n System.out.println();\n\n /*\n * HW6\n * 4.2.4\n *\n */\n\n file = new File(\"tinyDGex2.txt\");\n sc = new Scanner(file);\n Digraph digraph = new Digraph(sc.nextInt());\n temp = sc.nextInt();\n\n for(int i = 0; i < temp; i++){\n digraph.addEdge(sc.nextInt(), sc.nextInt());\n }\n\n sc.close();\n\n //Really nothing different here. Modded the test client to make sure it was seeing that the paths only went one way. 10 and 3 are connected in both directions; 11 and 8 are not.\n System.out.println(digraph.hasEdge(10, 3));\n System.out.println(digraph.hasEdge(3, 10));\n System.out.println(digraph.hasEdge(11, 8));\n System.out.println(digraph.hasEdge(8, 11));\n System.out.println();\n\n\n /*\n * HW6\n * 4.4.3\n * Note: Since you didn't specify which graph we should use for input, I used the edge-weighted DAG on page 658 as input\n */\n\n file = new File(\"tinyEWDAG.txt\");\n sc = new Scanner(file);\n EdgeWeightedDigraph ewd = new EdgeWeightedDigraph(sc);\n sc.close();\n\n //I wanted to output the list back into the input form. It's not in the same order, but it has the same values\n //saves to 'output.txt' in the root folder if you want to look at the output\n FileWriter fw = new FileWriter(\"output.txt\");\n fw.write(ewd.toString());\n fw.close();\n\n System.out.println(ewd.edgeWeight(4, 0));\n System.out.println(ewd.edgeWeight(2, 3));\n System.out.println(ewd.edgeWeight(6, 2));\n System.out.println(ewd.edgeWeight(5, 4));\n }",
"@Test\n\tpublic void test() {\n\t\tRandomVariableDefinition RV_DEF_X = new RandomVariableDefinition(\"DEF_X\", Arrays.asList(\"x0\", \"x1\", \"x2\"));\n\t\tRandomVariableDefinition RV_DEF_Y = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"y0\", \"y1\"));\n\t\tRandomVariableDefinition RV_DEF_Z = new RandomVariableDefinition(\"DEF_Y\", Arrays.asList(\"z0\", \"z1\"));\n\n\t\t///////////////////////////////////\n\t\t// define the local probability models\n\t\tLocalProbabilityModel X = new LocalProbabilityModel(\"X\");\n\t\tLocalProbabilityModel Y = new LocalProbabilityModel(\"Y\");\n\t\tLocalProbabilityModel Z = new LocalProbabilityModel(\"Z\");\n\t\tLocalProbabilityModel X1 = new LocalProbabilityModel(\"X1\");\n\t\tLocalProbabilityModel X2 = new LocalProbabilityModel(\"X2\");\n\t\tLocalProbabilityModel X3 = new LocalProbabilityModel(\"X3\");\n\t\tLocalProbabilityModel X7 = new LocalProbabilityModel(\"X7\");\n\t\t\n\t\t////////////////////////////////\n\t\t// specify target variable type, and dependencies\n\t\t\n\t\t// two a-priori variables - target only, no dependencies\n\t\tX.setTargetAndDependencies(RV_DEF_X, null);\n\t\tY.setTargetAndDependencies(RV_DEF_Y, null);\n\t\t\n\t\t// a LPM conditionally dependent on two variables\n\t\tZ.setTargetAndDependencies(RV_DEF_Z, Arrays.asList(X, Y));\n\n\t\t// a LPM conditionally dependent on several variables of the same type\n\t\tX3.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X1, X2));\n\n\t\t// a LPM conditionally dependent on itself (i.e. a state variable)\n\t\tX7.setTargetAndDependencies(RV_DEF_X, Arrays.asList(X7));\n\n\t\n\t\t// the first has no dependencies just values\n\t\tX.setValue(\"x0\", 0.6);\n\t\tX.setValue(\"x1\", 0.1);\n\t\tX.setValue(\"x2\", 0.1);\n\n\t\t// the second has dependencies\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z0\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x0\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x1\"), Y.event(\"y1\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y0\")), 0.3);\n\t\tZ.setValue(\"z1\", Arrays.asList(X.event(\"x2\"), Y.event(\"y1\")), 0.3);\n\n\t\t// the third has a recurrent dependency\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x0\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x0\")), 0.1);\n\t\tX1.setValue(\"x1\", Arrays.asList(X1.event(\"x1\")), 0.1);\n\t\t\n\t\t\n\t\t\n\t\t/* NOTE - should we enforce that a conditional probability should always be 'set' with requirement that the conditioning variables should all be identified ? */\n\t\t// this would be Z.setValue(\n\t//\tZ.setValue(Arrays.asList(X.event(\"x0\"), Y.event(\"y0\")),\n\t//\t\t\tArrays.asList(\n\t//\t\t\t\t\t\"z0\", 0.5,\n\t//\t\t\t\t\t\"z1\", 0.3,\n\t//\t\t\t\t\t\"z2\", 0.7));\n\n\n\n\t\tString s = Z.toString();\n\t\tSystem.out.println(\"==============\\n\" + s);\n\n\t\tSystem.out.println(\"done\");\n\n\n\t}",
"private void computeSat(){\n addVertexVisitConstraint();\n //add clause for each vertex must be visited only once/ all vertices must be on path\n addVertexPositionConstraint();\n //add clause for every edge in graph to satisfy constraint of vertices not belonging to edge not part of successive positions\n addVertexNonEdgeConstraint();\n }",
"private static void handlePolymorphismAlt() {\n for(Transition t : petrinet.getTransitions()) {\n Stack<Place> inputs = new Stack<>();\n Set<Flow> inEdges = t.getPresetEdges();\n for(Flow f : inEdges) {\n for(int i = 0; i < f.getWeight(); i++) {\n inputs.push(f.getPlace());\n }\n }\n Stack<Place> trueInputs = new Stack<>();\n generatePolymophism(t, 0, inputs, trueInputs);\n }\n }",
"public void dft() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> stack = new LinkedList<>();\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tstack.addFirst(rootpair);\r\n\t\t\twhile (stack.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = stack.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tstack.addFirst(np);\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 interface Graph extends Container {\n\n /**\n * returns how many elements are in the container.\n *\n * @return int = number of elements in the container.\n */\n public int size();\n\n /**\n * returns true if the container is empty, false otherwise.\n *\n * @return boolean true if container is empty\n */\n public boolean isEmpty();\n\n /**\n * return the number of vertices in the graph\n * \n * @return number of vertices in the graph\n */\n public int numVertices();\n\n /**\n * returns the number for edges in the graph\n * \n * @return number of edges in the graph\n */\n public int numEdges();\n\n /**\n * returns an Enumeration of the vertices in the graph\n * \n * @return vertices in the graph\n */\n public Enumeration vertices();\n\n \n /**\n * returns an Enumeration of the edges in the graph\n * \n * @return edges in the graph\n */\n public Enumeration edges();\n\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration directedEdges();\n\n /**\n * Returns an enumeration of the directed edges in the Graph\n * \n * @return an enumeration of the directed edges in the Graph\n */\n public Enumeration undirectedEdges();\n\n /**\n * returns the degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the degree of\n * @return degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int degree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the in degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the in degree of\n * @return in degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int inDegree(Position vp) throws InvalidPositionException;\n\n /**\n * returns the out degree of the passed in Vertex vp\n * \n * @param vp Vertex to return the out degree of\n * @return out degree of Vertex vp\n * @exception InvalidPositionException\n * thrown when vp is invalid for Vertex container V\n */\n public int outDegree(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the adjacent vertices of\n * @return enumeration of vertices adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration adjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices in adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the in adjacent vertices of\n * @return enumeration of vertices in adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration inAdjacentVertice(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an enumeration of vertices out adjacent to Vertex vp\n * \n * @param vp Position of Vertex to return the out adjacent vertices of\n * @return enumeration of vertices out adjacent to Vertex vp\n * @exception InvalidPositionException\n * thrown if vp is not a valid Vertex for this Graph\n */\n public Enumeration outAdjacentVertices(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration incidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges in incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges in incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;\n\n /**\n * Returns an Enumeration of the edges out incident upon the\n * Vertex in Position vp\n * \n * @param vp the Position to holding the Vertex to return the\n * Enumeration of\n * @return the Enumeration of edges out incident upon vp\n * @exception InvalidPositionException\n */\n public Enumeration outIncidentEdges(Position vp) throws InvalidPositionException;\n\n public Position[] endVertices(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the Vertex on Edge ep opposite from Vertex vp\n * \n * @param vp Vertex to find opposite of\n * @param ep Edge containing the vertices\n * @return \n * @exception InvalidPositionException\n */\n public Position opposite(Position vp, Position ep) throws InvalidPositionException;\n\n /**\n * Determine whether or not two vertices are adjacent\n * \n * @param vp Position of one Vertex to check\n * @param wp Position of other Vertex to check\n * @return true if they are adjacent, false otherwise\n * @exception InvalidPositionException\n * thrown if either Position is invalid for this container\n */\n public boolean areAdjacent(Position vp, Position wp) throws InvalidPositionException;\n\n /**\n * Returns the destination Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the destination Vertex of\n * @return the destination Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position destination(Position ep) throws InvalidPositionException;\n\n /**\n * Returns the origin Vertex of the given Edge Position\n * \n * @param ep Edge Position to return the origin Vertex of\n * @return the origin Vertex of the given Edge Position\n * @exception InvalidPositionException\n * thrown if the Edge Position is invalid\n */\n public Position origin(Position ep) throws InvalidPositionException;\n\n /**\n * Returns true if the given Edge Position is directed,\n * otherwise false\n * \n * @param ep Edge Position to check directed on\n * @return true if directed, otherwise false\n * @exception InvalidPositionException\n */\n public boolean isDirected(Position ep) throws InvalidPositionException;\n\n /**\n * Inserts a new undirected Edge into the graph with end\n * Vertices given by Positions vp and wp storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding one Vertex endpoint\n * @param wp Position holding the other Vertex endpoint\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertEdge(Position vp,Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new directed Edge into the graph with end\n * Vertices given by Positions vp, the origin, and wp,\n * the destination, storing Object o,\n * returns a Position object for the new Edge\n * \n * @param vp Position holding the origin Vertex\n * @param wp Position holding the destination Vertex\n * @param o Object to store at the new Edge\n * @return Position containing the new Edge object\n * @exception InvalidPositionException\n * thrown if either of the given vertices are invalid for\n * this container\n */\n public Position insertDirectedEdge(Position vp, Position wp, Object o) throws InvalidPositionException;\n\n /**\n * Inserts a new Vertex into the graph holding Object o\n * and returns a Position holding the new Vertex\n * \n * @param o the Object to hold in this Vertex\n * @return the Position holding the Vertex\n */\n public Position insertVertex(Object o);\n\n /**\n * This method removes the Vertex held in the passed in\n * Position from the Graph\n * \n * @param vp the Position holding the Vertex to remove\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void removeVertex(Position vp) throws InvalidPositionException;\n\n /**\n * Used to remove the Edge held in Position ep from the Graph\n * \n * @param ep the Position holding the Edge to remove\n * @exception InvalidPositionException\n * thrown if Position ep is invalid for this container\n */\n public void removeEdge(Position ep) throws InvalidPositionException;\n\n /**\n * This routine is used to change a directed Edge into an\n * undirected Edge\n * \n * @param ep a Position holding the Edge to change from directed to\n * undirected\n * @exception InvalidPositionException\n */\n public void makeUndirected(Position ep) throws InvalidPositionException;\n\n /**\n * This routine can be used to reverse the diretion of a \n * directed Edge\n * \n * @param ep a Position holding the Edge to reverse\n * @exception InvalidPositionException\n * thrown if the given Position is invalid for this container\n */\n public void reverseDirection(Position ep) throws InvalidPositionException;\n\n /**\n * Changes the direction of the given Edge to be out incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be out incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionFrom(Position ep, Position vp) throws InvalidPositionException;\n\n\n /**\n * Changes the direction of the given Edge to be in incident\n * upone the Vertex held in the given Position\n * \n * @param ep the Edge to change the direction of\n * @param vp the Position holding the Vertex that the Edge is going\n * to be in incident upon\n * @exception InvalidPositionException\n * thrown if either of the given positions are invalid for this container\n */\n public void setDirectionTo(Position ep, Position vp) throws InvalidPositionException;\n\n}",
"public void calcSP(Graph g, Vertex source){\n // Algorithm:\n // 1. Take the unvisited node with minimum weight.\n // 2. Visit all its neighbours.\n // 3. Update the distances for all the neighbours (In the Priority Queue).\n // Repeat the process till all the connected nodes are visited.\n\n // clear existing info\n// System.out.println(\"Calc SP from vertex:\" + source.name);\n g.resetMinDistance();\n source.minDistance = 0;\n PriorityQueue<Vertex> queue = new PriorityQueue<Vertex>();\n queue.add(source);\n\n while(!queue.isEmpty()){\n Vertex u = queue.poll();\n for(Edge neighbour:u.neighbours){\n// System.out.println(\"Scanning vector: \"+neighbour.target.name);\n Double newDist = u.minDistance+neighbour.weight;\n\n // get new shortest path, empty existing path info\n if(neighbour.target.minDistance>newDist){\n // Remove the node from the queue to update the distance value.\n queue.remove(neighbour.target);\n neighbour.target.minDistance = newDist;\n\n // Take the path visited till now and add the new node.s\n neighbour.target.path = new ArrayList<>(u.path);\n neighbour.target.path.add(u);\n// System.out.println(\"Path\");\n// for (Vertex vv: neighbour.target.path) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n\n// System.out.println(\"Paths\");\n neighbour.target.pathCnt = 0;\n neighbour.target.paths = new ArrayList<ArrayList<Vertex>>();\n if (u.paths.size() == 0) {\n ArrayList<Vertex> p = new ArrayList<Vertex>();\n p.add(u);\n neighbour.target.paths.add(p);\n neighbour.target.pathCnt++;\n } else {\n for (ArrayList<Vertex> p : u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n// for (Vertex vv : p1) {\n// System.out.print(vv.name);\n// }\n// System.out.print(\"\\n\");\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n }\n\n //Reenter the node with new distance.\n queue.add(neighbour.target);\n }\n // get equal cost path, add into path list\n else if (neighbour.target.minDistance == newDist) {\n queue.remove(neighbour.target);\n for(ArrayList<Vertex> p: u.paths) {\n ArrayList<Vertex> p1 = new ArrayList<>(p);\n p1.add(u);\n neighbour.target.paths.add(p1);\n neighbour.target.pathCnt++;\n }\n queue.add(neighbour.target);\n }\n }\n }\n }",
"void topologicalSort() {\n Stack stack = new Stack();\n\n // Mark all the vertices as not visited\n Boolean visited[] = new Boolean[V];\n for (int i = 0; i < V; i++)\n visited [i] = false;\n\n // Call the recursive helper function to store Topological\n // Sort starting from all vertices one by one\n for (int i = 0; i < V; i++)\n if (visited [i] == false)\n topologicalSortUtil(i, visited, stack);\n\n // Print contents of stack\n while (stack.empty() == false)\n System.out.print(stack.pop() + \" \");\n }",
"@Test\n public void directedRouting() {\n EdgeIteratorState rightNorth, rightSouth, leftSouth, leftNorth;\n graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(3).set(speedEnc, 10, 10);\n rightNorth = graph.edge(4, 10).setDistance(1).set(speedEnc, 10, 10);\n rightSouth = graph.edge(10, 5).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(5, 6).setDistance(2).set(speedEnc, 10, 10);\n graph.edge(6, 2).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(2, 7).setDistance(1).set(speedEnc, 10, 10);\n graph.edge(7, 8).setDistance(9).set(speedEnc, 10, 10);\n leftSouth = graph.edge(8, 9).setDistance(1).set(speedEnc, 10, 10);\n leftNorth = graph.edge(9, 0).setDistance(1).set(speedEnc, 10, 10);\n\n // make paths fully deterministic by applying some turn costs at junction node 2\n setTurnCost(7, 2, 3, 1);\n setTurnCost(7, 2, 6, 3);\n setTurnCost(1, 2, 3, 5);\n setTurnCost(1, 2, 6, 7);\n setTurnCost(1, 2, 7, 9);\n\n final double unitEdgeWeight = 0.1;\n assertPath(calcPath(9, 9, leftNorth.getEdge(), leftSouth.getEdge()),\n 23 * unitEdgeWeight + 5, 23, (long) ((23 * unitEdgeWeight + 5) * 1000),\n nodes(9, 0, 1, 2, 3, 4, 10, 5, 6, 2, 7, 8, 9));\n assertPath(calcPath(9, 9, leftSouth.getEdge(), leftNorth.getEdge()),\n 14 * unitEdgeWeight, 14, (long) ((14 * unitEdgeWeight) * 1000),\n nodes(9, 8, 7, 2, 1, 0, 9));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightSouth.getEdge()),\n 15 * unitEdgeWeight + 3, 15, (long) ((15 * unitEdgeWeight + 3) * 1000),\n nodes(9, 8, 7, 2, 6, 5, 10));\n assertPath(calcPath(9, 10, leftSouth.getEdge(), rightNorth.getEdge()),\n 16 * unitEdgeWeight + 1, 16, (long) ((16 * unitEdgeWeight + 1) * 1000),\n nodes(9, 8, 7, 2, 3, 4, 10));\n }",
"public SeparateChainingHashTable<Character, Boolean> solve2SAT(String formula) {\n HashSet<Character> variables = new HashSet<>();\n char[] charsInFormula = formula.toCharArray();\n for (int i = 0; i < charsInFormula.length; i++) {\n if (charsInFormula[i] != '('\n && charsInFormula[i] != ')'\n && charsInFormula[i] != 'V'\n && charsInFormula[i] != '^'\n && charsInFormula[i] != ' '\n && charsInFormula[i] != '!') {\n variables.add(charsInFormula[i]);\n }\n }\n\n Digraph digraph = new Digraph(variables.size() * 2);\n\n String[] values = formula.split(\" \");\n\n SeparateChainingHashTable<String, Integer> variableToIdMap = new SeparateChainingHashTable<>();\n SeparateChainingHashTable<Integer, String> idToVariableMap = new SeparateChainingHashTable<>();\n\n // Second pass to get vertices\n for (int i = 0; i < values.length; i += 2) {\n boolean isVariable1Negation;\n boolean isVariable2Negation;\n\n // Read variables\n String variable1;\n String variable2;\n\n String variable1Negation;\n String variable2Negation;\n\n if (values[i].charAt(1) == '!') {\n variable1 = values[i].substring(2, 3);\n isVariable1Negation = true;\n } else {\n variable1 = String.valueOf(values[i].charAt(1));\n isVariable1Negation = false;\n }\n variable1Negation = \"!\" + variable1;\n\n i += 2;\n\n if (values[i].charAt(0) == '!') {\n variable2 = values[i].substring(1, 2);\n isVariable2Negation = true;\n } else {\n variable2 = String.valueOf(values[i].charAt(0));\n isVariable2Negation = false;\n }\n variable2Negation = \"!\" + variable2;\n\n // Add variables to mappings if they do not exist yet\n if (!variableToIdMap.contains(variable1)) {\n addVariableToMappings(variable1, variableToIdMap, idToVariableMap);\n addVariableToMappings(variable1Negation, variableToIdMap, idToVariableMap);\n }\n if (!variableToIdMap.contains(variable2)) {\n addVariableToMappings(variable2, variableToIdMap, idToVariableMap);\n addVariableToMappings(variable2Negation, variableToIdMap, idToVariableMap);\n }\n\n // Add edges to implication digraph\n // Map (A V B) to (A -> !B) and (B -> !A)\n // based on http://www.geeksforgeeks.org/2-satisfiability-2-sat-problem/\n int variable1Id = variableToIdMap.get(variable1);\n int variable1NegationId = variableToIdMap.get(variable1Negation);\n int variable2Id = variableToIdMap.get(variable2);\n int variable2NegationId = variableToIdMap.get(variable2Negation);\n\n if (!isVariable1Negation) {\n if (!isVariable2Negation) {\n digraph.addEdge(variable1Id, variable2NegationId);\n digraph.addEdge(variable2Id, variable1NegationId);\n } else {\n digraph.addEdge(variable1Id, variable2Id);\n digraph.addEdge(variable2NegationId, variable1NegationId);\n }\n } else {\n if (!isVariable2Negation) {\n digraph.addEdge(variable1NegationId, variable2NegationId);\n digraph.addEdge(variable2Id, variable1Id);\n } else {\n digraph.addEdge(variable1NegationId, variable2Id);\n digraph.addEdge(variable2NegationId, variable1Id);\n }\n }\n }\n\n // Compute strongly connected components\n KosarajuSharirSCC kosarajuSharirSCC = new KosarajuSharirSCC(digraph);\n\n // Check if formula is satisfiable\n if (!isFormulaSatisfiable(digraph, kosarajuSharirSCC)) {\n return null;\n }\n\n // Solve 2-SAT by assigning variables to true using the strongly connected components topological order\n List<Integer>[] stronglyConnectedComponents = (List<Integer>[]) new ArrayList[kosarajuSharirSCC.count()];\n\n for (int scc = 0; scc < stronglyConnectedComponents.length; scc++) {\n stronglyConnectedComponents[scc] = new ArrayList<>();\n }\n\n for (int vertex = 0; vertex < digraph.vertices(); vertex++) {\n int stronglyConnectedComponentId = kosarajuSharirSCC.id(vertex);\n stronglyConnectedComponents[stronglyConnectedComponentId].add(vertex);\n }\n\n SeparateChainingHashTable<Character, Boolean> solution = new SeparateChainingHashTable<>();\n\n // Iterate through strongly connected components in topological order to assign the variables.\n // There is a lot of conflicting literature as how the variables should be assigned and in which order.\n // The only correct literature that I found was in the Competitive Programmers Handbook, by Antti Laaksonen\n // This implementation uses a reverse approach of the approach described in the book, because it seems\n // more logical to iterate in topological order and assign a value of TRUE to variables X\n // and FALSE to variables !X found along the way.\n for (int scc = stronglyConnectedComponents.length - 1; scc >= 0; scc--) {\n for (int vertexId : stronglyConnectedComponents[scc]) {\n String vertexVariable = idToVariableMap.get(vertexId);\n\n char variable;\n\n boolean isNegation = vertexVariable.charAt(0) == '!';\n if (!isNegation) {\n variable = vertexVariable.charAt(0);\n } else {\n variable = vertexVariable.charAt(1);\n }\n\n if (!solution.contains(variable)) {\n if (!isNegation) {\n solution.put(variable, true);\n } else {\n solution.put(variable, false);\n }\n }\n }\n }\n\n return solution;\n }",
"public int a(PathPoint[] var0, PathPoint var1) {\n/* 53 */ int var2 = 0;\n/* 54 */ int var3 = 1;\n/* */ \n/* 56 */ BlockPosition var4 = new BlockPosition(var1.a, var1.b, var1.c);\n/* 57 */ double var5 = b(var4);\n/* */ \n/* 59 */ PathPoint var7 = a(var1.a, var1.b, var1.c + 1, 1, var5);\n/* 60 */ PathPoint var8 = a(var1.a - 1, var1.b, var1.c, 1, var5);\n/* 61 */ PathPoint var9 = a(var1.a + 1, var1.b, var1.c, 1, var5);\n/* 62 */ PathPoint var10 = a(var1.a, var1.b, var1.c - 1, 1, var5);\n/* 63 */ PathPoint var11 = a(var1.a, var1.b + 1, var1.c, 0, var5);\n/* 64 */ PathPoint var12 = a(var1.a, var1.b - 1, var1.c, 1, var5);\n/* */ \n/* 66 */ if (var7 != null && !var7.i) {\n/* 67 */ var0[var2++] = var7;\n/* */ }\n/* 69 */ if (var8 != null && !var8.i) {\n/* 70 */ var0[var2++] = var8;\n/* */ }\n/* 72 */ if (var9 != null && !var9.i) {\n/* 73 */ var0[var2++] = var9;\n/* */ }\n/* 75 */ if (var10 != null && !var10.i) {\n/* 76 */ var0[var2++] = var10;\n/* */ }\n/* 78 */ if (var11 != null && !var11.i) {\n/* 79 */ var0[var2++] = var11;\n/* */ }\n/* 81 */ if (var12 != null && !var12.i) {\n/* 82 */ var0[var2++] = var12;\n/* */ }\n/* */ \n/* 85 */ boolean var13 = (var10 == null || var10.l == PathType.OPEN || var10.k != 0.0F);\n/* 86 */ boolean var14 = (var7 == null || var7.l == PathType.OPEN || var7.k != 0.0F);\n/* 87 */ boolean var15 = (var9 == null || var9.l == PathType.OPEN || var9.k != 0.0F);\n/* 88 */ boolean var16 = (var8 == null || var8.l == PathType.OPEN || var8.k != 0.0F);\n/* */ \n/* 90 */ if (var13 && var16) {\n/* 91 */ PathPoint var17 = a(var1.a - 1, var1.b, var1.c - 1, 1, var5);\n/* 92 */ if (var17 != null && !var17.i) {\n/* 93 */ var0[var2++] = var17;\n/* */ }\n/* */ } \n/* 96 */ if (var13 && var15) {\n/* 97 */ PathPoint var17 = a(var1.a + 1, var1.b, var1.c - 1, 1, var5);\n/* 98 */ if (var17 != null && !var17.i) {\n/* 99 */ var0[var2++] = var17;\n/* */ }\n/* */ } \n/* 102 */ if (var14 && var16) {\n/* 103 */ PathPoint var17 = a(var1.a - 1, var1.b, var1.c + 1, 1, var5);\n/* 104 */ if (var17 != null && !var17.i) {\n/* 105 */ var0[var2++] = var17;\n/* */ }\n/* */ } \n/* 108 */ if (var14 && var15) {\n/* 109 */ PathPoint var17 = a(var1.a + 1, var1.b, var1.c + 1, 1, var5);\n/* 110 */ if (var17 != null && !var17.i) {\n/* 111 */ var0[var2++] = var17;\n/* */ }\n/* */ } \n/* */ \n/* 115 */ return var2;\n/* */ }",
"private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis instances (replicated)\n\t\t\t\n\t\t\t// Add all but ignore if some channels should be ignored\n\t\t\tfor (Map.Entry<String, Channel> entry: map.entrySet()) {\n\t\t\t\tif (IGNORE_UNICAST_AND_SUBSCRIBE) {\n\t\t\t\t\tif (entry.getKey().startsWith(\"unicast\") == false && entry.getKey().startsWith(\"sub\") == false) {\n\t\t\t\t\t\tif (entry.getKey().startsWith(\"tile\")) {\n\t\t\t\t\t\t\tchannelList.add(entry.getValue());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchannelList.add(entry.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//channelList.addAll(map.values());\n\t\t}\n\t\t\n\t\t// Double-iteration to build pairs\n\t\tfor (Channel channel1: channelList) {\n\t\t\tfor (Channel channel2: channelList) {\n\t\t\t\tif (channel1 != channel2) {\n\t\t\t\t\t// Put channels as nodes in the set\n\t\t\t\t\tthis.nodes.add(channel1.getChannelName());\n\t\t\t\t\tthis.nodes.add(channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Build pair\n\t\t\t\t\tChannelPair pair = new ChannelPair(channel1.getChannelName(), channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Check if it is contained in the map\n\t\t\t\t\tif (this.pairMultiplicity.containsKey(pair) == false) {\n\t\t\t\t\t\t// Count common subscribers\n\t\t\t\t\t\tint commonSubscribers = countCommonSubscribers(channel1, channel2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (commonSubscribers > 0) {\n\t\t\t\t\t\t\t// Perform computation and add it\n\t\t\t\t\t\t\tthis.pairMultiplicity.put(pair, commonSubscribers);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}",
"public interface DirectedGraph {\n\n /**\n * Set a graph label\n * @param label a graph label\n */\n void setGraphLabel(String label);\n\n /**\n * @return the graph label\n */\n String getGraphLabel();\n\n /**\n * Add a node in graph\n * @param node\n * @throws IllegalArgumentException if node is negative\n */\n void addNode(int node);\n\n /**\n * Associating metadata to node\n * @param node the node id\n * @param key the metadata key\n * @param value the metadata value\n */\n void addNodeMetadata(int node, String key, String value);\n\n /**\n * Get the value of the metadata associated with the given node\n * @param node the node to get metadata for\n * @param key the metadata key\n * @return the value or null if not found\n */\n String getNodeMetadataValue(int node, String key);\n\n /**\n * @return the node given the label or -1 if not found\n */\n int getNodeFromMetadata(String metadata);\n\n /**\n * Add an edge in graph from tail to head and return its index\n * @param tail predecessor node\n * @param head successor node\n * @return the edge id or -1 if already exists\n */\n int addEdge(int tail, int head);\n\n /**\n * Set an edge label\n * @param edge a edge id\n * @param label a node label\n */\n void setEdgeLabel(int edge, String label);\n\n /**\n * @return the edge label\n */\n String getEdgeLabel(int edge);\n\n /**\n * @return an array of graph nodes\n */\n int[] getNodes();\n\n /**\n * @return an array of graph edges\n */\n int[] getEdges();\n\n /**\n * @return the edge id from end points or -1 if not found\n */\n int getEdge(int tail, int head);\n\n /**\n * Get the incoming and outcoming edges for the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getEdgesIncidentTo(int... nodes);\n\n /**\n * Get the incoming edges to the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getInEdges(int... nodes);\n\n /**\n * Get the outcoming edges from the given nodes\n * @param nodes the nodes\n * @return edge indices\n */\n int[] getOutEdges(int... nodes);\n\n /**\n * @return the tail node of the given edge or -1 if not found\n */\n int getTailNode(int edge);\n\n /**\n * @return the head node of the given edge or -1 if not found\n */\n int getHeadNode(int edge);\n\n /**\n * @return true if node belongs to graph else false\n */\n boolean containsNode(int node);\n\n /**\n * @return true if edge belongs to graph else false\n */\n boolean containsEdge(int edge);\n\n /**\n * @return true if tail -> head edge belongs to graph else false\n */\n boolean containsEdge(int tail, int head);\n\n /**\n * @return ancestors of the given node\n */\n int[] getAncestors(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node);\n\n /**\n * @return descendants of the given node\n */\n int[] getDescendants(int node, int maxDepth);\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n boolean isAncestorOf(int queryAncestor, int queryDescendant);\n\n /**\n * @return the predecessors of the given node\n */\n int[] getPredecessors(int node);\n\n /**\n * @return the successors of the given node\n */\n int[] getSuccessors(int node);\n\n /**\n * @return the number of head ends adjacent to the given node\n */\n int getInDegree(int node);\n\n /**\n * @return the number of tail ends adjacent to the given node\n */\n int getOutDegree(int node);\n\n /**\n * @return the sources (indegree = 0) of the graph\n */\n int[] getSources();\n\n /**\n * @return the sinks (outdegree = 0) of the graph\n */\n int[] getSinks();\n\n /**\n * @return the subgraph of this graph composed of given nodes\n */\n DirectedGraph calcSubgraph(int... nodes);\n\n /**\n * @return the total number of graph nodes\n */\n default int countNodes() {\n\n return getNodes().length;\n }\n\n /**\n * @return the total number of graph edges\n */\n default int countEdges() {\n\n return getEdges().length;\n }\n\n /**\n * @return true if queryDescendant is a descendant of queryAncestor\n */\n default boolean isDescendantOf(int queryDescendant, int queryAncestor) {\n\n return isAncestorOf(queryAncestor, queryDescendant);\n }\n\n default boolean isSource(int node) {\n return getInDegree(node) == 0 && getOutDegree(node) > 0;\n }\n\n default boolean isSink(int node) {\n return getInDegree(node) > 0 && getOutDegree(node) == 0;\n }\n\n /**\n * The height of a rooted tree is the length of the longest downward path to a leaf from the root.\n *\n * @return the longest path from the root or -1 if it is not a tree\n */\n default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }\n\n class NotATreeException extends Exception {\n\n public NotATreeException() {\n\n super(\"not a tree\");\n }\n }\n\n class NotATreeMultipleRootsException extends NotATreeException {\n\n private final int[] roots;\n\n public NotATreeMultipleRootsException(int[] roots) {\n\n super();\n this.roots = roots;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", roots=\" + Arrays.toString(this.roots);\n }\n }\n\n class CycleDetectedException extends NotATreeException {\n\n private final TIntList path;\n\n public CycleDetectedException(TIntList path) {\n\n super();\n\n this.path = path;\n }\n\n @Override\n public String getMessage() {\n\n return super.getMessage() + \", path=\" + this.path;\n }\n }\n}",
"public static void main(String[] args) {\n\n Node n1 = new Node(1);\n Node n2 = new Node(2);\n Node n3 = new Node(3);\n Node n4 = new Node(4);\n\n n1.neighbors.add(n2);\n n1.neighbors.add(n4);\n n2.neighbors.add(n1);\n n2.neighbors.add(n4);\n n3.neighbors.add(n2);\n n3.neighbors.add(n4);\n n4.neighbors.add(n1);\n n4.neighbors.add(n3);\n\n for (Node n : n1.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n2.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n3.neighbors) {\n System.out.print(n.val + \" \");\n }\n for (Node n : n4.neighbors) {\n System.out.print(n.val + \" \");\n }\n\n System.out.println();\n Node result = Solution.cloneGraph(n1);\n printGraph(result, 4);\n\n }",
"public static void main(String[] args) throws IOException {\n File file = new File(args[0]);\r\n //FileOutputStream f = new FileOutputStream(\"prat_dfs_data2.txt\");\r\n //System.setOut(new PrintStream(f));\r\n BufferedReader reader = new BufferedReader(new FileReader(file));\r\n String line;\r\n line = reader.readLine();\r\n int nodecount = 0;\r\n HashMap <String , Integer> nodeMap = new HashMap <String , Integer>(); \r\n while ((line = reader.readLine()) != null ) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n if (!nodeMap.containsKey(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"))){\r\n nodeMap.put(data[0].replaceAll(\"^\\\"|\\\"$\", \"\"), nodecount);\r\n nodecount++;\r\n }\r\n }\r\n reader.close();\r\n Vertex adjList[] = new Vertex[nodecount];\r\n Vertex sortVer[] = new Vertex[nodecount];\r\n for(int it = 0; it < nodecount; it++){\r\n adjList[it] = new Vertex(it);\r\n }\r\n nodeMap.forEach((k, v) -> adjList[v].val = k);\r\n File file2 = new File(args[1]);\r\n BufferedReader reader2 = new BufferedReader(new FileReader(file2));\r\n line = reader2.readLine();\r\n while ((line = reader2.readLine()) !=null) {\r\n String data[] = line.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\r\n String source = data[0].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n String target = data[1].replaceAll(\"^\\\"|\\\"$\", \"\");\r\n\r\n int weight = Integer.parseInt(data[2]);\r\n Vertex current = adjList[nodeMap.get(source)];\r\n Vertex newbie = new Vertex(nodeMap.get(target));\r\n current.countN++;\r\n current.co_occur += weight;\r\n if (adjList[nodeMap.get(source)].next == null){\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n else{\r\n current.next.prev = newbie;\r\n newbie.next = current.next;\r\n current.next = newbie;\r\n newbie.prev = current;\r\n }\r\n Vertex current1 = adjList[nodeMap.get(target)];\r\n Vertex newbie1 = new Vertex(nodeMap.get(source));\r\n current1.co_occur += weight;\r\n current1.countN++;\r\n if (current1.next == null){\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n else{\r\n current1.next.prev = newbie1;\r\n newbie1.next = current1.next;\r\n current1.next = newbie1;\r\n newbie1.prev = current1;\r\n }\r\n }\r\n reader2.close();\r\n \r\n for(int it = 0; it < nodecount; it++){\r\n sortVer[it] = new Vertex(adjList[it].id);\r\n sortVer[it].val = adjList[it].val;\r\n sortVer[it].co_occur = adjList[it].co_occur;\r\n }\r\n if (args[2].equals(\"average\")){\r\n double countdeg = 0;\r\n for(int it = 0; it<nodecount; it++){\r\n countdeg+= (double) adjList[it].countN;\r\n }\r\n countdeg = countdeg / (double) (nodecount);\r\n System.out.printf(\"%.2f\", countdeg);\r\n System.out.println();\r\n //long toc= System.nanoTime();\r\n //System.out.println((toc- startTime)/1000000000.0);\r\n }\r\n \r\n if(args[2].equals(\"rank\")){\r\n Graph.mergesort(sortVer, 0, nodecount-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n System.out.print(sortVer[0].val);\r\n for(int kk=1; kk<nodecount; kk++){\r\n System.out.print(\",\" + sortVer[kk].val.toString());\r\n }\r\n System.out.println();\r\n }\r\n if(args[2].equals(\"independent_storylines_dfs\")){\r\n boolean visited[] = new boolean[nodecount];\r\n int ind = 0;\r\n ArrayList<ArrayList<Vertex>> comps = new ArrayList<ArrayList<Vertex>>();\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n visited[it1] = false;\r\n }\r\n for(int it1 = 0; it1<nodecount; it1++){\r\n if (visited[it1] == false){\r\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\r\n Graph.dfs(it1, visited, ind, adjList, temp);\r\n ind++;\r\n Graph.mergesort2(temp, 0, temp.size()-1);\r\n comps.add(temp);\r\n }\r\n }\r\n Graph.mergesort3(comps, 0, comps.size()-1);\r\n // long toc= System.nanoTime();\r\n // System.out.println((toc- startTime)/1000000000.0);\r\n for(int a1 = 0; a1 < ind; a1++){\r\n System.out.print(comps.get(a1).get(0).val);\r\n for(int j1 = 1; j1<comps.get(a1).size(); j1++){\r\n System.out.print(\",\" + comps.get(a1).get(j1).val);\r\n }\r\n System.out.println();\r\n }\r\n }\r\n }",
"private static void addTripToGraph(Trip newTrip, Graph<Node, WeightEdge> graph, List<Node> depots, List<Node> trips, Problem problem){\n Node tripStart = new Node(newTrip, 0, false);\n Node tripEnd = new Node(newTrip, 0, true);\n\n graph.addVertex(tripStart);\n graph.addVertex(tripEnd);\n\n // Add weightEdgeWithBounders from trip startPoint to trip endPoint\n // lowerBound and upperBound for this edges is 1, because we are looking for solution that saturates all trips\n WeightEdge tripInternalWeightEdge = new BoundedWeightEdge(1,1);\n graph.addEdge(tripStart, tripEnd, tripInternalWeightEdge);\n graph.setEdgeWeight(tripInternalWeightEdge, 0);\n\n for(Node depot : depots){\n if(depot.isExitNode()){ // is source\n // add weightEdgeWithBounders from depot source to trip startPoint\n WeightEdge depotToTripWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(depot, tripStart, depotToTripWeightEdge);\n graph.setEdgeWeight(depotToTripWeightEdge, problem.getCost(depot.getLocation(), tripStart.getLocation()).toMinutes());\n }else{ // is depot sink\n // add weightEdgeWithBounders from trip endPoint to depot sink\n WeightEdge tripToDepotWeightEdge = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, depot, tripToDepotWeightEdge);\n graph.setEdgeWeight(tripToDepotWeightEdge, problem.getCost(tripEnd.getLocation(), depot.getLocation()).toMinutes());\n }\n }\n\n for(Node otherTrip : trips){\n if(otherTrip.isExitNode()){\n // add feasible edges from all trips endPoints to this trip startPoint\n if(isFeasibleEdge(otherTrip, tripStart, problem)){\n WeightEdge otherTripToThisTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(otherTrip, tripStart, otherTripToThisTrip);\n graph.setEdgeWeight(otherTripToThisTrip, problem.getCost(otherTrip.getLocation(), tripStart.getLocation()).toMinutes());\n }\n }else{\n // add feasible edges from this trip endPoint to all trips startPoints\n if(isFeasibleEdge(tripEnd, otherTrip, problem)){\n WeightEdge thisTripToOtherTrip = new BoundedWeightEdge(0, 1);\n graph.addEdge(tripEnd, otherTrip, thisTripToOtherTrip);\n graph.setEdgeWeight(thisTripToOtherTrip, problem.getCost(tripEnd.getLocation(), otherTrip.getLocation()).toMinutes());\n }\n }\n }\n\n // add this nodes in our trips list;\n trips.add(tripStart);\n trips.add(tripEnd);\n }",
"@Test\n void shortestPath() {\n directed_weighted_graph g0 = new DW_GraphDS();\n dw_graph_algorithms ag0 = new DWGraph_Algo();\n node_data n0 = new NodeData(0);\n node_data n1 = new NodeData(1);\n node_data n2 = new NodeData(2);\n node_data n3 = new NodeData(3);\n g0.addNode(n1);\n g0.addNode(n2);\n g0.addNode(n3);\n g0.connect(1, 2, 5);\n g0.connect(2, 3, 3);\n g0.connect(1, 3, 15);\n g0.connect(3, 2, 1);\n ag0.init(g0);\n\n List<node_data> list0 = ag0.shortestPath(1, 1); //should go from 1 -> 1\n int[] list0Test = {1, 1};\n int i = 0;\n for (node_data n : list0) {\n\n assertEquals(n.getKey(), list0Test[i]);\n i++;\n }\n\n List<node_data> list1 = ag0.shortestPath(1, 2); //should go 1 -> 2\n int[] list1Test = {1, 2};\n i = 0;\n for (node_data n : list1) {\n\n assertEquals(n.getKey(), list1Test[i]);\n i++;\n }\n g0.connect(1, 3, 2);\n List<node_data> list2 = ag0.shortestPath(1, 2); //should go 1 -> 3 -> 2\n int[] list2Test = {1, 3, 2};\n i = 0;\n for (node_data n : list2) {\n\n assertEquals(n.getKey(), list2Test[i]);\n i++;\n }\n\n g0.connect(1, 3, 10);\n List<node_data> list3 = ag0.shortestPath(1,3);\n int[] list3Test = {1, 2, 3};\n i = 0;\n for(node_data n: list3) {\n\n assertEquals(n.getKey(), list3Test[i]);\n i++;\n }\n/*\n\n List<node_data> list4 = ag0.shortestPath(1,4);\n int[] list4Test = {1, 4};\n i = 0;\n for(node_data n: list4) {\n\n assertEquals(n.getKey(), list4Test[i]);\n i++;\n }\n\n List<node_data> list5 = ag0.shortestPath(4,1);\n int[] list5Test = {4, 1};\n i = 0;\n for(node_data n: list5) {\n\n assertEquals(n.getKey(), list5Test[i]);\n i++;\n }\n*/\n }",
"public static void main(String[] args) throws Exception {\n\t\tlong startTime, stopTime;\n\t\tdouble t_searchCache, t_storeCache;\n//\t\tMap<SmallGraph, SmallGraph> cache = new HashMap<SmallGraph, SmallGraph>(); // the cache\n\t\t// the index on the ploytrees stored in the cache\n\t\tMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>> cacheIndex = new HashMap<Set<Pair<Integer,Integer>>, Set<SmallGraph>>();\n\t\tMap<SmallGraph, Pair<Integer, SmallGraph>> polytree2query = new HashMap<SmallGraph, Pair<Integer, SmallGraph>>();\n\n\t\t// reading the original data graph\n\t\tGraph originalDataGraph = new Graph(args[0]);\n\t\tif(args.length == 6)\toriginalDataGraph.buildParentIndex(args[5]);\n\n\t\t// reading all popular data graphs\n\t\tFile dirG = new File(args[1]);\n\t\tif(!dirG.isDirectory())\n\t\t\tthrow new Exception(\"The specified path for the candidate data graphs is not a valid directory\");\n\t\tFile[] graphFiles = dirG.listFiles();\n\t\tint nPopularGraphs = graphFiles.length;\n\t\tGraph[] graphs = new Graph[nPopularGraphs];\n\t\tfor(int i=0; i < nPopularGraphs; i++)\n\t\t\tgraphs[i] = new Graph(graphFiles[i].getAbsolutePath());\n\t\t\n\t\t// statistical result file\n\t\tFile file = new File(args[2]);\n\t\t// if file does not exists, then create it\n\t\tif (!file.exists()) file.createNewFile();\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\t\t\t\n\t\tBufferedWriter bw = new BufferedWriter(fw);\t\n\n\t\tbw.write(\"queryNo\\t querySize\\t degree\\t sourceNo\\t isPolytree\\t nHitCandidates\\t t_searchCache\\t isHit\\t hitQueryNo\\t hitQuerySize\\t t_storeCache\\n\");\n\t\tStringBuilder fileContents = new StringBuilder();\n\t\t\n\t\tint nSourceOptions = nPopularGraphs + 1; // number of sources for creating query\n\t\tRandom randSource = new Random();\n\t\tint[] querySizes = {20,22,24,26,28,30,32,34,36,38}; // different available sizes for queries\n\t\tRandom randQuerySize = new Random();\n//\t\tRandom randDegree = new Random();\n\t\tRandom randCenter = new Random();\n\t\t\t\t\n\t\tint requestedQueries = Integer.parseInt(args[4]);\n\t\tfor(int queryNo=0; queryNo < requestedQueries; queryNo++) { // main loop\n\t\t\tSystem.out.print(\"Processing Q\" + queryNo + \":\\t\");\n\t\t\tSmallGraph q;\n\t\t\tint querySize = 25;\n\t\t\tint degree = 5;\n\t\t\tint sourceNo = randSource.nextInt(nSourceOptions);\n\t\t\t// q is created\n\t\t\tif(sourceNo == nSourceOptions - 1) { // from the original data graph\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\t//degree = randDegree.nextInt(querySize/DEGREE_RATIO);\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tint center = randCenter.nextInt(originalDataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(originalDataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} else {\t// from popular data graphs\n\t\t\t\tGraph dataGraph = graphs[sourceNo];\n\t\t\t\tboolean notFound = true;\n\t\t\t\tSmallGraph sg = null;\n\t\t\t\twhile(notFound) {\n\t\t\t\t\tquerySize = querySizes[randQuerySize.nextInt(querySizes.length)];\n\t\t\t\t\tdegree = (int)Math.sqrt(querySize);\n\t\t\t\t\tif(degree == 0) continue;\n\t\t\t\t\tint center = randCenter.nextInt(dataGraph.getNumVertices());\n\t\t\t\t\tsg = GraphUtils.subGraphBFS(dataGraph, center, degree, querySize);\n\t\t\t\t\tif(sg.getNumVertices() == querySize)\n\t\t\t\t\t\tnotFound = false;\n\t\t\t\t}\n\t\t\t\tq = QueryGenerator.arrangeID(sg);\n\t\t\t} //if-else\n\t\t\t\n\t\t\tfileContents.append(queryNo + \"\\t\" + q.getNumVertices() + \"\\t\" + degree + \"\\t\" + sourceNo + \"\\t\");\n\t\t\tSystem.out.print(\"N\" + q.getNumVertices() + \"D\" + degree + \"S\" + sourceNo + \",\\t\");\n\t\t\t\n\t\t\tint queryStatus = q.isPolytree();\n\t\t\tswitch (queryStatus) {\n\t\t\t\tcase -1: System.out.println(\"The query Graph is disconnected\");\n\t\t\t\t\tfileContents.append(\"-1\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t\tcase 0: System.out.print(\"! polytree, \");\n\t\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1: System.out.print(\"a polytree, \");\n\t\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: System.out.println(\"Undefined status of the query graph\");\n\t\t\t\t\tfileContents.append(\"2\\t 0\\t 0\\t 0\\t -1\\t 0\\t\");\n\t\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// searching in the cache\n\t\t\tPair<Integer, SmallGraph> hitPair = null;\n\t\t\tstartTime = System.nanoTime();\n\t\t\tboolean notInCache = true;\n\t\t\tSet<SmallGraph> candidateMatchSet = CacheUtils.getCandidateMatchSet(q, cacheIndex);\n\t\t\tint nHitCandidates = candidateMatchSet.size();\n\t\t\tSystem.out.print(\"nHitCandidates=\" + nHitCandidates + \", \");\n\t\t\tfileContents.append(nHitCandidates + \"\\t\");\n\t\t\t\n\t\t\tfor(SmallGraph candidate : candidateMatchSet) {\n\t\t\t\tif(CacheUtils.isDualCoverMatch(q, candidate)) {\n\t\t\t\t\tnotInCache = false;\n\t\t\t\t\tSystem.out.print(\"Hit the cache!, \");\n\n\t\t\t\t\thitPair = polytree2query.get(candidate);\n\t\t\t\t\t// use the cache content to answer the query\n//\t\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\t\tSmallGraph inducedSubgraph = cache.get(candidate);\n//\t\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(inducedSubgraph, queryGraph);\n//\t\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\t\tSystem.out.println(\"The time for tight simulation from cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t\tbreak; // the first match would be enough \n\t\t\t\t} //if\n\t\t\t} //for\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_searchCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.print(\"search: \" + t_searchCache + \", \");\n\t\t\tfileContents.append(t_searchCache + \"\\t\");\n\t\t\t\n\t\t\tif(! notInCache) { // found in the cache\n\t\t\t\t// hit query\n\t\t\t\tfileContents.append(\"1\\t\");\n\t\t\t\tint hitQueryNo = hitPair.getValue0();\n\t\t\t\tSmallGraph hitQuery = hitPair.getValue1();\n\t\t\t\thitQuery.print2File(args[3] + \"/Q\" + hitQueryNo + \"_N\" + hitQuery.getNumVertices() + \".txt\");\n\t\t\t\tfileContents.append(hitQueryNo + \"\\t\" + hitQuery.getNumVertices() + \"\\t\");\n\t\t\t}\n\n\t\t\tstartTime = System.nanoTime();\n\t\t\tif(notInCache) { // Not found in the cache\n\t\t\t\tSystem.out.print(\"Not the cache!, \");\n\t\t\t\tfileContents.append(\"0\\t\");\n\t\t\t\tfileContents.append(\"-1\\t-1\\t\");\n//\t\t\t\tlong bTime = System.currentTimeMillis();\n//\t\t\t\tSet<Ball> tightResults_cache = TightSimulation.getTightSimulation(dataGraph, queryGraph);\n//\t\t\t\ttightResults_cache = TightSimulation.filterMatchGraphs(tightResults_cache);\n//\t\t\t\tlong fTime = System.currentTimeMillis();\n//\t\t\t\tSystem.out.println(\"The time for tight simulation without cache: \" + (fTime - bTime) + \" ms\");\n\t\t\t\t// store in the cache\n\t\t\t\t// The polytree of the queryGraph is created\n\t\t\t\tint center = q.getSelectedCenter();\n\t\t\t\tSmallGraph polytree = GraphUtils.getPolytree(q, center);\n\t\t\t\t// The dualSimSet of the polytree is found\n\t\t\t\t// The induced subgraph of the dualSimSet is found\n\t\t\t\t// The <polytree, inducedSubgraph> is stored in the cache\n//\t\t\t\tcache.put(polytree, inducedSubgraph);\n\t\t\t\tSet<Pair<Integer, Integer>> sig = polytree.getSignature(); \n\t\t\t\tif (cacheIndex.get(sig) == null) {\n\t\t\t\t\tSet<SmallGraph> pltSet = new HashSet<SmallGraph>();\n\t\t\t\t\tpltSet.add(polytree);\n\t\t\t\t\tcacheIndex.put(sig, pltSet);\n\t\t\t\t} else\n\t\t\t\t\tcacheIndex.get(sig).add(polytree);\n\t\t\t\t\n\t\t\t\tpolytree2query.put(polytree, new Pair<Integer, SmallGraph>(queryNo, q)); // save the queries filling the cache\n\t\t\t} //if\n\t\t\tstopTime = System.nanoTime();\n\t\t\tt_storeCache = (double)(stopTime - startTime) / 1000000;\n\t\t\tSystem.out.println(\"store: \" + t_storeCache);\n\t\t\tfileContents.append(t_storeCache + \"\\n\");\t\t\t\n\t\t\t\n\t\t\tbw.write(fileContents.toString());\n\t\t\tfileContents.delete(0, fileContents.length());\n\t\t} //for\n\t\t\n\t\tbw.close();\n\t\t\n\t\tSystem.out.println(\"Number of signatures stored: \" + cacheIndex.size());\n\t\tSystem.out.println(\"Number of polytrees stored: \" + polytree2query.size());\n\t\tint maxSet = 0;\n\t\tfor(Set<SmallGraph> pt : cacheIndex.values()) {\n\t\t\tint theSize = pt.size();\n\t\t\tif(theSize > maxSet)\n\t\t\t\tmaxSet = theSize;\n\t\t} //for\n\t\tSystem.out.println(\"The maximum number of stored polytrees with the same signature: \" + maxSet);\n\t}",
"public void testReachability() throws Exception{\n\t\tfor (int i=0; i<input.size(); i++){\n\t\t\tString fileInput=input.get(i);\n\n\t\t\tTBoxReasoner reasoner = TBoxReasonerImpl.create(OWLAPI3TranslatorUtility.loadOntologyFromFile(fileInput));\n\t\t\t//\t\tDAGImpl dag2= InputOWL.createDAG(fileOutput);\n\n\t\t\t//transform in a named graph\n\t\t\tTestTBoxReasonerImpl_OnNamedDAG dag2= new TestTBoxReasonerImpl_OnNamedDAG(reasoner);\n\t\t\tTestTBoxReasonerImpl_Named dag1 = new TestTBoxReasonerImpl_Named(reasoner);\n\t\t\tlog.debug(\"Input number {}\", i+1 );\n\t\t\tlog.info(\"First dag {}\", dag1);\n\t\t\tlog.info(\"Second dag {}\", dag2);\n\t\t\t\n\t\t\tassertTrue(testDescendants(dag1.getClassDAG(), dag2.getClassDAG()));\n\t\t\tassertTrue(testDescendants(dag1.getObjectPropertyDAG(), dag2.getObjectPropertyDAG()));\n\t\t\tassertTrue(testAncestors(dag1.getClassDAG(),dag2.getClassDAG()));\n\t\t\tassertTrue(testAncestors(dag1.getObjectPropertyDAG(),dag2.getObjectPropertyDAG()));\n\t\t\tassertTrue(checkforNamedVertexesOnly(dag2, reasoner));\n\t\t\tassertTrue(testDescendants(dag2.getClassDAG(), dag1.getClassDAG()));\n\t\t\tassertTrue(testDescendants(dag2.getObjectPropertyDAG(), dag1.getObjectPropertyDAG()));\n\t\t\tassertTrue(testAncestors(dag2.getClassDAG(), dag1.getClassDAG()));\n\t\t\tassertTrue(testAncestors(dag2.getObjectPropertyDAG(), dag1.getObjectPropertyDAG()));\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tDirectedAcyclicGraph<String, DefaultEdge> dag = new DirectedAcyclicGraph<>(DefaultEdge.class);\r\n\t\t\r\n\t\t//Add some vertices to the DAG and display the contents\r\n\t\tdag.addVertex(\"1\");\r\n\t\tdag.addVertex(\"2\");\r\n\t\tdag.addVertex(\"3\");\r\n\t\tdag.addVertex(\"4\");\r\n\t\tSystem.out.println(dag.toString());\r\n\t\t\r\n\t\t//Properly use the addDagEdge() method and display the contents\r\n\t\ttry {\r\n\t\t\tdag.addDagEdge(\"1\", \"2\");\r\n\t\t\tdag.addDagEdge(\"2\", \"3\");\r\n\t\t\tdag.addDagEdge(\"3\", \"4\");\r\n\t\t} catch (CycleFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(dag.toString());\r\n\t\t\r\n\t\t//Purposefully have addDagEdge() throw an exception\r\n\t\ttry {\r\n\t\t\tdag.addDagEdge(\"4\", \"1\");\r\n\t\t} catch (CycleFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//Display the contents of the DAG\r\n\t\tSystem.out.println(dag.toString());\r\n\t\t\r\n\t\t//Acknowledge that the addEdge() method can work without a try-catch block\r\n\t\tdag.addEdge(\"2\", \"4\");\r\n\t\t\r\n\t\t//Display the contents of the DAG\r\n\t\tSystem.out.println(dag.toString());\r\n\t\t\r\n\t\t//Show that addEdge() throws an IllegalArgumentException when used improperly\r\n\t\ttry {\r\n\t\t\tdag.addEdge(\"4\", \"1\");\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//Remove \"4\" from the DAG and display the contents\r\n\t\tdag.removeVertex(\"4\");\r\n\t\tSystem.out.println(dag.toString());\r\n\t\t\r\n\t\t//Add \"4\" and \"5\" and associated edges (3, 4) and (3, 5)\r\n\t\tdag.addVertex(\"4\");\r\n\t\tdag.addVertex(\"5\");\r\n\t\ttry {\r\n\t\t\tdag.addDagEdge(\"3\", \"4\");\r\n\t\t\tdag.addDagEdge(\"3\", \"5\");\r\n\t\t} catch (CycleFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//Display the ancestors of \"4\"\r\n\t\tSystem.out.println(dag.getAncestors(dag, \"4\").toString());\r\n\t\t\r\n\t\t//Display the descendants of \"2\"\r\n\t\tSystem.out.println(dag.getDescendants(dag, \"2\").toString());\r\n\t}",
"public static void main(String[] args) throws IOException {\n\n\t\tArrayList<Node> nodes = new ArrayList<Node>();\n\n\t\tStringBuilder graphVis = new StringBuilder();\n\t\t\n\t\tfloat edgeProb = 0.001f;\n\t\tgenerateNodesAndEdges(nodes, graphVis, edgeProb, // GraphConfig.EDGE_PROHABILITY\n\t\t\t\tGraphConfig.EDGE_LEVEL_LIMIT, GraphConfig.EDGE_LEVEL_FUNCTION);\n\t\t//generateNodesAndEdgesRecursiv(nodes, graphVis);\n\t\taddColocations(nodes);\n\n\t\t// do the visualization string creation after setting colocation\n\t\t// constraints, if not colocation constraints are not set correctly\n\t\tString graphPath = \"../../Sample_Data/Graph/Evaluation/\" + nodes.size() + \"n_\"\n\t\t\t\t+ m + \"_\" + Util.currentTime();\n\t\t/*\n\t\t * StringBuilder content = new StringBuilder();\n\t\t * \n\t\t * for (Node node : nodes) { content.append(node.toString()); }\n\t\t * \n\t\t * GraphWriter writer = new GraphWriter();\n\t\t * writer.write(content.toString(), graphPath);\n\t\t * if(shallCreateGraphVisualization){\n\t\t * writer.writeVisualisation(graphVis.toString(), graphPath); }\n\t\t */\n\t\tFile file = new File(graphPath + \".csv\");\n\n\t\t// if file doesnt exists, then create it\n\t\tif (!file.exists()) {\n\t\t\tfile.createNewFile();\n\t\t}\n\n\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(GraphConfig.configToString() + \"\\n\");\n\t\tbw.write(\n\t\t\t\t\"Id,(Outgoing) node,(Incoming) node,Colocation nodes,#tensorSize, #operations, RAM storage,Device constraint ,name\\n\");\n\t\tfor (Node node : nodes) {\n\t\t\tbw.write(node.toString());\n\t\t}\n\t\tbw.close();\n\t\tfw.close();\n\t\t// now change properties of the graph\n\n\t\t// String[] edge_probability = {\"0.025\",\"0.05\",\"0.\",\"0.1\", \"0.2\",\"0.4\",\n\t\t// \"0.6\", \"0.8\",\"1\"};\n\t\t/*\n\t\t * String[] edge_probability = { \"0.05\", \"0.1\", \"0.2\", \"0.3\", \"0.4\" };\n\t\t * int nodeLevelDistance = -1; // watch out that all nodes are reachable\n\t\t * -> need sink node // ode sink = new Node(0, \"SINK\"); // not problem\n\t\t * anymore for (String factor : edge_probability) { content = new\n\t\t * StringBuilder(); // remove all edges for (Node nodeToRemoveEdges :\n\t\t * nodes) { nodeToRemoveEdges.removeAllEdges(); } for (Node node :\n\t\t * nodes) { // könnte man beschleunigen da es sich um eine Arraylist\n\t\t * handelt for (Node possibleEdge : nodes) { // To avoid cycles, would\n\t\t * be faster to exploid properties of // the arraylist if (node.level <\n\t\t * possibleEdge.level) { if (Math.random() < Float.parseFloat(factor)) {\n\t\t * if (nodeLevelDistance < 0 || (possibleEdge.level - node.level <\n\t\t * nodeLevelDistance)) { node.getOutgoingNodes().add(possibleEdge);\n\t\t * possibleEdge.getIncomingNodes().add(node);\n\t\t * \n\t\t * } } } } } // koennte man auch schon vorher hinzufuegen, aber um\n\t\t * Fehler // auszuschließen for (Node node : nodes) {\n\t\t * content.append(node.toString()); } writer.write(content.toString(),\n\t\t * graphPath + \"_\" + factor); }\n\t\t */\n\t\t// System.out.println(\"isReachable:\" +\n\t\t// isEveryNodeReachable(sink,numberOfNodes));\n\t\t\n\t\tif(shallCreateGraphVisualization){\n\t\t\tSystem.out.println(graphVis.toString());\n\t\t}\n\t}",
"@Test\n public void finiteUTurnCosts() {\n int right0 = graph.edge(0, 1).setDistance(10).set(speedEnc, 10, 10).getEdge();\n graph.edge(1, 2).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(2, 3).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(3, 4).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(4, 5).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(5, 2).setDistance(1000).set(speedEnc, 10, 10);\n int left6 = graph.edge(1, 6).setDistance(10).set(speedEnc, 10, 10).getEdge();\n int left0 = graph.edge(0, 7).setDistance(10).set(speedEnc, 10, 10).getEdge();\n graph.edge(7, 8).setDistance(10).set(speedEnc, 10, 10);\n graph.edge(8, 9).setDistance(10).set(speedEnc, 10, 10);\n int right6 = graph.edge(9, 6).setDistance(10).set(speedEnc, 10, 10).getEdge();\n\n // enforce p-turn (using the loop in clockwise direction)\n setRestriction(0, 1, 6);\n setRestriction(5, 4, 3);\n\n assertPath(calcPath(0, 6, right0, left6), 107.0, 1070, 107000, nodes(0, 1, 2, 3, 4, 5, 2, 1, 6));\n // if the u-turn cost is finite it depends on its value if we rather do the p-turn or do an immediate u-turn at node 2\n assertPath(calcPath(0, 6, right0, left6, createWeighting(5000)), 107.0, 1070, 107000, nodes(0, 1, 2, 3, 4, 5, 2, 1, 6));\n assertPath(calcPath(0, 6, right0, left6, createWeighting(40)), 44, 40, 44000, nodes(0, 1, 2, 1, 6));\n\n assertPath(calcPath(0, 6, left0, right6), 4, 40, 4000, nodes(0, 7, 8, 9, 6));\n assertPath(calcPath(0, 6, left0, left6), 111, 1110, 111000, nodes(0, 7, 8, 9, 6, 1, 2, 3, 4, 5, 2, 1, 6));\n // if the u-turn cost is finite we do a u-turn at node 1 (not at node 7 at the beginning!)\n assertPath(calcPath(0, 6, left0, left6, createWeighting(40)), 46.0, 60, 46000, nodes(0, 7, 8, 9, 6, 1, 6));\n }",
"public interface IDirectedAcyclicGraph<T> extends Serializable {\n\n /**\n * Adds an edge to the graph.\n *\n * @param from the starting point.\n * @param to the ending point.\n * @return true if the edge was actually added (i.e. not present and didn't\n * create a cycle)\n * @throws NullPointerException if from or to is null\n */\n boolean add(T from, T to) throws NullPointerException;\n\n /**\n * Returns all the nodes that can be reached following the directed edges\n * starting from the selected node. It is guaranteed that the elements are\n * partially ordered by increasing distance from the selected node. If the\n * starting point is not a node in the graph, an empty iterable is returned.\n *\n * @param start the starting point.\n * @return an iterable with all the nodes that can be reached from the\n * starting node.\n * @throws NullPointerException if start is null.\n */\n Iterable<T> followNode(T start) throws NullPointerException;\n\n /**\n * Returns the selected node, followed by all the nodes that can be reached\n * following the directed edges starting from the selected node. It is\n * guaranteed that the elements are partially ordered by increasing distance\n * from the selected node. If the starting point is not a node in the graph,\n * an iterable containing only the starting node is returned.\n *\n * @param start the starting point.\n * @return an iterable which starts with the selected node and is followed\n * by all the connected nodes.\n * @throws NullPointerException if start is null.\n */\n Iterable<T> followNodeAndSelef(T start) throws NullPointerException;\n\n}",
"public abstract void reduce(PDG graph);",
"public void flowAlgorithm(){\n while(!augmentedPath()){\n ArrayList<Integer> flowList = new ArrayList<>();//this is here just so we can print out the path\n int minFlow = 10000;\n int currentID = t;\n GraphNode node = graphNode[currentID];\n //very simply this part will start at the last node and go back through the path that was selected and fin the minimum flow\n flowList.add(t);\n while(node != graphNode[s]){\n int parent = node.parent;\n flowList.add(parent);\n if(graph.flow[parent][currentID][1] < minFlow){\n minFlow = graph.flow[parent][currentID][1];\n }\n node = graphNode[parent];\n currentID = parent;\n }\n currentID = t;//should this be here\n displayMaxFlow(flowList, minFlow);\n node = graphNode[t];\n //this will go back through the same list as the one up above and change their current value\n while(node != graphNode[s]){\n int parent = node.parent;\n graph.flow[parent][currentID][1] = graph.flow[parent][currentID][1] - minFlow;\n node = graphNode[parent];\n currentID = parent;\n }\n }\n }",
"public void topologicalSort() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\t// Call the helper function starting from all vertices one by one\r\n\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\tif (!visited.contains(this.vertices[i]))\r\n\t\t\t\ttopologicalSort(this.vertices[i], visited, stack);\r\n\r\n\t\twhile (!stack.isEmpty()) {\r\n\t\t\tSystem.out.print(stack.pop() + \" \");\r\n\t\t}\r\n\t}",
"private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }",
"private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }",
"public void makePreferredOTTOLRelationshipsNOConflicts() {\n \n // TraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n // .relationships(RelType.TAXCHILDOF, Direction.INCOMING);\n \n // get the start point\n Node life = getLifeNode();\n System.out.println(life.getProperty(\"name\"));\n \n Transaction tx = beginTx();\n addToPreferredIndexes(life, ALLTAXA);\n HashSet<Long> traveled = new HashSet<Long>();\n int nNewRels = 0;\n try {\n // walk out to the tips from the base of the tree\n for (Node n : TAXCHILDOF_TRAVERSAL.traverse(life).nodes()) {\n if (n.hasRelationship(Direction.INCOMING, RelType.TAXCHILDOF) == false) {\n \n // when we hit a tip, start walking back\n Node curNode = n;\n while (curNode.hasRelationship(Direction.OUTGOING, RelType.TAXCHILDOF)) {\n Node startNode = curNode;\n if (traveled.contains((Long)startNode.getId())){\n \tbreak;\n }else{\n \ttraveled.add((Long)startNode.getId());\n }\n Node endNode = null;\n \n // if the current node already has a preferred relationship, we will just follow it\n if (startNode.hasRelationship(Direction.OUTGOING, RelType.PREFTAXCHILDOF)) {\n Relationship prefRel = startNode.getSingleRelationship(RelType.PREFTAXCHILDOF, Direction.OUTGOING);\n \n // make sure we don't get stuck in an infinite loop (should not happen, could do weird things to the graph)\n if (prefRel.getStartNode().getId() == prefRel.getEndNode().getId()) {\n System.out.println(\"pointing to itself \" + prefRel + \" \" + prefRel.getStartNode().getId() + \" \" + prefRel.getEndNode().getId());\n break;\n }\n \n // prepare to move on\n endNode = prefRel.getEndNode();\n \n } else {\n \n // if there is no preferred rel then they all point to the same end node; just follow the first non-looping relationship\n for (Relationship rel : curNode.getRelationships(RelType.TAXCHILDOF, Direction.OUTGOING)) {\n if (rel.getStartNode().getId() == rel.getEndNode().getId()) {\n System.out.println(\"pointing to itself \" + rel + \" \" + rel.getStartNode().getId() + \" \" + rel.getEndNode().getId());\n break;\n } else {\n endNode = rel.getEndNode();\n break;\n }\n }\n \n // if we found a dead-end, die\n if (endNode == null) {\n System.out.println(curNode.getProperty(\"name\"));\n System.out.println(\"Strange, this relationship seems to be pointing at a nonexistent node. Quitting.\");\n System.exit(0);\n }\n \n // create preferred relationships\n curNode.createRelationshipTo(endNode, RelType.PREFTAXCHILDOF);\n curNode.createRelationshipTo(endNode, RelType.TAXCHILDOF).setProperty(\"source\", \"ottol\");\n nNewRels += 1;\n }\n \n if (startNode == endNode) {\n System.out.println(startNode);\n System.out.println(\"The node seems to be pointing at itself. This is a problem. Quitting.\");\n System.exit(0);\n \n // prepare for next iteration\n } else {\n curNode = endNode;\n addToPreferredIndexes(startNode, ALLTAXA);\n }\n }\n }\n \n if (nNewRels % transaction_iter == 0) {\n System.out.println(nNewRels);\n // tx.success();\n // tx.finish();\n // tx = beginTx();\n }\n }\n tx.success();\n } finally {\n tx.finish();\n }\n }",
"@Test\n public void testParallelPropagationLoopBack3SitesNtoNTopologyPutFromOneDS() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n createCacheInVMs(lnPort, vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n vm3.invoke(WANTestBase::createReceiver);\n vm4.invoke(WANTestBase::createReceiver);\n vm5.invoke(WANTestBase::createReceiver);\n\n // site1\n vm3.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n\n // site2\n vm4.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n\n // site3\n vm5.invoke(() -> WANTestBase.createSender(\"tk1\", 1, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"tk2\", 2, true, 100, 10, false, false, null, true));\n\n // create PR\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk1,tk2\", 0,\n 1, isOffHeap()));\n\n // start all the senders\n vm3.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.startSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.startSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.startSender(\"tk2\"));\n\n // pause senders on all the sites\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk2\"));\n\n // this is required since sender pause doesn't take effect immediately\n Wait.pause(1000);\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln1\", 100));\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln2\", 100));\n\n // resume sender (from site1 to site2) on site1\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as the events from site1 should not go back to site1\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as events from site1 will reach site3 directly..site2 need not send to\n // site3 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // resume sender (from site3 to site2) on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk2\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as the events from site3 should not go back to site3\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as events from site3 will reach site1 directly..site2 need not send to\n // site1 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // resume all senders\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk1\"));\n\n // validate region size on all sites\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }",
"public static void main(String[] args) throws Exception {\n\n // Create a buffered reader so that we can read full lines of input.\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n // Retrieve the name of the file to build the graph from.\n System.out.printf(\"Enter the name of the graph file (something.tsv): \");\n System.out.flush();\n String fileName = in.readLine().trim();\n\n // Construct the full file name from the simple name given.\n if (fileName.indexOf('/') < 0) {\n fileName = \"src/main/resources/hw6/data/\" + fileName;\n } else {\n System.err.printf(\"Error: file name must be simple (no '/'s)\\n\");\n System.exit(1);\n }\n\n // Build the graph from the file and report the time spent to the user.\n\n long startTime = System.currentTimeMillis();\n Graph<String, String> graph = buildGraph(fileName);\n long endTime = System.currentTimeMillis();\n\n double duration = (endTime - startTime) / 1000.;\n System.out.printf(\"Parsed graph in %.1f seconds\\n\", duration);\n System.out.printf(\" - %d characters\\n\", graph.size());\n System.out.printf(\" - %d pairs appeared together\\n\", (graph.getNumOfEdges())/2);\n System.out.println();\n\n // Read in the names of the two characters and check that they exist.\n\n System.out.printf(\"To find a path between two characters...\\n\");\n System.out.printf(\"Enter the first character's name: \");\n System.out.flush();\n String src = in.readLine().trim();\n if (!graph.contains(new GraphNode<String>(src))) {\n System.err.printf(\"Error: no such node\\n\");\n System.exit(1);\n }\n\n System.out.printf(\"Enter the second character's name: \");\n System.out.flush();\n String dest = in.readLine().trim();\n if (!graph.contains(new GraphNode<String>(dest))) {\n System.err.printf(\"Error: no such node\\n\");\n System.exit(1);\n }\n\n // Find the shortest path.\n\n startTime = System.currentTimeMillis();\n List<GraphEdge<String, String>> path = shortestPath(graph, src, dest);\n endTime = System.currentTimeMillis();\n\n duration = (endTime - startTime) / 1000.;\n System.out.printf(\"Found shortest path in %.1f seconds\\n\", duration);\n System.out.println();\n\n // Display the shortest path to the user.\n if (path == null) {\n System.out.printf(\"No path from %s to %s\\n\", src, dest);\n } else {\n System.out.printf(\"Shortest path:\\n\");\n System.out.printf(\" from %s\\n\", src);\n for (GraphEdge<String, String> edge : path) {\n \t System.out.printf(\" to %s [in %s]\\n\",\n edge.getDestination().getData(), edge.getData());\n }\n }\n }",
"void topologicalSort(){ \n Stack<Integer> stack = new Stack<Integer>(); \n \n // Mark all the vertices as not visited \n boolean visited[] = new boolean[V]; \n for (int i = 0; i < V; i++) \n visited[i] = false; \n \n // Call the recursive helper function to store Topological Sort starting from all vertices one by one \n for (int i = 0; i < V; i++) \n if (visited[i] == false) \n topologicalSortUtil(i, visited, stack); \n \n // Print contents of stack \n while (stack.empty()==false) \n System.out.print(stack.pop() + \" \"); \n }",
"private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }",
"private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }",
"private void computeAllPaths()\n {\n for (Station src : this.graph.stations)\n {\n List<Station> visited = new ArrayList<Station>();\n computePathsForNode(src, null, null, visited);\n }\n Print.printTripList(this.tripList);\n }",
"public void Generator(Graph<MyNode, MyEdge> Graph, ArrayList<MySFC> S,int R,int x,int y,int z) {\n Map<MyEdge, Integer> r_e2 = new HashMap<>();\n for (MyEdge e : Graph.getEdges()) r_e2.put(e, r_e.get(e));\n Map<MyNode, Integer> r_n2 = new HashMap<>();\n for (MyNode n : Graph.getVertices()) r_n2.put(n, r_n.get(n));\n /**Sort SFC set in reverse order*/\n S.sort(new MyComparator());\n whole:for (MySFC s : S) {\n /**Deep copy of graph*/\n Graph<MyNode, MyEdge> Copy_Graph = Clone_Graph(Graph);\n /**Remove links which don't have enough capacity*/\n for (MyEdge e : Copy_Graph.getEdges()) if (s.Demand_Link_Resource > r_e.get(find_edge(e))) Copy_Graph.removeEdge(e);\n /**finding shortest path*/\n DijkstraShortestPath<MyNode, MyEdge> ds = new DijkstraShortestPath<>(Copy_Graph, new MyTransformer());\n DijkstraDistance<MyNode, MyEdge> dd = new DijkstraDistance<>(Copy_Graph);\n List<MyEdge> path;\n MyNode source = find_original_Node(Copy_Graph, s.source);\n MyNode sink = find_original_Node(Copy_Graph, s.sink);\n if (dd.getDistance(source, sink) != null) path = ds.getPath(source, sink);\n else {\n cost_link = 0;\n cost_node = 0;\n break whole;\n }\n Graph<MyNode, MyEdge> p = Dijkstra_Path(Copy_Graph, path, source);\n for (int i = 0; i < R; i++) {\n Map<MyNode, Set<MyVNF>> Deploy_List = new HashMap<>();\n ArrayList<MyNode> U = new ArrayList<MyNode>(p.getVertices());\n MyNode before = source;\n for (MyVNF f : s.VNF) {\n U = Capacity_Confirm(U, f, r_n2);\n if (U.size() != 0)before = Deploy_Value(U, Copy_Graph, p, Deploy_List, r_n2, f, s, x, y, z);\n else {\n step1:for (;;) {\n /**selecting the before and next node*/\n MyNode next = find_original_Node(Copy_Graph, Next_Generator(p, s.source, before));\n MyEdge e = Copy_Graph.findEdge(before, next);\n Copy_Graph.removeEdge(e);\n Graph_Modificator(Copy_Graph, p, before, next, s);\n step2:for (;;){\n dd = new DijkstraDistance<>(Copy_Graph,new MyTransformer());\n ds = new DijkstraShortestPath<>(Copy_Graph, new MyTransformer());\n List<MyEdge> path2 = new ArrayList<>();\n if (dd.getDistance(before, next) != null) {\n path2 = ds.getPath(before, next);\n Graph<MyNode, MyEdge> p2 = Dijkstra_Path(Copy_Graph, path2, source);\n for (MyNode n : p2.getVertices()) if(before.Node_Num!= n.Node_Num&&next.Node_Num!=n.Node_Num)U.add(n);\n if(U.size()!=0)Capacity_Confirm(U, f, r_n2);\n if (U.size() != 0) {\n List<MyEdge> path3 = new ArrayList<MyEdge>(path);\n path3.remove(e);\n path3.addAll(path2);\n Graph<MyNode, MyEdge> p3 = Dijkstra_Path(Graph, path3, source);\n before = find_original_Node(Copy_Graph,Deploy_Value(U, Graph, p3, Deploy_List, r_n2, f, s, x, y, z));\n U = List_Modificator(U, p3, before, source);\n p = p3;\n path = new ArrayList<MyEdge>(p3.getEdges());\n break step1;\n } else {\n ArrayList<MyNode> nl = new ArrayList<>(p2.getNeighbors(find_original_Node(p2,before)));\n Copy_Graph.removeEdge(Copy_Graph.findEdge(find_original_Node(Copy_Graph, nl.get(0)), find_original_Node(Copy_Graph, before)));\n }\n } else {\n before = next;\n if (before.Node_Num == s.sink.Node_Num) {\n cost_link = 0;\n cost_node = 0;\n break whole;\n } else break step2;\n }\n }\n }\n }\n }\n }\n if (cost_node != 0) for (MyEdge e : p.getEdges()) cost_link += c_e.get(find_edge(e)) * s.Demand_Link_Resource;\n }\n }",
"public String depthFirstSearch( AnyType start_vertex ) throws VertexException {\n \n StringBuffer buffer = new StringBuffer();\n \n // ----------------------------\n // TODO: Add your code here\n // ----------------------------\n ConstantTimeStack<Vertex<AnyType>> stack = new ConstantTimeStack<Vertex<AnyType>>();\n boolean exists = false;\n Vertex<AnyType> S = new Vertex<AnyType>(start_vertex);\n int counter = 0;\n //loop through to set each vertex to not visited\n for( int i = 0; i < vertex_adjacency_list.size(); i++){\n vertex_adjacency_list.get(i).setVisited(-1);\n //if find the start vertex then set index position to counter\n if(vertex_adjacency_list.get(i).compareTo(S) == 0){\n exists = true;\n vertex_adjacency_list.get(i).setVisited(counter);\n counter = i;\n }\n }\n //if doesn't exist then through exception\n if(exists == false){\n throw new VertexException(\"Start Vertex does not exist\");\n }\n //if it does exist then push start node onto stack, set visited \n else if(exists){\n stack.push(vertex_adjacency_list.get(counter));\n vertex_adjacency_list.get(counter).setVisited(1);\n Vertex <AnyType> e = vertex_adjacency_list.get(counter);\n counter = 2;\n int n = e.numberOfAdjacentVertices();\n try{\n \n while(true){\n //loop through e's adjacent vertices \n for (n = e.numberOfAdjacentVertices()-1; n >=0 ; n--){\n //if the adacent vertex has not been visited\n if(e.getAdjacentVertex(n).hasBeenVisited()==false){\n //change e to adjacent vertex and push onto stack\n e = e.getAdjacentVertex(n);\n stack.push(e);\n //set e as visited at counter\n e.setVisited(counter);\n counter++;\n //reset n to e's num of vertices\n n = e.numberOfAdjacentVertices();\n }\n //if it has been visited and it's the first node in list\n //then pop it off the stack and then set e to new top\n //set n to new num of vertices\n else if(e.getAdjacentVertex(n).hasBeenVisited() && n == 0){\n stack.pop();\n e = stack.peek();\n n = e.numberOfAdjacentVertices();\n }\n }\n }\n }catch(EmptyStackException m){\n }\n }\n //loop through the list and print each with when it was visited\n for(int k = 0; k< vertex_adjacency_list.size(); k++){\n buffer.append(vertex_adjacency_list.get(k) + \":\" + vertex_adjacency_list.get(k).getVisited()+ \"\\n\");\n }\n \n return buffer.toString();\n \n }",
"private void createEdges() throws IOException {\r\n\t\tString line;\r\n\t\tString fromVertex=null;\r\n\t\tString toVertex=null;\r\n\t\twhile((line=next(1))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\ttoVertex= line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"is_a:\"))\r\n\t\t\t\t{\r\n\t\t\t\tfromVertex = nocomment(line.substring(colon+1));\r\n\t\t\t\t//System.out.println(fromVertex+\" to be connected to: \"+toVertex);\r\n\t\t\t\tTerm fromNode = terms.get(fromVertex);\r\n\t\t\t\tTerm toNode = terms.get(toVertex);\r\n\t\t\t\tif (fromNode.namespace.equals(\"molecular_function\") && toNode.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse if (fromNode.namespace.equals(\"biological_process\") && toNode.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addEdge(fromNode, toNode);\r\n\t\t\t\t} \r\n\t\t\t\telse if (fromNode.namespace.equals(\"cellular_component\") && toNode.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addEdge(fromNode, toNode);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"FAILED TO ADD TO DAG, not belonging to the same NAMESPACE\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}",
"private void createGraphFromIntermediateStructure() {\n // initialize the graph to be a directed sparse graph\n graph = new DirectedSparseGraph<>();\n \n groupVertices = new HashMap<>();\n \n mainScoreAccession = piaModeller.getPSMModeller().getFilesMainScoreAccession(1);\n \n // go through the clusters and create the graph\n for (Set<IntermediateGroup> cluster : piaModeller.getIntermediateStructure().getClusters().values()) {\n for (IntermediateGroup group : cluster) {\n VertexObject groupV = addGroupVertex(group);\n\n // connect to the child-groups\n if (group.getChildren() != null) {\n for (IntermediateGroup child : group.getChildren()) {\n VertexObject childV = addGroupVertex(child);\n String edgeName = \"groupGroup_\" + groupV.getLabel() + \"_\" + childV.getLabel();\n graph.addEdge(edgeName, groupV, childV);\n }\n }\n\n // add the proteins collapsed\n if ((group.getProteins() != null) && (group.getProteins().size() > 0)) {\n addProteinVertices(groupV, true);\n }\n\n // add the peptides\n if ((group.getPeptides() != null) && (group.getPeptides().size() > 0)) {\n addPeptideVertices(groupV, true);\n \n for (IntermediatePeptide peptide : group.getPeptides()) {\n for (IntermediatePeptideSpectrumMatch psm : peptide.getAllPeptideSpectrumMatches()) {\n Double score = psm.getScore(mainScoreAccession);\n \n if ((score != null) && !score.equals(Double.NaN)) {\n if ((highestMainScore == null) || highestMainScore.equals(Double.NaN)) {\n highestMainScore = score;\n } else if (score > highestMainScore){\n highestMainScore = score;\n }\n \n if ((lowestMainScore == null) || lowestMainScore.equals(Double.NaN)) {\n lowestMainScore = score;\n } else if (score < lowestMainScore){\n lowestMainScore = score;\n }\n }\n }\n }\n }\n }\n }\n }",
"public void force_directed() {\n\n\t\tint ssize = g_heir[g_current_level];\n\t\tint fixedsize = 0;\n\t\tif (g_interpolating)\n\t\t\tfixedsize = g_heir[g_current_level + 1];\n\n\t\t// initialize index sets\n\t\tif (g_cur_iteration == g_stop_iteration) {\n\n\t\t\tfor (int i = 0; i < ssize; i++) {\n\n\t\t\t\tfor (int j = 0; j < V_SET_SIZE; j++) {\n\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( j > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(j+1);\n\t\t\t\t\t}\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// perform the force simulation iteration\n\t\tfloat[] dir_vec = new float[g_embedding_dims];\n\t\tfloat[] relvel_vec = new float[g_embedding_dims];\n\t\tfloat diff = 0.f;\n\t\tfloat norm = 0.f;\n\t\tfloat lo = 0.f;\n\t\tfloat hi = 0.f;\n\n\t\t// compute new forces for each point\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\t// update the S set with random entries\n\t\t\t\tif (j >= V_SET_SIZE) {\n\t\t\t\t\t\n\t\t\t\t\tSimpleEdge se = null;\n\t\t\t\t\tif( V_SET_SIZE > m_gm.nodeEdgeLookup.get(i).size() - 2 ) {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tse = m_gm.nodeEdgeLookup.get(i).get(V_SET_SIZE + myRandom.nextInt(m_gm.nodeEdgeLookup.get(i).size()-V_SET_SIZE));\n\t\t\t\t\t} \n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se = se;\n\t\t\t\t\t// g_idx[i*(V_SET_SIZE+S_SET_SIZE)+j].index =\n\t\t\t\t\t// myRandom.nextInt(g_interpolating?fixedsize:ssize);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by index\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new IdxComp());\n\n\t\t\t// mark duplicates (with 1000)\n\t\t\tfor (int j = 0; j < V_SET_SIZE + S_SET_SIZE; j++) {\n\n\t\t\t\tif( j > 0) {\n\t\t\t\t\tif (g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst == g_idx[i\n\t\t\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE) + j - 1].se.dst)\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t\telse {\n\t\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.src == g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst ) {\n\t\t\t\t\t\n\t\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// sort index set by distance\n\t\t\tArrays.sort(g_idx, i * (V_SET_SIZE + S_SET_SIZE), (i + 1)\n\t\t\t\t\t* (V_SET_SIZE + S_SET_SIZE), new DistComp());\n\n\t\t\t// move the point\n\t\t\tfor (int j = 0; j < (V_SET_SIZE + S_SET_SIZE); j++) {\n\n\t\t\t\t// get a reference to the other point in the index set\n\t\t\t\tint idx = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.dst;\n\t\t\t\tnorm = 0.f;\n\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t// calculate the direction vector\n\t\t\t\t\tdir_vec[k] = m_embed[idx * g_embedding_dims + k]\n\t\t\t\t\t\t\t- m_embed[i * g_embedding_dims + k];\n\t\t\t\t\tnorm += dir_vec[k] * dir_vec[k];\n\t\t\t\t}\n\t\t\t\tnorm = (float) Math.sqrt(norm);\n\t\t\t\tg_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd = norm;\n\t\t\t\tif (norm > 1.e-6\n\t\t\t\t\t\t&& !g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].isDuplicate ) {\n\t\t\t\t\t\n\t\t\t\t\t// normalize direction vector\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tdir_vec[k] /= norm;\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate relative velocity\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\t\t\t\t\t\trelvel_vec[k] = g_vel[idx *g_embedding_dims + k]\n\t\t\t\t\t\t\t\t- g_vel[i * g_embedding_dims + k];\n\t\t\t\t\t}\n\n\t\t\t\t\t// calculate difference between lo and hi distances\n\t\t\t\t\tlo = g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].lowd;\n\t\t\t\t\thi = (float) Math.pow(g_idx[i * (V_SET_SIZE + S_SET_SIZE) + j].se.w,POWER_FACTOR);\n\t\t\t\t\tdiff = (lo - hi) * SPRINGFORCE;\n\t\t\t\t\t// compute damping value\n\t\t\t\t\tnorm = 0.f;\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tnorm += dir_vec[k] * relvel_vec[k];\n\t\t\t\t\t}\n\t\t\t\t\tdiff += norm * DAMPING;\n\n\t\t\t\t\t// accumulate the force\n\t\t\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\t\t\tg_force[i * g_embedding_dims + k] += dir_vec[k] * diff;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// scale the force by the size factor\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tg_force[i * g_embedding_dims + k] *= SIZE_FACTOR;\n\t\t\t}\n\t\t}\n\n\t\t// compute new velocities for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tfloat foo = g_vel[i * g_embedding_dims + k];\n\t\t\t\tfloat bar = foo + g_force[i * g_embedding_dims + k] * DELTATIME;\n\t\t\t\tfloat baz = bar * FREENESS;\n\t\t\t\tg_vel[i * g_embedding_dims + k] = (float) Math.max(\n\t\t\t\t\t\tMath.min(baz, 2.0), -2.0);\n\t\t\t}\n\t\t}\n\n\t\t// compute new positions for each point with Euler integration\n\t\tfor (int i = fixedsize; i < ssize; i++) {\n\t\t\tfor (int k = 0; k < g_embedding_dims; k++) {\n\n\t\t\t\tm_embed[i * g_embedding_dims + k] += g_vel[i * g_embedding_dims\n\t\t\t\t\t\t+ k]\n\t\t\t\t\t\t* DELTATIME;\n\t\t\t}\n\t\t}\n\t}",
"public void processTreeTypes(@NonNull CompilationUnit ast) {\n\t\tVariableTypeMap variables = new VariableTypeMap();\n\t\tthis.variableMaps.clear();\n\n\t\tthis.variableMaps.push(variables);\n\t\tLabelPass labels = new LabelPass(variables);\n\t\tlabels.processLabels(ast);\n\n\t\tthis.processTypes(ast);\n\t}",
"private GraphPath<V, E> P(\n Graph<V, E> g, GraphPath<V, E> S, GraphPath<V, E> T, V m, V b1, V b2, V b3, V s1, V s2,\n V s3)\n {\n if (s1 == b1) {\n if (b1 == m) {\n List<E> edgeList = new LinkedList<>();\n return new GraphWalk<>(g, s1, b1, edgeList, 0);\n } else\n return null;\n } else {\n if (b1 == m)\n return null;\n if (g.containsEdge(m, b2) || g.containsEdge(m, b3) || g.containsEdge(m, s2)\n || g.containsEdge(m, s3) || S == null || T == null)\n return null;\n if (S.getVertexList().stream().anyMatch(\n t -> g.containsEdge(t, b2) || g.containsEdge(t, b3) || g.containsEdge(t, s2)\n || g.containsEdge(t, s3))\n || T.getVertexList().stream().anyMatch(\n t -> t != b1 && (g.containsEdge(t, b2) || g.containsEdge(t, b3)\n || g.containsEdge(t, s2) || g.containsEdge(t, s3))))\n return null;\n List<V> intersection = intersectGraphPaths(S, T);\n if (intersection.size() != 1 || !intersection.contains(m))\n return null;\n if (S.getVertexList().stream().anyMatch(\n s -> s != m\n && T.getVertexList().stream().anyMatch(t -> t != m && g.containsEdge(s, t))))\n return null;\n List<E> edgeList = new LinkedList<>();\n edgeList.addAll(T.getEdgeList());\n edgeList.addAll(S.getEdgeList());\n double weight = edgeList.stream().mapToDouble(g::getEdgeWeight).sum();\n return new GraphWalk<>(g, b1, s1, edgeList, weight);\n\n }\n }",
"protected void createTopologyGraph() {\n graph = new TopologyGraph(roots, boundaries);\n\n // check and resolve conflicts about input priorities\n AbstractExecNodeExactlyOnceVisitor inputPriorityVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n if (!boundaries.contains(node)) {\n visitInputs(node);\n }\n updateTopologyGraph(node);\n }\n };\n roots.forEach(n -> n.accept(inputPriorityVisitor));\n }",
"public interface IRControlFlowGraph {\n\t\n\tCollection<? extends IREdge<? extends IRBasicBlock>> getEdges();\n \n /** Get the initial node. The initial node has no predecessors and no statements. */\n IRBasicBlock getEntry();\n\n /** Get the exit node. The exit node has no successors and no statements. */\n IRBasicBlock getExit();\n\n /** Get all the nodes in the CFG representation. */\n Set<? extends IRBasicBlock> getBlocks();\n\n /** Get the predecessors for the given <code>block</code>. */\n Set<? extends IRBasicBlock> getPredecessors(IRBasicBlock block);\n\n /** Get the successors for the given <code>block</code>. */\n Set<? extends IRBasicBlock> getSuccessors(IRBasicBlock block);\n\n /** Get the list of incoming edges. */\n Collection<? extends IREdge<? extends IRBasicBlock>> getIncomingEdges(\n IRBasicBlock block);\n\n /** Get the list of outgoing edges. */\n Collection<? extends IREdge<? extends IRBasicBlock>> getOutgoingEdges(\n IRBasicBlock block);\n\n Scope getScope();\n\n /** Get the source node of the declaration for this CFG. */\n Node getSourceNode();\n\n /** Get the source location of the declaration for this CFG. */\n Location getLocation();\n \n /** Get the name of this CFG (e.g., the name of the procedure). */\n String getName();\n\n /** Pretty-print the CFG to the given <code>Printer</code>. */\n void format(Printer printer);\n\n\tvoid removeBlock(IRBasicBlock block);\n\n\tvoid removeEdge(IREdge<?> edge);\n\n\tvoid addEdge(IREdge<?> edge);\n\n\tvoid addEdge(IRBasicBlock currentBlock, IRBasicBlock succ);\n\n\tvoid addEdge(IRBasicBlock source, IRBooleanExpression guard, IRBasicBlock target);\n\n\tvoid setEntry(IRBasicBlock newEntry);\n\t\n\tvoid setExit(IRBasicBlock newExit);\n\n\tList<IRBasicBlock> topologicalSeq(IRBasicBlock startBlock);\n\n\tIRControlFlowGraph clone();\n\n\tvoid addBlock(IRBasicBlock source);\n\n\tList<IRBasicBlock> topologicalRevSeq(IRBasicBlock endBlock);\n}",
"@Override\r\n public Set<List<String>> findAllPaths(int sourceId, int targetId, int reachability) {\r\n //all paths found\r\n Set<List<String>> allPaths = new HashSet<List<String>>();\r\n //collects path in one iteration\r\n Set<List<String>> newPathsCollector = new HashSet<List<String>>();\r\n //same as the solution but with inverted edges\r\n Set<List<String>> tmpPathsToTarget = new HashSet<List<String>>();\r\n //final solution\r\n Set<List<String>> pathsToTarget = new HashSet<List<String>>();\r\n \r\n String[] statementTokens = null; \r\n Set<Integer> allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n List<String> statementsFound = new ArrayList<String>();\r\n \r\n for (int i = 0; i < reachability; i++) {\r\n if (i == 0) { \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(sourceId);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n //allProcessedNodes.add(inNodeId); \r\n //Incoming nodes are reversed\r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n allPaths.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(sourceId);\r\n \r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n statementsFound.add(outEdge);\r\n allPaths.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n } else {\r\n newPathsCollector = new HashSet<List<String>>();\r\n\r\n for (List<String> statements: allPaths) {\r\n allProcessedNodes = new HashSet<Integer>(); //to avoid duplicates\r\n int lastNodeInPath = 0;\r\n \r\n for (String predicate: statements) {\r\n if (predicate.contains(\">-\")) {\r\n statementTokens = predicate.split(\">-\");\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[0]).reverse().toString()));\r\n allProcessedNodes.add(Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString()));\r\n lastNodeInPath = Integer.parseInt(\r\n new StringBuilder(statementTokens[2]).reverse().toString());\r\n } else {\r\n statementTokens = predicate.split(\"->\"); \r\n allProcessedNodes.add(Integer.parseInt(statementTokens[0]));\r\n allProcessedNodes.add(Integer.parseInt(statementTokens[2]));\r\n lastNodeInPath = Integer.parseInt(statementTokens[2]);\r\n }\r\n }\r\n \r\n Collection<String> inEdges = jungCompleteGraph.getInEdges(lastNodeInPath);\r\n for (String inEdge: inEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = inEdge.split(\"->\");\r\n int inNodeId = Integer.parseInt(statementTokens[0]);\r\n if (allProcessedNodes.contains(inNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(new StringBuilder(inEdge).reverse().toString());\r\n newPathsCollector.add(statementsFound);\r\n if (inNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n \r\n }\r\n \r\n Collection<String> outEdges = jungCompleteGraph.getOutEdges(lastNodeInPath);\r\n for (String outEdge: outEdges) {\r\n \r\n statementsFound = new ArrayList<String>();\r\n statementsFound.addAll(statements);\r\n statementTokens = outEdge.split(\"->\");\r\n int outNodeId = Integer.parseInt(statementTokens[2]);\r\n if (allProcessedNodes.contains(outNodeId)) continue;\r\n \r\n //Incoming nodes are reversed \r\n statementsFound.add(outEdge);\r\n newPathsCollector.add(statementsFound);\r\n if (outNodeId == targetId) tmpPathsToTarget.add(statementsFound);\r\n }\r\n }\r\n allPaths.addAll(newPathsCollector);\r\n }\r\n \r\n //System.out.println(\"*****End of iteration \" + i);\r\n //System.out.println(\"#SIZE OF allPaths: \" + allPaths.size());\r\n int numItems = 0;\r\n for (List<String> currList: allPaths) {\r\n numItems = numItems + currList.size();\r\n }\r\n //System.out.println(\"#NUMBER OF ELEMS OF ALL LISTS: \" + numItems);\r\n //System.out.println(\"#SIZE OF tmpPathsToTarget : \" + tmpPathsToTarget.size());\r\n }\r\n \r\n //We need to reverse back all the predicates\r\n for (List<String> statements: tmpPathsToTarget) { \r\n List<String> fixedStatements = new ArrayList<String>(); \r\n for (int i = 0; i < statements.size(); i++) { \r\n String statement = statements.get(i); \r\n if (statement.contains(\">-\")) {\r\n fixedStatements.add(new StringBuilder(statement).reverse().toString());\r\n } else {\r\n fixedStatements.add(statement);\r\n } \r\n }\r\n pathsToTarget.add(fixedStatements);\r\n }\r\n return pathsToTarget;\r\n }"
] | [
"0.58219445",
"0.54622597",
"0.5437355",
"0.53960204",
"0.5372496",
"0.53407747",
"0.53069246",
"0.5293674",
"0.528412",
"0.5276772",
"0.5276119",
"0.5273955",
"0.52625906",
"0.5260796",
"0.5257277",
"0.5227205",
"0.52114975",
"0.5179996",
"0.51771325",
"0.5171841",
"0.5169657",
"0.5169066",
"0.51581144",
"0.5154693",
"0.51324904",
"0.51172405",
"0.51150024",
"0.5113698",
"0.51100624",
"0.5108922",
"0.5107508",
"0.5080093",
"0.5079706",
"0.5076314",
"0.5073457",
"0.5070713",
"0.5066122",
"0.50651675",
"0.50618315",
"0.50583816",
"0.5053188",
"0.5048736",
"0.5036926",
"0.5034916",
"0.50290054",
"0.50283223",
"0.5025614",
"0.5021235",
"0.50163096",
"0.500967",
"0.4986241",
"0.49603406",
"0.49578568",
"0.4950112",
"0.49480206",
"0.49427488",
"0.4941741",
"0.4938685",
"0.49220157",
"0.49199185",
"0.4915816",
"0.49022377",
"0.48934186",
"0.4892377",
"0.48919585",
"0.48917857",
"0.48878205",
"0.48784667",
"0.48663947",
"0.48631793",
"0.48545083",
"0.48510087",
"0.48479155",
"0.4845993",
"0.48459896",
"0.48254913",
"0.4804153",
"0.4801222",
"0.47983435",
"0.47970837",
"0.47945607",
"0.4784655",
"0.47761968",
"0.47761223",
"0.47476253",
"0.47287086",
"0.47285846",
"0.47246265",
"0.4720971",
"0.47186765",
"0.4717446",
"0.47170672",
"0.47126958",
"0.47122744",
"0.4712058",
"0.4710761",
"0.4709496",
"0.47093922",
"0.47087082",
"0.47069007"
] | 0.54616684 | 2 |
Solution one union and find | public int countComponents(int n, int[][] edges) {
int [] ids = new int [n];
for(int i=0; i<n; i++) ids[i] = i;
for(int [] edge : edges) {
union(edge[0], edge[1], ids);
}
Set<Integer> set = new HashSet<>();
for(int i : ids) set.add(find(ids[i], ids));
return set.size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int union(int u, int v) {\n int p1 = find(u), p2 = find(v);\n if (p1 == p2) {\n return p1;\n }\n int s1 = _sizes[p1], s2 = _sizes[p2];\n if (s1 > s2) {\n _sizes[p1] += s2;\n// int i = 1;\n// while (s2 > 0) {\n// if (_parents[i] == p2) {\n// _parents[i] = p1;\n// s2 -= 1;\n// }\n// i += 1;\n// }\n _parents[p2] = p1;\n return s1;\n } else {\n _sizes[p2] += s1;\n// int j = 1;\n// while (s1 > 0) {\n// if (_parents[j] == p1) {\n// _parents[j] = p2;\n// s1 -= 1;\n// }\n// j += 1;\n// }\n _parents[p1] = p2;\n return s2;\n }\n }",
"List<ProtocolPo> queryByUnion(ProtocolPo query);",
"void union(int a, int b) {\n int aParent = find(a); // find parent of a\n int bParent = find(b); // find parent of b\n\n // here we are everytime setting the parent of a_set as b_set in union\n // set the parent of all a as parent of b\n childToParentMap.put(aParent, bParent);\n }",
"void union(int p, int q) {}",
"static int findUnion(int i) {\n int result = i;\n while(parent[result] != result)\n result = parent[result];\n\n // update all parents of i to result\n while(parent[i] != i) {\n int temp = parent[i];\n parent[i] = result;\n i = temp;\n }\n return result;\n }",
"void union(int x, int y) {\n\n // **** set the modes in the parents array ****\n if (parents[x] == 0)\n parents[x] = x;\n\n if (parents[y] == 0)\n parents[y] = y;\n\n // **** update the representative element of each set ****\n if (parents[x] != 0 || parents[y] != 0) {\n\n // **** get the low and high from these nodes ****\n int high = Math.max(parents[x], parents[y]);\n int low = Math.min(parents[x], parents[y]);\n\n // ???? ????\n System.out.println(\"union <<< high: \" + high + \" low: \" + low);\n\n // **** update to point to the proper representative ****\n for (int i = 0; i < parents.length; i++) {\n if (parents[i] == high)\n parents[i] = low;\n }\n }\n }",
"@Test\r\n\t\tpublic void testUnion() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// 3rd set =to the union of the two lists \r\n\t\t\ttestingSet3= new IntegerSet(union);\r\n\t\t\t// 4th set equal to the union of sets 1 and 2 \r\n\t\t\ttestingSet4= testingSet.union(testingSet, testingSet2);\r\n\t\t\t// sets 3 and 4 should be equal\r\n\t\t\t// assertEquals method is deprecated \r\n\t\t\tassertArrayEquals(testingSet3.toArray(),testingSet4.toArray());\r\n\t\t\t \r\n\t\t}",
"public UnionFind(int n) {}",
"public T union( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If already were in same set, just return data from the root of that\n // set.\n if ( root1 == root2 )\n return root1.data;\n // If not already, then doing union reduces overall number of sets.\n numSets-- ;\n // We use root2 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this case,\n // or (b) the tree containing obj1 has lower rank.\n if ( ( root1.rank == root2.rank && Math.random() < 0.5 ) || root1.rank < root2.rank )\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root1.parent = root2;\n root2.size += root1.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root2.rank++ ;\n \n return root2.data;\n }\n else\n // We use root1 as the new parent if either (a) the trees containing\n // both inputs have same rank and a \"coin toss\" settles on this\n // case, or (b) the tree containing obj2 has lower rank.\n {\n // When we link root1 to root2, size of set under root2 inreases.\n root2.parent = root1;\n root1.size += root2.size;\n \n // When we union two sets of same rank, new root gets higher rank.\n if ( root1.rank == root2.rank )\n root1.rank++ ;\n \n return root1.data;\n }\n }",
"@Test\n\t public void test_Union_Set_Same() throws Exception{\n\t\t int[] setarray1= new int[]{1,2,3};\n\t\t int[] setarray2= new int[]{1,2,3};\n\t\t SET set = new SET(setarray1);\n\t\t int returnedArrOperation[] =set.Union(setarray1,setarray2); \n\t\t int []expectedArr = new int[] {1,2,3};\n\t\t Assert.assertArrayEquals( expectedArr, returnedArrOperation );\n\t }",
"private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }",
"void union(int x,int y){\n int xRoot=find(x),yRoot=find(y);\n if(xRoot==yRoot)return;\n if(rank[xRoot]<rank[yRoot])\n parent[xRoot]=yRoot;\n else if(rank[xRoot]>rank[yRoot])\n parent[yRoot]=xRoot;\n else{\n parent[yRoot]=xRoot;\n rank[xRoot]=rank[xRoot]+1;\n }\n --totalSets;\n }",
"int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}",
"void union(int a, int b) {\n\t\tif (a==9 && b==4){\r\n\t\tSystem.out.println(\"DEBUGGING 9 AND 4\");\r\n\t\tSystem.out.println(\"size of A: \"+ sizeOf(a));\r\n\t\tSystem.out.println(\"size of B: \"+ sizeOf(b));\r\n\t\t}\r\n\t\tint rootB = getRoot(b); // N array access\r\n\t\tint rootA = getRoot(a); // N array access\r\n\t\tif (rootA==rootB)return;\r\n\r\n\t\tif (sizeOf(rootA)<sizeOf(rootB)){\r\n\t\t\tidNode[rootA] = rootB; // 1 array access\r\n\t\t}\r\n\t\telse{\r\n\t\t\tidNode[rootB] = rootA; // 1 array access\r\n\t\t}\r\n\t}",
"public static void union(int u, int v) {\n\t\tu = root(u); // optimizations\n\t\tv = root(v); // to make find faster\n\t\tif (u == v) return; // already in same component\n\t\t\n\t\tif (size[u] >= size[v]) {\n\t\t\tp[v] = u;\n\t\t\tsize[u] += size[v];\n\t\t} else {\n\t\t\tp[u] = v;\n\t\t\tsize[v] += size[u];\n\t\t}\n\t}",
"public static boolean union(int a, int b, int p[], int r[]){\n int pa=find(a,p,r);\r\n int pb=find(b,p,r);\r\n if(pa==pb)\r\n return true;\r\n if(pa!=pb)\r\n {\r\n if(r[pa]<r[pb])\r\n {\r\n p[pa]=pb;\r\n }\r\n else if(r[pa]>r[pb])\r\n {\r\n p[pb]=pa;\r\n }\r\n else\r\n {\r\n p[pa]=pb;\r\n r[pb]++;\r\n }\r\n }\r\n return false;\r\n }",
"public interface ISet<T> {\n\n // Maximum possible size of data structures\n int MAX_SIZE = 100;\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain one of each int from both unionWith and this]\n * @param unionWith ISet to find the union from\n */\n default void union(ISet<T> unionWith) {\n T temp;\n int tsize = unionWith.getSize();\n//For every element in unionWith...\n for (int i = 0; i < tsize; i++) {\n //Store value at first position\n //Remove value from unionWith\n temp = unionWith.removePos(0);\n //If this set does not contain value from unionWith...\n if (!this.contains(temp)) {\n //Add value to this set\n this.add(temp);\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are not in diffWith]\n * @param diffWith ISet to find the difference from\n */\n default void difference(ISet<T> diffWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If diffWith does not contain value from this set...\n if(!diffWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n }\n\n /**\n * @pre 0 <= sizeOfSet < max_size\n * @post [this will contain ints from this that are also found in intWith]\n * @param intWith ISet to find the intersection from\n */\n default void intersect(ISet<T> intWith){\n T temp;\n int i = 0;\n //For every element in this set...\n while (i < this.getSize()){\n //Store value at first position\n //Remove value from this set\n temp = this.removePos(0);\n //If intWith does not contain value from this set...\n if(intWith.contains(temp)){\n //Add value to this set\n this.add(temp);\n //Increment position\n i++;\n }\n }\n\n }\n\n\n /**\n * @pre [ISet initialized]\n * @post [ISet contains same elements with a\n * new element - add - placed at the end]\n * @param add T value to be added to ISet\n */\n void add(T add);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and pos >= 0\n * @post [ISet contains same elements as\n * when it was passed, without element at pos] and [T returned]\n * @param pos position in ISet to be removed\n * @return T of position where the element was removed\n */\n T removePos(int pos);\n\n /**\n * @pre [ISet contains elements (non-NULL)] and val != NULL\n * @post [ISet unmodified] and [boolean returned]\n * @param val value to be searched in ISet\n * @return true if ISet contains val, otherwise false\n */\n boolean contains(T val);\n\n /**\n * @pre [ISet initialized with constructor]\n * @post [ISet, size of ISet unmodified] and [int returned]\n * @return int value of the size of the ISet\n */\n int getSize();\n\n}",
"public Filter doUnion(Filter f);",
"public void union(int p, int q) {\n\t\tint i = root(p);\n\t\tint j = root(q);\n//\t\tid[i] = j; instead of this do below improvement\n\t\tif (sz[i] < sz[j]) {\n\t\t\tid[i] = j;\n\t\t\tsz[j] += sz[i];\n\t\t} else {\n\t\t\tid[j] = i;\n\t\t\tsz[i] += sz[j];\n\t\t}\n\t}",
"@Test\n\tpublic void testUnionSLLSetArrayAll0() {\n\n\t\tint[] arr1 = { 0, 0, 0 };\n\t\tint[] arr2 = { 0, 0, 0, 0 };\n\t\tint[] arr3 = { 0, 0 };\n\t\tint[] arr4 = { 0, 0 };\n\t\tSLLSet listObj100 = new SLLSet(arr1);\n\t\tSLLSet listObj99 = new SLLSet(arr2);\n\t\tSLLSet listObj98 = new SLLSet(arr3);\n\t\tSLLSet listObj97 = new SLLSet(arr4);\n\t\tSLLSet listObj96 = new SLLSet();\n\t\tSLLSet[] Array = { listObj100, listObj99, listObj98, listObj97, listObj96 }; // test static SLLSet union(sArray)\n\n\t\tSLLSet listObj23 = SLLSet.union(Array);\n\n\t\tString expected = \"0\";\n\t\tint expectedSize = 1;\n\n\t\tassertEquals(expectedSize, listObj23.getSize());\n\t\tassertEquals(expected, listObj23.toString());\n\n\t}",
"public Bag union(Bag u) {\n return u;\n }",
"@Test\r\n public void testUnion1() {\r\n int actual[] = set1.unionOfSets(set2);\r\n Assert.assertArrayEquals(new int[] { 1, 2, 3, 4, 5 }, actual);\r\n }",
"public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }",
"public static ArrayList<ArrayList<String>> unionD(String table1Name, String table2Name){\n\t\tArrayList<ArrayList<String>> union = new ArrayList<ArrayList<String>>();\r\n\t\t//these will hold the data from the input tables\r\n\t\tArrayList<ArrayList<String>> columns1 = new ArrayList<ArrayList<String>>();\r\n\t\tArrayList<ArrayList<String>> columns2 = new ArrayList<ArrayList<String>>();\r\n\t\t//find the input tables in the database list\r\n\t\tfor (int i = 0; i < tables.size(); i++) {\r\n\t\t\tif (tables.get(i).getName().equals(table1Name)) {\r\n\t\t\t\tcolumns1 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t\tif (tables.get(i).getName().equals(table2Name)) {\r\n\t\t\t\tcolumns2 = new ArrayList<ArrayList<String>>(tables.get(i).datas);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check if the tables are union compatable\r\n\t\tif (columns1.size() != columns2.size()) {\r\n\t\t\tSystem.out.println(\"Unable to perform union - unnequal number of columns.\");\r\n\t\t}\r\n\t\telse {\t//only continue if they are union compatable\r\n\t\t\t//true if all columns have the same type\r\n\t\t\tint sameTypes = 1;\r\n\t\t\tint type1 = 0;\r\n\t\t\tint type2 = 0;\r\n\t\t\t//a max char value of -1 indicates the type is integer\r\n\t\t\tfor (int j = 0; j < columns1.size(); j++) {\r\n\t\t\t\ttype1 = Integer.valueOf(new String(columns1.get(j).get(1)));\r\n\t\t\t\ttype2 = Integer.valueOf(columns2.get(j).get(1));\r\n\t\t\t\tif (type1 > 0) { type1 = 1; }\r\n\t\t\t\telse if (type1 < 0) { type1 = -1; }\r\n\t\t\t\tif (type2 > 0) { type2 = 1; }\r\n\t\t\t\telse if (type2 < 0) { type2 = -1; }\r\n\t\t\t\t//if the types were not equal, don't continue\r\n\t\t\t\tif (type1 != type2) {\r\n\t\t\t\t\tSystem.out.println(\"Unable to perform union - incompatible types.\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\t//continue if the types are equal\r\n\t\t\t\t\t\t//create new columns holding the name from the first table and the greatest char max\r\n\t\t\t\t\tArrayList<String> newColumn = new ArrayList<String>();\r\n\t\t\t\t\tint largestChar = 0;\r\n\t\t\t\t\tif (type1 != -1) {\t//if they aren't integers\r\n\t\t\t\t\t\t//find the largest max char value\r\n\t\t\t\t\t\tif (Integer.parseInt(columns1.get(j).get(1)) >= Integer.parseInt(columns2.get(j).get(1))) {\r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(new String(columns1.get(j).get(1)));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse { \r\n\t\t\t\t\t\t\tlargestChar = Integer.parseInt(columns2.get(j).get(1)); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//keep the type as integer\r\n\t\t\t\t\telse { \r\n\t\t\t\t\t\tlargestChar = -1; \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t//use the name from the first table and largest char max\r\n\t\t\t\t\tnewColumn.add(new String(columns1.get(j).get(0)));\r\n\t\t\t\t\tnewColumn.add(String.valueOf(largestChar));\r\n\t\t\t\t\tunion.add(newColumn);\r\n\t\t\t\t\t//check if there are equal rows to avoid duplicates\r\n\t\t\t\t\tint colCount = 0;\r\n\t\t\t\t\tfor (int n = 2; n < columns1.get(colCount).size(); n++) {\t//for each row in table1\r\n\t\t\t\t\t\tunion.get(j).add(new String(columns1.get(j).get(n)));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\t\r\n\t\t\tfor(int t = 2; t<columns2.get(0).size(); t++){\t//column2 row\r\n\t\t\t\tboolean completeUniqe = true;\r\n\t\t\t\tfor(int p = 2; p < union.get(0).size(); p++){// rows of union\r\n\t\t\t\t\tint sameCount = 0;\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tif(columns2.get(u).get(t).equals(union.get(u).get(p))){\r\n\t\t\t\t\t\t\tsameCount++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(sameCount);\r\n\t\t\t\t\tif(sameCount == union.size()){\r\n\t\t\t\t\t\tcompleteUniqe = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(completeUniqe){\r\n\t\t\t\t\tfor(int u = 0; u<union.size(); u++){//columns of union\r\n\t\t\t\t\t\tunion.get(u).add(new String(columns2.get(u).get(t)));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn union;\r\n\t}",
"public void union(int v1, int v2, int[] parent) {\n\t\tint parentV1 = findParent(parent, v1); // 4\n\t\tint parentV2 = findParent(parent, v2); // 6\n\n\t\t// 2. kya disjoint hai dono/ parent/leader different hai?\n\t\tif (parentV1 != parentV2) {\n\t\t\t// Ab tum union kr sakte ho\n\t\t\t// parent[v1] = v2;\n\t\t\t// parent[4] = 6\n\t\t\tparent[parentV1] = parentV2;\n\t\t}\n\t}",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }",
"@Override\n public SetI union(SetI other) {\n Set o;\n\n if (!(other instanceof Set)) {\n // Different Set impl. Convertion needed.\n // Will impact performance.\n o = Set.fromAnotherImpl(other);\n }\n else {\n o = (Set) other;\n }\n\n int[] newArr = new int[count + o.count];\n int i = 0, j = 0, k = 0;\n\n // Merge sorted arrays.\n while (i < count && j < o.count) {\n // Skip duplicated elements.\n if (contains(o.arr[j])) {\n ++j;\n }\n else if (arr[i] < o.arr[j]) {\n newArr[k++] = arr[i++];\n }\n else {\n newArr[k++] = o.arr[j++];\n }\n }\n\n while (i < count) {\n newArr[k++] = arr[i++];\n }\n\n while (j < o.count) {\n // Skip duplicated elements.\n if (!contains(o.arr[j])) {\n newArr[k++] = o.arr[j];\n }\n ++j;\n }\n\n return new Set(newArr, k);\n }",
"public BSTSet union(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] unionArray = new int[thisArray.length + sArray.length];\n int unionArrayIndex = 0;\n\n // add both arrays together\n for (int i = 0; i < thisArray.length; i++) {\n unionArray[unionArrayIndex++] = thisArray[i];\n }\n\n for (int i = 0; i < sArray.length; i++) {\n unionArray[unionArrayIndex++] = sArray[i];\n }\n\n return new BSTSet(unionArray);\n }",
"@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //create return SetInterface\n SetInterface<T> result = new LinkedSet();\n //add the items from the calling set to the result set\n Node n = first;\n while(n != null){\n result.addItem(n.value);\n n = n.next;\n }\n \n //convert rhs to an array so we know what we're dealing with\n T[] rhsArr = rhs.toArray();\n //add the items from rhsArr to result\n for(int i = 0; i < rhsArr.length; i++){\n result.addItem(rhsArr[i]);\n }\n \n return result;\n }",
"protected <Ty> HashSet<Ty> union(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n retSet.addAll(setA);\n retSet.addAll(setB);\n return retSet;\n }",
"@Test(expected = NullPointerException.class)\r\n\t\tpublic void testUnionWithNullInput() {\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t// union of 2 sets should result in null value \r\n\t\t\ttestingSet3= testingSet.union(testingSet, testingSet2);\r\n\t\t\t\r\n\t\t}",
"public Set Union(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> unionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < 10; i++) {\n\t\t\tif (firstArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(firstArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (secondArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(secondArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet unionReturn = new Set(unionOfBoth); // Initiate a Set object from out final ArrayList\n\t\t\n\t\treturn unionReturn; // Return the final Set Object\n\t}",
"public Set union(Set join){\n Set newSet = new Set();\n for(int element = 0; element < join.size(); element++){\n if (!elementOf(join.getSet()[element]))\n newSet.add(join.getSet()[element]);\n }\n for(int element = 0; element < set.length; element++){\n newSet.add(set[element]);\n }\n return newSet;\n }",
"public ArrBag<T> union( ArrBag<T> other )\n {\n ArrBag<T> unionArray = new ArrBag<T>(other.size() + this.size()); \n\n int unionCount = 0; \n for (int i = 0; i <this.size(); i++ ){\n unionArray.add(this.get(i));\n unionCount++;\n } for (int i = 0; i<other.size(); i++){\n if (!unionArray.contains(other.get(i))){\n unionArray.add(other.get(i));\n unionCount ++;\n }\n }\n return unionArray;\n }",
"public ArrayList<ArrayList> union(ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n if(data == null || data2 == null)\n {\n return null;\n }\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(int i = 0; i < docs.size(); i++)\n {\n docs3.add(docs.get(i));\n relevance3.add(relevance.get(i));\n occurrence3.add(occurrence.get(i));\n popularity3.add(popularity.get(i));\n }\n \n for(Document d: docs2)\n {\n if(!docs3.contains(d))\n {\n docs3.add(d);\n int docIndex = docs2.indexOf(d);\n relevance3.add(relevance2.get(docIndex));\n occurrence3.add(occurrence2.get(docIndex));\n popularity3.add(d.popularity);\n }\n else\n {\n int docIndex = docs3.indexOf(d);\n int docIndex2 = docs2.indexOf(d);\n double oldRel = (double) relevance3.get(docIndex);\n int oldOcc = (int) occurrence3.get(docIndex);\n relevance3.set(docIndex, oldRel+relevance2.get(docIndex2));\n if(oldOcc > occurrence2.get(docIndex2))\n {\n occurrence3.set(docIndex, occurrence2.get(docIndex2));\n }\n } \n }\n ArrayList<ArrayList> data3 = new ArrayList();\n data3.add(docs3);\n data3.add(relevance3);\n data3.add(occurrence3);\n data3.add(popularity3);\n return data3; \n }",
"@Override\n public IntSet union(IntSet other) {\n return other;\n }",
"BUnion createBUnion();",
"@Test\r\n public void test_UnionOf_simple() {\r\n System.out.println(\"unionOf\");\r\n int p = 11;\r\n int q = 99;\r\n UnionFind instance = new QuickUnion(100);\r\n instance.unionOf(p, q);\r\n assertEquals(true, instance.isConnected(p, q));\r\n\r\n }",
"public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }",
"void Union( int x, int y){\n\n int i = root(x);\n int j = root(y);\n if (i == j) return;\n if (rank[i] > rank[j]) { id[j] = i; rank[i] += rank[j]; }\n else { id[i] = j; rank[j] += rank[i]; }\n }",
"int[] MinSubUnion(int x, ArrayList<Integer> vn, ArrayList<Integer> vnComp){\n\tint[] ret = new int[x];\n\t\n\t/*\n\t * Build the set for legitimate users\n\t */\n\t//ArrayList<String> L = new ArrayList<String>();\n\tArrayList<String> LComp = new ArrayList<String>();\n\t//for (int v : vn)\n\t//\tL.addAll(this.LiSet[v]);\n\tfor (int v : vnComp){\n\t\tLComp.removeAll(this.LiSet[v]);\n\t\tLComp.addAll(this.LiSet[v]);\n\t}\n\t\n\tfor(int i = 0; i < x; i ++){\n\t\tint gain = 1000000000;\n\t\tint v_min = -1;\n\t\t\n\t\tfor(int v : vn){\n\t\t\tArrayList<String> temp = this.LiSet[v];\n\t\t\ttemp.removeAll(LComp);\n\t\t\tif(gain > temp.size()){\n\t\t\t\tgain = temp.size();\n\t\t\t\tv_min = v;\n\t\t\t}\n\t\t}\n\t\tif(v_min == -1)\n\t\t\tcontinue;\n\n\t\t//L.removeAll(this.LiSet[v_max]);\n\t\tLComp.removeAll(this.LiSet[v_min]);\n\t\tLComp.addAll(this.LiSet[v_min]);\n\t\tvn.remove(vn.indexOf(v_min));\n\t\tvnComp.add(v_min);\n\t\tret[i] = v_min;\n\t}\n\treturn ret;\n}",
"@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //Declare return SetInterface\n SetInterface<T> answer = new ArraySet();\n //Add the items from the calling ArraySet to the return Set\n for (int i = 0; i < this.numItems; i++){\n answer.addItem(arr[i]);\n }\n //Convert the other set to an array in case it isnt and to \n //ease iteration\n T[] other = rhs.toArray();\n //Add the items from RHS to return Set\n for (int j = 0; j < rhs.getSize(); j++){\n answer.addItem(other[j]);\n }\n //Return the answer\n return answer; \n }",
"@Test\n public void testUnionOnSchemaSameSchema() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, j: int\");\n Schema sch = pig.dumpSchema(\"u\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2)\",\n \"(5,3)\",\n \"(1,2)\",\n \"(5,3)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"@Override\n public void union(int root1, int root2) {\n // TODO: Implement the union-by-rank algorithm for disjoint set\n if (s[root1]>-1 || s[root2]>-1 ) throw new IllegalArgumentException(\"Impossible to union because one of the roots is already dependant\");\n if( s[root2] < s[root1]){ // root2 is deeper\n s[root1] = root2;// Make root2 new root\n } \n else{\n if(s[root1] == s[root2]) s[ root1 ]--; // Update height if same\n s[root2] = root1; // Make root1 new root\n }\n }",
"public PipeUnion<T> getUnion();",
"public ArrayList<Predmet> union(ArrayList<ArrayList<Predmet>> listU){\n\t\tSet<Predmet> set = new HashSet<Predmet>();\n\t\t\n\t\tfor(ArrayList<Predmet> p : listU)\n\t\t\tset.addAll(p);\n\t\t\n\t\treturn new ArrayList<Predmet>(set);\n\t}",
"@Test\n public void testUnionOnSchema3Inputs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int); \"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : double, x : int); \" \n + \"l3 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onschema l1, l2, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1.0,2,null,null,null)\",\n \"(5.0,3,null,null,null)\",\n \"(1.0,null,2,null,null)\",\n \"(5.0,null,3,null,null)\",\n \"(1.0,2,null,'abc',{(1,'a'),(1,'b')})\",\n \"(5.0,3,null,'def',{(2,'a'),(2,'b')})\",\n\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }",
"protected boolean union(int id1, int id2) \n\t{\n\t\t// Find the parents of both nodes.\n\t\tint root1 = find(id1);\n\t\tint root2 = find(id2);\n\t\t\n\t\t// No union needed.\n\t\tif (root1 == root2)\n\t\t{\n\t\t //Return that the two values were already in the same tree\n\t\t return false;\n\t\t}\n\t\t\n\t\t//Combine the trees with these two roots\n\t\tparents[root1] = root2;\n\t\t\n\t\t// We successfully did a union.\n\t\treturn true;\n\t}",
"public Collection<MatchingPair> matchingPairs(Collection<Integer> values, Integer targetSum)\n {\n HashMap<Integer, Integer> tableCompteur = new HashMap<>();\n LinkedHashMap<Integer, Integer> tablePaire = new LinkedHashMap<Integer, Integer>();\n Collection<MatchingPair> paireSansDuplication = new LinkedList();\n Collection<MatchingPair> solution = new LinkedList();\n\n // On itere sur les valeurs donnee pour savoir le compte de chaque valeur\n for (Integer valeur : values)\n {\n if (tableCompteur.containsKey(valeur))\n {\n // Partie Compteur\n Integer compteur = tableCompteur.get(valeur);\n compteur++;\n tableCompteur.put(valeur, compteur);\n }\n else {\n tableCompteur.put(valeur, 0);\n }\n\n }\n\n // On itere sur les valeurs donnee pour savoir les paires\n for (Integer element : values)\n {\n int temp = targetSum - element;\n if (tablePaire.containsKey(element))\n {\n if (tablePaire.get(element) != null)\n {\n paireSansDuplication.add(new MatchingPair(element, temp));\n }\n // si la table contient l'element on met nul pour ne pas avoir de repetition\n tablePaire.put(temp, null);\n }\n else if (!tablePaire.containsKey(element))\n {\n tablePaire.put(temp, element);\n }\n }\n\n // On trouve le minimum count entre les paire et leur compte pour tenir en compte de toutes les possibilites. Ici le meilleur cas reste O(n) ( pas de paire)\n for (MatchingPair paire : paireSansDuplication)\n {\n if (paire != null) { // verification au debug pr erreur nullpointer\n int a = tableCompteur.get(paire.first);\n int b = tableCompteur.get(paire.second);\n int minCount = Math.min(a+1, b+1);\n for (int i = 0; i < pow(minCount, 2); i++)\n {\n solution.add(new MatchingPair(paire.first, paire.second));\n }\n }\n }\n return solution;\n }",
"@Test\n\tpublic void testUnion5() {\n\n\t\tint[] arr = {};\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tint[] uni2 = { 0, 2, 3 };\n\t\tSLLSet listObj7 = new SLLSet(uni2);\n\t\tSLLSet listObj8 = listObj2.union(listObj7);\n\n\t\tString expected = \"0, 2, 3\";\n\t\tint expectedSize = 3;\n\n\t\tassertEquals(expectedSize, listObj8.getSize());\n\t\tassertEquals(expected, listObj8.toString());\n\n\t}",
"public boolean union(int p, int q) {\r\n int pID = find(p);\r\n int qID = find(q);\r\n\r\n //already p u Q\r\n if (pID == qID) {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < id.length; i++) {\r\n\r\n if (id[i] == pID) {\r\n id[i] = qID;\r\n numberOfComponents--;\r\n }\r\n }\r\n\r\n return true;\r\n }",
"public static <T extends Comparable<? super T>> \n void union(SLL<T> list1, SLL<T> list2,\n SLL<T> result) {\n \n SLLNode<T> iterlist1 = list1.head;\n SLLNode<T> iterlist2 = list2.head;\n \n T itemlist1=null, itemlist2=null;\n \n // get first item in each list\n if ( iterlist1 != null )\n itemlist1 = iterlist1.info;\n if( iterlist2 != null )\n itemlist2 = iterlist2.info;\n \n while ( itemlist1 != null || itemlist2 != null ) {\n\n int compareResult;\n if( itemlist1 == null ) {\n compareResult = 1;\n } else if ( itemlist2 == null ) {\n compareResult = -1;\n } else {\n compareResult = itemlist1.compareTo(itemlist2);\n }\n \n if ( compareResult == 0 ) {\n result.addToTail(itemlist1); //appending to result list \n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n \n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n } \n }\n else if ( compareResult < 0 ) { \n result.addToTail(itemlist1); //appending to result list\n if( iterlist1.next != null ) {\n iterlist1 = iterlist1.next;\n itemlist1 = iterlist1.info;\n } else {\n itemlist1 = null;\n }\n }\n else {\n result.addToTail(itemlist2);\n if( iterlist2.next != null ) {\n iterlist2 = iterlist2.next;\n itemlist2 = iterlist2.info;\n } else {\n itemlist2 = null;\n }\n }\n } \n }",
"public void union(int p, int q) {\n int i = root(p);\n int j = root(q);\n \n if( i == j) {\n return;\n }\n \n id[i] = j;\n count--;\n }",
"void union(int [] parent, int x, int y)\n\t\t{\n\t\t\tint x_set_parent = find(parent, x);\n\t\t\tint y_set_parent = find(parent, y);\n\t\t\tparent[y_set_parent] = x_set_parent;\n\t\t}",
"public void queryTaskUnionSet1() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\t\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"FIX_DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\t\t\r\n\t\t\r\n\t\tassert( (t1.getName().equals(\"FIX_DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t\t(t2.getName().equals(\"FIX_DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")) );\r\n\t}",
"public void union(int p, int q)\n {\n int i = root(p);\n int j = root(q);\n if ( i == j ) return;\n \n if ( sz[i] < sz[j] ) { \n // i is no longer a root, so we don't need to update the size\n id[i] = j; sz[j] += sz[i];\n }\n else {\n id[j] = i; sz[i] += sz[j]; \n } \n }",
"public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}",
"@Test\n public void testTwoUnions() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : int);\"\n + \"u1 = union onschema l1, l2;\"\n + \"l3 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : double);\"\n + \"u2 = union onschema u1, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u2\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"public void union(int p, int q) {\n\t\tint rootP = find(p);\n\t\tint rootQ = find(q);\n\t\tif (rootQ == rootP)\n\t\t\treturn;\n\t\tid[rootQ] = rootP;\n\t\tcount--;\n\t}",
"private static int[] union(int[] items1, int[] items2) {\n\t\tSet<Integer> itemSet = new HashSet<Integer>();\n\t\tfor(int i : items1) {\n\t\t\titemSet.add(i);\n\t\t}\n\t\tfor(int i : items2){\n\t\t\titemSet.add(i);\n\t\t}\n\t\tint[] items = new int[itemSet.size()];\n\t\tint i = 0;\n\t\tfor(int val : itemSet){\n\t\t\titems[i++] = val; \n\t\t}\n\t\treturn items;\n\t}",
"@Test\n public void testUnionOnSchemaDiffNumType() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : double);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"@Test\n public void testUnionOnSchemaSuccOps() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : int, y : int);\"\n + \"u = union onschema l1, l2;\"\n + \"o = order u by i desc;\"\n + \"lim = limit o 2;\"\n + \"fil = filter lim by i == 5 and y is null;\"\n ; \n Util.registerMultiLineQuery(pig, query); \n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, y: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,null)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }",
"@Test\n public void testUnionOnSchemaNoCommonCols() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(null,null,1L,2.0F)\",\n \"(null,null,5L,3.0F)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"public void union(int x, int y, int[] parents) {\n parents[find(y, parents)] = find(x, parents);\n }",
"static\nint\nprintUnion(\nint\narr1[], \nint\narr2[], \nint\nm, \nint\nn) \n\n{ \n\nint\ni = \n0\n, j = \n0\n; \n\nwhile\n(i < m && j < n) \n\n{ \n\nif\n(arr1[i] < arr2[j]) \n\nSystem.out.print(arr1[i++]+\n\" \"\n); \n\nelse\nif\n(arr2[j] < arr1[i]) \n\nSystem.out.print(arr2[j++]+\n\" \"\n); \n\nelse\n\n{ \n\nSystem.out.print(arr2[j++]+\n\" \"\n); \n\ni++; \n\n} \n\n} \n\n\n/* Print remaining elements of \n\nthe larger array */\n\nwhile\n(i < m) \n\nSystem.out.print(arr1[i++]+\n\" \"\n); \n\nwhile\n(j < n) \n\nSystem.out.print(arr2[j++]+\n\" \"\n); \n\n\nreturn\n0\n; \n\n}",
"void Union(int parent[], int x, int y){ \n int xset = find(parent, x); \n int yset = find(parent, y); \n parent[xset] = yset; \n }",
"@Test\n public void testUnionOnSchemaScopeMulti() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" a = load '\" + INP_FILE_2NUMS+ \"' as (i:int, j:int); \"\n + \"b = group a by i; \"\n + \"c = foreach b generate group as gp, flatten(a); \"\n + \"d = group c by $0; \"\n + \"e = foreach d generate group as gp, flatten(c); \"\n + \"f = load '\" + INP_FILE_2NUMS + \"' as (i, j); \"\n ;\n String query = query_prefix + \"u = union onschema e,f;\";\n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"gp: int,c::gp: int,i: int,j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n query = query_prefix + \"u = union onschema f,e;\";\n Util.registerMultiLineQuery(pig, query);\n\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int,j: int, gp: int,c::gp: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(1,2,1,1)\",\n \"(5,3,5,5)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tint N = input.nextInt(), M = input.nextInt();\n\t\tint[] pre = new int[N + 1];\n\t\t// initialize\n\t\tfor (int i = 1; i <= N; i++) pre[i] = i; \n\t\tfor (int i = 1; i <= M; i++) {\n\t\t\tint a = input.nextInt();\n\t\t\tint b = input.nextInt();\n\t\t\tunion(pre, a, b);\n\t\t}\n\t\tSystem.out.println(Arrays.toString(pre));\n\t\tint res = 0;\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = i + 1; j <= N; j++) {\n\t\t\t\tif (pre[i] == pre[j]) ++res;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(res);\n\t\tinput.close();\n\t}",
"List<Long> getBestSolIntersection();",
"public static void main(String[] args) {\n\t\tSet<String> guys = Set.of(\"Tom\", \"Dick\", \"Harry\");\n\t\tSet<String> stooges = Set.of(\"Larry\", \"Moe\", \"Curly\");\n\t\tSet<String> aflCio = union(guys, stooges);\n\t\tSystem.out.println(aflCio);\n\t}",
"@Test\r\n public void testCreateUnion_OneAndOne() {\r\n Tour tourA = new Tour(new int[][]{{1, 1}});\r\n Tour tourB = new Tour(new int[][]{{12, 12}});\r\n Tour result = tourA.createUnion(tourB);\r\n Tour expected = new Tour(new int[][]{{1, 1}, {12, 12}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }",
"public void unionOf(IntegerSet set1, IntegerSet set2) {\n get = new int[0];\n for (int i : set1.get)\n insertElement(i);\n for (int i : set2.get)\n insertElement(i);\n }",
"public static void unionFind(int[][] doubleArray, int dimensions, UnionFind uf)\n {\n int count = 0;\n while (count != dimensions)\n {\n for (int column = 0; column < dimensions; column++) {\n if (uf.find(count, (dimensions*dimensions - 1 - column)) == true)\n {\n uf.printArray();\n StdOut.println();\n StdOut.println(\"Drip, drip.\");\n return;\n }\n }\n count++;\n }\n StdOut.println(\"No drip, drip.\");\n }",
"public void union(int i, int j) {\n\n int root1 = find(i);\n int root2 = find(j);\n\n if (root2 == root1)\n return;\n\n if (_rank[root1] > _rank[root2]) {\n _parent[root2] = root1;\n } else if (_rank[root2] > _rank[root1]) {\n _parent[root1] = root2;\n } else {\n _parent[root2] = root1;\n _rank[root1]++;\n }\n }",
"public void union(int p, int q) {\n // Find the root of p and q\n int i = root(p);\n int j = root(q);\n\n // Make j as i parent\n id[i] = j;\n }",
"public static <T> List<T> union(List<T> a, List<T> b) {\n\t\t\n\t\tHashMap<T, Boolean> include = new HashMap<T, Boolean>();\n\t\t\n\t\tfor (T elt : a)\n\t\t\tinclude.put(elt, true);\n\t\tfor (T elt : b)\n\t\t\tinclude.put(elt, true);\n\t\t\n\t\tList<T> toReturn = new ArrayList<T>();\n\t\tfor (T elt : include.keySet())\n\t\t\ttoReturn.add(elt);\n\t\t\n\t\treturn toReturn;\n\t}",
"public static <T> Set<T> union(Set<? extends T> s1, Set<? extends T> s2) {\n Set<T> result = new HashSet<>(s1);\n result.addAll(s2);\n return result;\n }",
"public void queryTaskUnionSet2() {\r\n\t\t// task 1\r\n\t\tTask task1 = new Task();\r\n\t\ttask1.setName(\"DEFECTS\");\r\n\t\ttask1.setDisplayName(\"Defects\");\r\n\t\ttask1.setDescription(\"User story to address product defects\");\r\n\t\t\r\n\t\tTask d1 = new Task();\r\n\t\td1.setName(\"DEFECT 1\");\r\n\t\td1.setDisplayName(\"Defect 1\");\r\n\t\td1.setDescription(\"First defect\");\r\n\t\tTask d2 = new Task();\r\n\t\td2.setName(\"DEFECT 2\");\r\n\t\td2.setDisplayName(\"Defect 2\");\r\n\t\td2.setDescription(\"Second defect\");\r\n\t\tSet<Task> c = new HashSet<Task>();\r\n\t\tc.add(d1);\r\n\t\tc.add(d2);\r\n\t\ttask1.setTaskChildren(c);\r\n\t\ttask1 = (Task) aggregateService.create(task1, new Settings());\r\n\r\n\t\t\tSystem.out.println(\"Name: \" + task1.getName() + \", Id: \" + task1.getId());\r\n\r\n\t\t// task 2\r\n\t\tTask task2 = new Task();\r\n\t\ttask2.setName(\"FIX_DEFECTS\");\r\n\t\ttask2.setDisplayName(\"Fix defects\");\r\n\t\ttask2.setDescription(\"Task to track the defect fixing effort\");\r\n\t\ttask2 = (Task) aggregateService.create(task2, new Settings());\r\n\r\n\t\t// task 3\r\n\t\tTask task3 = new Task();\r\n\t\ttask3.setName(\"PRIORITIZE_DEFECTS\");\r\n\t\ttask3.setDisplayName(\"Prioritize defects\");\r\n\t\ttask3.setDescription(\"Based upon the effort required for the defects prioritize them\");\r\n\t\ttask3 = (Task) aggregateService.create(task3, new Settings());\r\n\r\n\t\ttask1 = (Task) aggregateService.read(task1, getSettings());\t\t\r\n\r\n\t\t// query the task object\r\n\t\tSettings settings = new Settings();\r\n\t\tsettings.setParam(\"name1\", \"DEFECTS\");\r\n\t\tsettings.setParam(\"name2\", \"PRIORITIZE_DEFECTS\");\r\n\t\tsettings.setParam(\"name3\", \"FIX_DEFECTS\");\r\n\t\tsettings.addFunction(FunctionHandler.NE, \"name\", \"name3\");\r\n\t\tsettings.addFunction(FunctionType.ASC, \"name\");\r\n\t\tsettings.setView(aggregateService.getView(\"TASKUNIONSET\"));\t\t\r\n\t\tList<?> toList = aggregateService.query(new Task(), settings);\r\n\r\n\t\tSystem.out.println(\"SIZE : \" + toList.size());\r\n\t\tfor(Object o: toList) {\r\n\t\t\tTask t = (Task) o;\r\n\t\t\tSystem.out.println(\"Name: \" + t.getName() + \", Id: \" + t.getId());\r\n\t\t}\r\n\t\tassert(toList.size() == 2);\r\n\r\n\t\tObject obj1 = toList.get(0);\r\n\t\tObject obj2 = toList.get(1);\r\n\r\n\t\tassert(Task.class.isAssignableFrom(obj1.getClass()));\r\n\t\tassert(Task.class.isAssignableFrom(obj2.getClass()));\r\n\t\t\r\n\t\tTask t1 = (Task) obj1;\r\n\t\tTask t2 = (Task) obj2;\r\n\r\n\t\tassert ((t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"PRIORITIZE_DEFECTS\")) ||\r\n\t\t\t(t2.getName().equals(\"DEFECTS\") && t1.getName().equals(\"PRIORITIZE_DEFECTS\")));\r\n\r\n\t\tTask d = t1.getName().equals(\"DEFECTS\") ? t1 : t2;\r\n\t\tassert (d.getTaskChildren() != null && d.getTaskChildren().size() == 2);\r\n\r\n//\t\tSystem.out.println(\"Task 1: \" + t1.getName() + \", Task 2: \" + t2.getName());\r\n//\t\tassert (t1.getName().equals(\"DEFECTS\") && t2.getName().equals(\"DEFECT 1\"));\r\n//\t\tassert(t1.getTaskChildren() != null && t1.getTaskChildren().size() == 2);\r\n\t}",
"public void union(T x, T y) {\n\t\tassert (_parents.containsKey(x));\n\t\tassert (_parents.containsKey(y));\n\n\t\tx = find(x);\n\t\ty = find(y);\n\n\t\tif (x == y) {\n\t\t\treturn;\n\t\t}\n\n\t\tint xRank = _ranks.get(x);\n\t\tint yRank = _ranks.get(y);\n\n\t\tif (xRank < yRank) {\n\t\t\t_parents.put(x, y);\n\t\t} else if (xRank > yRank) {\n\t\t\t_parents.put(y, x);\n\t\t} else {\n\t\t\t_parents.put(y, x);\n\t\t\t_ranks.put(x, xRank + 1);\n\t\t}\n\n\t\t_numSets--;\n\t}",
"@Override\n public boolean supportsUnionAll() {\n return true;\n }",
"@Test\n public void testUnionOnSchemaInputUdfs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"f1 = foreach l1 generate i, CONCAT(j,j) as cj, \" +\n \t\t\"org.apache.pig.test.TestUnionOnSchema\\\\$UDFTupleNullSchema(i,j) as uo;\"\n + \"u = union onschema f1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n String expectedSch = \"{i: int,cj: chararray,uo: (),j: chararray}\";\n Assert.assertTrue( expectedSch.equals( sch.toString() ) );\n \n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,null,null,'2')\",\n \"(5,null,null,'3')\",\n \"(1,'22',(1,'2'),null)\",\n \"(5,'33',(5,'3'),null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"@Test\r\n public void testCreateUnion_thisIsEmpty() {\r\n Tour tourA = new Tour();\r\n Tour tourB = new Tour(new int[][]{{12, 12}});\r\n Tour result = tourA.createUnion(tourB);\r\n Tour expected = new Tour(new int[][]{{12, 12}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }",
"public static void union(String a, String b) {\r\n int root1 = find(a);\r\n int root2 = find(b);\r\n if (root1 == root2)return;\r\n if(size.get(root1) < size.get(root2)){size.set(root2, size.get(root2)+size.get(root1)); position.set(root1, root2);}\r\n else {size.set(root1, size.get(root1)+size.get(root2)); position.set(root2, root1);}\r\n }",
"public void union(int i, int j) {\n\tint p = findRoot(i);\n\tint q = findRoot(j);\n\t\n\tif (p == q) return;\n\t\n\tif (size[p] < size[q]) { //pick the smallest tree and append it to the bigger tree\n\t root[p] = q;\n\t size[p] += size[q];\n\t} else {\n\t root[q] = p;\n\t size[q] += size[p];\n\t}\n }",
"@Test void testInterpretUnion() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\");\n }",
"default Stream<T> union(Stream<T> other) {\n return union(Arrays.asList(other));\n }",
"@Test\n public void testUnionOnSchemaFilter() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, x : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n + \"fil = filter u by i == 5 and (x is null or x != 1);\"\n ; \n Util.registerMultiLineQuery(pig, query);\n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,3)\",\n \"(5,3,null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }",
"UnionSecuenciaLuz createUnionSecuenciaLuz();",
"public static <T> Set<T> union(final Set<T> a, final Set<T> b) {\n return new Set<T>() {\n public boolean has(final T n) {\n return a.has(n) || b.has(n);\n }\n };\n }",
"public void union(int first, int second){\n int firstId = find(first);\n int secondId = find(second);\n //Check if these are already connected\n if(firstId == secondId){\n return;\n }\n if(size[firstId] < size[secondId]){\n size[secondId]+=size[firstId];\n grid[first] = secondId;\n }\n else {\n size[firstId]+=size[secondId];\n grid[second] = firstId;\n }\n --numOfComponents;\n }",
"private void union(int[] parent, int x, int y){\n int xParent = find(parent, x);\n int yParent = find(parent, y);\n parent[xParent] = yParent;\n }",
"public void union(int p, int q) {\n int pRoot = getRoot(p);\n int qRoot = getRoot(q);\n nodes[pRoot] = qRoot;\n }",
"@Test\n public void testUnionOnSchemaUdfTypeEvolution2() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f11 = foreach f1 generate i, mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n + \"f22 = foreach f2 generate i, mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f11, f22;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f22, f11;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }",
"private void or() {\n // PROGRAM 1: Student must complete this method\n //loop through output array\n for (int i = 0; i < output.length; i++) {\n //take the or of index i of inputA and inputB and place result in output[i]\n output[i] = (inputA[i] | inputB[i]);\n }\n }",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}",
"void Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}",
"@Test\n public void testUnionWithEmptyDataSet() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n // Don't know how to make an empty result in an other way than filtering it\n DataSet<Tuple3<Integer, Long, String>> empty =\n CollectionDataSets.get3TupleDataSet(env).filter(new RichFilter1());\n\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n CollectionDataSets.get3TupleDataSet(env).union(empty);\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }",
"@Test\n public void testUnionOnSchemaUdfTypeEvolution() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f1, f2;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f2, f1;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }"
] | [
"0.6307833",
"0.6216925",
"0.6203423",
"0.615095",
"0.61400247",
"0.60676366",
"0.6013048",
"0.60048246",
"0.5967264",
"0.5918911",
"0.5909046",
"0.5902771",
"0.5840612",
"0.57647717",
"0.57393336",
"0.57332253",
"0.5720657",
"0.57021534",
"0.56954104",
"0.5682416",
"0.5640966",
"0.5640403",
"0.563882",
"0.5632126",
"0.56171143",
"0.5615458",
"0.5615458",
"0.5615458",
"0.561112",
"0.560161",
"0.5596632",
"0.55935323",
"0.5581796",
"0.558151",
"0.55628216",
"0.5538122",
"0.55298865",
"0.55086076",
"0.5507525",
"0.5497071",
"0.5492072",
"0.54889965",
"0.5483939",
"0.5483316",
"0.5473565",
"0.5467586",
"0.54660577",
"0.5462903",
"0.5454354",
"0.5453463",
"0.54446197",
"0.5444475",
"0.5444436",
"0.5434235",
"0.54280216",
"0.5416474",
"0.54138285",
"0.54106927",
"0.5410347",
"0.5410009",
"0.539167",
"0.53827",
"0.53757423",
"0.537236",
"0.5371988",
"0.53436226",
"0.53291476",
"0.5325433",
"0.53210664",
"0.5304412",
"0.5301737",
"0.5301108",
"0.5275697",
"0.5271403",
"0.52624434",
"0.5261682",
"0.5261582",
"0.5249821",
"0.52083683",
"0.5204426",
"0.52036947",
"0.51978016",
"0.5196653",
"0.51950085",
"0.519152",
"0.5189832",
"0.51874447",
"0.5185571",
"0.5180497",
"0.51722044",
"0.51661867",
"0.51628345",
"0.5148549",
"0.5145879",
"0.5143725",
"0.512702",
"0.51269716",
"0.5107791",
"0.51030105",
"0.5099246",
"0.50925905"
] | 0.0 | -1 |
Initialize all states here | @Override
public void initStatesList(GameContainer gc) throws SlickException {
this.getState(MAINMENUSTATE).init(gc, this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initStates() {\n\n\t\tstateManager.add(\"main_menu\", new MainMenuState(stateManager, stateWidget, inputManager, textureManager));\n\t\tstateManager.add(\"inner_game\", new InnerGameState(stateManager, stateWidget, inputManager, textureManager));\n\t\tstateManager.add(\"game_over\", new GameOverState(stateManager));\n\t\tstateManager.changeState(\"main_menu\");\n\t}",
"@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }",
"private void init() {\n StateManager.setState(new MenuState());\n }",
"public void initialState() {\n\t\t//empty\n\t}",
"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 InitialState() {\r\n\t\t}",
"protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}",
"private void initState() {\n Arrays.fill(state = new char[this.mystery.length()], '_');\n }",
"protected void initialize() {\n\t\televator.zeroEncoder();\n\t}",
"@Override\n protected void initialize() {\n System.out.println(\"initializing claw state machine\");\n }",
"protected void setInitialStates() {\n\n\t\tchar[][] states = gridConfig.getCellConfiguration();\n\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tCell c = simMap.get(states[i][j]).copy();\n\t\t\t\tinitializeCell(i, j, c);\n\t\t\t}\n\t\t}\n\t\troot.getChildren().add(pane);\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 init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }",
"protected void initialize() {\n \tstartTime = System.currentTimeMillis();\n \tintake.setLeftPower(power);\n \tintake.setRightPower(power);\n }",
"@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}",
"public void initialState() {\r\n\t\tfor (int i = 0; i < checkBoxes.length; i++) {\r\n\t\t\tamountBoxes[i].setSelectedIndex(0);\r\n\t\t\tcheckBoxes[i].setSelected(false);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void init() { \r\n\t\t\r\n\t\tsession = -1;\r\n\t\t\r\n\t\tProgressDif = 0;\r\n\t\tnoisFact = 0;\r\n\t\tcompromiseFact = 0;\r\n\t\t\r\n\t\tcompromiseLearn = 20;\r\n\t\tprogressLearn = 10;\r\n\t\tnoisLearn = 0.2;\r\n\t\t\r\n\t\treservationPanic = 0.2;\r\n\t\tmyBids = new ArrayList<Pair<Bid,Double>>();\r\n\t\topponentBidsA = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\t\topponentBidsB = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\r\n\t\tdf = utilitySpace.getDiscountFactor();\r\n\t\tif (df==0) df = 1; \r\n\r\n\t\ttry {\r\n\t\t\tinitStates();\r\n\t\t} catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}",
"public void initState() {\n\n\t\tdouble bsc_p = 0.09; // TODO : doit dependre du souffle !?\n\t\tfor (int i=0; i<n; i++) lambda[i] = 0;\n\t\taddBSCnoise(lambda, bsc_p); \n\t\t// lambda: log likelihood ratio\n\t\tcalc_q0(lambda);\n\n\t\t// initialization of beta\n\t\tfor (int i = 0; i <= m - 1; i++) {\n\t\t\tfor (int j = 0; j <= row_weight[i] - 1; j++) {\n\t\t\t\tbeta[i][j] = 0.0;\n\t\t\t}\n\t\t}\t\t\n\n\t}",
"protected void initialize() {\n\t\tthis.position = Point3D.ZERO;\n\t\t// reset subclasses properties if any\n\t\treset();\n\t}",
"public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }",
"public void init() {\n \n }",
"public void setUp() {\r\n state1 = new DateState(new State(20200818, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15)); // root\r\n test1 = state1;\r\n state2 = new DateState(new State(20200818, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state3 = new DateState(new State(20200817, \"VA\", 72, 43, 79, 12, 17, 33,\r\n \"B\", 9));\r\n state4 = new DateState(new State(20200817, \"VM\", 110, 50, 123, 11, 19,\r\n 65, \"A+\", 15));\r\n nullState = null;\r\n }",
"private GameStatePresets()\n {\n\n }",
"private void initializeAll() {\n initialize(rows);\n initialize(columns);\n initialize(boxes);\n }",
"protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}",
"private void initialize() {\n }",
"private void initialize() {\n\t\t\n\t}",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"@Override\n public void startState() {\n Spell.clear();\n initGoldRenderers();\n initBackground();\n startBattleState();\n isOver = false;\n }",
"public void init() {\r\n\r\n\t}",
"private synchronized void initStateMachine() {\n next = start;\n Deque<StateInfo> stack = getNextToAncestorStackLocked();\n\n // Enter all the states of the new branch.\n while (stack.size() > 0) {\n current = stack.pop();\n current.active = true;\n current.state.enter();\n }\n next = null;\n }",
"public final void initialize() {\n initialize(0);\n }",
"void state_INIT(){\r\n eccState = INDEX_INIT;\r\n alg_INIT();\r\n INITO.serviceEvent(this);\r\n state_START();\r\n}",
"private void initialize() {\n\t}",
"public void init() {\n\t\t}",
"public void initialize() {\r\n }",
"private void init() {\n\n\n\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void init() {\n\t\tdisplay= new Display(title,width,height);\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\n\t\t\n\t\t//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Declarare imagini~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n Assets.init();\n \n\t\tgameState= new GameState(this);\n\t\tgameStateAI= new GameStateAI(this);\n\t\tmenuState = new MenuState(this);\n\t\tsettingsState= new SettingsState(this);\n\t\tState.setState(menuState);\t\n\t\t\n\t\n\t}",
"public WorldState ()\n\t{\n\t\tproperties = new HashMap<String, WorldStateProperty>();\n\t}",
"@Override\n protected void initialize() {\n ramper.reset();\n Robot.toteLifterSubsystem.setGateState(GateState.OPEN);\n }",
"protected void initialize() {\n \t\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 void initStatesList(GameContainer gc) throws SlickException {\r\n\t\tthis.getState(state1).init(gc, this);\r\n\r\n\t}",
"public void init(){\n \n }",
"public void initialize() {\n // empty for now\n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"public void initModel() {\r\n this.stateEngine = new RocketStateEngine();\r\n }",
"public State(){}",
"private StateActions(){}",
"public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}",
"private StateUtils() {}",
"private void init() {\n\n\t\tinitializeLists();\n\t\tcreateTiles();\n\t\tcreateTileViews();\n\t\tshuffleTiles();\n\n\t}",
"public void initialize()\n {\n }",
"public GameState(int initialStones) \n {\n \tif (initialStones < 1) initialStones = 4;\n \tfor (int i=0; i<6; i++)\n \t\tstate[i] = state[i+7] = initialStones;\n }",
"@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }",
"public void init() {\n\t\n\t}",
"public void init() {\n\t\t\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void init() {\n\n\t}",
"public void initialize() {\n\t}",
"public void initialize() {\n\t}",
"protected void initialize() {\r\n x = 0;\r\n y = 0;\r\n driveTrain.reInit();\r\n }",
"protected void resetState()\n {\n // Nothing to do by default.\n }",
"@Deprecated(\n since = \"forever\",\n forRemoval = false\n )\n public static void initStates() {\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18656, \"facing=north\", \"waterlogged=true\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18657, \"facing=north\", \"waterlogged=false\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18658, \"facing=south\", \"waterlogged=true\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18659, \"facing=south\", \"waterlogged=false\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18660, \"facing=west\", \"waterlogged=true\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18661, \"facing=west\", \"waterlogged=false\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18662, \"facing=east\", \"waterlogged=true\"));\n Block.BIG_DRIPLEAF_STEM.addBlockAlternative(new BlockAlternative((short) 18663, \"facing=east\", \"waterlogged=false\"));\n }",
"public void init() {\n\t}",
"public void init() {\n\t}",
"public void init() {\n\t}",
"protected void initialize() {\r\n }",
"protected void initialize() {\r\n }",
"private void initErrorState()\n\t{\n\t\tthis.initErrorPath();\n\t\tthis.initErrorLoopCount();\n\t}",
"public void initialize() {\n }",
"@Deprecated(\n since = \"forever\",\n forRemoval = false\n )\n public static void initStates() {\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15071, \"face=floor\", \"facing=north\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15072, \"face=floor\", \"facing=south\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15073, \"face=floor\", \"facing=west\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15074, \"face=floor\", \"facing=east\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15075, \"face=wall\", \"facing=north\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15076, \"face=wall\", \"facing=south\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15077, \"face=wall\", \"facing=west\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15078, \"face=wall\", \"facing=east\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15079, \"face=ceiling\", \"facing=north\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15080, \"face=ceiling\", \"facing=south\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15081, \"face=ceiling\", \"facing=west\"));\n Block.GRINDSTONE.addBlockAlternative(new BlockAlternative((short) 15082, \"face=ceiling\", \"facing=east\"));\n }",
"private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}",
"protected void initialize() {\n\t\t\n\t}",
"protected void initialize() {\n\t\t\n\t}",
"private void initialize() {\r\n\r\n // add default buttons\r\n addButton(getToggleButton(),\"toggle\");\r\n addButton(getFinishButton(),\"finish\");\r\n addButton(getCancelButton(),\"cancel\");\r\n addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n String cmd = e.getActionCommand();\r\n if(\"toggle\".equalsIgnoreCase(cmd)) change();\r\n else if(\"finish\".equalsIgnoreCase(cmd)) finish();\r\n else if(\"cancel\".equalsIgnoreCase(cmd)) cancel();\r\n }\r\n\r\n });\r\n\r\n }",
"@Override\n protected void incrementStates() {\n\n }",
"private void _init() {\n }",
"@Override\n protected void initialize() {\n led.setLED_M1(false, false, false);\n count = 0;\n led.setLED_M1(true, false, false);\n ledState = status.ONE;\n System.out.println(\"BUTTON PRESSED\");\n }",
"public void init(){\r\n\t\tbuild(0);\r\n\t\taddFestiveCity(1);\r\n\t}",
"private State5() {\n\t}",
"public void initialize() {\n // TODO\n }",
"public CurrentRobotState() {\r\n currentPos = new RobotCoordinates();\r\n motorState = new Motor();\r\n reInitialize();\r\n }",
"@Override public void init()\n\t\t{\n\t\t}",
"public void initialize() {\n }",
"protected void initialize() {\n\t\t// startAngle = drive.getAngle();\n\t\tdrive.resetBothEncoders();\n\t\tpLeft = speed;\n\t\tpRight = speed;\n\t}",
"@Override\n public void initialize() {\n conveyor.setBallCount(0);\n conveyor.startTime(); \n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}",
"protected void initialize() {\n\t\tL.ogInit(this);\n\t\t_timesRumbled = 0;\n\t}",
"protected void initialize() {\n \t\n \t// TODO: Switch to execute on changes based on alignment\n \tRobot.lightingControl.set(LightingObjects.BALL_SUBSYSTEM,\n LightingControl.FUNCTION_BLINK,\n LightingControl.COLOR_ORANGE,\n 0,\t\t// nspace - don't care\n 300);\t// period_ms \n }"
] | [
"0.7883139",
"0.7769829",
"0.7661109",
"0.7245478",
"0.7155878",
"0.7147877",
"0.7144205",
"0.70951515",
"0.70910907",
"0.7082274",
"0.7071771",
"0.70115036",
"0.6994433",
"0.6983955",
"0.69821984",
"0.6980905",
"0.6949941",
"0.6923403",
"0.6915652",
"0.6914628",
"0.69028825",
"0.6892429",
"0.6888758",
"0.6861202",
"0.6853565",
"0.68508345",
"0.6846034",
"0.68363476",
"0.6833492",
"0.6833492",
"0.6833492",
"0.6833492",
"0.6833186",
"0.6818758",
"0.68086666",
"0.67986184",
"0.67976093",
"0.67844325",
"0.6783924",
"0.67834324",
"0.6771091",
"0.6770939",
"0.67704487",
"0.6769861",
"0.6769771",
"0.676695",
"0.6764717",
"0.67612576",
"0.6756324",
"0.67547077",
"0.67524004",
"0.6749444",
"0.67483926",
"0.6742551",
"0.67422104",
"0.67333114",
"0.6730911",
"0.67294776",
"0.6720468",
"0.6712671",
"0.6700964",
"0.6698782",
"0.66910875",
"0.66910875",
"0.66910875",
"0.66893935",
"0.66893935",
"0.66778123",
"0.6676348",
"0.6670163",
"0.66618955",
"0.66618955",
"0.66618955",
"0.66617674",
"0.66617674",
"0.666057",
"0.66596276",
"0.66537815",
"0.66521484",
"0.6648156",
"0.6648156",
"0.6644982",
"0.6644486",
"0.6639983",
"0.6637622",
"0.66370547",
"0.663201",
"0.6631665",
"0.6624482",
"0.6623262",
"0.66226023",
"0.66189957",
"0.66150093",
"0.6613912",
"0.6613912",
"0.6613912",
"0.6613912",
"0.66055256",
"0.660221",
"0.65994513"
] | 0.6875266 | 23 |
Inflate the layout for this fragment | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
view = inflater.inflate(R.layout.fragment_five, container, false);
initView(view);
entries.add(new BarEntry(new float[]{16f,20f}, 0));
entries.add(new BarEntry(new float[]{20f,25f}, 1));
barDataSet = new BarDataSet(entries, "");
barDataSet.setColors(new int[]{Color.GREEN,Color.YELLOW});
barDataSet.setValueFormatter(new PercentFormatter());
barDataSet.setStackLabels(new String[]{"有违法","无违法"});
barDataSet.setValueTextSize(20);
barData = new BarData(s, barDataSet);
mBar2chart.setData(barData);
mBar2chart.setDescription("");
mBar2chart.getAxisRight().setEnabled(false);
mBar2chart.getLegend().setPosition(Legend.LegendPosition.RIGHT_OF_CHART_CENTER);
XAxis xAxis = mBar2chart.getXAxis();
xAxis.setTextSize(15);
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);
xAxis.setDrawGridLines(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 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int countByExample(UserExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int deleteByExample(UserExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int deleteByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | Long insert(User record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | Long insertSelective(User record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | List<User> selectByExample(UserExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | User selectByPrimaryKey(Long id); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int updateByExampleSelective(User record, UserExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int updateByExample(User record, UserExample example); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int updateByPrimaryKeySelective(User record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
This method was generated by MyBatis Generator. This method corresponds to the database table User | int updateByPrimaryKey(User record); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic String getTableName() {\n\t\treturn \"user\";\n\t}",
"@Override\n public String asTableDbName() {\n return \"user\";\n }",
"@Override\n public List<User> getAllUser() {\n// SQLParameter sqlParameter = DSL.select()\n// .from(TableOperand.table(User.class))\n// .build();\n// return executor.selectList(sqlParameter);\n return null;\n }",
"@Select({\n \"select\",\n \"uid, username, password, sex, phonenumber, id_card, bank_card, bank_location, \",\n \"type, salt, is_able, create_time, parent_id, name\",\n \"from xxd_user\",\n \"where uid = #{uid,jdbcType=INTEGER}\"\n })\n @Results({\n @Result(column=\"uid\", property=\"uid\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"phonenumber\", property=\"phonenumber\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"id_card\", property=\"idCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_card\", property=\"bankCard\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"bank_location\", property=\"bankLocation\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"type\", property=\"type\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"salt\", property=\"salt\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"is_able\", property=\"is_able\", jdbcType=JdbcType.SMALLINT),\n @Result(column=\"create_time\", property=\"create_time\", jdbcType=JdbcType.VARCHAR),\n @Result(column=\"parent_id\", property=\"parent_id\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"name\", property=\"name\", jdbcType=JdbcType.VARCHAR)\n })\n XxdUser selectByPrimaryKey(Integer uid);",
"@Select({\r\n \"select\",\r\n \"user_id, nickname, sex, age, birthday, regist_date, update_date, disable\",\r\n \"from umajin.user_master\",\r\n \"where user_id = #{user_id,jdbcType=INTEGER}\"\r\n })\r\n @Results({\r\n @Result(column=\"user_id\", property=\"user_id\", jdbcType=JdbcType.INTEGER, id=true),\r\n @Result(column=\"nickname\", property=\"nickname\", jdbcType=JdbcType.VARCHAR),\r\n @Result(column=\"sex\", property=\"sex\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"age\", property=\"age\", jdbcType=JdbcType.INTEGER),\r\n @Result(column=\"birthday\", property=\"birthday\", jdbcType=JdbcType.DATE),\r\n @Result(column=\"regist_date\", property=\"regist_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"update_date\", property=\"update_date\", jdbcType=JdbcType.TIMESTAMP),\r\n @Result(column=\"disable\", property=\"disable\", jdbcType=JdbcType.INTEGER)\r\n })\r\n UserMaster selectByPrimaryKey(Integer user_id);",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n List<User> selectAll();",
"@Mapper\npublic interface UserMapper {\n @Options(useGeneratedKeys = true, keyProperty = \"id\") //回写自增的主键ID\n @Insert(\"INSERT INTO users (userName,vpsName,port,months,transfer,speedPort,speedThread,userNum) VALUES (#{userName},#{vpsName},#{port},#{months},#{transfer},#{speedPort},#{speedThread},#{userNum})\")\n Integer addUser(User user);\n\n @Delete(\"DELETE FROM users WHERE username = #{userName}\")\n Integer deleteUser(String userName);\n\n @Select(\"SELECT * FROM users\")\n List<User> findAllUser();\n\n @Update(\"UPDATE users SET #{willUpdate} = #{updateContent} WHERE username = #{userName}\")\n Integer updateUser(String willUpdate, String userName, String updateContent);\n\n @Select(\"SELECT * FROM users WHERE username = #{username}\")\n User findByUserName(@Param(\"username\") String condition);\n\n @Delete(\"DELETE FROM users\")\n void deleteAll();\n}",
"@RegisterMapperFactory(BeanMapperFactory.class)\n\npublic interface UserRegisterDAO {\n @SqlUpdate(\"create table if not exists User (id Long auto_increment , username varchar(2000) primary key,emailaddress varchar(20),password varchar(8),occupation varchar(20))\")\n void createUserTable();\n\n @SqlUpdate(\"delete table User\")\n void deleteUserTable();\n\n @SqlQuery(\"select * from User\")\n List<UserDetails> list();\n\n @GetGeneratedKeys\n @SqlUpdate(\"insert into User (id, username, emailaddress, password, occupation) values (:id,:userName,:emailAddress,:password,:occupation)\")\n long create(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where id = :id\")\n UserDetails retrieve(@Bind(\"id\") long id);\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@BindBean UserDetails userDetails);\n\n @SqlQuery(\"select * from User where userName = :userName\")\n UserDetails retrieveByUserName(@Bind(\"userName\") String userName );\n\n @SqlQuery(\"select username from User where id = :id\")\n String retrieveUserName(@Bind(\"id\") long id );\n\n @SqlQuery(\"select * from User where (username)= (:userName) and (password)=(:password)\")\n UserDetails retrieveUser(@Bind(\"userName\") String userName,@Bind(\"password\") String password);\n\n @SqlQuery(\"select occupation from User where username = :userName\")\n String retrieveOccupation(@Bind(\"userName\") String userName);\n\n @SqlQuery(\"select id from User where username = :userName\")\n long retrieveUserId(@Bind(\"userName\") String userName);\n}",
"@MyBatisRepository\npublic interface UserMybatisDao {\n int register(User user);\n\n int updateUser(User user);\n\n String checkPhone(String phone);\n\n int perfectUserInfo(Map params);\n\n User findByToken(String uid);\n\n int checkIsRegisteredByPhone(String phone);\n\n User findByUserId(Long userId);\n}",
"@Select({\n \"select\",\n \"username, password\",\n \"from tb_user\",\n \"where username = #{username,jdbcType=VARCHAR}\"\n })\n @Results({\n @Result(column=\"username\", property=\"username\", jdbcType=JdbcType.VARCHAR, id=true),\n @Result(column=\"password\", property=\"password\", jdbcType=JdbcType.VARCHAR)\n })\n User selectByPrimaryKey(String username);",
"@Transactional\r\n\tpublic List<User> getUserList() {\r\n\t\tString hql = \"from User\";\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"@Select({\n \"select\",\n \"id, user_name, password, age, ver\",\n \"from user_t\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n @ResultMap(\"BaseResultMap\")\n User selectByPrimaryKey(Integer id);",
"@Mapper\npublic interface UserDAO {\n String TABLE_NAME = \"user\";\n\n String INSERT_FIELDS = \" username , password , salt, telephone, address \";\n\n String SELECT_FIELDS = \" id, \" + INSERT_FIELDS;\n\n @Insert({\"insert into \", TABLE_NAME, \"(\", INSERT_FIELDS, \") Values (#{name}, #{password}, #{salt}\" +\n \", #{telephone}, #{address})\"})\n int addUser(User user);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where id=#{id}\"})\n User selectById(int id);\n\n @Select({\"select \", SELECT_FIELDS, \" from \", TABLE_NAME, \" where username=#{name}\"})\n User selectByName(String name);\n\n @Update({\"update \", TABLE_NAME, \" set username = #{username} where id=#{id}\"})\n void updateUsername(User user);\n\n @Update({\"update \", TABLE_NAME, \" set telephone = #{telephone} where id=#{id}\"})\n void updateTelephone(User user);\n\n @Update({\"update \", TABLE_NAME, \" set address = #{address} where id=#{id}\"})\n void updateAddress(User user);\n\n @Delete({\"delete from \", TABLE_NAME, \" where id = #{id}\"})\n void deleteById(int id);\n}",
"@Override\n\tpublic List<User> getallUserDetail() {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// select all from table user\n\t\tString sql = \"SELECT * FROM user\";\n\t\tList<User> listuser = jdbcTemplate.query(sql, new RowMapper<User>() {\n\n\t\t\t@Override\n\t\t\tpublic User mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tUser user = new User();\n\t\t\t\t// set parameters\n\t\t\t\tuser.setUserid(rs.getLong(\"user_id\"));\n\t\t\t\tuser.setEmailid(rs.getString(\"emailid\"));\n\t\t\t\tuser.setAppversion(rs.getString(\"appversion\"));\n\t\t\t\tuser.setGcmregistartionkey(rs.getString(\"gcmregistartionkey\"));\n\t\t\t\tuser.setMobileno(rs.getString(\"mobileno\"));\n\t\t\t\tuser.setUuid(rs.getString(\"uuid\"));\n\t\t\t\tuser.setUsername(rs.getString(\"username\"));\n\t\t\t\tuser.setCreateddate(rs.getDate(\"createddate\"));\n\t\t\t\treturn user;\n\t\t\t}\n\n\t\t});\n\n\t\treturn listuser;\n\n\t}",
"@Override\n public void createUsersTable() {\n\n\n Session session = sessionFactory.openSession();\n Transaction transaction = session.beginTransaction();\n session.createSQLQuery(\"CREATE TABLE IF NOT EXISTS Users \" +\n \"(Id BIGINT PRIMARY KEY AUTO_INCREMENT, FirstName TINYTEXT , \" +\n \"LastName TINYTEXT , Age TINYINT)\").executeUpdate();\n transaction.commit();\n session.close();\n\n\n }",
"public interface SysUserMapper {\n\n @Select(\"select * from sys_user where user_name=#{username}\")\n public SysUser getUserByName(@Param(\"username\")String username);\n\n @Select(\"select * from sys_user where user_id=#{userId}\")\n public SysUser getUserById(@Param(\"userId\")int userId);\n\n @Select(\"select * from sys_user\")\n public List<SysUser> getAllUsers();\n\n @Update(\"update sys_user set online = #{online} where user_name = #{username}\")\n public void setUserOnlineStatusByName(@Param(\"username\")String username, @Param(\"online\")boolean online);\n\n @Select(\"select count(user_id) from sys_user where online = #{online}\")\n public int getUserCountByStatus(@Param(\"online\")boolean online);\n\n @Insert(\"insert into sys_user values(default, #{username}, #{password}, #{enabled}, #{online})\")\n public void addUser(@Param(\"username\")String username, @Param(\"password\")String password, @Param(\"enabled\")boolean enabled, @Param(\"online\")boolean online);\n\n @Update(\"update sys_user set enabled = #{isEnabled} where user_id = #{user_id}\")\n public void setUserEnabledStatusById(@Param(\"user_id\") int user_id, @Param(\"isEnabled\") boolean isEnabled);\n}",
"public interface UserDao extends SqlObject {\n\n @SqlQuery(\"SELECT account_code FROM users WHERE email = ?\")\n String getAccountCode(String email);\n\n @SqlQuery(\"SELECT id, email, account_code FROM users WHERE id = ?\")\n @RegisterBeanMapper(User.class)\n User getUserById(Integer userId);\n}",
"@Override\r\n public List<User> userfindAll() {\n return userMapper.userfindAll();\r\n }",
"public interface UserMapper {\n @Insert(\"INSERT INTO USERS (id,name,password) VALUES (#{id},#{name},#{password})\")\n int insert(User user);//插入用户\n @Select(\"SELECT * FROM USERS WHERE id=#{param1} and password=(#{param2})\")\n User checkUser(int id,String password);\n}",
"List<User> getAll() throws SQLException;",
"public Users_crud() throws SQLException {\n users = new Users();\n configuration = new Configuration().configure();\n sessionFactory = configuration.buildSessionFactory();\n }",
"public List<User> getUserList() {\n return getSqlSession().getMapper(UserMapper.class).getUserList();\n }",
"@Override\n\tpublic List<User> getUsertable() {\n\t\tSession session=sessionFactory.openSession();\n\t\tTransaction tr = session.beginTransaction();\n\t\tList<User> list=null;\n\t\tString sqlString=\"select * from user\";\n\t\ttry {\n\t\t\tQuery query=session.createSQLQuery(sqlString).addScalar(\"id\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"username\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"password\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"administra\", StringType.INSTANCE)\n\t\t\t\t\t.addScalar(\"balance\", FloatType.INSTANCE);\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(User.class));\n\t\t\tlist= query.list();\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\ttr.commit();\n\t\t session.close();\n\t\t}\n\t\treturn list;\n\t\t\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"@Override\r\n\tpublic User getAllUser() {\n\t\tList<User> list=null;\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM USER\";\r\n\t\t\treturn qr.query(sql, new BeanHandler<User>(User.class));\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 null;\r\n\t}",
"@Override\n\tpublic List<User> selectall() {\n\t\treturn userMapper.selectall();\n\t}",
"@Override\n\tpublic User map(ResultSet resultSet) throws SQLException {\n\t\tif(resultSet==null)return new User();\n\t\tLong id=resultSet.getLong(\"id\");\n\t\tString account=resultSet.getString(\"account\");\n\t\tString userName=resultSet.getString(\"user_name\");\n\t\tString passwordMD5=resultSet.getString(\"password_md5\");\n\t\tbyte status=resultSet.getByte(\"status\");\n\t\tLong concernedTime=resultSet.getLong(\"concerned_time\");\n\t\tUser usr=new User(id,userName, account, passwordMD5,concernedTime);\n\t\tfor(Type.UserStatus each:Type.UserStatus.values()){\n\t\t\tif(each.getValue()==status){\n\t\t\t\tusr.setStatus(each);\n\t\t\t}\n\t\t}\n\t\treturn usr;\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getUsers() \r\n\t{\n\t\tSession session = sessionFactory.getCurrentSession();\r\n String sql = \"select * from users\";\r\n Query query = session.createSQLQuery(sql).addEntity(User.class);\r\n\t\tSystem.out.println(\"getUsers list is : \" + query.list().size());\r\n\t\treturn query.list();\r\n\t}",
"@MyBatisDao\npublic interface UserProfileMapper {\n UserProfile selectByPrimaryKey(long id);\n\n UserProfile selectByUserId(long userId);\n\n UserProfile selectByEmail(String email);\n\n int deleteByPrimaryKey(long id);\n\n int insert(UserProfile userProfile);\n\n int update(UserProfile userProfile);\n\n int updateAvatar(UserProfile userProfile);\n}",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"public interface UserMapper {\n\n\t/**\n\t * 根据实体类条件查询数据(分页)\n * Querying data based on entity class conditions.(pagination)\n\t * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByCondition(User user, RowBounds rb);\n\n\t/**\n\t * 根据实体类条件查询数据(无分页)\n\t * Querying data based on entity class conditions.(no pagination)\n * @param user\n * @return Data mapping entity list\n\t */\n\tList<User> queryUserListByConditionNoPage(User user);\n\n\t/**\n\t * 根据实体类条件查询数据总条数\n * Querying data count based on entity class conditions.\n * @param user\n * @return Total Data\n\t */\n\tInteger queryUserNumByCondition(User user);\n\n\t/**\n\t * 根据实体类属性进行数据添加\n\t * Add data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid addUser(User user);\n\n\t/**\n\t * 根据主键删除数据\n\t * Delete data according to the primary key.\n\t * @param id PrimaryKey\n\t */\n\tvoid deleteUser(String id);\n\n\t/**\n\t * 根据主键获取数据实体\n\t * Querying Data entity based on primary key.\n\t * @param id PrimaryKey\n\t * @return Data mapping entity\n\t */\n\tUser getUser(String id);\n\n\t/**\n\t * 根据实体类属性修改数据\n\t * Modify data based on entity class attributes.\n\t * @param user\n\t */\n\tvoid editUser(User user);\n\n\t/**\n\t * 查询所有数据\n\t * Querying all data.\n\t * @return Data mapping entity list\n\t */\n\tList<User> queryAllUser();\n\t\n}",
"@Select(\"select * from users where username = #{username}\")\n @Results({\n @Result(id = true,property = \"id\",column = \"id\"),\n @Result(property = \"username\",column = \"username\"),\n @Result(property = \"email\",column = \"email\"),\n @Result(property = \"password\",column = \"password\"),\n @Result(property = \"phoneNum\",column = \"phoneNum\"),\n @Result(property = \"status\",column = \"status\"),\n @Result(property = \"roles\",column = \"id\",javaType = List.class,many = @Many(select = \"com.itheima.ssm.dao.RoleDao.findRoleById\")),\n })\n UserInfo findUserByUsername(String username);",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n\tpublic List<Map<String, Object>> getAllUser(int userType) {\n\t\tString sql = \"select * from tp_users where userType=2\";\n\t\t\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\t\tparams.put(\"userType\", userType);\n\t\treturn joaSimpleDao.queryForList(sql, params);\n\t}",
"@Override\r\n\t\tpublic Object mapRow(ResultSet rs) throws SQLException {\n\t\t\tVIPUser vu = new VIPUser(\r\n\t\t\t\t\trs.getString(\"id\"),\r\n\t\t\t\t\trs.getString(\"name\"));\r\n\t\t\treturn vu;\r\n\t\t}",
"public static List<user> getAll() throws SQLException {\n\t\ttry {\n\t\t\tuserExample example = new userExample();\n\t\t\tList<Integer> values = new ArrayList<Integer>();\n\t\t\tvalues.add(0);\n\t\t\tvalues.add(1);\n\t\t\texample.or().andStatusIn(values);\n\n\t\t\treturn mapper.selectByExample(example);\n\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}",
"public UserDao() {\n super(User.USER, com.ims.dataAccess.tables.pojos.User.class);\n }",
"ROmUsers selectByPrimaryKey(String pkUserid);",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"@Override\n\tpublic List reterive() {\n\t\tString str=\"SELECT allusers FROM User allusers\";\n\t\tTypedQuery<User> query=em.createQuery(str,User.class);\n\t\treturn query.getResultList();\n\t\t\n\t}",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn mapper.findAllUser();\n\t}",
"@Override\n\tpublic List<UserWithoutPassword> getUserList() {\n\t\treturn userDao.findAll();\n\t}",
"public void setUserMap() {\n ResultSet rs = Business.getInstance().getData().getAllUsers();\n try {\n while (rs.next()) {\n userMap.put(rs.getString(\"username\"), new User(rs.getInt(\"id\"),\n rs.getString(\"name\"),\n rs.getString(\"username\"),\n rs.getString(\"password\"),\n rs.getBoolean(\"log\"),\n rs.getBoolean(\"medicine\"),\n rs.getBoolean(\"appointment\"),\n rs.getBoolean(\"caseAccess\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"User createUser(ResultSet resultSet, User user) throws SQLException;",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"BaseUser selectByPrimaryKey(String userId);",
"@Override\n\tpublic User mapRow(ResultSet res, int rowNo) throws SQLException {\n\t\tUser user=new User();\n\t\tuser.setFirstname(res.getString(\"firstname\"));\n\t\tuser.setLastname(res.getString(\"lastnamr\"));\n\t\tuser.setStatus(res.getInt(\"status\"));\n\t\tuser.setPassword(res.getString(\"password\"));\n\t\tuser.setEmailType(res.getInt(\"email_type\"));\n\t\tuser.setEmail(res.getString(\"e_mail\"));\n\t\t\n\t\treturn user;\n\t\n\t}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"@SelectProvider(type = UserProviders.class, method = \"getAllUsersProvider\")\n @Results({\n @Result(column = \"created_at\", property = \"createdAt\")\n })\n List<User> getAllUsers();",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"@Override\n\tpublic List<Map<String, Object>> getUserList() {\n\t\tList<Map<String, Object>> list = new ArrayList<Map<String,Object>>();\n\t\tString sql = \"select * from tp_users where userType = 2\";\n\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\tlist = joaSimpleDao.queryForList(sql, map);\n\t\treturn list;\n\t}",
"@Override\r\n public List<User> darUsers() {\r\n Query q = em.createQuery(\"SELECT u FROM UserEntity u\");\r\n List<UserEntity> l = q.getResultList();\r\n List<User> ltr = new ArrayList();\r\n for(UserEntity te: l)\r\n {\r\n ltr.add(TransformadorEntityDto.getInstance().entityADtoUser(te));\r\n }\r\n return ltr;\r\n }",
"@Override\r\n\tpublic List<User> getAllUser() {\n\t\tList<User> listStudents = new ArrayList<User>();\r\n\t\tlistStudents = userReposotory.findAll();\r\n\t\treturn listStudents;\r\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.getList();\n\t}",
"@Select({\n \"select\",\n \"id, user_id, role_id\",\n \"from A_USER_ROLE\"\n })\n @Results({\n @Result(column=\"id\", property=\"id\", jdbcType=JdbcType.INTEGER, id=true),\n @Result(column=\"user_id\", property=\"userId\", jdbcType=JdbcType.INTEGER),\n @Result(column=\"role_id\", property=\"roleId\", jdbcType=JdbcType.INTEGER)\n })\n List<AUserRole> selectAll();",
"public List<User> getAllUsers() throws ClassNotFoundException, SQLException {\n\t\tConnection con = DBConnection.getConnection();\r\n\t\tList<User> userList = new ArrayList<>();\r\n\t\tList list = new ArrayList<>();\r\n\t\tUser user = null;\r\n\t\tCourse course =new Course(); \r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT user_table.user_id,user_table.name,user_table.age,user_table.gender,user_table.contact_number,user_course.course_code,course.name FROM user_table JOIN user_course ON user_table.user_id=user_course.user_id join course on user_course.vendor_id=course.user_id\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\t \r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tuser = new User();\r\n user.setId(rs.getInt(1));\r\n\t\t\t\tuser.setName(rs.getString(2));\r\n\t\t\t\tuser.setAge(rs.getInt(3));\r\n\t\t\t\tuser.setGender(rs.getString(4));\r\n\t\t\t\tuser.setContactNumber(rs.getInt(5));\r\n\t\t\t\tuser.setCid(rs.getInt(6));\r\n\t\t\t user.setCname( rs.getString(7));\r\n\t\t\t\tuserList.add(user);\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n\t\treturn userList;\r\n\r\n\t}",
"public interface UserMapper {\n int getUserByName(@Param(\"username\")String username);\n User getUser(@Param(\"username\")String username,@Param(\"password\")String password);\n List<User> selectAllUser();\n int addUser(User user);\n int editUser(User user);\n int deleteUser(@Param(\"id\")String id);\n int userAddRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n String selectUserRoleIdByUser(@Param(\"userId\")String userId);\n int userUpdateRole(@Param(\"userId\")String userId,@Param(\"roleId\")String roleId);\n int userClearRole(@Param(\"userId\")String userId);\n User queryUser(@Param(\"username\")String username,@Param(\"password\")String password,@Param(\"id\")String id);\n}",
"SysUser selectByPrimaryKey(Long userId);",
"public User getUserByID(long id)throws SQLException, ClassNotFoundException ;",
"@Override\n\tpublic List<User> getAllUser() {\n\t\treturn uDao.getAllUser();\n\t}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"@Override\r\n\tpublic List<User1> getAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = session.createQuery(\"FROM User1\");\r\n\t\treturn query.list();\r\n\t}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"public interface UserMapper {\n User selectUser(int id);\n List<User> selectList(User user);\n List<User> selectListForRowBounds(User user , RowBounds rowBounds);\n void updateUser(User user);\n}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"@Override\r\n public List<MissionCodeUser> findAllUsers() {\n\tList<CustomSortField> sortFields = new ArrayList<CustomSortField>();\r\n\tsortFields.add(new CustomSortField(\"missionCode\", CustomSortField.ASCENDING));\r\n\r\n\tQuery query = this.createHqlQuery(HQL_ALL_USERS);\r\n\tList<MissionCodeUser> missionCodeUsers = (List<MissionCodeUser>) this.executeQuery(query);\r\n\r\n\treturn missionCodeUsers;\r\n }",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Override\n\tpublic Integer insert(User user) {\n\t\tuserMapper.insert(user);\n\t\t// MyBatisUtil.closeSqlSession();\n\t\treturn user.getId();\n\t}",
"@Mapper\npublic interface SeckillUserDao {\n\n @Select(\"select * from seckill_user where id = #{id}\")\n public SeckillUser getById(@Param(\"id\")long id);\n\n}",
"public interface UserAnnoMapper {\n\n @Select(\"select * from tbl_user where id = #{id}\")\n User findOneById(Long id);\n}",
"public User selectByPrimaryKey(Long id) {\r\n User key = new User();\r\n key.setId(id);\r\n User record = (User) getSqlMapClientTemplate().queryForObject(\"spreader_tb_user.ibatorgenerated_selectByPrimaryKey\", key);\r\n return record;\r\n }",
"public void createTableUser(){\r\n Statement stmt;\r\n try {\r\n stmt = this.getConn().createStatement();\r\n ///////////////*********remember to retrieve*************/////////////\r\n //stmt.executeUpdate(\"create table user(username VARCHAR(40),email VARCHAR(40), password int);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('A','[email protected]',12344);\");\r\n //stmt.executeUpdate(\"INSERT INTO user VALUES('CC','[email protected]',3231);\");\r\n } catch (SQLException e) { e.printStackTrace();}\r\n }",
"public test_user getTestUserById() {\r\n return testUserDAO.selectByPrimaryKey(1);\r\n }",
"public List<Map<String, Object>> getAllUsers() {\n Result<Record2<Long, String>> result = getDbContext().select(USER.USER_ID, USER.USER_NAME).from(USER).fetch();\n return result.intoMaps();\n }",
"public ResultSet Reuser()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='not approved'\");\r\n\treturn rs;\r\n}",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"WbUser selectByPrimaryKey(Integer userId);",
"@Override\r\n\tprotected final void objectDataMapping() throws BillingSystemException{\r\n\t\tString[][] data=getDataAsArray(USER_DATA_FILE);\r\n\t\tif(validateData(data,\"Authorised User\",COL_LENGTH)){\r\n\t\tList<User> listUser=new ArrayList<User>();\r\n\t\t\r\n\t\tfor(int i=0;i<data.length;i++){\r\n\t \t\r\n\t \tUser usr=new User();\r\n\t \t\t\r\n\t \tusr.setUsername(data[i][0]);\r\n\t \tusr.setPassword(data[i][1]);\r\n\t \tusr.setRole(getRoleByCode(data[i][2]));\r\n\t \t\r\n\t \tlistUser.add(usr);\t\r\n\t }\r\n\r\n\t\t\r\n\t\tthis.listUser=listUser;\r\n\t\t}\r\n\t}",
"public List<User> getAllUsers() {\n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from User u order by u.lastLogin DESC\");\n\t\tList<User> userList = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn userList;\n\t}",
"public void insertUser() {}",
"@Override\n\tpublic int findAllUser()throws Exception {\n\t\treturn userMapper.findAllUser();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n public List<User> findAll() {\n return dao.findAll();\n }",
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}",
"public interface UsersDAO extends JpaDao<Users> {\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPassword\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPassword(String password, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPrimaryKey\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByPrimaryKey(Integer userId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByPasswordContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByPasswordContaining(String password_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findAllUserss\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findAllUserss4tsw(Integer tswId, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsernameContaining\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsernameContaining(String username, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUsername\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByUsername(String username_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByActiveYn\r\n\t *\r\n\t */\r\n\tpublic Set<Users> findUsersByActiveYn(Integer activeYn, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1) throws DataAccessException;\r\n\r\n\t/**\r\n\t * JPQL Query - findUsersByUserId\r\n\t *\r\n\t */\r\n\tpublic Users findUsersByUserId(Integer userId_1, int startResult, int maxRows) throws DataAccessException;\r\n\r\n\tpublic Integer getMaxUsersID();\r\n\r\n}",
"private String getUserQuery() {\n return \"select UserName,Password, Enabled from users where UserName=?\";\n //return \"select username,password, enabled from users_temp where username=?\";\n }",
"@Override\n\tpublic List<User> selectAllUser() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<?> getAllUser() {\n\t\treturn userQueryRepositoryImpl.getAllUser();\r\n\t}",
"@Query(\"SELECT * FROM USERS_TABLE ORDER BY userID ASC\")\n List<UsersEntity>getAllUsers();",
"@Override\n\tpublic String getPrimaryKey() {\n\t\treturn \"user_id\";\n\t}",
"@Override\n\tpublic List<User> findAllUser() {\n\t\treturn userDao.findAllUser();\n\t}",
"@Override\r\n\t\tpublic List<Dev_User> selAll() {\n\t\t\tList<Dev_User> list =session.selectList(\"com.app.dao.AppMapper.selAll\");\r\n\t\t\treturn list;\r\n\t\t}",
"public static void main(String[] args) throws IOException {\n\t\tString resource = \"mybatis-config.xml\";\r\n //ʹ��MyBatis�ṩ��Resources�����mybatis�������ļ�����Ҳ���ع�����ӳ���ļ���\r\n Reader reader = Resources.getResourceAsReader(resource); \r\n //����sqlSession�Ĺ���\r\n SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);\r\n //������ִ��ӳ���ļ���sql��sqlSession\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.addUser\";\r\n// User user=new User(\"usermode\",22,222.22,UserState.AVAILABLE);\r\n// session.insert(statement,user);\r\n// session.commit();\r\n// System.out.println(user.getId());select id,name,age,money,status from t_user\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.getUser\";\r\n// user=session.selectOne(statement, user.getId());\r\n// System.out.println(user.toString()); \r\n \r\n\r\n// SqlSession session = sessionFactory.openSession();\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.getuser\";\r\n// User user=session.selectOne(statement, 1);\r\n// user=session.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session.commit();\r\n// SqlSession session1 = sessionFactory.openSession();\r\n// user=session1.selectOne(statement, 1);\r\n// System.out.println(user.toString()); \r\n// session1.commit();\r\n \r\n \r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename1\";\r\n// List<User> users=session.selectList(statement, \"%J%\");\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n// statement=\"com.demo.mybatis.DBMapping.UserMapper.finduserbylikename2\";\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"name\", \"J\"); \r\n// users=session.selectList(statement, map);\r\n// System.out.println(users.size());\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\r\n// String statement=\"com.demo.mybatis.DBMapping.UserMapper.findcardbyuserids\";\r\n// List ids = new ArrayList();\r\n// ids.add(\"1\");\r\n// ids.add(\"2\");\r\n// ids.add(\"3\");\r\n// Map<String,Object> map=new HashMap<String,Object>(); \r\n// map.put(\"ids\", ids); \r\n// List<User> users=session.selectList(statement,map);\r\n// for(int i=0;i<users.size();i++)\r\n// {\r\n// System.out.println(users.get(i).toString());\r\n// }\r\n\t\t SqlSession session = sessionFactory.openSession();\r\n\t\t String statement=\"com.demo.mybatis.DBMapping.UserMapper.getUserList\"; \r\n\t\t PageHelper.startPage(1, 5, true); \r\n\t\t List<User> users=session.selectList(statement);\r\n\t\t PageInfo<User> pageInfo = new PageInfo<User>(users); \r\n\t\t System.out.println(\"数据总数:\" + pageInfo.getTotal()); \r\n\t\t System.out.println(\"数据总页数:\" + pageInfo.getPages()); \r\n\t\t System.out.println(\"最后一页:\" + pageInfo.getLastPage()); \r\n\t\t for (User u: users)\r\n\t\t {\r\n\t\t\t System.out.println(u.toString());\r\n\t\t } \r\n\t \r\n\r\n\t}",
"public interface TblUserService {\n\n List<TblUser> selectAll();\n\n int insert();\n\n}"
] | [
"0.7103414",
"0.67444175",
"0.6739887",
"0.6705276",
"0.66744584",
"0.664297",
"0.6618272",
"0.6617397",
"0.65052736",
"0.64737266",
"0.64463055",
"0.64026403",
"0.63779306",
"0.637233",
"0.63657886",
"0.63265127",
"0.6275861",
"0.626315",
"0.6258682",
"0.62428224",
"0.62211883",
"0.6219928",
"0.61786777",
"0.61758834",
"0.61530745",
"0.6152624",
"0.61352706",
"0.6131808",
"0.61260736",
"0.6111677",
"0.608896",
"0.60803115",
"0.6035129",
"0.6026888",
"0.6025805",
"0.6010543",
"0.6002172",
"0.59902495",
"0.59877455",
"0.59868795",
"0.59666896",
"0.5943995",
"0.59292746",
"0.59275734",
"0.5925053",
"0.5924392",
"0.5923691",
"0.59233755",
"0.5914134",
"0.5913506",
"0.5902082",
"0.5900193",
"0.58953047",
"0.58913195",
"0.58860534",
"0.58691275",
"0.586208",
"0.58608204",
"0.585712",
"0.5848663",
"0.58455443",
"0.58436924",
"0.5843593",
"0.582261",
"0.5822568",
"0.5816553",
"0.58116156",
"0.58085483",
"0.5806408",
"0.5801571",
"0.57980055",
"0.5797902",
"0.57972705",
"0.5789048",
"0.57881063",
"0.57844776",
"0.5784247",
"0.5783988",
"0.578349",
"0.5781286",
"0.5779874",
"0.57743406",
"0.57741106",
"0.5773946",
"0.5772571",
"0.5772093",
"0.57702047",
"0.5769603",
"0.5768558",
"0.576796",
"0.57678527",
"0.5762252",
"0.5761382",
"0.57589316",
"0.57548153",
"0.57531995",
"0.57477874",
"0.57466036",
"0.5738723",
"0.57370573",
"0.57364047"
] | 0.0 | -1 |
Sets this bounding sphere to the specified center point and radius. | public BoundingSphere set(Vec3 center, double radius) {
if (center == null) {
throw new IllegalArgumentException(
Logger.logMessage(Logger.ERROR, "BoundingSphere", "set", "missingPoint"));
}
if (radius < 0) {
throw new IllegalArgumentException(
Logger.logMessage(Logger.ERROR, "BoundingSphere", "set", "invalidRadius"));
}
this.center.set(center);
this.radius = radius;
return this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Sphere(double radius, Point3D center) {\n super(radius);\n _center = center;\n }",
"public Sphere(float radius) {\n\t\tsuper();\n\t\tthis.radius = radius;\n\t}",
"public Sphere( double radius, Point3d center, Material material ) {\n \tsuper();\n \tthis.radius = radius;\n \tthis.center = center;\n \tthis.material = material;\n }",
"public Sphere( double radius, Point3d center, Material material ) {\r\n \tsuper();\r\n \tthis.radius = radius;\r\n \tthis.center = center;\r\n \tthis.material = material;\r\n }",
"public void set(Point3 centerValue, float radiusValue)\n\t{\n\t\tcenter.x=centerValue.x;\n\t\tcenter.y=centerValue.y;\n\t\t\n\t\tradius=radiusValue;\n\t}",
"public Circle(Vector3d center, double radius) {\n this.x = center.x;\n this.y = center.y;\n this.z = center.z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }",
"public Sphere(Point3D c, double r)\r\n\t{\r\n\t\tsuper(r);\r\n\t\t_center = c;\r\n\t}",
"public void setCenter(Coordinate center) {\n this.center = center;\n }",
"public void setCenter(Point center) {\r\n this.center = center;\r\n }",
"public void set(Point2 centerValue, float radiusValue)\n\t{\n\t\tcenter.x=centerValue.x;\n\t\tcenter.y=centerValue.y;\n\t\t\n\t\tradius=radiusValue;\n\t}",
"public Circle(Vector2 center, float radius) {\n this.center = center;\n this.radius = radius;\n }",
"public void setCenter(Point centerPoint) {\n this.center = centerPoint;\n }",
"public Circle(double radius, Point center) {\r\n this.radius = radius;\r\n this.center = center;\r\n }",
"public void setCenter(Point center) {\r\n\t\tthis.center = center;\r\n\t}",
"public void setCenterOfProjection(Vector3f centerOfProjection) {\n\t\tthis.mCenterOfProjection = centerOfProjection;\n\t\tthis.update();\n\t}",
"public void setCenter(PointF center) {\n this.center = center;\n }",
"public Sphere(double nx, double ny, double nz, double size) {\n this.x = nx;\n this.y = ny;\n this.z = nz;\n this.radius = size;\n }",
"public Circle(float centerX, float centerY, float radius) {\n this.center = new Vector2(centerX, centerY);\n this.radius = radius;\n }",
"public T setRadius(float radius) {\n if (radius <= 0) {\n throw new IllegalArgumentException(\"radius must be greater than 0\");\n }\n this.radius = radius;\n return self();\n }",
"public Sphere(){\n\t\tradius = 128;\n\t\tlightScale = 1;\n\t\tambientLight = 0.3;\t\t\t// Amount of ambient light\n\t\tdiffuseLight = 0.7;\t\t\t// Amount of diffuse light\n\t\tlightSource = new double[]{0, 0, 128};\t// Place light 128 units away from origin\n\t}",
"private void drawCenterSphere() {\n\t\t//Draw sphere\n\t\tgl.glColor3d(0, 0, 0);\n\t\tgl.glEnable(GL2.GL_LIGHTING);\n\t\tglut.glutSolidSphere(0.01, 50, 50);\n\t}",
"public void setRadius(int radius) {\r\n\t\tthis.majorAxis = radius;\r\n\t}",
"private void setRadius(float radius) {\n\t\tthis.radius = radius;\n\t}",
"public Sphere(String name, Material m, double radius, Vector3D pos){\n super();\n p = pos;\n r = radius;\n this.name = name;\n this.material = m;\n light = false;\n }",
"public void setRadius(float radius) {\n this.radius = radius;\n }",
"public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}",
"public void setRadius(double radius) {\r\n this.radius = radius;\r\n }",
"public void setRadius(double radius) {\n this.radius = radius;\n }",
"@Override\n public void setRadius(double radius) {\n radius = makePositive(radius, \"Invalid radius. NaN\");\n\n if (radius < MINIMUM_RADIUS) {\n throw new IllegalArgumentException(\"Invalid radius. \" + radius + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n this.getRenderable().setRadius(radius);\n }",
"public float getSphereRadius() {\n\t\treturn sphereRadius;\n\t}",
"public void setRadius(double radius){\n\t\tradius =this.radius;\n\t}",
"public Circle(double r, Point center) {\n this.r = r;\n this.center = center;\n }",
"public void setCenter(Point newPoint) {\n this.center = newPoint;\n }",
"public void setRadius(double radius) {\n\t\tthis.radius = radius;\n\t}",
"public void setRadius(double radius) {\n\t\tthis.radius = radius;\n\t}",
"public void setRadius(double radius){\n this.radius = radius;\n }",
"public void setRadius(int radius){\r\n\r\n if(radius < 1){\r\n throw new IllegalArgumentException(\"Radius must be greater than 0.\");\r\n }\r\n\r\n this.radius = radius;\r\n\r\n this.shadow.setRadius(this.radius);\r\n this.surface.setRadius(this.radius);\r\n this.shading.setRadius(this.radius - (this.radius / 8));\r\n }",
"public void setRadius(double entry) {\r\n\t\tradius = entry;\r\n\t}",
"public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}",
"public void setRadius(int radius);",
"public void setRadius(int radius) {\n this.radius = radius;\n }",
"public float getSphereRadius();",
"public void setArea(double radius) {\n this.radius = radius;\n }",
"public void setCenter(CGPoint center) {\n \t\tCGRect frame = this.frame();\n \t\tframe.origin.x = (int) (center.x-frame.size.width/2);\n \t\tframe.origin.y = (int) (center.y-frame.size.height/2);\n \t\tthis.setFrame(frame);\n \t\tthis.center = center;\n \t}",
"@Override\n public void setRadius(float radius) {\n Preconditions.checkArgument(radius >= 0, \"radius should be non negative\");\n Arrays.fill(mRadii, radius);\n updatePath();\n invalidateSelf();\n }",
"public void setCenter(float x, float y) {\r\n\t\tbasePoly.translate((int) -center.x, (int) -center.y);\r\n\t\tcenter = new Point2D.Float(x, y);\r\n\t\tbasePoly.translate((int) center.x, (int) center.y);\r\n\t}",
"public void setRadius(int radius)\n {\n this.radius = radius;\n super.setSize(radius + 2, radius + 2);\n this.paintImmediately(this.getVisibleRect());\n }",
"public void setRadius(double value) {\n radius = value;\n }",
"public void setRadius(int radius) {\n\t\tif (radius < 0)\n\t\t\tthrow new IllegalArgumentException(\"The given radius is negative\");\n\t\tthis.radius = radius;\n\t}",
"public void setRadius(double r) { radius.set(clamp(r, RADIUS_MIN, RADIUS_MAX)); }",
"public void setRadius(int radius) {\n\t\tthis.radius = radius;\n\t}",
"@Resource(name=\"thirdPoint\")\r\n\tpublic void setCenter(Point center) {\r\n\t\tthis.center = center;\r\n\t}",
"public Circle() {\r\n this.radius = 0.0;\r\n this.center = new Point();\r\n }",
"void setCenter() {\n\t\tLine line02 = new Line(myParent, new PVector(), new PVector());\n\t\tLine line13 = new Line(myParent, new PVector(), new PVector());\n\t\tline02.set(point[0].position, point[2].position);\n\t\tline13.set(point[1].position, point[3].position);\n\t\tif (line02.intersects_at(line13) != null) // if two points are on each\n\t\t\t\t\t\t\t\t\t\t\t\t\t// other\n\t\t\tcenter.set(line02.intersects_at(line13));\n\t}",
"public Point sphereCoords(double r, double phi, double theta) {\n\t\t\n\t\tx = r*Math.sin(phi)*Math.cos(theta);\n\t\ty = r*Math.sin(phi)*Math.sin(theta);\n\t\tz = r*Math.cos(phi);\n\t\treturn this;\n\t}",
"public void setRadius(double value) {\n this.radius = value;\n }",
"@Override\n public void setRadius(float radius) {\n Arrays.fill(mRadii, radius);\n updatePath();\n invalidateSelf();\n }",
"public Sphere(Point3D c, double r, Color color)\r\n\t{\r\n\t\tthis(c, r);\r\n\t\tsuper._emission = color;\r\n\t}",
"public void setRadius(float r) {\n if (!highwayPerspectiveEnabled) {\n radius = r;\n } else {\n radius = defaultClusterRadius * getPerspectiveScaleFactor(location);\n }\n radiusX = radius / aspectRatio;\n radiusY = radius * aspectRatio;\n }",
"public void setRadius(int r) {\n this.radius = r;\n }",
"public void setRadius( double r ) \r\n { radius = ( r >= 0.0 ? r : 0.0 ); }",
"public void setNormalOvalRadius(int radius) {\n this.mNormalOvalRadius = radius;\n }",
"public Sphere (final Point3 c, final double r, final Material material) {\n super(material);\n\n this.c = c;\n this.r = r;\n }",
"public void setCenterLongitude(double centerLongitude) {\n this.centerLongitude = centerLongitude % 6.283185307179586;\n }",
"public void setRadius(double n)\r\n\t{\r\n\t\tradius = n;\r\n\t}",
"private void setGeometryData() {\n // allocate vertices\n final int factorK = (innerRadius == 0 ? 1 : 2);\n final int verts = factorK * ((zSamples - 2) * (radialSamples) + 2); // rs + 1\n setVertexCoordsSize (verts);\n setNormalCoordsSize (verts);\n\n // generate geometry\n final double fInvRS = 1.0 / (radialSamples);\n final double fZFactor = 1.0 / (zSamples - 1); // 2.0 / (zSamples - 1);\n\n // Generate points on the unit circle to be used in computing the mesh\n // points on a sphere slice.\n final double[] afSin = new double[(radialSamples + 1)];\n final double[] afCos = new double[(radialSamples + 1)];\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fAngle = phi0 + dPhi * fInvRS * iR;\n afCos[iR] = Math.cos (fAngle);\n afSin[iR] = Math.sin (fAngle);\n }\n // afSin[radialSamples] = afSin[0];\n // afCos[radialSamples] = afCos[0];\n\n double radDiff = Math.abs (outerRadius - innerRadius);\n\n for ( int icnt = 0; icnt < 2; icnt++ ) {\n radius = (icnt == 0 ? innerRadius : outerRadius);\n if ( radius == 0.0 ) {\n continue;\n }\n double zNP = centerZ; // 0.0;\n double zSP = centerZ; // 0.0;\n\n // generate the sphere itself\n int i = 0;\n Vector3D tempVa;\n Vector3D kSliceCenter;\n\n for ( int iZ = 1; iZ < (zSamples - 1); iZ++ ) { // -1\n //final double fAFraction = 0.5 * Math.PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2)\n final double fAFraction = theta1 - iZ * fZFactor * dTheta;\n final double fZFraction = Math.sin (fAFraction); // in (-1,1)\n final double fZ = radius * fZFraction;\n\n // compute center of slice\n kSliceCenter = new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + fZ\n );\n\n // compute radius of slice\n final double fSliceRadius = Math.sqrt (\n Math.abs (\n radius * radius - fZ * fZ\n )\n );\n\n // compute slice vertices with duplication at end point\n Vector3D kNormal;\n final int iSave = i;\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fRadialFraction = iR * fInvRS; // in [0,1)\n final Vector3D kRadial = new Vector3D (\n afCos[iR],\n afSin[iR],\n 0\n );\n tempVa = new Vector3D (\n fSliceRadius * kRadial.getX (),\n fSliceRadius * kRadial.getY (),\n fSliceRadius * kRadial.getZ ()\n );\n\n zNP = Math.\n max (kSliceCenter.getZ (), zNP);\n zSP = Math.\n min (kSliceCenter.getZ (), zSP);\n\n putVertex (\n (kSliceCenter.getX () + tempVa.getX ()),\n (kSliceCenter.getY () + tempVa.getY ()),\n (kSliceCenter.getZ () + tempVa.getZ ())\n );\n tempVa = getVertexCoord (i);\n\n kNormal = new Vector3D (\n tempVa.getX () - center.getX (),\n tempVa.getY () - center.getY (),\n tempVa.getZ () - center.getZ ()\n );\n double mag = Math.sqrt (\n Math.pow (kNormal.getX (), 2) +\n Math.pow (kNormal.getY (), 2) +\n Math.pow (kNormal.getZ (), 2)\n );\n kNormal = new Vector3D (\n kNormal.getX () / mag,\n kNormal.getY () / mag,\n kNormal.getZ () / mag\n );\n if ( !viewInside ) {\n putNormal (\n kNormal.getX (),\n kNormal.getY (),\n kNormal.getZ ()\n );\n } else {\n putNormal (\n -kNormal.getX (),\n -kNormal.getY (),\n -kNormal.getZ ()\n );\n }\n i++;\n }\n\n// setVertexCoord(i, getVertexCoord(iSave));\n// setNormalCoord(i, getNormalCoord(iSave));\n putVertex (getVertexCoord (iSave));\n putNormal (getNormalCoord (iSave));\n i++;\n }\n\n // south pole\n if ( theta0 == -0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n (center.getZ () - radius)\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, -1));\n } else {\n putNormal (new Vector3D (0, 0, 1));\n }\n setNormalCount (i + 1);\n i++;\n }\n\n // north pole\n if ( theta1 == 0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + radius\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, 1));\n } else {\n putNormal (new Vector3D (0, 0, -1));\n }\n setNormalCount (i + 1);\n i++;\n }\n }\n\n }",
"public Sphere(Point3 c, double r, Material material) {\n\t\tsuper(material);\n\t\tthis.c = c;\n\t\tthis.r = r;\n\t}",
"public static double sphereArea(double radius) {\r\n return 4 * Math.PI * radius * radius;\r\n }",
"public void setRegion(CoordinateRadius region);",
"public Circle(double x, double y, double z, double radius) {\n this.x = x;\n this.y = y;\n this.z = z;\n this.radius = radius;\n pos = Vector3d.createVector3d(x, y, z);\n }",
"public Vec3d getCenter() {\n\t\treturn set;\n\t}",
"void setHitboxCenter(float x, float y) {\n _hitboxCenter = new PVector(x, y);\n }",
"public Sphere2(\n\t\t\tString description, Vector3D centre, double radius,\n\t\t\tboolean inverse,\n\t\t\tSurfaceProperty surfaceProperty,\n\t\t\tSceneObject parent,\n\t\t\tStudio studio\n\t\t)\n\t{\n\t\tsuper(description, surfaceProperty, parent, studio);\n\t\tthis.centre = centre; //passes current sphere's center and radius\n\t\tthis.radius = radius;\n\t\tthis.inverse = inverse;\n\t}",
"public Sphere(final Material m) {\n super(m);\n this.c = new Point3(0,0,0);\n this.r = 1;\n }",
"public Pj3dSphere Sphere(int x)\r\n\t{\r\n \tPj3dSphere s = new Pj3dSphere(this, x);\r\n\t\treturn s;\r\n\t}",
"public Circle(double radius) {\n super(new GeoCircle(), FeatureTypeEnum.GEO_CIRCLE);\n radius = makePositive(radius, \"Invalid radius. NaN\");\n\n if (radius >= MINIMUM_RADIUS) {\n this.getRenderable().setRadius(radius);\n } else {\n throw new IllegalArgumentException(\"Invalid radius. \" + radius + \" Minimum supported \" + MINIMUM_RADIUS);\n }\n this.setFillStyle(null);\n }",
"public void setCenter(boolean isCenter) {\n\t\tthis.roomCenter = isCenter; \n\t}",
"public Circle(double r) {\n this.r = r;\n this.center = new Point(0,0);\n }",
"@External\r\n\t@ClientFunc\r\n\tpublic MetaVar SetParticleCullRadius(MetaVarNumber radiusVar);",
"private void setCurrentRadius(double r){\n\t\t\n\t\t_currentRadius = r;\n\t\t\n\t}",
"public Vector3D getCenter() {\n return center;\n }",
"public void setCenter(final ILatLng latlng) {\n setCenter(latlng, null);\n }",
"public Particle(float x, float y, float radius) {\n\t\tthis.position = new Vector2d(x, y);\n\t\tthis.radius = radius;\n\t}",
"public void setFixedRadius ( int radius ) {\r\n\t\tradius_mag_dependent = false;\r\n\t\tplot_radius = radius;\r\n\t}",
"public void setCenter() {\n\t\tthis.isCenter = true;\n\t}",
"public Circle(double radius){\n this.radius = radius;\n }",
"public boolean intersects(Vector3d center, double radius) {\r\n return intersects(this.getCurrentCollisionCenter(), this.boundingSphereRadius, center, radius);\r\n }",
"public void setRadius(float aValue)\n {\n if (getRadius() == aValue) return;\n repaint();\n firePropChange(\"Radius\", _radius, _radius = aValue);\n }",
"@SuppressWarnings(\"unused\")\n private void setCenter(JSONArray args, CallbackContext callbackContext) throws JSONException {\n double lat, lng;\n\n lat = args.getDouble(1);\n lng = args.getDouble(2);\n\n LatLng latLng = new LatLng(lat, lng);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLng(latLng);\n this.myMoveCamera(cameraUpdate, callbackContext);\n }",
"public void center() {\n\t\tif(parent != null) {\n\t\t\tfloat parMidWidth = parent.getWidth() / 2f;\n\t\t\tfloat parMidHeight = parent.getHeight() / 2f;\n\t\t\tfloat midWidth = width / 2f;\n\t\t\tfloat midHeight = height / 2f;\n\t\t\t\n\t\t\tfloat newX = parent.getX() + (parMidWidth - midWidth);\n\t\t\tfloat newY = parent.getY() + (parMidHeight - midHeight);\n\t\t\t\n\t\t\tposition = new Vec2f(newX, newY);\n\t\t\tfindPosRatios();\n\t\t}\n\t}",
"public Sphere(Point3D c, double r, Color color, Material material)\r\n\t{\r\n\t\tthis(c,r, color);\r\n\t\tsuper._material = material;\r\n\t}",
"public Circle(double newRadius) {\n\t\tradius = newRadius;\t\t\t\n\t}",
"public Vector3f getCenter() {\r\n return center;\r\n }",
"public View center(Coordinate center) {\n setCenter(center);\n return this;\n }",
"public Circle(double givenRadius)\n\t{\n\t\tradius = givenRadius;\n\t}",
"public void setRadius(double radius) throws IllegalArgumentException {\n if (radius >= 0) {\n this.radius = radius;\n } else {\n throw new IllegalArgumentException(\"Radius cannot be negative\");\n }\n }",
"private void configureLocation() {\n radius = size / 2;\n circleX = bounds.left + radius;\n circleY = bounds.top + radius;\n }",
"@Test\n\tpublic void testSphereRadiusOne()\n\t{\n\t\tfinal EllipseRegionOfInterest ellipse = new EllipseRegionOfInterest( 3 );\n\t\tellipse.setOrigin( new double[] { 1, 1, 1 } );\n\t\tellipse.setRadius( 1 );\n\t\ttestEllipse( ellipse );\n\n\t}",
"public GameObjectBase(float boundsRadius) {\n bounds = new Circle(x,y,boundsRadius);\n }",
"public void setCenterX(double x) { centerX.set(clamp(x, X_MIN, X_MAX)); }"
] | [
"0.7657534",
"0.7353436",
"0.70736635",
"0.7039872",
"0.66958964",
"0.65399146",
"0.65162903",
"0.6475385",
"0.6413559",
"0.6351964",
"0.63483065",
"0.6340027",
"0.6317401",
"0.6300485",
"0.6269708",
"0.62543505",
"0.62465954",
"0.62228864",
"0.61937076",
"0.618519",
"0.61100674",
"0.60953766",
"0.6095215",
"0.6066669",
"0.6057076",
"0.6054395",
"0.6052962",
"0.602138",
"0.59940594",
"0.5975248",
"0.5953174",
"0.5923952",
"0.591685",
"0.59042454",
"0.59042454",
"0.5895504",
"0.5892",
"0.58774316",
"0.5872282",
"0.58339834",
"0.58016896",
"0.5784828",
"0.57718086",
"0.5734048",
"0.5729508",
"0.57261425",
"0.57232225",
"0.5705102",
"0.5694203",
"0.5689607",
"0.5686725",
"0.56827843",
"0.5677596",
"0.56771684",
"0.5668512",
"0.5646936",
"0.56464905",
"0.5639411",
"0.56282634",
"0.5595554",
"0.5595248",
"0.5565339",
"0.5564805",
"0.5551255",
"0.554681",
"0.55232114",
"0.5522255",
"0.5521467",
"0.55165315",
"0.55153936",
"0.5513819",
"0.55112284",
"0.550638",
"0.54997784",
"0.5495581",
"0.54931647",
"0.5473558",
"0.5471932",
"0.5470332",
"0.5451369",
"0.5428518",
"0.54272324",
"0.5416087",
"0.54154825",
"0.54067904",
"0.5389502",
"0.53756195",
"0.5365547",
"0.53537476",
"0.53517973",
"0.5349493",
"0.5346663",
"0.53449136",
"0.53296953",
"0.53141284",
"0.5305281",
"0.5285726",
"0.52838504",
"0.5281979",
"0.5262124"
] | 0.8384801 | 0 |
Indicates whether this bounding sphere intersects a specified frustum. | public boolean intersectsFrustum(Frustum frustum) {
if (frustum == null) {
throw new IllegalArgumentException(
Logger.logMessage(Logger.ERROR, "BoundingSphere", "intersectsFrustum", "missingFrustum"));
}
// See if the extent's bounding sphere is within or intersects the frustum. The dot product of the extent's
// center point with each plane's vector provides a distance to each plane. If this distance is less than
// -radius, the extent is completely clipped by that plane and therefore does not intersect the space enclosed
// by this Frustum.
double nr = -this.radius;
if (frustum.near.distanceToPoint(this.center) <= nr) {
return false;
}
if (frustum.far.distanceToPoint(this.center) <= nr) {
return false;
}
if (frustum.left.distanceToPoint(this.center) <= nr) {
return false;
}
if (frustum.right.distanceToPoint(this.center) <= nr) {
return false;
}
if (frustum.top.distanceToPoint(this.center) <= nr) {
return false;
}
if (frustum.bottom.distanceToPoint(this.center) <= nr) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean intersects(MeshObject object) {\r\n return intersects(this.getCurrentCollisionCenter(), this.boundingSphereRadius, object.getCurrentCollisionCenter(), object.boundingSphereRadius);\r\n }",
"boolean intersects( Geometry gmo );",
"public boolean isIntersectingWithViewport(ObjectWithPosition obj){\n if(this.bounds.intersect(obj.getBounds()))\n return true;\n else return false;\n }",
"public boolean isSphereInBox(final Vec3 inP, float fRadius)\n {\n float fDist;\n float fDistSq = 0;\n Vec4 p = m.getInverseSimple().multiply(inP.toPoint());\n\n // Add distance squared from sphere centerpoint to box for each axis\n for (int i = 0; i < 3; i++)\n {\n if (abs(p.get(i)) > extents.get(i))\n {\n fDist = abs(p.get(i)) - extents.get(i);\n fDistSq += fDist * fDist;\n }\n }\n\n\n return (fDistSq <= fRadius * fRadius);\n }",
"@FromAnyThread\n public static boolean isContains(@NotNull Geometry geometry, float x, float y) {\n\n var mesh = geometry.getMesh();\n var localScale = geometry.getLocalScale();\n\n if (mesh instanceof Sphere) {\n var radius = ((Sphere) mesh).getRadius() * localScale.getX();\n // return true if the distance is less than equal to the radius\n return Math.abs(CoordsUtils.length(x, y)) <= radius;\n }\n\n return false;\n }",
"public boolean intersects(Rectangle r) {\r\n return this.getRectangle().intersects(r);\r\n }",
"@Override\n\tpublic boolean insideObject(Vector3D p)\n\t{\n\t\treturn (inverse\n\t\t\t\t?(centre.getDifferenceWith(p).getModSquared() > MyMath.square(radius))\n\t\t\t\t:(centre.getDifferenceWith(p).getModSquared() < MyMath.square(radius))\n\t\t\t);\n\t}",
"boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }",
"public boolean intersects(Platform p){\n \treturn box.intersects(p.getBox());\r\n }",
"@Override\n public boolean isInView(Vector3d point, double radius)\n {\n if (myLeftClip.isInFront(point, radius) && myRightClip.isInFront(point, radius) && myTopClip.isInFront(point, radius)\n && myBottomClip.isInFront(point, radius))\n {\n Plane earthBisector = new Plane(Vector3d.ORIGIN, myPosition.getLocation());\n if (earthBisector.isInFront(point, radius))\n {\n return true;\n }\n }\n return false;\n }",
"public boolean areIntersecting() {\n return intersection != null;\n }",
"public boolean isIntersecting(GameObject other){\n if(other.isSolid()&&this.solid){\n return RectF.intersects(other.getHitBox(),this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }\n return false;\n }",
"public boolean isIntersecting(RectF other){\n return RectF.intersects(other,this.hitBox);//|| hitBox.contains(other.getHitBox())||other.getHitBox().contains(this.hitBox)\n }",
"private boolean intersects(Circle range) {\n\t\treturn range.intersects(boundary);\n\t}",
"public boolean intersects(HitBox h){\n\t\treturn rect.intersects(h.getRectangle());\n\t}",
"public boolean intersects(Rectangle2D r) {\n Geometry rect = rectangleToGeometry(r);\n\n return geometry.intersects(rect);\n }",
"public abstract boolean intersect(BoundingBox bbox);",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIntersection();",
"public static boolean intersects(Geometry a, Geometry b) {\r\n GeometryFactory factory = new GeometryFactory(a.getPrecisionModel(),\r\n a.getSRID());\r\n List aComponents = components(a);\r\n List bComponents = components(b);\r\n\r\n for (Iterator i = aComponents.iterator(); i.hasNext();) {\r\n Geometry aComponent = (Geometry) i.next();\r\n Assert.isTrue(!(aComponent instanceof GeometryCollection));\r\n\r\n //Collapse to point as workaround for JTS defect: #contains doesn't work for\r\n //polygons and zero-length vectors. [Jon Aquino]\r\n aComponent = collapseToPointIfPossible(aComponent, factory);\r\n\r\n for (Iterator j = bComponents.iterator(); j.hasNext();) {\r\n Geometry bComponent = (Geometry) j.next();\r\n Assert.isTrue(!(bComponent instanceof GeometryCollection));\r\n bComponent = collapseToPointIfPossible(bComponent, factory);\r\n\r\n if (aComponent.intersects(bComponent)) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n }",
"public boolean isCube(){\n\t\treturn !cubeDetectorL.get() && !cubeDetectorR.get();\n\t}",
"public void findVisible (\n Frustum frustum,\n Set<Node> objectsFound\n ) {\n\n // First check if this is a leaf node with no objects in it. In that\n // case there's nothing to do, and we don't even want to perform the\n // frustum check.\n if (children == null && firstClassList == null && secondClassList == null) return;\n\n // Now do the frustum intersection check and if so, go deeper and look\n // for objects\n if (frustum.intersects (this.bounds)) {\n \n // Base case -- check the individual objects here against the frustum.\n // We try to eliminate multiple frustum intersection queries by checking\n // if the object has already been found.\n if (children == null) {\n\n if (firstClassList != null) {\n for (Node object : firstClassList) {\n if (!objectsFound.contains (object)) {\n if (frustum.intersects (object.getBoundsInLocal())) objectsFound.add (object);\n } // if\n } // for\n } // if\n\n if (secondClassList != null) {\n for (Node object : secondClassList) {\n if (!objectsFound.contains (object)) {\n if (frustum.intersects (object.getBoundsInLocal())) objectsFound.add (object);\n } // if\n } // for\n } // if\n\n } // if\n\n // Recursive case -- check the children\n else {\n for (SceneOctTree child : children) {\n child.findVisible (frustum, objectsFound);\n } // for\n } // else\n \n } // if\n\n }",
"public boolean intersectSphereTriangle(Triangle t, Vec3D result) {\n\t\t// Find Vec3D P on triangle ABC closest to sphere center\n\t\tresult.set(t.closestPointOnSurface(this));\n\n\t\t// Sphere and triangle intersect if the (squared) distance from sphere\n\t\t// center to Vec3D p is less than the (squared) sphere radius\n\t\tVec3D v = result.sub(this);\n\t\treturn v.magSquared() <= radius * radius;\n\t}",
"public boolean intersects( Geometry gmo ) {\n boolean inter = false;\n\n try {\n if ( gmo instanceof Point ) {\n inter = LinearIntersects.intersects( (Point)gmo, this );\n } else if ( gmo instanceof Curve ) {\n inter = LinearIntersects.intersects( this, (Curve)gmo );\n } else if ( gmo instanceof Surface ) {\n inter = LinearIntersects.intersects( this, (Surface)gmo );\n } else if ( gmo instanceof Aggregate ) {\n inter = intersectsAggregate( (Aggregate)gmo );\n }\n } catch ( Exception e ) {\n }\n\n return inter;\n }",
"public boolean intersects( final Layer.HasSize layer )\r\n {\r\n return this.intersects( layer.transform( ).tx( ), layer.transform( ).ty( ), layer.width( ), layer.height( ) );\r\n }",
"public boolean intersects( final float tx, final float ty, final float width, final float height )\r\n {\r\n if ( this.transform.tx( ) > tx + width ) return false;\r\n if ( this.transform.tx( ) + this.width( ) < tx ) return false;\r\n if ( this.transform.ty( ) > ty + height ) return false;\r\n if ( this.transform.ty( ) + this.height( ) < ty ) return false;\r\n\r\n return true;\r\n }",
"public boolean intersects(OnScreenObject other) {\r\n if (other == null) {\r\n return false;\r\n }\r\n Rectangle r1 = getRectangle();\r\n Rectangle r2 = other.getRectangle();\r\n\r\n return r1.intersects(r2);\r\n }",
"boolean contains( Geometry gmo );",
"@Test\n public void testGetIntersect() throws Exception {\n Vector farIntersect = sphere.getIntersect(new Vector(0,0,0),new Vector(0,-6,10));\n assertTrue(farIntersect.equals(new Vector(0,-6,10)));\n }",
"public boolean intersects(Vector3d center, double radius) {\r\n return intersects(this.getCurrentCollisionCenter(), this.boundingSphereRadius, center, radius);\r\n }",
"public boolean isColliding(){\n for(int i = 0; i < eng.getIDManager().getObjectsWithID(\"GameObject\").size(); i++){\n GameObject temp = eng.getIDManager().getObjectsWithID(\"GameObject\").get(i);\n \n if(temp.getHitBox().getBounds().intersects(rect.getBounds()) &&\n temp.getHitBox() != this){\n currentCollidingObject = temp;\n return true;\n }\n }\n \n return false;\n }",
"@Override\n\tpublic boolean isInside(float x, float y, float z) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean intersects(double arg0, double arg1, double arg2, double arg3) {\n\t\treturn false;\n\t}",
"public void isIntersects(WorldObject worldObject) {\n Area areaFromThisObject = new Area(this.getShape());\n Area areaFromWorldObject = new Area(worldObject.getShape());\n areaFromThisObject.intersect(areaFromWorldObject);\n this.collided = !areaFromThisObject.isEmpty();\n }",
"public boolean contains(Rectangle2D r) {\n Geometry rect = rectangleToGeometry(r);\n\n return geometry.contains(rect);\n }",
"public boolean doesIntersect(Box box) {\n\n\n\t\tfor (Point point:box.getVerts()) {\n\n\t\t\tif (this.contains(point)) return true;\n\t\t}\n\n\t\tfor (Point point: this.verts) {\n\n\t\t\tif (box.contains(point)) return true;\n\t\t}\n\n\t\treturn false;\n\t}",
"boolean hasVector3Value();",
"@Override\n public int octree_function(Object... obj) //public static int\n //o_sphere(\t\t\t/* compute intersection with sphere */\n //\tOBJECT.OBJREC so,\n //\tRAY r\n //)\n {\n OBJECT.OBJREC so = (OBJECT.OBJREC) obj[0];\n RAY r = (RAY) obj[1];\n double a, b, c;\t/* coefficients for quadratic equation */\n double[] root = new double[2];\t/* quadratic roots */\n int nroots;\n double t = 0;\n double[] ap;\n int i;\n\n if (so.oargs.nfargs != 4) {\n//\t\tobjerror(so, USER, \"bad # arguments\");\n }\n ap = so.oargs.farg;\n if (ap[3] < -FVECT.FTINY) {\n//\t\tobjerror(so, WARNING, \"negative radius\");\n so.otype = (short) (so.otype == OTYPES.OBJ_SPHERE\n ? OTYPES.OBJ_BUBBLE : OTYPES.OBJ_SPHERE);\n ap[3] = -ap[3];\n } else if (ap[3] <= FVECT.FTINY) {\n//\t\tobjerror(so, USER, \"zero radius\");\n }\n /*\n *\tWe compute the intersection by substituting into\n * the surface equation for the sphere. The resulting\n * quadratic equation in t is then solved for the\n * smallest positive root, which is our point of\n * intersection.\n *\tSince the ray is normalized, a should always be\n * one. We compute it here to prevent instability in the\n * intersection calculation.\n */\n /* compute quadratic coefficients */\n a = b = c = 0.0;\n for (i = 0; i < 3; i++) {\n a += r.rdir.data[i] * r.rdir.data[i];\n t = r.rorg.data[i] - ap[i];\n b += 2.0 * r.rdir.data[i] * t;\n c += t * t;\n }\n c -= ap[3] * ap[3];\n\n nroots = ZEROES.quadratic(root, a, b, c);\t/* solve quadratic */\n\n for (i = 0; i < nroots; i++) /* get smallest positive */ {\n if ((t = root[i]) > FVECT.FTINY) {\n break;\n }\n }\n if (i >= nroots) {\n return (0);\t\t\t/* no positive root */\n }\n\n if (t >= r.rot) {\n return (0);\t\t\t/* other is closer */\n }\n\n r.ro = so;\n r.rot = t;\n /* compute normal */\n a = ap[3];\n if (so.otype == OTYPES.OBJ_BUBBLE) {\n a = -a;\t\t\t/* reverse */\n }\n for (i = 0; i < 3; i++) {\n r.rop.data[i] = r.rorg.data[i] + r.rdir.data[i] * t;\n r.ron.data[i] = (r.rop.data[i] - ap[i]) / a;\n }\n r.rod = -FVECT.DOT(r.rdir, r.ron);\n r.rox = null;\n r.pert.data[0] = r.pert.data[1] = r.pert.data[2] = 0.0;\n r.uv[0] = r.uv[1] = 0.0;\n\n return (1);\t\t\t/* hit */\n }",
"public boolean collidePoint(float mX, float mY){\n return super.shape.contains(mX,mY);\n }",
"@Override\n\tpublic boolean intersects(Vec3D vec)\n\t\t{\n\t\tboolean isInRes = true;\n\t\tisInRes &= vec.x() >= topLeft.x();\n\t\tisInRes &= vec.x() <= topLeft.x() + edgeLength;\n\t\tisInRes &= vec.y() >= topLeft.y();\n\t\tisInRes &= vec.y() <= topLeft.y() + edgeLength;\n\t\tisInRes &= vec.z() >= topLeft.z();\n\t\tisInRes &= vec.z() <= topLeft.z() + edgeLength;\n\t\treturn isInRes;\n\t\t}",
"public boolean intersecta(Base obj) {\n return getPerimetro().intersects(obj.getPerimetro());\n }",
"public Pair<Boolean, Float> intersects(AxisAlignedBox box) {\r\n\t\treturn SecaMath.intersect(this, box);\r\n\t}",
"protected boolean intersects(Circle2D other) {\n\t\treturn intersects(other.x, other.y, other.diameter);\n\t}",
"public boolean contains(double[] loc, double[] normal){\n double[] r = Vector3DOps.difference(loc, position);\n double proj = Vector3DOps.dot(normal, r);\n double s = Vector3DOps.dot(r, r);\n\n return s - proj*proj<radius*radius;\n\n }",
"public boolean intersects(final Rectangle2D other)\r\n {\r\n return other.intersects(new Rectangle2D.Float(x, y, width, height));\r\n }",
"public boolean intersect(BoundingBox3d b2) {\n return ((xmin <= b2.xmin && b2.xmin <= xmax) || (xmin <= b2.xmax && b2.xmax <= xmax))\n && ((ymin <= b2.ymin && b2.ymin <= ymax) || (ymin <= b2.ymax && b2.ymax <= ymax))\n && ((zmin <= b2.zmin && b2.zmin <= zmax) || (zmin <= b2.zmax && b2.zmax <= zmax));\n }",
"public boolean centroidIsInRect(Rectangular r) {\n\t\tdouble Gx = (r.getA1().getX() + r.getC1().getX()) / 2;\n\t\tdouble Gy = (r.getA1().getY() + r.getC1().getY()) / 2;\n\t\tdouble Gz = (r.getA1().getZ() + r.getC1().getZ()) / 2;\n\n\t\tPoint G = new Point(Gx, Gy, Gz);\n\n\t\treturn isInRect(G);\n\t}",
"public boolean blocks(Point3d S, Ray3d c) {\n double A = c.getX() * c.getX() + c.getY() * c.getY() + c.getZ() * c.getZ();\n\n double bx = (this.x - S.getX()); //Account for the Sphere's position\n double by = (this.y - S.getY());\n double bz = (this.z - S.getZ());\n double B = -(c.getX() * bx + c.getY() * by + c.getZ() * bz);\n double r = this.radius * this.radius;\n double C = bx * bx + by * by + bz * bz - r;\n\n double D = (B * B - A * C);\n if (D < 0) //no intersection\n {\n return false;\n }\n\n if (D == 0) //'graze' the sphere\n {\n /****/return false;\n }\n\n double t1 = (-B - Math.sqrt(D)) / A;\n if (t1 > 0.00001 && t1 < 1.0) //The first hit\n {\n return true; //But need to check if it's less than 1, also!\n }\n\n double t2 = (-B / A) + Math.sqrt(D) / A;\n if (t2 > 0.00000001 && t2 < 1.0) {\n return true;\n }\n\n return false;\n }",
"public boolean intersects(Entity other) {\n return other.getBoundary().intersects(this.getBoundary());\n }",
"public boolean intersects(S2Point v1) {\n boolean result = true;\n\n if ((v1.x < xmin && lastVertex.x < xmin) || (v1.x > xmax && lastVertex.x > xmax)) {\n result = false;\n } else if ((v1.y < ymin && lastVertex.y < ymin) || (v1.y > ymax && lastVertex.y > ymax)) {\n result = false;\n } else if ((v1.z < zmin && lastVertex.z < zmin) || (v1.z > zmax && lastVertex.z > zmax)) {\n result = false;\n }\n\n lastVertex = v1;\n return result;\n }",
"public boolean isProjectionIncluded() {\n return geometry.almostZero(projectionDistance);\n }",
"static boolean intersectsFace(S2Point n) {\n // L intersects the [-1,1]x[-1,1] square in (u,v) if and only if the dot\n // products of N with the four corner vertices (-1,-1,1), (1,-1,1), (1,1,1),\n // and (-1,1,1) do not all have the same sign. This is true exactly when\n // |Nu| + |Nv| >= |Nw|. The code below evaluates this expression exactly\n // (see comments above).\n double u = Math.abs(n.x);\n double v = Math.abs(n.y);\n double w = Math.abs(n.z);\n // We only need to consider the cases where u or v is the smallest value,\n // since if w is the smallest then both expressions below will have a\n // positive LHS and a negative RHS.\n return (v >= w - u) && (u >= w - v);\n }",
"public boolean intersects(Rectangle rect){\n\t\tRectangle rectIntersect = (Rectangle) rect.clone();\n\t\trectIntersect.translate(-x, -y);\n\t\treturn rectangle.intersects(rectIntersect);\n\t}",
"private boolean colisionEstorbos(){\r\n\t\tif(game.estorbo1.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo1, rebotes1);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo2.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo2, rebotes2);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tif(game.estorbo3.getBounds().intersects(getBounds())){\r\n\t\t\tasignarVelocidad(game.estorbo3, rebotes3);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean isIncludeBounds();",
"public boolean intersects(Obstacle v){\n \treturn box.intersects(v.getBox()); \t\r\n }",
"public boolean intersects(BaseGameObject other) {\r\n return (other.getPosx() - this.getPosx())\r\n * (other.getPosx() - this.getPosx())\r\n + (other.getPosy() - this.getPosy())\r\n * (other.getPosy() - this.getPosy())\r\n < (other.bound + this.bound) * (other.bound + this.bound);\r\n }",
"private boolean colisionPalas() {\r\n\t\treturn game.racketIzq.getBounds().intersects(getBounds())\r\n\t\t\t\t|| game.racketDer.getBounds().intersects(getBounds());\r\n\t}",
"@Override\n\tpublic boolean collidesWith(GameObject otherObject) {\n\t\tboolean result = false;\n\t\tdouble thisCenterX = this.getX();\n\t\tdouble thisCenterY = this.getY();\n\n\t\tdouble otherCenterX = (otherObject).getX();\n\t\tdouble otherCenterY = (otherObject).getY();\n\n\t\tdouble dx = thisCenterX - otherCenterX;\n\t\tdouble dy = thisCenterY - otherCenterY;\n\n\t\tdouble distBetweenCentersSqr = (dx * dx + dy * dy);\n\n\t\tint thisRadius= this.getSize() / 2;\n\t\t\n\t\tint otherRadius;\n\t\t\n\t\tif(otherObject instanceof Base) {\n\t\t\totherRadius= (otherObject).getSize();\n\t\t}else {\n\t\t\totherRadius= (otherObject).getSize() / 2;\n\t\t}\n\n\t\tint radiiSqr= (thisRadius * thisRadius + 2 * thisRadius * otherRadius + otherRadius * otherRadius);\n\n\t\tif (distBetweenCentersSqr <= radiiSqr) { result = true ; }\n\n\t\treturn result;\n\t}",
"public boolean intersects(PhysicsComponent p, int x, int y) {\n\t\treturn p.getBoundsRect().intersects(this.getRect(x, y));\n\t}",
"private boolean intersectsAggregate( Aggregate mprim ) throws Exception {\n boolean inter = false;\n\n int cnt = mprim.getSize();\n\n for ( int i = 0; i < cnt; i++ ) {\n if ( intersects( mprim.getObjectAt( i ) ) ) {\n inter = true;\n break;\n }\n }\n\n return inter;\n }",
"Multimap<String, String> intersects(Circle bounds);",
"public boolean isInViewport(ObjectWithPosition obj){\n Point viewPoint = convertToViewCoordinates(obj.xCoordinate,obj.yCoordinate);\n if(viewPoint.getX() > 0 && viewPoint.getX() < 1024){\n if(viewPoint.getY() > 0 && viewPoint.getY() < 528){\n return true;\n }\n else return false;\n }\n else return false;\n }",
"public boolean intersect(Unit collidee) {\n if (collidee instanceof Qix) {\n Qix qix = (Qix) collidee;\n return qix.intersect(this);\n }\n Rectangle colliderR = this.toRectangle();\n // subtract one from width&height to make collisions look more real\n Rectangle collideeR = collidee.toRectangle();\n\n if (colliderR.intersects(collideeR)) {\n\n LOGGER.log(Level.WARNING, this.toString() + \" collided with \" + collidee.toString() + \" at (\" + this.getX()\n + \",\" + this.getY() + \")\", this.getClass());\n\n return true;\n }\n return false;\n }",
"@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n if (getClass() != obj.getClass()) {\n return false;\n }\n final Vector3 other = (Vector3) obj;\n if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(other.x)) {\n return false;\n }\n if (Double.doubleToLongBits(this.y) != Double.doubleToLongBits(other.y)) {\n return false;\n }\n if (Double.doubleToLongBits(this.z) != Double.doubleToLongBits(other.z)) {\n return false;\n }\n if (Double.doubleToLongBits(this.magnitude) != Double.doubleToLongBits(other.magnitude)) {\n return false;\n }\n return true;\n }",
"public boolean hasIntersectionRay(Line3D line) {\n List<Point3D> list = new ArrayList();\n /*for (Face3D face : faces)\n if (face.intersectionRay(line, list) > 0)\n return true;*/\n return false;\n }",
"public boolean isInBoundaries() {\n\t return Referee.playfield.isInBoundaries(this);\n }",
"public double findRayIntersection(Vec3 origin, Vec3 direction, Vec3 normal)\n {\n double scale = width/obj.getScale();\n double ox = origin.x*scale+0.5*width;\n double oy = origin.y*scale+0.5*width;\n double oz = origin.z*scale+0.5*width;\n double dx = direction.x;\n double dy = direction.y;\n double dz = direction.z;\n\n // Find the intersection of the ray with the bounding box.\n\n double mint = -Double.MAX_VALUE;\n double maxt = Double.MAX_VALUE;\n if (dx == 0.0)\n {\n if (ox < minx || ox > maxx)\n return 0.0;\n }\n else\n {\n double t1 = (minx-ox)/dx;\n double t2 = (maxx-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dy == 0.0)\n {\n if (oy < miny || oy > maxy)\n return 0.0;\n }\n else\n {\n double t1 = (miny-oy)/dy;\n double t2 = (maxy-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dz == 0.0)\n {\n if (oz < minz || oz > maxz)\n return 0.0;\n }\n else\n {\n double t1 = (minz-oz)/dz;\n double t2 = (maxz-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (mint < 0.0)\n mint = 0.0;\n\n // Find the first voxel and initialize variables.\n\n double xpos = ox+mint*dx;\n double ypos = oy+mint*dy;\n double zpos = oz+mint*dz;\n int x = Math.max(Math.min((int) xpos, maxx), minx);\n int y = Math.max(Math.min((int) ypos, maxy), miny);\n int z = Math.max(Math.min((int) zpos, maxz), minz);\n int stepx, stepy, stepz;\n int finalx, finaly, finalz;\n double tdeltax, tdeltay, tdeltaz;\n double tmaxx, tmaxy, tmaxz;\n if (dx < 0.0)\n {\n stepx = -1;\n finalx = minx-1;\n tdeltax = -1.0/dx;\n tmaxx = (x-ox)/dx;\n }\n else if (dx > 0.0)\n {\n stepx = 1;\n finalx = maxx+1;\n tdeltax = 1.0/dx;\n tmaxx = (x+1-ox)/dx;\n }\n else\n {\n stepx = 0;\n finalx = 0;\n tdeltax = 0.0;\n tmaxx = Double.MAX_VALUE;\n }\n if (dy < 0.0)\n {\n stepy = -1;\n finaly = miny-1;\n tdeltay = -1.0/dy;\n tmaxy = (y-oy)/dy;\n }\n else if (dy > 0.0)\n {\n stepy = 1;\n finaly = maxy+1;\n tdeltay = 1.0/dy;\n tmaxy = (y+1-oy)/dy;\n }\n else\n {\n stepy = 0;\n finaly = 0;\n tdeltay = 0.0;\n tmaxy = Double.MAX_VALUE;\n }\n if (dz < 0.0)\n {\n stepz = -1;\n finalz = minz-1;\n tdeltaz = -1.0/dz;\n tmaxz = (z-oz)/dz;\n }\n else if (dz > 0.0)\n {\n stepz = 1;\n finalz = maxz+1;\n tdeltaz = 1.0/dz;\n tmaxz = (z+1-oz)/dz;\n }\n else\n {\n stepz = 0;\n finalz = 0;\n tdeltaz = 0.0;\n tmaxz = Double.MAX_VALUE;\n }\n\n // Step through the voxels, looking for intersections.\n\n VoxelOctree voxels = obj.getVoxels();\n byte values[] = new byte[8];\n while (true)\n {\n int index = x*width*width+y*width+z;\n if ((flags[index/32]&(1<<(index%32))) != 0)\n {\n // There is a piece of the surface in this voxel, so see if the ray intersects it.\n // First find the values of t at which the ray enters and exits it.\n \n double tenter = -Double.MAX_VALUE;\n double texit = Double.MAX_VALUE;\n if (dx != 0.0)\n {\n double t1 = (x-ox)/dx;\n double t2 = (x+1-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dy != 0.0)\n {\n double t1 = (y-oy)/dy;\n double t2 = (y+1-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dz != 0.0)\n {\n double t1 = (z-oz)/dz;\n double t2 = (z+1-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (tenter < 0.0)\n continue; // Ignore intersections in the voxel containing the origin.\n\n // Look up the values at the eight corners of the voxel.\n\n values[0] = voxels.getValue(x, y, z);\n values[1] = voxels.getValue(x, y, z+1);\n values[2] = voxels.getValue(x, y+1, z);\n values[3] = voxels.getValue(x, y+1, z+1);\n values[4] = voxels.getValue(x+1, y, z);\n values[5] = voxels.getValue(x+1, y, z+1);\n values[6] = voxels.getValue(x+1, y+1, z);\n values[7] = voxels.getValue(x+1, y+1, z+1);\n\n // Find the positions within the voxel where the ray enters and exits.\n\n double xenter = ox+dx*tenter-x;\n double yenter = oy+dy*tenter-y;\n double zenter = oz+dz*tenter-z;\n double xexit = ox+dx*texit-x;\n double yexit = oy+dy*texit-y;\n double zexit = oz+dz*texit-z;\n\n // Interpolate the find the values at those points.\n\n double enterValue = values[0]*(1.0-xenter)*(1.0-yenter)*(1.0-zenter)\n +values[1]*(1.0-xenter)*(1.0-yenter)*zenter\n +values[2]*(1.0-xenter)*yenter*(1.0-zenter)\n +values[3]*(1.0-xenter)*yenter*zenter\n +values[4]*xenter*(1.0-yenter)*(1.0-zenter)\n +values[5]*xenter*(1.0-yenter)*zenter\n +values[6]*xenter*yenter*(1.0-zenter)\n +values[7]*xenter*yenter*zenter;\n double exitValue = values[0]*(1.0-xexit)*(1.0-yexit)*(1.0-zexit)\n +values[1]*(1.0-xexit)*(1.0-yexit)*zexit\n +values[2]*(1.0-xexit)*yexit*(1.0-zexit)\n +values[3]*(1.0-xexit)*yexit*zexit\n +values[4]*xexit*(1.0-yexit)*(1.0-zexit)\n +values[5]*xexit*(1.0-yexit)*zexit\n +values[6]*xexit*yexit*(1.0-zexit)\n +values[7]*xexit*yexit*zexit;\n if ((enterValue > 0 && exitValue <= 0) || (enterValue <= 0 && exitValue > 0))\n {\n // Find the intersection point.\n\n double weight1 = Math.abs(exitValue);\n double weight2 = Math.abs(enterValue);\n double d = 1.0/(weight1+weight2);\n weight1 *= d;\n weight2 *= d;\n double tintersect = (tenter*weight1 + texit*weight2)/scale;\n if (normal != null)\n {\n normal.set(values[0]+values[1]+values[2]+values[3]-values[4]-values[5]-values[6]-values[7],\n values[0]+values[1]-values[2]-values[3]+values[4]+values[5]-values[6]-values[7],\n values[0]-values[1]+values[2]-values[3]+values[4]-values[5]+values[6]-values[7]);\n normal.normalize();\n }\n return tintersect;\n }\n }\n\n // Advance to the next voxel.\n\n if (tmaxx < tmaxy)\n {\n if (tmaxx < tmaxz)\n {\n x += stepx;\n if (x == finalx)\n return 0.0;\n tmaxx += tdeltax;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n else\n {\n if (tmaxy < tmaxz)\n {\n y += stepy;\n if (y == finaly)\n return 0.0;\n tmaxy += tdeltay;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n }\n }",
"private boolean collides(GameObject gameObject1, double radius) {\n synchronized (mGameObjects) {\n for (GameObject gameObject2 : mGameObjects) {\n if (gameObject1 != gameObject2) {\n if (collides(gameObject1.getLocation(), gameObject2.getLocation(), radius))\n return true;\n }\n }\n }\n return false;\n }",
"public boolean intersectsSegment(Vector a, Vector b, double R){\r\n\t\tif(floor && !obstructed())\r\n\t\t\treturn false;\r\n\t\t\r\n\t\tVector[] p = getCardinalPoints();\r\n\t\t\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tVector c = p[i];\r\n\t\t\tVector d = p[(i+1)%4];\r\n\t\t\tif(Geometry.segmentIntersect(a, b, c, d) || Geometry.plsDist(a, b, p[i]) <= R)\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean inBounds(Actor a)\n {\n boolean inX = Math.abs(a.getXPos()) < levelWidth/2;\n boolean inY = Math.abs(a.getYPos()) < levelHeight/2;\n return inX && inY;\n }",
"private boolean collision1() {\n return game.racket1.getBounds1().intersects(getBounds()); // returns true if the two rectangles intersect\r\n }",
"public boolean collideWithBarrier() {\n\t\t// Gets the barrierCollisionBoxes array list from the level.\n\t\tArrayList<Rectangle2D.Double> barrierCollisonBoxes = this.level\n\t\t\t\t.getBarrierCollisonBoxes();\n\n\t\t// Loop through and check if the Digger is colliding with a\n\t\t// barrierCollisonBox.\n\t\tfor (int i = 0; i < barrierCollisonBoxes.size(); i++) {\n\t\t\tif (this.collisionBox.intersects(barrierCollisonBoxes.get(i))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean intersectsWith(AxisAlignedBB axis) {\n\t\treturn axis.maxX > this.minX && axis.minX < this.maxX ? (axis.maxY > this.minY && axis.minY < this.maxY ? axis.maxZ > this.minZ && axis.minZ < this.maxZ : false) : false;\n\t}",
"public abstract boolean ContainsContactObjects();",
"private boolean contains(Ball ball) {\n checkRep();\n boolean contains =\n ball.getPosition().x() > this.boundingBoxPosition.x()\n && ball.getPosition().x() < this.boundingBoxPosition.x() + this.width\n && ball.getPosition().y() > this.boundingBoxPosition.y() \n && ball.getPosition().y() < this.boundingBoxPosition.y() + this.height;\n return contains;\n }",
"public boolean contains(Lover m) {\n PVector loc =m.location;\n // is Lover object is inside of mouse controlled fluid?\n // if (loc.x> mouseX && loc.x < mouseX + w && loc.y > mouseY && loc.y < mouseY+ h) { //creates flyover\n // return true;\n // } \n // is Lover object inside of stationary fluid area? Yes? then go back to if statement and apply force\n if (loc.x> x && loc.x < x + w && loc.y > y && loc.y < y+ h) {\n return true;\n } \n // No? then return fals and do not apply drag force\n else {\n return false;\n }\n }",
"public boolean overlapAnyEntity(){\n \treturn this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T));\n }",
"public boolean intersects(GISArea other) {\n if (this.isPoint() && other.isPoint()) {\n return this.latitudes.equals(other.latitudes) && this.longitudes.equals(other.longitudes);\n }\n // 2. We're a point, they're not.\n else if (this.isPoint() && other.isRegion()) {\n Area them = new Area(other.path);\n return them.contains(this.latitudes.get(0), this.longitudes.get(0));\n }\n // 3. We're a region, they're a point.\n else if (this.isRegion() && other.isPoint()) {\n Area us = new Area(this.path);\n return us.contains(other.latitudes.get(0), other.longitudes.get(0));\n }\n // 4. We're both regions.\n else {\n // Make the shapes for both areas.\n // Take the intersect\n // If an empty shape, no intersection.\n Area us = new Area(path);\n Area them = new Area(other.path);\n us.intersect(them);\n return !us.isEmpty();\n }\n }",
"@Override\n public void intersect( Ray ray, IntersectResult result ) {\n \t\tVector3d e = new Vector3d(ray.eyePoint);\n \t\te.sub(this.center);\n \t\tdouble a = ray.viewDirection.dot(ray.viewDirection);\n \t\tdouble b = 2 * ray.viewDirection.dot(e);\n \t\tdouble c = e.dot(e) - this.radius * this.radius;\n \t\tdouble discriminant = b*b - 4*a*c;\n \t\t\n \t\tif (discriminant == 0.0) {\n \t\t\t\n \t\t\tdouble t_pos = -0.5 * b / a;\n \t\t\t// scale ray viewDirection to be t_pos length\n\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n\t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n\t\t\tpoint_of_intersection.scale(t_pos);\n\t\t\tpoint_of_intersection.add(ray.eyePoint);\n\t\t\t\n\t\t\t// normal is point_of_intersection - sphere.center\n\t\t\tVector3d normal = new Vector3d();\n\t\t\tnormal.add(point_of_intersection);\n\t\t\tnormal.sub(this.center);\n\t\t\tnormal.normalize();\n\t\t\t\n\t\t\tresult.p.set(point_of_intersection);\n\t\t\tresult.material = this.material;\n\t\t\tresult.t = t_pos;\n\t\t\tresult.n.set(normal);\n \t\t\t\n \t\t}\n \t\telse if (discriminant > 0.0) {\n \t\t\t\n \t\t\t// solve quadratic formula\n \t\t\tdouble q = (b > 0) ? -0.5 * (b + Math.sqrt(discriminant)) : -0.5 * (b - Math.sqrt(discriminant));\n \t\t\tdouble t_pos = q / a;\n \t\t\tdouble t_neg = c / q;\n \t\t\t\n \t\t\tif (t_pos < t_neg) {\n \t\t\t\tdouble temp = t_pos;\n \t\t\t\tt_pos = t_neg;\n \t\t\t\tt_neg = temp;\n \t\t\t}\n \t\t\t\t\n \t\t\tif (t_neg > 0) {\n \t\t\t\t// scale ray viewDirection to be t_neg length\n \t\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n \t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n \t\t\tpoint_of_intersection.scale(t_neg);\n \t\t\tpoint_of_intersection.add(ray.eyePoint);\n \t\t\t\n \t\t\t// normal is point_of_intersection - sphere.center\n \t\t\tVector3d normal = new Vector3d();\n \t\t\tnormal.add(point_of_intersection);\n \t\t\tnormal.sub(this.center);\n \t\t\tnormal.normalize();\n \t\t\t\n \t\t\tresult.p.set(point_of_intersection);\n \t\t\tresult.material = this.material;\n \t\t\tresult.t = t_neg;\n \t\t\tresult.n.set(normal);\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n\n }",
"public boolean collisionDetection(Body body) {\n boolean collision = false; // default: no collision\n if (body.name != this.name) {\n double r = Math.sqrt(Math.pow((this.x - body.x),2) + Math.pow((this.y - body.y),2));\n if (r <= 1*(body.radius + this.radius)) {\n collision = true; // collision detected\n }\n\n }\n return collision;\n }",
"public boolean containsContact(Contact c);",
"public boolean inBounds(Rectangle bounds)\n\t{\n\t\treturn bounds.contains(mX, mY);\n\t}",
"public boolean intersects(Circle other)\n{\n if (Math.abs(center.x - other.center.x) <= (radius +other.radius) && \n Math.abs(center.y - other.center.y) <= (radius + other.radius))// true calculation needs both radius to\n return true;\n return false;\n}",
"public boolean collides(Ball b)\n\t{\n\t\tdouble dx = b.xPosition - xPosition;\n\t\tdouble dy = b.yPosition - yPosition;\n\t\tdouble distance = Math.sqrt(dx*dx+dy*dy);\n\n\t\treturn distance < size/2 + b.size/2;\n\t}",
"public boolean isVecInside(Vec3 vec) {\n\t\treturn vec.xCoord > this.minX && vec.xCoord < this.maxX ? (vec.yCoord > this.minY && vec.yCoord < this.maxY ? vec.zCoord > this.minZ && vec.zCoord < this.maxZ : false) : false;\n\t}",
"public boolean intersects(double Lat1, double Long1, double Lat2, double Long2){\n if(distance(Lat1, Long1, Lat2, Long2, \"M\") <= mRadius){\n return true;\n }else{\n return false;\n }\n }",
"public boolean intersects(Shape other) {\n boolean result = false;\n ArrayList<Vector3D> points = getPoints();\n for (Vector3D point : points) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n if (other.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n points = other.getPoints();\n for (Vector3D point : points) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n if (this.contains(point)) {\n System.out.println(this.part.name + \" contains \" + other.part.name + \" : \" + point);\n\n result = true;\n }\n }\n }\n }\n\n return result;\n }",
"Boolean CheckIfInside(float xVal, float yVal) {\r\n double distance = Math.sqrt((this.x-xVal)*(this.x-xVal) + (this.y-yVal)*(this.y-yVal));\r\n return (distance <= this.radius);\r\n }",
"public boolean isCollision(Ball ob) { // Kollisionsabfrage\r\n\t\t\r\n\t\tdX = posX - ob.getPosX();\r\n\t\tdY = posY - ob.getPosY();\r\n\t\tfloat vector = dX * dX + dY * dY;\r\n\t\tfloat hypo = radius * radius * 4;\r\n\t\tif (hypo >= vector) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void intersects(unit unit) {\n\t\t\n\t}",
"public boolean intersects (GraphicalFigure fig) {\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures horizontally\n\t\tif (fig.getOffset().xCoord() > this.gfPos.xCoord() + this.getWidth() || this.gfPos.xCoord() > fig.getOffset().xCoord() + fig.getWidth()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Check to see if there is any overlap between the 2 figures vertically\n\t\tif (fig.getOffset().yCoord() > this.gfPos.yCoord() + this.getHeight() || this.gfPos.yCoord() > fig.getOffset().yCoord() + fig.getHeight()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isAround(Ball ball)\n {\n int delta = 10;\n Rectangle2D rectangle = new Rectangle2D.Double(mPosition.getX() - delta, mPosition.getY() - delta, 2 * delta, 2 * delta);\n \n return rectangle.contains(ball.getPosition());\n }",
"@Override\n public boolean intersectsAt(Point point){\n if (planeImage.getBoundingBoxAt(currPos).intersects(point)){\n return true;\n }\n else\n return false;\n }",
"public Pair<Boolean, Float> intersects(Plane plane) {\r\n\t\treturn SecaMath.intersect(this, plane);\r\n\t}",
"boolean overlaps(MyRectangle2D r) {\r\n\t\t//cordinates of the first corner of the parametar's rectangle\r\n\t\tdouble x1 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y1 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the second corner of the parametar's rectangle\r\n\t\tdouble x2 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y2 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the third corner of the parametar's rectangle\r\n\t\tdouble x3 = r.getX() - (r.getWidth() / 2);\r\n\t\tdouble y3 = r.getY() - (r.getHeight() / 2);\r\n\r\n\t\t//cordinates of the fourth corner of the parametar's rectangle\r\n\t\tdouble x4 = r.getX() + (r.getWidth() / 2);\r\n\t\tdouble y4 = r.getY() + (r.getHeight() / 2);\r\n\r\n\t\t//checking if calling rectangle has any of the corners inside itself\r\n\t\tboolean corner1Overlaps = this.contains(x1, y1);\r\n\t\tboolean corner2Overlaps = this.contains(x2, y2);\r\n\t\tboolean corner3Overlaps = this.contains(x3, y3);\r\n\t\tboolean corner4Overlaps = this.contains(x4, y4);\r\n\r\n\t\t//if it does contain any of the corners they overlap\r\n\t\treturn corner1Overlaps || corner2Overlaps || corner3Overlaps\r\n\t\t\t\t|| corner4Overlaps ? true : false;\r\n\t}",
"public boolean intersects(Shape otherShape)\n {\n if (rotation == 0.0 && otherShape.rotation == 0.0)\n {\n return RectF.intersects(getBounds(), otherShape.getBounds());\n }\n else\n {\n updateRotatedCorners();\n otherShape.updateRotatedCorners();\n if (checkOutside(rotatedCorners, otherShape.rotatedCorners))\n {\n return false;\n }\n if (checkOutside(otherShape.rotatedCorners, rotatedCorners))\n {\n return false;\n }\n return true;\n }\n }",
"boolean insideSprite(Sprite s){\n if (s._hitbox.length == 1) {\n if (_hitbox.length == 1) {\n return PVector.dist(s._getCenter(),this._getCenter()) <\n s._hitbox[0].x - this._hitbox[0].x;\n }\n return _insideCirc(_getPoints(), s._getCenter(), s._hitbox[0].x);\n }\n if (s._hitbox.length == 1) {\n // TODO: check if center is in middle but NOT touching any side\n // (will want to adapt existing _circPoly to separate side-touching\n // code into individual method)\n return false;\n }\n return _insidePts(this._getPoints(), s._getPoints());\n }",
"public synchronized boolean isInPosition(){\r\n\t\tSystem.out.println(\"wheel: \" + flywheel.isFlywheelAtSpeed() + \r\n\t\t\t\t\" hood: \" + hood.isInPosition() + \r\n\t\t\t\t\" turret: \" + turret.isInPosition() + \r\n\t\t\t\t\" kicker: \" + kicker.isInPosition());\r\n\t\treturn flywheel.isFlywheelAtSpeed() && \r\n\t\t\t\thood.isInPosition() && \r\n\t\t\t\tturret.isInPosition() && \r\n\t\t\t\tkicker.isInPosition();\r\n\t}",
"private boolean riftCoversCameraBounds(float cameraX, float cameraY, float maskWidth, float maskHeight,\r\n\t\t\t\t\t\t\t\t\t\t CharacterModel character) {\r\n\t\tupdateMaskPosition(maskWidth, maskHeight, character);\r\n\t\tboolean coversLeft = maskOrigin.x + maskOffset < cameraX;\r\n\t\tboolean coversRight = maskOrigin.x + maskWidth - maskOffset > cameraX + canvas.getWidth();\r\n\t\tboolean coversBottom = maskOrigin.y + maskOffset < cameraY;\r\n\t\tboolean coversTop = maskOrigin.y + maskHeight - maskOffset > cameraY + canvas.getHeight();\r\n\t\treturn coversLeft && coversRight && coversBottom && coversTop;\r\n\t}",
"public boolean intersects(VectorXZ segmentP1, VectorXZ segmentP2) {\n // TODO: (performance): passing \"vector TO second point\", rather than\n // point2, would avoid having to calc it here - and that information\n // could be reused for all comparisons involving the segment\n return getIntersection(segmentP1, segmentP2) != null;\n }"
] | [
"0.6494527",
"0.60418063",
"0.59792626",
"0.58116925",
"0.5438293",
"0.5433975",
"0.54135025",
"0.53998584",
"0.53955454",
"0.5365161",
"0.53623396",
"0.535821",
"0.5357788",
"0.5351217",
"0.5324452",
"0.5320989",
"0.5311397",
"0.5304124",
"0.5282489",
"0.5278474",
"0.5269556",
"0.52591276",
"0.52307653",
"0.52058417",
"0.5196359",
"0.51510376",
"0.51476973",
"0.5122653",
"0.51151276",
"0.50748575",
"0.5026729",
"0.4955475",
"0.49491727",
"0.49247196",
"0.49144778",
"0.4899918",
"0.4860195",
"0.4852298",
"0.48516133",
"0.48379293",
"0.4818949",
"0.4810887",
"0.48034063",
"0.4799493",
"0.4790803",
"0.47899002",
"0.47740227",
"0.4770809",
"0.47586966",
"0.47331014",
"0.47316438",
"0.47295645",
"0.47093287",
"0.47057694",
"0.47049242",
"0.47037172",
"0.47018263",
"0.46886933",
"0.4688428",
"0.46781203",
"0.4675436",
"0.46738717",
"0.46665987",
"0.46651432",
"0.46630335",
"0.46462995",
"0.4638669",
"0.46358865",
"0.4632147",
"0.46298406",
"0.46267763",
"0.46203792",
"0.4614727",
"0.4610798",
"0.4607826",
"0.46043384",
"0.4602414",
"0.45919",
"0.4574341",
"0.45731863",
"0.45691115",
"0.45677516",
"0.45655826",
"0.4557157",
"0.4548277",
"0.45364702",
"0.4535721",
"0.45351788",
"0.4532479",
"0.45203704",
"0.4519654",
"0.45102006",
"0.45060542",
"0.4492254",
"0.44904372",
"0.44897154",
"0.44833273",
"0.4480644",
"0.44800678",
"0.44792002"
] | 0.7983897 | 0 |
TODO Autogenerated method stub | private void reply(HttpServletRequest request, HttpServletResponse response) throws IOException {
int id = Integer.parseInt(request.getParameter("id"));
complainVo complainVo = new complainVo();
complainVo.setComplainId(id);
complainDao complainDao = new complainDao();
List ls = complainDao.edit(complainVo);
HttpSession session = request.getSession();
session.setAttribute("replyList", ls);
response.sendRedirect("Admin/replyComplain.jsp");
} | {
"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 |
Handle request to download an Excel document | @RequestMapping(value = "/download", method = RequestMethod.GET)
public PdfView download(final Model model) {
final PdfView view = new PdfView();
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected ModelAndView handleRequestInternal(HttpServletRequest request,\n HttpServletResponse response) {\n String query = Utility.decodeAndDecompress(request.getParameter(\"query\"));\n String uri = request.getRequestURI();\n try {\n uri = URLDecoder.decode(uri, \"UTF-8\");\n } catch (UnsupportedEncodingException ex) {\n LOGGER.error(ex);\n return null;\n }\n int posLastSlash = uri.lastIndexOf(\"/\");\n String fileName = null;\n if (posLastSlash != -1) {\n fileName = uri.substring(posLastSlash+1);\n } else {\n fileName = uri;\n }\n response.setContentType(\"application/ms-excel\");\n return null;\n }",
"public void downloadSingleExcel(QueryParameter query) {\n try {\n // Get excel\n HttpPost httppost = new HttpPost(HttpURL.getBillURL());\n List<NameValuePair> exportExcelFields = new ArrayList<NameValuePair>();\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(timeYear)\", query.getYearString()));\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(timeMonth)\", LAST_MONTH));\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(yearId)\", query.getYearString()));\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(chars)\", \"\"));\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(hiddenDate)\", query.getYearString() + LAST_MONTH));\n exportExcelFields.add(new BasicNameValuePair(\"reservedProp(type)\", \"power\"));\n exportExcelFields.add(new BasicNameValuePair(\"errorInfo\", \"power\"));\n exportExcelFields.add(new BasicNameValuePair(\"maxrow\", \"12\"));\n exportExcelFields.add(new BasicNameValuePair(\"action\", \"expExcel\"));\n httppost.setEntity(new UrlEncodedFormEntity(exportExcelFields, \"UTF-8\"));\n HttpEntity entity = this.client.execute(httppost).getEntity();\n this.saveExcelFile(entity, getTempExcelName(this.account, query));\n EntityUtils.consume(entity);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n @RequestMapping(\"download.feep\")\n public void download(HttpServletRequest request, HttpServletResponse response) throws FeepControllerException {\n\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n\n String action = request.getParameter(\"action\");\n if (action.equalsIgnoreCase(\"farmer\")) {\n response.setContentType(\"application/vnd.ms-excel\");\n response.setHeader(\"Content-Disposition\", \"attachment;filename=Farmer.xls\");\n\n String nm = request.getParameter(\"nm\");\n String community = request.getParameter(\"cm\");\n String mainCrop = request.getParameter(\"mc\");\n String age = request.getParameter(\"ag\");\n\n System.out.println(\"Nm \" + nm);\n System.out.println(\"Cm \" + community);\n System.out.println(\"Mc \" + mainCrop);\n System.out.println(\"ag \" + age);\n BiodataModel biodataModel = new BiodataModel();\n List<BiodataWrapper> bios = biodataModel.getBioData(\"\", \"\");\n\n WritableWorkbook writableWorkbook = Workbook.createWorkbook(response.getOutputStream());\n\n WritableSheet writableSheet = writableWorkbook.createSheet(\"Sheet1\", 0);\n writableSheet.getSettings().setDefaultColumnWidth(25);\n// writableSheet.getSettings().setDefaultRowHeight(100 * 20);\n WritableFont cellFont = new WritableFont(WritableFont.TIMES, 12);\n WritableCellFormat cellFormat = new WritableCellFormat(cellFont);\n /**\n *\n */\n try {\n writableSheet.setRowView(0, 20 * 20);\n writableSheet.addCell(new Label(0, 0, \"ID\"));\n writableSheet.addCell(new Label(1, 0, \"Surname\"));\n writableSheet.addCell(new Label(2, 0, \"Othernames\"));\n writableSheet.addCell(new Label(3, 0, \"Community\"));\n writableSheet.addCell(new Label(4, 0, \"Village\"));\n writableSheet.addCell(new Label(5, 0, \"Region\"));\n writableSheet.addCell(new Label(6, 0, \"District\"));\n writableSheet.addCell(new Label(7, 0, \"Education\"));\n writableSheet.addCell(new Label(8, 0, \"Gender\"));\n writableSheet.addCell(new Label(9, 0, \"Marital Status\"));\n writableSheet.addCell(new Label(10, 0, \"Nickname\"));\n writableSheet.addCell(new Label(11, 0, \"# Children\"));\n writableSheet.addCell(new Label(12, 0, \"# Dependants\"));\n writableSheet.addCell(new Label(13, 0, \"Cluster\"));\n\n// writableSheet.addCell(new Label(5, 0, \"QR CODE\"));\n int i = 1;\n for (BiodataWrapper bio : bios) {\n\n writableSheet.addCell(new Label(0, i, bio.getFarmID()));\n writableSheet.addCell(new Label(1, i, bio.getLastName()));\n writableSheet.addCell(new Label(2, i, bio.getFirstName()));\n writableSheet.addCell(new Label(3, i, bio.getCommunity()));\n writableSheet.addCell(new Label(4, i, bio.getVillage()));\n writableSheet.addCell(new Label(5, i, bio.getRegion()));\n\n writableSheet.addCell(new Label(6, i, bio.getDistrict()));\n writableSheet.addCell(new Label(7, i, bio.getEducation()));\n writableSheet.addCell(new Label(8, i, bio.getGender()));\n writableSheet.addCell(new Label(9, i, bio.getMaritalStatus()));\n writableSheet.addCell(new Label(10, i, bio.getNickname()));\n writableSheet.addCell(new Label(11, i, bio.getNumberOfChildren()));\n writableSheet.addCell(new Label(12, i, bio.getNumberOfDependants()));\n writableSheet.addCell(new Label(13, i, bio.getCluster()));\n i++;\n }\n\n writableWorkbook.write();\n writableWorkbook.close();\n } catch (Exception e) {\n }\n } else if (action.equalsIgnoreCase(\"logs\")) {\n response.setContentType(\"application/vnd.ms-excel\");\n\n\n MobileTrackerModel biodataModel = new MobileTrackerModel();\n String format = \"dd-MM-yyyy HH:mm\";\n\n SimpleDateFormat simpleDate = new SimpleDateFormat(format);\n\n String s = request.getParameter(\"s\");\n String e = request.getParameter(\"d\");\n SimpleDateFormat todateDate = new SimpleDateFormat(\n \"yyyy-MM-dd\");\n SimpleDateFormat todateDates = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\");\n if (s == null || s.isEmpty()) {\n s = todateDate.format(new Date());\n }\n if (e == null || e.isEmpty()) {\n e = todateDate.format(new Date());\n }\n\n System.out.println(\"Start s : \" + s);\n System.out.println(\"Start s : \" + e);\n Date startDate = new Date();\n Date endDate = new Date();\n \n response.setHeader(\"Content-Disposition\", \"attachment;filename=ICTCLogs_\"+s+\"_\"+e+\".xls\");\n\n try {\n\n endDate = todateDates.parse(e + \" 23:59:59\");\n startDate = todateDates.parse(s + \" 00:00:00\");\n\n } catch (Exception k) {\n }\n List<MobileTrackerWrapper> logs = biodataModel.findAll(startDate, endDate);\n\n\n \n WritableWorkbook writableWorkbook = Workbook.createWorkbook(response.getOutputStream());\n\n WritableSheet writableSheet = writableWorkbook.createSheet(\"ICTCLogs_\"+s+\"_\"+e, 0);\n writableSheet.getSettings().setDefaultColumnWidth(25);\n\n// writableSheet.getSettings().setDefaultRowHeight(100 * 20);\n WritableFont cellFont = new WritableFont(WritableFont.TIMES, 12);\n WritableCellFormat cellFormat = new WritableCellFormat(cellFont);\n /**\n *\n */\n try {\n writableSheet.setRowView(0, 20 * 20);\n writableSheet.addCell(new Label(0, 0, \"ID\"));\n writableSheet.addCell(new Label(1, 0, \"Username\"));\n writableSheet.addCell(new Label(2, 0, \"Module\"));\n writableSheet.addCell(new Label(3, 0, \"Page\"));\n writableSheet.addCell(new Label(4, 0, \"Section\"));\n writableSheet.addCell(new Label(5, 0, \"Start time\"));\n writableSheet.addCell(new Label(6, 0, \"End Time\"));\n writableSheet.addCell(new Label(7, 0, \"Version\"));\n writableSheet.addCell(new Label(8, 0, \"Battery\"));\n writableSheet.addCell(new Label(9, 0, \"IMEI\"));\n writableSheet.addCell(new Label(10, 0, \"Data\"));\n\n \n int i = 1;\n for (MobileTrackerWrapper log : logs) {\n\n writableSheet.addCell(new Label(0, i, log.getId()));\n writableSheet.addCell(new Label(1, i, log.getUserId()));\n writableSheet.addCell(new Label(2, i, log.getModule()));\n writableSheet.addCell(new Label(3, i, log.getPage()));\n writableSheet.addCell(new Label(4, i, log.getSection()));\n writableSheet.addCell(new Label(5, i, simpleDate.format(new Date(log.getStartTime()))));\n writableSheet.addCell(new Label(6, i, simpleDate.format(new Date(log.getEndTime()))));\n writableSheet.addCell(new Label(7, i, String.valueOf(log.getVersion()))); \n writableSheet.addCell(new Label(8, i, String.valueOf(log.getTimeSpent()/1000)));\n\n writableSheet.addCell(new Label(9, i, String.valueOf(log.getBattery())));\n writableSheet.addCell(new Label(10, i, String.valueOf(log.getImei())));\n writableSheet.addCell(new Label(11, i, String.valueOf(log.getData())));\n \n i++;\n }\n\n writableWorkbook.write();\n writableWorkbook.close();\n }catch(Exception r){\n }\n }\n\n }\n }",
"@RequestMapping(\"/findingRate/downloadExcel/format\")\r\n\t@ResponseBody\r\n\tpublic String excelFormatDownload(\r\n\t\t\t@RequestParam(value = \"headingVal\") String headingVal,Principal principal){\r\n\t\t\r\n\t\tString retVal = \"-1\";\r\n\t\tString fileName = principal.getName()+new java.util.Date().getTime()+\".xls\";\r\n\t\tString filePath = uploadDirecotryPath + File.separator +\"excelfilecontent\" + File.separator;\r\n\t\tString tempHeadVal[] = headingVal.split(\",\");\r\n\t\t\r\n\t\t try {\r\n\t String filename = filePath+fileName;\r\n\t HSSFWorkbook workbook = new HSSFWorkbook();\r\n\t HSSFSheet sheet = workbook.createSheet(\"FirstSheet\"); \r\n\r\n\t HSSFRow rowhead = sheet.createRow((short)0);\r\n\t for(int i=0;i<tempHeadVal.length;i++){\r\n\t \t rowhead.createCell(i).setCellValue(tempHeadVal[i].toString());\r\n\t }\r\n\t \r\n\t FileOutputStream fileOut = new FileOutputStream(filename);\r\n\t workbook.write(fileOut);\r\n\t fileOut.close();\r\n\t workbook.close();\r\n\t retVal = fileName;\r\n\t } catch ( Exception ex ) {\r\n\t System.out.println(ex);\r\n\t retVal = \"-2\";\r\n\t }\r\n\t\t\r\n\t\treturn retVal;\r\n\t}",
"public void toExcelFromRequest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n \n String tituloReporte = request.getParameter(\"tituloReporte\");\n String tipoReporte = request.getParameter(\"tipoReporte\");\n String nombreReporte = request.getParameter(\"nombreReporte\");\n String nombreRuta = request.getParameter(\"nombreRuta\");\n String idRuta = request.getParameter(\"idRuta\");\n String fechaInicio = request.getParameter(\"fechaInicio\");\n String fechaFinal = request.getParameter(\"fechaFinal\");\n String meta = request.getParameter(\"meta\");\n String metaReal = request.getParameter(\"metaReal\");\n String listaVehPlaca = request.getParameter(\"listaVehiculosPlaca\");\n \n ParametrosReporte pr = new ParametrosReporte();\n \n if (pr != null) {\n pr.setTituloReporte(tituloReporte);\n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n pr.setNombreRuta(nombreRuta);\n pr.setIdRuta(Restriction.getNumber(idRuta));\n pr.setFechaInicioStr(fechaInicio);\n pr.setFechaFinalStr(fechaFinal);\n pr.setMeta(Restriction.getNumber(meta));\n pr.setMeta_real(Restriction.getRealNumber(metaReal));\n pr.setListaVehiculosPlaca(listaVehPlaca);\n \n PrintOutExcel poe = new PrintOutExcel();\n poe.print(request, response, pr);\n }\n \n /*\n HttpSession session = request.getSession();\n ParametrosReporte pr = (ParametrosReporte) session.getAttribute(\"parametrosReporte\");\n \n if (pr != null) {\n \n // Reporte editable XLS \n ReporteUtilExcel rue = new ReporteUtilExcel(); \n pr.setTipoReporte(Restriction.getNumber(tipoReporte));\n pr.setNombreReporte(nombreReporte);\n \n MakeExcel rpte = rue.crearReporte(pr.getTipoReporte(), false, pr); \n String nombreArchivo = pr.getNombreReporte() + \".xls\"; \n\n //response.setContentType(\"application/vnd.ms-excel\");\n response.setContentType(\"application/ms-excel\"); \n response.setHeader(\"Content-Disposition\", \"attachment; filename=\"+nombreArchivo);\n\n HSSFWorkbook file = rpte.getExcelFile();\n file.write(response.getOutputStream()); \n response.flushBuffer();\n response.getOutputStream().close(); \n }\n */\n }",
"@RequestMapping (value=\"/DownloadFileNote/{filename}\", method=RequestMethod.GET )\r\n public void doDownload(HttpServletRequest request,\r\n HttpServletResponse response, @PathVariable(value = \"filename\") String fileName ) throws IOException {\n ServletContext context = request.getServletContext();\r\n String appPath = context.getRealPath(\"\");\r\n System.out.println(\"filepath = \" + dirNotes);\r\n\r\n // construct the complete absolute path of the file\r\n\r\n File downloadFile = new File(dirNotes+fileName);\r\n FileInputStream inputStream = new FileInputStream(downloadFile);\r\n\r\n // get MIME type of the file\r\n String mimeType = context.getMimeType(dirNotes+fileName);\r\n if (mimeType == null) {\r\n // set to binary type if MIME mapping not found\r\n mimeType = \"application/octet-stream\";\r\n }\r\n System.out.println(\"MIME type: \" + mimeType);\r\n\r\n // set content attributes for the response\r\n response.setContentType(mimeType);\r\n response.setContentLength((int) downloadFile.length());\r\n\r\n // set headers for the response\r\n String headerKey = \"Content-Disposition\";\r\n String headerValue = String.format(\"attachment; filename=\\\"%s\\\"\",\r\n downloadFile.getName());\r\n response.setHeader(headerKey, headerValue);\r\n\r\n // get output stream of the response\r\n OutputStream outStream = response.getOutputStream();\r\n\r\n byte[] buffer = new byte[BUFFER_SIZE];\r\n int bytesRead = -1;\r\n\r\n // write bytes read from the input stream into the output stream\r\n while ((bytesRead = inputStream.read(buffer)) != -1) {\r\n outStream.write(buffer, 0, bytesRead);\r\n }\r\n\r\n inputStream.close();\r\n outStream.close();\r\n }",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n String filePath = \"/home/harun/Downloads/Q3.pdf\";\n File downloadFile = new File(filePath);\n FileInputStream inputStream = new FileInputStream(downloadFile);\n\n // Get the mimeType of the file\n ServletContext context = getServletContext();\n String mimeType = context.getMimeType(filePath);\n\n // Fetch file in binary there's no MimeType mapping\n if(mimeType==null) mimeType = \"application/octet-stream\";\n // Log the mimeType in the console\n System.out.println(mimeType);\n\n\n //Set the response mimeType/contentType and file length\n response.setContentType(\"Mime Tyoe: \" + mimeType);\n int fileLength = (int) downloadFile.length();\n response.setContentLength(fileLength);\n\n // Set the response header value// Force download\n String headerKey = \"Content-Disposition\";\n String headerValue = String.format(\"attachment; filename=\\\"%s\\\"\", downloadFile.getName());\n response.setHeader(headerKey,headerValue);\n\n // read the input stream in buffered chunks to the output stream\n OutputStream outputStream = response.getOutputStream();\n byte[] buffer = new byte[4096]; // Buffers of 4MB's\n int c = -1;\n\n while((c = inputStream.read(buffer)) != -1){\n outputStream.write(buffer, 0, c);\n }\n\n // Close the input and output streams\n inputStream.close();\n outputStream.close();\n\n }",
"@RequestMapping(value = \"/DownloadFile\" )\r\n\tpublic void doDownload(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws IOException {\r\n\t\tint BUFFER_SIZE = 4096;\r\n\r\n\t\t/**\r\n\t\t * Path of the file to be downloaded, relative to application's directory\r\n\t\t */\r\n\t\tHttpSession session = request.getSession();\r\n\t\t//session.setAttribute(\"filePath\", filepath1);\r\n\t\t//String filePath =\"C:/Users/826862/Desktop/download.jsp\";\r\n\t\tString filePath =(String) session.getAttribute(\"docLink\");\r\n\r\n\t\tSystem.out.println(\"payth\" + filePath);\r\n\r\n\t\t/**\r\n\t\t * Method for handling file download request from client\r\n\t\t */\r\n\t\t// get absolute path of the application\r\n\t\tServletContext context = request.getServletContext();\r\n\t\tString appPath = context.getServerInfo();\r\n\r\n\t\tSystem.out.println(\"appPath = \" + appPath);\r\n\r\n\t\t// construct the complete absolute path of the file\r\n\t\tString fullPath = filePath;\t\t\r\n\t\tFile downloadFile = new File(fullPath);\r\n\t\tFileInputStream inputStream = new FileInputStream(downloadFile);\r\n\r\n\t\t// get MIME type of the file\r\n\t\tString mimeType = context.getMimeType(fullPath);\r\n\t\tif (mimeType == null) {\r\n\t\t\t// set to binary type if MIME mapping not found\r\n\t\t\tmimeType = \"application/octet-stream\";\r\n\t\t}\r\n\t\tSystem.out.println(\"MIME type: \" + mimeType);\r\n\r\n\t\t// set content attributes for the response\r\n\t\tresponse.setContentType(mimeType);\r\n\t\tresponse.setContentLength((int) downloadFile.length());\r\n\r\n\t\t// set headers for the response\r\n\t\tString headerKey = \"Content-Disposition\";\r\n\t\tString headerValue = String.format(\"attachment; filename=\\\"%s\\\"\",\r\n\t\t\t\tdownloadFile.getName());\r\n\t\tresponse.setHeader(headerKey, headerValue);\r\n\r\n\t\t// get output stream of the response\r\n\t\tOutputStream outStream = response.getOutputStream();\r\n\r\n\t\tbyte[] buffer = new byte[BUFFER_SIZE];\r\n\t\tint bytesRead = -1;\r\n\r\n\t\t// write bytes read from the input stream into the output stream\r\n\t\twhile ((bytesRead = inputStream.read(buffer)) != -1) {\r\n\t\t\toutStream.write(buffer, 0, bytesRead);\r\n\t\t}\r\n\r\n\t\tinputStream.close();\r\n\t\toutStream.close();\r\n\r\n\t}",
"@RequestMapping(value = \"/download\", method = RequestMethod.GET)\n public String download(HttpServletRequest request, HttpServletResponse response, Model model)\n throws IOException, TemplateException {\n FreemarkerCfg reportCfg = FreemarkerCfg.newInstance();\n WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();\n ServletContext servletContext = webApplicationContext.getServletContext();\n reportCfg.setServletContextForTemplateLoading(servletContext, \"/views/ftl\");\n // reportCfg.setDirectoryForTemplateLoading(templateDir);\n // Template t = reportCfg.getTemplate(\"scaleList.flt\");\n Template t = reportCfg.getTemplate(\"report.flt\");\n response.setCharacterEncoding(\"utf-8\");\n response.setContentType(\"application/msword\");\n // 设置浏览器以下载的方式处理该文件默认名为resume.doc\n response.addHeader(\"Content-Disposition\", \"attachment;filename=resume.doc\");\n // Writer out = response.getWriter();\n ServletOutputStream out = response.getOutputStream();\n Map root = new HashMap();\n\n String name = \"temp\" + (int) (Math.random() * 100000) + \".doc\";\n File f = new File(name);\n Writer w = new OutputStreamWriter(new FileOutputStream(f), \"utf-8\");\n\n // root.put(\"scaleList\", scaleList);\n root.put(\"name\", \"\");\n t.process(root, w);\n w.close();\n FileInputStream fin = new FileInputStream(f);\n IOUtils.copy(fin, out);\n IOUtils.closeQuietly(out);\n IOUtils.closeQuietly(fin);\n return null;\n // return viewName(\"scaletablelist\");\n }",
"public void download(BillDownloadEventNotification eventNotification) throws Exception {\n\t\tStopWatch timer = new StopWatch();\n\t\ttimer.start();\n\t\t\n\t\tOLBBillDownloadRequest request = null;\n\t\tboolean successful = false;\n\t\t//update status to processing\n\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\tif (null == request) {\n\t\t\tthrow new Exception(\"BillDownloadRequest cannot be found: \" + eventNotification.getRecordId());\n\t\t}\n\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_PROCESSING);\n\t\tdao.update(request);\n\t\t\n\t\tDataHandler billContent = null;\n\t\tString extension = \".pdf\";\n\t\tsuccessful = true;\n\t\tString billSysId = getBillSysId(request.getDdn());\n\t\t\n\t\tString billNumber = \"\";\n\t\tif(billSysId.equals(BILL_SYS_ID_FLEXCAB)){\n\t\t\tbillNumber = request.getBillNumber();\n\t\t} else if(billSysId.equals(BILL_SYS_ID_MICA)){\n\t\t\tbillNumber = getMICABillNumber(request.getBillNumber());\t\t\t\n\t\t}\n\t\t\n\t\tDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString issueDate = df.format(request.getBillIssueDate());\n\t\tif (log.isDebugEnabled()) log.debug(\"Calling webservice client\");\n\t\ttry {\n\t\t\tString requestType = REQUEST_TYPE_BULK;\n\t\t\tif(eventNotification.getParentRecordId() == ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\t\trequestType = REQUEST_TYPE_ONEOFF;\n\t\t\t}\n\t\t\tbillContent = getDoc(requestType,billSysId,request.getAccountNumber(), billNumber, issueDate,PAGE_LIMIT, PAGE_RANGE, id, pw);\n\t\t} catch(TelJIesRpcServiceFault e){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Service Fault received: \",e);\t\t\t\n\t\t\tif(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_001)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_NOT_FOUND);\n\t\t\t} else if(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_008)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_TOO_LARGE);\n\t\t\t} else { \n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\t}\n\t\t\tsuccessful = false;\n\t\t} catch(RemoteException re){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Remote exception occured: \",re);\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\tsuccessful = false;\n\t\t}\n\t\ttry {\n\t\t\teventNotification.setSuccessful(false);\n\t\t\tif (successful) {\n\t\t\t\t//save file to file system\n\t\t\t\tMessageFormat pathFormat = new MessageFormat(this.billsPath);\n\t\t\t\tString[] pathArgs = {eventNotification.getUserId(),eventNotification.getBulkReqestName()};\n\t\t\t\tStringBuffer path = new StringBuffer(pathFormat.format(pathArgs));\n\t\t\n\t\t\t\tpath.append(request.getAccountNumber()).append(\"_\")\n\t\t\t\t\t\t.append(request.getBillNumber()).append(\"_\")\n\t\t\t\t\t\t.append(df.format(request.getBillIssueDate())).append(extension);\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Writing PDF to the location: \"+path.toString());\n\t\t\t\tFile file = new File(path.toString());\n\t\t\t\tif(!file.exists()){ file.createNewFile();}\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\tbillContent.writeTo(fos);\n\t\t\t\tfos.close();\n\t\t\t\t\n\t\t\t\t//update status to complete\n\t\t\t\trequest.setBillFilePath(path.toString());\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_COMPLETE);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t\n\t\t\t\teventNotification.setSuccessful(true);\n\t\t\t} else {\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Saving failed bill status to database\");\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception caught while saving bill download request to file system: \", e);\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Cleaning up bill download request\");\n\t\t\t//get fresh copy of request\n\t\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\tdao.update(request);\n\t\t\tdao.flushToDatabase();\n\t\t}\n\t\t\n\t\ttimer.stop();\n\t\tOLBBillDownloadTime time = new OLBBillDownloadTime();\n\t\ttime.setCreated(new Date());\n\t\ttime.setGeneratorTypeId(getGeneratorType(request.getDownloadFormat()));\n\t\ttime.setElapsedSeconds((float)timer.getElapsedTime()/(float)1000);\n\t\ttime.setReference(request.getId()+\"\");\n\t\tif(log.isDebugEnabled()) { log.debug(\"Recording response time: \" + time.getElapsedSeconds()); }\n\t\tgetDao().recordTime(time);\n\t\t\n\t\tif(eventNotification.getParentRecordId() != ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\tjmsSender.sendMesage(eventNotification);\n\t\t}\n\t}",
"protected abstract void buildExcelDocument(Map<String, Object> model,\n Workbook workbook, HttpServletRequest request,\n HttpServletResponse response) throws Exception;",
"@Override\n\tprotected void buildExcelDocument(Map<String, Object> model,\n\t\t\tHSSFWorkbook workbook, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tDate date = new Date();\n\t\tString filename = Tools.date2Str(date, \"yyyyMMddHHmmss\");\n\t\tHSSFSheet sheet;\n\t\tHSSFCell cell;\n\t\tresponse.setContentType(\"application/octet-stream\");\n\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\"+filename+\".xls\");\n\t\tsheet = workbook.createSheet(\"sheet1\");\n\t\t\n\t\t//第一行表头\n\t\tPageData pdHead = (PageData) model.get(\"pdHead\");\n\t\t//第二行标题\n\t\tList<String> titles = (List<String>) model.get(\"titles\");\n\t\tint row = 0;\n\t\t\n\t\tif(StringUtil.isNotEmpty(pdHead)) {\n\t\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\t\theaderFont.setFontHeightInPoints((short)11);\n\t\t\theaderStyle.setFont(headerFont);\n\t\t\t\n\t\t\tCellRangeAddress region = new CellRangeAddress(row, row, (short) 0, (short) titles.size()); \n\t\t\t\n\t\t\tString title = pdHead.getString(\"name\");\n\t\t\tcell = getCell(sheet, row, 0);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t\tshort height=25*18*2;\n\t\t\tsheet.getRow(row).setHeight(height);\n\t\t\tsheet.addMergedRegion(region);\n\t\t\t\n\t\t\trow = 1;\n\t\t}\n\t\t\n\t\t\n\t\tint len = titles.size();\n\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\theaderFont.setFontHeightInPoints((short)11);\n\t\theaderStyle.setFont(headerFont);\n\t\tshort width = 20,height=25*20;\n\t\tsheet.setDefaultColumnWidth(width);\n\t\tfor(int i=0; i<len; i++){ //设置标题\n\t\t\tString title = titles.get(i);\n\t\t\tcell = getCell(sheet, row, i);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t}\n\t\t\n\t\tsheet.getRow(row).setHeight(height);\n\t\t\n\t\tHSSFCellStyle contentStyle = workbook.createCellStyle(); //内容样式\n\t\tcontentStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tList<PageData> varList = (List<PageData>) model.get(\"varList\");\n\t\tint varCount = varList.size();\n\t\tfor(int i=0; i<varCount; i++){\n\t\t\trow++;\n\t\t\tPageData vpd = varList.get(i);\n\t\t\tfor(int j=0;j<len;j++){\n\t\t\t\tString varstr = vpd.get(\"var\"+(j+1)).toString() != null ? vpd.get(\"var\"+(j+1)).toString() : \"\";\n\n\n\t\t\t\tcell = getCell(sheet, row, j);\n\t\t\t\tcell.setCellStyle(contentStyle);\n\t\t\t\tsetText(cell,varstr);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"@Test\n public void testFileDownload() throws FileNotFoundException {\n ExcelFile testFile = new ExcelFile(\"0\", \"/Users/zhongyuanlu/IdeaProjects/reporting_system/temp.xlsx\");\n Mockito.when(excelService.getExcelBodyById(anyString())).thenReturn(new FileInputStream(\"temp.xlsx\"));\n Mockito.when(excelService.getExcelFileById(anyString())).thenReturn(testFile);\n given().accept(\"application/json\").get(\"/excel/0/content\").peek().\n then().assertThat()\n .statusCode(200);\n }",
"@RequestMapping(\"api/admin/fileDownload.do\")\n\tpublic void fileDownload(HttpServletRequest request,HttpServletResponse response,@RequestParam(value=\"fileName\")String fileName) throws IOException{\n\t\tServletContext context = request.getServletContext();\n \n // construct the complete absolute path of the file\n String fullPath = boardPath+fileName; \n File downloadFile = new File(fullPath);\n FileInputStream inputStream = new FileInputStream(downloadFile);\n \n // get MIME type of the file\n String mimeType = context.getMimeType(fullPath);\n if (mimeType == null) {\n // set to binary type if MIME mapping not found\n mimeType = \"application/octet-stream\";\n }\n System.out.println(\"MIME type: \" + mimeType);\n \n // set content attributes for the response\n response.setContentType(mimeType);\n response.setContentLength((int) downloadFile.length());\n \n // set headers for the response\n String headerKey = \"Content-Disposition\";\n String headerValue = String.format(\"attachment; filename=\\\"%s\\\"\",\n URLEncoder.encode(downloadFile.getName(),\"UTF-8\"));\n System.out.println(downloadFile.getName());\n \n response.setHeader(headerKey, headerValue);\n \n // get output stream of the response\n OutputStream outStream = response.getOutputStream();\n \n byte[] buffer = new byte[BUFFER_SIZE];\n int bytesRead = -1;\n \n // write bytes read from the input stream into the output stream\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outStream.write(buffer, 0, bytesRead);\n }\n \n inputStream.close();\n outStream.close();\n \n \n \n\t}",
"@Action(semantics = SemanticsOf.SAFE)\n public Blob download() {\n final String fileName = \"TurnoverRentBulkUpdate-\" + getProperty().getReference() + \"@\" + getYear() + \".xlsx\";\n final List<LeaseTermForTurnOverRentFixedImport> lineItems = getTurnoverRentLines();\n return excelService.toExcel(lineItems, LeaseTermForTurnOverRentFixedImport.class,\n LEASE_TERM_FOR_TURNOVER_RENT_SHEET_NAME, fileName);\n }",
"@RequestMapping(value = \"customer/download\" + SPRING_EXT, method = RequestMethod.POST)\r\n\tpublic void customer_download(\r\n\t\t\tHttpServletRequest req,\r\n\t\t\tHttpServletResponse response\r\n\t\t\t) \r\n\t{\r\n\t\t\r\n\t\tlog.debug(\"| customer_download | Entry\");\r\n\t\t\r\n\t\t/*Configuration*/\r\n\t\tString current_datetime = SDF_YYYY_MM_DD.format(new Date());\r\n\t\tString filename = \"STUDENTLIST_\"+current_datetime+\".csv\";\r\n\t\tString[] header = customerService.setUpCSVHeader();\r\n\t\tfinal CellProcessor[] whiterProcessors = customerService.setUpWriterProcessors(header);\r\n\t\t/*Configuration*/\r\n\t\t\r\n\t\t/*Data*/\r\n\t\tCustomerFilterObj filter = new CustomerFilterObj(req.getParameter(\"identificationNum\"), \r\n\t\t\t\treq.getParameter(\"name\"), req.getParameter(\"contactNum\"), req.getParameter(\"email\"),\r\n\t\t\t\treq.getParameter(\"invoiceNum\"), req.getParameter(\"event\"));\r\n\t\tList<CustomerDTO> customerList = customerService.getDownloadListByFilter(filter);\r\n\t\tList<Map<String, Object>> customerMap = customerService.convertCustomerListToMapList(header, customerList);\r\n\t\t/*Data*/\r\n\t\t\r\n\t\tCSVFileHandler handler = new CSVFileHandler();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\thandler.downloadCustomerCSV(customerMap, header, whiterProcessors, response, filename);\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\tlog.debug(\"| customer_download | Exit\");\r\n \r\n\t}",
"private static void download(String arquivo, HttpServletRequest request, HttpServletResponse response) throws IOException {\n File f = new File(arquivo);\n response.setContentLength((int) f.length());\n response.setContentType(\"application/octet-stream\");\n response.setHeader(\"Content-Transfer-Encoding\", \"binary\");\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"\" + f.getName() + \"\\\"\");\n\n byte[] buf = new byte[4096];\n BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));\n BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());\n int i = 0;\n while ((i = in.read(buf)) > 0) {\n out.write(buf, 0, i);\n }\n out.close();\n in.close();\n }",
"@Override\n\tpublic Result<String> excelExport(EasyUIAccept accept, HttpServletRequest req, HttpServletResponse resp) {\n\t\treturn null;\n\t}",
"@RequestMapping(\"Downloads\")\n\n\tpublic ModelAndView downLoadExcel(HttpServletRequest request, HttpSession session) {\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\n\t\t\treturn new ModelAndView(\"Downloads\");\n\t\t}\n\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}",
"@RequestMapping(value = \"download.do\")\r\n\tpublic ModelAndView download(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tString storeName = request.getParameter(\"name\");\r\n\t\tString contentType = \"application/octet-stream\";\r\n\t\t// 获取项目根目录\r\n\t\tString ctxPath = request.getSession().getServletContext().getRealPath(\"\");\r\n\t\t// 获取下载文件露肩\r\n\t\tString downLoadPath = ctxPath + \"/data/\" + storeName;\r\n\t\tFileUploadController.download(request, response, storeName, downLoadPath, contentType);\r\n\t\treturn null;\r\n\t}",
"@RequestMapping(\n\t\t\tvalue = \"/ristore/foundation/xml/{filename}\",\n\t\t\tmethod = RequestMethod.GET,\n\t\t\tproduces = \"application/xml\")\n\tpublic ResponseEntity<byte[]> downloadXMLFile(@PathVariable String filename) throws IOException {\n\t\tFileInputStream fileStream;\n fileStream = new FileInputStream(new File(\"/rsrch1/rists/moonshot/data/prod/foundation/xml/\" + filename + \".xml\"));\n byte[] content = IOUtils.toByteArray(fileStream);\n HttpHeaders headers = new HttpHeaders();\n headers.setContentType(MediaType.parseMediaType(\"application/pdf\"));\n headers.setContentDispositionFormData(filename + \".xml\", filename + \".xml\");\n return new ResponseEntity<byte[]>(content, headers, HttpStatus.OK);\n\t}",
"@RequestMapping(value = { \"/printReport.xls\" }, method = RequestMethod.POST)\r\n\tpublic void payOther(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\r\n\t\tString rptCode = request.getParameter(\"rptCode\");\r\n\t\tString pathFile = request.getSession().getServletContext().getRealPath(\"/report/excel/\" + rptCode + \".xls\");\r\n\t\tFileInputStream input_document = new FileInputStream(new File(pathFile));\r\n\t\tWorkbook workbook = new HSSFWorkbook(input_document);\r\n\t\tReportBean bean = new ReportBean();\r\n\r\n\t\tinput_document.close();\r\n\t\tByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n\t\t\r\n\t\tif(creteria != null) {\r\n//\t\t\t result = paymentManualService.findPayOrder(creteria);\r\n\t\t }\r\n\t\t\r\n\t\treportService.controlAllReports(workbook, rptCode, bean).write(byteArrayOutputStream);\r\n\t\tbyte[] bytes = byteArrayOutputStream.toByteArray();\r\n\r\n\t\tresponse.setContentType(\"application/vnd.ms-excel\");\r\n\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\" + rptCode+\".xls\");\r\n\t\tresponse.getOutputStream().write(bytes);\r\n\t\tresponse.getOutputStream().flush();\r\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 (ClassNotFoundException ex) {\r\n Logger.getLogger(download.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(download.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"WritableWorkbook downloadUserTemplate(HttpServletResponse response, int advisorId) throws RuntimeException, IOException, RowsExceededException, WriteException, CustomFinexaException;",
"@RequestMapping(value = \"/exportExcelAllSchoolOrder\", method = RequestMethod.POST)\r\n public ModelAndView exportExcelAllSchoolOrder(Model model, HttpServletRequest request) {\n \tString companyId = request.getParameter(\"companyId\");\r\n \tMap<String,Object>map = new HashMap<String,Object>();\r\n \tPayOrder payOrder = new PayOrder();\r\n \t//if(!\"0\".equals(isArea)){\r\n \t\tmap.put(\"companyId\",companyId);\r\n \t//}\r\n \tmap.put(\"orderNum\",request.getParameter(\"orderNum\"));\r\n \tmap.put(\"inpstart\",request.getParameter(\"inpstart\"));\r\n \tmap.put(\"inpend\",request.getParameter(\"inpend\"));\r\n \tmap.put(\"payMethod\",request.getParameter(\"payMethod\"));\r\n \tmap.put(\"firstPrice\",request.getParameter(\"firstPrice\"));\r\n \tmap.put(\"secondPrice\",request.getParameter(\"secondPrice\"));\r\n \tmap.put(\"pageSize\",1000000);\r\n \tmap.put(\"page\",payOrder.getFirstIndex());\r\n \t\r\n \t//2018-1-29 新增 支付方式\r\n \tmap.put(\"payStates\",request.getParameter(\"payStates\"));\r\n \t// 查询 订单 集合\r\n \tList<PayOrder> cpoList = this.payOrderServiceImpl.findPayOrderByParams(map);\r\n \tString tittle = \"订单编号:orderNum,课程名:commodityName,金额(元):payPrice,姓名:stuName,电话:discountNo,下单时间:orderTime,付款时间:payTime,订单状态:payStatus\";\r\n \tExcelSheetEntity entity = ExcelSheetEntity.newInstance(\r\n \t\t\ttittle,\r\n \t\t\tcpoList);\r\n \tMap<String,Object>map01 = new HashMap<String,Object>();\r\n \tmap01.put(\"entity\", entity);\r\n \tmap01.put(\"fileName\", \"订单.xls\");\r\n \tViewFiles excel = new ViewFiles();\r\n \treturn new ModelAndView(excel, map01);\r\n }",
"public void download() {\n }",
"public static Result downloadStatistics(){\n\t\tUser currentUser = SessionHelper.getCurrentUser(ctx());\n\t\t// Null Catching\n\t\tif (currentUser == null) {\n\t\t\tLogger.of(\"user\").warn(\"Not registered User tried to access the fucntion > download the statistics file\");\n\t\t\treturn redirect(routes.Application.index());\n\t\t}\n\t\t// Method in Statscontroller which generates and totally fills the excel sheet with data needed in the file;\n\t\tFile statsFile = createStatisticsFile(currentUser);\n\t\tresponse().setContentType(\"application/x-download\"); \n\t\tresponse().setHeader(\"Content-disposition\",\"attachment; filename=statistics.xls\");\n\t\treturn ok(statsFile);\n\t\n\t}",
"@RequestMapping(value = \"/downloadBulkPdf\", method = RequestMethod.GET)\r\n\tpublic @ResponseBody\r\n\tString downloadBulkPdf(@ModelAttribute(\"groupDownload\") BulkDownloadTO bulkDownloadTO, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\t\tlogger.log(IAppLogger.INFO, \"Enter: downloadBulkPdf()\");\r\n\t\tString currentUser = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSER);\r\n\t\tString currentUserId = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSERID);\r\n\t\tString currentOrg = (String) request.getSession().getAttribute(IApplicationConstants.CURRORG);\r\n\t\tString customer = (String) request.getSession().getAttribute(IApplicationConstants.CUSTOMER);\r\n\t\tlong currCustomer = (customer == null) ? 0 : Long.parseLong(customer);\r\n\t\tString status = \"Error\";\r\n\t\ttry {\r\n\t\t\t// remove retain bulk value\r\n\t\t\trequest.getSession().removeAttribute(\"retainBulkDownloadTO\");\r\n\t\t\tString fileType = request.getParameter(\"fileType\");\r\n\t\t\tString nodeid = (String) request.getParameter(\"tenantId\");\r\n\t\t\tString adminYear = (String) request.getParameter(\"AdminYear\");\r\n\t\t\tString reportUrl = (String) request.getParameter(\"reportUrl\");\r\n\t\t\tString docName = CustomStringUtil.appendString(currentUser, \" \", Utils.getDateTime(), \"_Querysheet.pdf\");\r\n\r\n\t\t\tString school = null, corp = null, orgClass = null, testProgram = null, grade = null;\r\n\t\t\tif (!\"CR\".equals(fileType)) {\r\n\t\t\t\tMap<String, Object> parameters = null;\r\n\t\t\t\tparameters = (Map<String, Object>) request.getSession().getAttribute(IApplicationConstants.REPORT_TYPE_CUSTOM + \"parameters\" + reportUrl);\r\n\t\t\t\twhile (parameters == null) {\r\n\t\t\t\t\tlogger.log(IAppLogger.WARN, \"Waiting for custom report parameter .... \");\r\n\t\t\t\t\tThread.sleep(2000);\r\n\t\t\t\t\tparameters = (Map<String, Object>) request.getSession().getAttribute(IApplicationConstants.REPORT_TYPE_CUSTOM + \"parameters\" + reportUrl);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tadminYear = (String) parameters.get(\"p_adminYear\");\r\n\t\t\t\tschool = (String) parameters.get(\"p_school\");\r\n\t\t\t\tcorp = (String) parameters.get(\"p_corp\");\r\n\t\t\t\torgClass = (String) parameters.get(\"p_class\");\r\n\t\t\t\tgrade = (String) parameters.get(\"p_gradeid\");\r\n\t\t\t\ttestProgram = (String) parameters.get(\"p_testProgram\");\r\n\t\t\t}\r\n\t\t\tbulkDownloadTO.setQuerysheetFile(docName);\r\n\t\t\tbulkDownloadTO.setUdatedBy((currentUserId == null) ? 0 : Long.parseLong(currentUserId));\r\n\t\t\tbulkDownloadTO.setUsername(currentUser);\r\n\t\t\tbulkDownloadTO.setTestAdministration(adminYear);\r\n\t\t\tbulkDownloadTO.setSchool(school);\r\n\t\t\tbulkDownloadTO.setCorp(corp);\r\n\t\t\tbulkDownloadTO.setOrgClass(orgClass);\r\n\t\t\tbulkDownloadTO.setTestProgram(testProgram);\r\n\t\t\tbulkDownloadTO.setGrade(grade);\r\n\t\t\tbulkDownloadTO.setCustomerId(customer);\r\n\t\t\tbulkDownloadTO.setReportUrl(reportUrl);\r\n\t\t\tbulkDownloadTO.setRequestType(fileType);\r\n\t\t\tbulkDownloadTO.setDownloadMode(request.getParameter(\"mode\"));\r\n\r\n\t\t\tbulkDownloadTO = inorsService.createJob(bulkDownloadTO);\r\n\r\n\t\t\tString querysheetFile = PdfGenerator.generateQuerysheet(bulkDownloadTO, propertyLookup);\r\n\r\n\t\t\tlogger.log(IAppLogger.INFO, \"sending messsage --------------- \");\r\n\t\t\tmessageProducer.sendJobForProcessing(String.valueOf(bulkDownloadTO.getJobId()), Utils.getContractName());\r\n\r\n\t\t\tif (bulkDownloadTO.getJobId() != 0)\r\n\t\t\t\tstatus = \"Success\";\r\n\r\n\t\t\tresponse.setContentType(\"application/json\");\r\n\t\t\tresponse.getWriter().write(\"\");\r\n\t\t\tresponse.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, e.getMessage(), e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tresponse.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t}\r\n\t\tlogger.log(IAppLogger.INFO, \"Exit: downloadBulkPdf()\");\r\n\t\treturn null;\r\n\t}",
"public void reviewFileDownload(HttpServletRequest request, HttpServletResponse response, int reviewNum, int idx) throws Exception;",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(download.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(download.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@RequestMapping(\"exportToExcel\")\n public void exportFundamentalsToExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\n log.debug(\"Requested exporting data to excel.\");\n\n TradingAidCommand jshData = getJshData();\n\n // create a new file\n FileOutputStream outExcel = new FileOutputStream(\"workbook\");\n // create a new workbook\n HSSFWorkbook workbook = new HSSFWorkbook();\n // create a new sheet\n HSSFSheet sheet = workbook.createSheet();\n\n sheet.setDefaultColumnWidth(7);\n\n // create header row\n HSSFRow header = sheet.createRow(0);\n header.createCell(0).setCellValue(\"Horse\");\n header.createCell(1).setCellValue(\"9am\");\n header.createCell(2).setCellValue(\"MovAM\");\n header.createCell(3).setCellValue(\"60min\");\n header.createCell(4).setCellValue(\"Mov60\");\n header.createCell(5).setCellValue(\"30min\");\n header.createCell(6).setCellValue(\"Mov30\");\n header.createCell(7).setCellValue(\"15min\");\n header.createCell(8).setCellValue(\"Mov15\");\n header.createCell(9).setCellValue(\"5min\");\n header.createCell(10).setCellValue(\"Mov5\");\n header.createCell(11).setCellValue(\"3min\");\n header.createCell(12).setCellValue(\"Mov3\");\n header.createCell(13).setCellValue(\"2min\");\n header.createCell(14).setCellValue(\"Mov2\");\n header.createCell(15).setCellValue(\"1min\");\n header.createCell(16).setCellValue(\"Mov1\");\n header.createCell(17).setCellValue(\"Mean\");\n header.createCell(18).setCellValue(\"321\");\n header.createCell(19).setCellValue(\"Result\");\n header.createCell(20).setCellValue(\"CPR\");\n header.createCell(21).setCellValue(\"NPTips\");\n header.createCell(22).setCellValue(\"Naps\");\n header.createCell(23).setCellValue(\"Stars\");\n header.createCell(24).setCellValue(\"Jockey\");\n header.createCell(25).setCellValue(\"Wins\");\n header.createCell(26).setCellValue(\"R\");\n header.createCell(27).setCellValue(\"Rs\");\n header.createCell(28).setCellValue(\"Mov9-60\");\n header.createCell(29).setCellValue(\"FP\");\n header.createCell(30).setCellValue(\"C\");\n header.createCell(31).setCellValue(\"D\");\n header.createCell(32).setCellValue(\"CD\");\n header.createCell(33).setCellValue(\"HG\");\n header.createCell(34).setCellValue(\"Trainer\");\n header.createCell(35).setCellValue(\"Wins\");\n header.createCell(36).setCellValue(\"R\");\n header.createCell(37).setCellValue(\"Rs\");\n\n int rowIndex = 1;\n for (JSHRaceCommand race : jshData.getRaces()) {\n\n HSSFRow row = sheet.createRow(rowIndex);\n HSSFCell cell = row.createCell(0);\n cell.setCellValue(race.getGeneralInfo());\n sheet.addMergedRegion(new CellRangeAddress(rowIndex, rowIndex, 0, 37));\n\n rowIndex++;\n\n int runnerFavPos = 1;\n for (JSHRunnerCommand runner : race.getRunners()) {\n row = sheet.createRow(rowIndex);\n row.createCell(0).setCellValue(runner.getHorseName());\n row.createCell(1).setCellValue(runner.getPrice9());\n row.createCell(2).setCellValue(runner.getMov9to11());\n row.createCell(3).setCellValue(runner.getPrice60());\n row.createCell(4).setCellValue(runner.getMov60());\n row.createCell(5).setCellValue(runner.getPrice30());\n row.createCell(6).setCellValue(runner.getMov30());\n row.createCell(7).setCellValue(runner.getPrice15());\n row.createCell(8).setCellValue(runner.getMov15());\n row.createCell(9).setCellValue(runner.getPrice5());\n row.createCell(10).setCellValue(runner.getMov5());\n row.createCell(11).setCellValue(runner.getPrice3());\n row.createCell(12).setCellValue(runner.getMov3());\n row.createCell(13).setCellValue(runner.getPrice2());\n row.createCell(14).setCellValue(runner.getMov2());\n row.createCell(15).setCellValue(runner.getPrice1());\n row.createCell(16).setCellValue(runner.getMov1());\n row.createCell(17).setCellValue(runner.getMean());\n row.createCell(18).setCellValue(runner.getMov3to1());\n row.createCell(19).setCellValue(runner.getResult());\n row.createCell(20).setCellValue(runner.getCpr());\n row.createCell(21).setCellValue(runner.getNptips());\n row.createCell(22).setCellValue(runner.getNaps());\n row.createCell(23).setCellValue(runner.getStars());\n row.createCell(24).setCellValue(runner.getJockey());\n row.createCell(25).setCellValue(runner.getJockeyWins());\n row.createCell(26).setCellValue(runner.getJockeyRideNo());\n row.createCell(27).setCellValue(runner.getJockeyRides());\n row.createCell(28).setCellValue(runner.getMov9to60());\n row.createCell(29).setCellValue(runnerFavPos++);\n row.createCell(30).setCellValue(runner.getCourse());\n row.createCell(31).setCellValue(runner.getDistance());\n row.createCell(32).setCellValue(runner.getDistanceAndCourse());\n row.createCell(33).setCellValue(runner.getHeadGear());\n row.createCell(34).setCellValue(runner.getTrainer());\n row.createCell(35).setCellValue(runner.getTrainerWins());\n row.createCell(36).setCellValue(runner.getTrainerRunnerNo());\n row.createCell(37).setCellValue(runner.getTrainerRunners());\n\n rowIndex++;\n }\n\n }\n\n for (int i = 0; i < 37; i++) {\n sheet.autoSizeColumn(i);\n }\n\n // Movement formatting\n HSSFSheetConditionalFormatting conditionalFormattingLayer = sheet.getSheetConditionalFormatting();\n HSSFConditionalFormattingRule blueRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.GT, \"5\");\n HSSFConditionalFormattingRule greenRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"2.5\", \"5\");\n HSSFConditionalFormattingRule yellowRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"0.01\", \"2.5\");\n HSSFConditionalFormattingRule orangeRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.BETWEEN, \"-2.5\", \"-0.01\");\n HSSFConditionalFormattingRule pinkRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"-2.5\");\n\n HSSFPatternFormatting blueFormatting = blueRule.createPatternFormatting();\n blueFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.BLUE.getIndex());\n\n HSSFPatternFormatting greenFormatting = greenRule.createPatternFormatting();\n greenFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.GREEN.getIndex());\n\n HSSFPatternFormatting yellowFormatting = yellowRule.createPatternFormatting();\n yellowFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.YELLOW.getIndex());\n\n HSSFPatternFormatting orangeFormatting = orangeRule.createPatternFormatting();\n orangeFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.ORANGE.getIndex());\n\n HSSFPatternFormatting pinkFormatting = pinkRule.createPatternFormatting();\n pinkFormatting.setFillBackgroundColor(HSSFColor.HSSFColorPredefined.PINK.getIndex());\n\n HSSFPalette palette = workbook.getCustomPalette();\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.BLUE.getIndex(), (byte) 153, (byte) 204, (byte) 255);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.GREEN.getIndex(), (byte) 204, (byte) 255, (byte) 204);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.YELLOW.getIndex(), (byte) 255, (byte) 255, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.ORANGE.getIndex(), (byte) 255, (byte) 204, (byte) 153);\n palette.setColorAtIndex(HSSFColor.HSSFColorPredefined.PINK.getIndex(), (byte) 255, (byte) 153, (byte) 204);\n\n int lastRowNum = sheet.getLastRowNum();\n\n CellRangeAddress[] basicMovementCellRangeAddresses = {\n\n // 9-11 Movement\n new CellRangeAddress(1, lastRowNum, 2, 2),\n // 60 min Movement\n new CellRangeAddress(1, lastRowNum, 4, 4),\n // 30 min Movement\n new CellRangeAddress(1, lastRowNum, 6, 6),\n // 15 min Movement\n new CellRangeAddress(1, lastRowNum, 8, 8),\n // 5 min Movement\n new CellRangeAddress(1, lastRowNum, 10, 10),\n // 3 min Movement\n new CellRangeAddress(1, lastRowNum, 12, 12),\n // 2 min Movement\n new CellRangeAddress(1, lastRowNum, 14, 14),\n // 1 min Movement\n new CellRangeAddress(1, lastRowNum, 16, 16),\n // Mean\n new CellRangeAddress(1, lastRowNum, 17, 17),\n // 3-1 Movement\n new CellRangeAddress(1, lastRowNum, 18, 18),\n };\n\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, blueRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, greenRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, yellowRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, orangeRule);\n conditionalFormattingLayer.addConditionalFormatting(basicMovementCellRangeAddresses, pinkRule);\n\n\n // Movement 9 to 60 formatting\n HSSFConditionalFormattingRule mov9to60LessThanZeroRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting mov9to60LessThanZeroFormatting = mov9to60LessThanZeroRule.createFontFormatting();\n mov9to60LessThanZeroFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] mov9to60CellRange = {new CellRangeAddress(1, lastRowNum, 28, 28)};\n conditionalFormattingLayer.addConditionalFormatting(mov9to60CellRange, mov9to60LessThanZeroRule);\n\n // CPR Formatting\n HSSFConditionalFormattingRule cprRule = conditionalFormattingLayer.createConditionalFormattingRule(ComparisonOperator.LT, \"0\");\n HSSFFontFormatting cprFormatting = cprRule.createFontFormatting();\n cprFormatting.setFontColorIndex(HSSFColor.HSSFColorPredefined.RED.getIndex());\n CellRangeAddress[] cprCellRange = {new CellRangeAddress(1, lastRowNum, 20, 20)};\n conditionalFormattingLayer.addConditionalFormatting(cprCellRange, cprRule);\n\n // Result formatting\n HSSFConditionalFormattingRule winnerRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Won\\\")\");\n HSSFConditionalFormattingRule placedRule = conditionalFormattingLayer.createConditionalFormattingRule(\"EXACT($T1, \\\"Placed\\\")\");\n\n HSSFPatternFormatting winnerFormatting = winnerRule.createPatternFormatting();\n winnerFormatting.setFillBackgroundColor(IndexedColors.BRIGHT_GREEN.getIndex());\n\n HSSFPatternFormatting placedFormatting = placedRule.createPatternFormatting();\n placedFormatting.setFillBackgroundColor(IndexedColors.LEMON_CHIFFON.getIndex());\n\n palette.setColorAtIndex(IndexedColors.BRIGHT_GREEN.getIndex(), (byte) 62, (byte) 213, (byte) 120);\n palette.setColorAtIndex(IndexedColors.LEMON_CHIFFON.getIndex(), (byte) 242, (byte) 218, (byte) 193);\n\n CellRangeAddress[] resultCellRange = {\n // Horse name\n new CellRangeAddress(1, lastRowNum, 0, 0),\n // Result\n new CellRangeAddress(1, lastRowNum, 19, 19),\n // Jockey\n new CellRangeAddress(1, lastRowNum, 24, 24),\n // Trainer\n new CellRangeAddress(1, lastRowNum, 34, 34)\n\n };\n\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, winnerRule);\n conditionalFormattingLayer.addConditionalFormatting(resultCellRange, placedRule);\n\n // Writing the file into Http response\n workbook.write(outExcel);\n\n response.setContentType(\"application/octet-stream\");\n DateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n Date today = new Date();\n response.setHeader(\"Content-disposition\", \"attachment; filename=\" + \"trading-aid-\" + dateFormat.format(today) + \".xls\");\n\n FileInputStream inputStream = new FileInputStream(new File(\"workbook\"));\n\n OutputStream outputStream = response.getOutputStream();\n\n byte[] buffer = new byte[1024];\n int bytesRead = -1;\n while ((bytesRead = inputStream.read(buffer)) != -1) { // write bytes read from the input stream into the output stream\n outputStream.write(buffer, 0, bytesRead);\n }\n\n outputStream.flush();\n\n log.debug(\"Data export to excel successful.\");\n\n }",
"@GetMapping(\"/downloadFile/{fileName:.+}\")\n public ResponseEntity<Resource> downloadFile(@PathVariable String fileName, HttpServletRequest request) {\n Resource resource = docFileService.loadFileAsResource(fileName);\n\n // Try to determine file's content type\n String contentType = null;\n try {\n contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath());\n } catch (IOException ex) {\n System.out.println(\"Could not determine file type.\");\n }\n\n // Fallback to the default content type if type could not be determined\n if(contentType == null) {\n contentType = \"application/octet-stream\";\n }\n\n return ResponseEntity.ok()\n .contentType(MediaType.parseMediaType(contentType))\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\n .body(resource);\n }",
"@RequestMapping(value = \"/downloadGRTInvitationCodeFiles\", method = RequestMethod.GET)\r\n\tpublic void downloadGRTInvitationCodeFiles(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tlogger.log(IAppLogger.INFO, \"Enter: downloadGRTInvitationCodeFiles()\");\r\n\t\tMap<String, String> paramMap = new HashMap<String, String>();\r\n\r\n\t\tString type = (String) request.getParameter(\"type\");\r\n\t\tString testAdministrationVal = (String) request.getParameter(\"testAdministrationVal\");\r\n\t\tString testProgram = (String) request.getParameter(\"testProgram\");\r\n\t\tString corpDiocese = (String) request.getParameter(\"corpDiocese\");\r\n\t\tString school = (String) request.getParameter(\"school\");\r\n\r\n\t\tlogger.log(IAppLogger.INFO, \"type=\" + type);\r\n\t\tlogger.log(IAppLogger.INFO, \"testAdministrationVal=\" + testAdministrationVal);\r\n\t\tlogger.log(IAppLogger.INFO, \"testProgram=\" + testProgram);\r\n\t\tlogger.log(IAppLogger.INFO, \"corpDiocese=\" + corpDiocese);\r\n\t\tlogger.log(IAppLogger.INFO, \"school=\" + school);\r\n\r\n\t\tString productName = getProductNameById(testAdministrationVal);\r\n\t\tlogger.log(IAppLogger.INFO, \"productName=\" + productName);\r\n\t\tString[] tokens = productName.split(\" \");\r\n\t\tString product = tokens[0];\r\n\t\tString term = tokens[1];\r\n\t\tString year = tokens[2];\r\n\r\n\t\tlogger.log(IAppLogger.INFO, \"product=\" + product);\r\n\t\tlogger.log(IAppLogger.INFO, \"term=\" + term);\r\n\t\tlogger.log(IAppLogger.INFO, \"year=\" + year);\r\n\r\n\t\t// String userId = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSERID);\r\n\t\t// String userName = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSER);\r\n\t\tString customerId = (String) request.getSession().getAttribute(IApplicationConstants.CUSTOMER);\r\n\t\tlogger.log(IAppLogger.INFO, \"customerId=\" + customerId);\r\n\r\n\t\tString productStr = product;\r\n\t\tif (productStr.indexOf('+') > 0) {\r\n\t\t\tproductStr = productStr.replace(\"+\", \"\").trim();\r\n\t\t}\r\n\t\tif (productStr.indexOf('-') > 0) {\r\n\t\t\tproductStr = productStr.replace(\"-\", \"\").trim();\r\n\t\t}\r\n\t\tString layoutName = type + \"_\" + productStr + \"_\" + term + \"_\" + year;\r\n\t\tlayoutName = layoutName.toUpperCase();\r\n\t\tif (layoutName.indexOf(' ') > 0) {\r\n\t\t\tlayoutName = layoutName.replaceAll(\"\\\\s+\", \"\").trim();\r\n\t\t}\r\n\t\tlogger.log(IAppLogger.INFO, \"layoutName=\" + layoutName);\r\n\r\n\t\tString headers = propertyLookup.get(layoutName + \"_HEADER\");\r\n\t\tString aliases = propertyLookup.get(layoutName + \"_ALIAS\");\r\n\t\tArrayList<String> headerList = InorsDownloadUtil.getRowDataLayout(headers);\r\n\t\tArrayList<String> aliasList = InorsDownloadUtil.getRowDataLayout(aliases);\r\n\t\tif (headerList.size() != aliasList.size()) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, \"Header count(\" + headerList.size() + \") does not match with Alias count(\" + aliasList.size() + \")\");\r\n\t\t} else {\r\n\t\t\tlogger.log(IAppLogger.INFO, \"Header count(\" + headerList.size() + \") matches with Alias count(\" + aliasList.size() + \")\");\r\n\t\t}\r\n\r\n\t\tparamMap.put(\"type\", type);\r\n\t\tparamMap.put(\"product\", product);\r\n\t\tparamMap.put(\"term\", term);\r\n\t\tparamMap.put(\"year\", year);\r\n\t\tparamMap.put(\"productId\", testAdministrationVal);\r\n\t\tparamMap.put(\"testProgram\", testProgram);\r\n\t\tparamMap.put(\"parentOrgNodeId\", corpDiocese);\r\n\t\tparamMap.put(\"orgNodeId\", school);\r\n\t\t// paramMap.put(\"userId\", userId);\r\n\t\tparamMap.put(\"customerId\", customerId);\r\n\r\n\t\tbyte[] data = null;\r\n\t\tString fileName = layoutName.toLowerCase() + \".dat\";\r\n\t\tString zipFileName = layoutName.toLowerCase() + \".zip\";\r\n\t\tArrayList<ArrayList<String>> table = inorsService.getTabulerData(paramMap, aliasList, headerList);\r\n\t\tdata = InorsDownloadUtil.getTableDataBytes(table, IApplicationConstants.COMMA);\r\n\r\n\t\ttry {\r\n\t\t\tdata = FileUtil.zipBytes(fileName, data);\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, \"zipBytes - \", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tFileUtil.browserDownload(response, data, zipFileName);\r\n\t\tlogger.log(IAppLogger.INFO, \"Exit: downloadGRTInvitationCodeFiles()\");\r\n\t}",
"@RequestMapping(\"/downloadFile/{id}\")\r\n public Timesheet downloadFile(@PathVariable(\"id\") String id) {\n return ti.getAllId(id);\r\n }",
"@GetMapping(value = \"/xls\", produces = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity<String> generateXLSReport() {\n LOGGER.info(\"Generating Fund XLS report.\");\n\n boolean success =false;\n if(configFilter().getJasperPrint() != null) {\n xlsExporter.setJasperPrint(configFilter().getJasperPrint());\n success = xlsExporter.exportToXlsx(\"fundReport.xlsx\", \"Fund Data\");\n }\n if (success) {\n return new ResponseEntity<>(\"XLS Report is successfully generated \", HttpStatus.OK);\n } else {\n return new ResponseEntity<>(\"XLS Report cannot be generated \", HttpStatus.OK);\n }\n }",
"@RequestMapping(value = \"/downloadphoto\", method = RequestMethod.GET)\n void buildDynamicReportDownload(HttpServletRequest request, HttpServletResponse response) {\n try {\n\n // Get the form id from the submitted form.\n String photoKey = request.getParameter(\"photoKey\");\n byte[] photoBytes = s3Client.getObjectBytes(bucketName, photoKey) ;\n InputStream is = new ByteArrayInputStream(photoBytes);\n\n // Define the required information here.\n response.setContentType(\"image/png\");\n response.setHeader(\"Content-disposition\", \"attachment; filename=\"+photoKey);\n org.apache.commons.io.IOUtils.copy(is, response.getOutputStream());\n response.flushBuffer();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void getExportedBookDataXlsFileByUser(){\n File mPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n //String pathName = mPath.getPath() + \"/\" + \"sample_wordbook_daum.xls\";\n //Manager_SystemControl.saveFileFromInputStream(databaseInputStream,pathName);\n\n final Manager_FileDialog managerFileDialog = new Manager_FileDialog(this, mPath, \".xls\");\n managerFileDialog.addFileListener(new Manager_FileDialog.FileSelectedListener() {\n public void fileSelected(File file) {\n managerFileDialog.removeFileListener(this);\n new LoadDaumXlsFile(WordListActivity.this,file.getPath()).execute();\n }\n });\n managerFileDialog.showDialog();\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n\n response.setContentType(\"application/x-msexcel\");\n Vector resultXLS = new Vector();\n Location location = new Location();\n\n long userId = JSPRequestValue.requestLong(request, \"user_id\");\n int type = JSPRequestValue.requestInt(request, \"type\");\n int invType = JSPRequestValue.requestInt(request, \"inv_type\");\n \n User u = new User();\n try {\n u = DbUser.fetch(userId);\n } catch (Exception e) {\n }\n\n Vector result = new Vector();\n ReportParameter rp = new ReportParameter();\n try {\n HttpSession session = request.getSession();\n resultXLS = (Vector) session.getValue(\"REPORT_INVENTORY_STOCK_SUMMARY\");\n result = (Vector) resultXLS.get(0);\n rp = (ReportParameter) resultXLS.get(1);\n } catch (Exception e) {\n }\n\n Company cmp = new Company();\n try {\n Vector listCompany = DbCompany.list(0, 0, \"\", \"\");\n if (listCompany != null && listCompany.size() > 0) {\n cmp = (Company) listCompany.get(0);\n }\n } catch (Exception ext) {\n System.out.println(ext.toString());\n }\n\n if (rp.getLocationId() != 0) {\n try {\n location = DbLocation.fetchExc(rp.getLocationId());\n } catch (Exception e) {\n }\n }\n\n boolean gzip = false;\n\n OutputStream gzo;\n if (gzip) {\n response.setHeader(\"Content-Encoding\", \"gzip\");\n gzo = new GZIPOutputStream(response.getOutputStream());\n } else {\n gzo = response.getOutputStream();\n }\n\n PrintWriter wb = new PrintWriter(new OutputStreamWriter(gzo, \"UTF-8\"));\n \n String title = \"\";\n if(invType==0){\n title = \"INVENTORY REPORT (VALUE)\";\n }else{\n title = \"INVENTORY REPORT (QUANTITY)\";\n }\n\n wb.println(\" <?xml version=\\\"1.0\\\"?>\");\n wb.println(\" <?mso-application progid=\\\"Excel.Sheet\\\"?>\");\n wb.println(\" <Workbook xmlns=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\"\");\n wb.println(\" xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\"\");\n wb.println(\" xmlns:x=\\\"urn:schemas-microsoft-com:office:excel\\\"\");\n wb.println(\" xmlns:ss=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\"\");\n wb.println(\" xmlns:html=\\\"http://www.w3.org/TR/REC-html40\\\">\");\n wb.println(\" <DocumentProperties xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\" <Author>Roy</Author>\");\n wb.println(\" <LastAuthor>Roy</LastAuthor>\");\n wb.println(\" <Created>2015-01-25T05:27:31Z</Created>\");\n wb.println(\" <Version>12.00</Version>\");\n wb.println(\" </DocumentProperties>\");\n wb.println(\" <ExcelWorkbook xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <WindowHeight>8445</WindowHeight>\");\n wb.println(\" <WindowWidth>20055</WindowWidth>\");\n wb.println(\" <WindowTopX>240</WindowTopX>\");\n wb.println(\" <WindowTopY>105</WindowTopY>\");\n wb.println(\" <ProtectStructure>False</ProtectStructure>\");\n wb.println(\" <ProtectWindows>False</ProtectWindows>\");\n wb.println(\" </ExcelWorkbook>\");\n wb.println(\" <Styles>\");\n wb.println(\" <Style ss:ID=\\\"Default\\\" ss:Name=\\\"Normal\\\">\");\n wb.println(\" <Alignment ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders/>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\" <Interior/>\");\n wb.println(\" <NumberFormat/>\");\n wb.println(\" <Protection/>\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s70\\\">\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s70i\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Right\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" />\");\n wb.println(\" </Style>\");\n \n wb.println(\" <Style ss:ID=\\\"s81\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s82\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s83\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <NumberFormat ss:Format=\\\"Standard\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s84\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s85\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s86\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s87\\\">\");\n wb.println(\" <Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s92\\\">\");\n wb.println(\" <Borders>\");\n wb.println(\" <Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" <Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\" </Borders>\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" <NumberFormat ss:Format=\\\"Standard\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" <Style ss:ID=\\\"s94\\\">\");\n wb.println(\" <Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"12\\\" ss:Color=\\\"#000000\\\"\");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\" </Style>\");\n wb.println(\" </Styles>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet1\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"39.75\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n if(type == 1){\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"80\\\"/>\");\n wb.println(\" <Column ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"123\\\"/>\");\n }\n \n wb.println(\" <Column ss:Width=\\\"84.75\\\" ss:Span=\\\"13\\\"/>\");\n wb.println(\" <Row>\");\n if(type == 0){\n wb.println(\" <Cell ss:MergeAcross=\\\"15\\\" ss:StyleID=\\\"s70i\\\"><Data ss:Type=\\\"String\\\">Print date : \" + JSPFormater.formatDate(new Date(), \"dd-MM-yyyy HH:mm:ss\") + \", by \" + u.getFullName() + \"</Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:MergeAcross=\\\"18\\\" ss:StyleID=\\\"s70i\\\"><Data ss:Type=\\\"String\\\">Print date : \" + JSPFormater.formatDate(new Date(), \"dd-MM-yyyy HH:mm:ss\") + \", by \" + u.getFullName() + \"</Data></Cell>\"); \n }\n wb.println(\" </Row>\");\n wb.println(\" <Row ss:Height=\\\"18.75\\\">\");\n wb.println(\" <Cell ss:StyleID=\\\"s94\\\"><Data ss:Type=\\\"String\\\">\" + cmp.getName() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row ss:Height=\\\"18.75\\\">\");\n wb.println(\" <Cell ss:StyleID=\\\"s94\\\"><Data ss:Type=\\\"String\\\">\" + cmp.getAddress() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">\"+title+\"</Data></Cell>\");\n wb.println(\" </Row>\");\n if (rp.getLocationId() != 0) {\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Location : \" + location.getName() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n }else{\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Location : All Location</Data></Cell>\");\n wb.println(\" </Row>\");\n }\n \n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\">Period : \" + JSPFormater.formatDate(rp.getDateFrom(), \"dd MMM yyyy\") + \" - \" + JSPFormater.formatDate(rp.getDateTo(), \"dd MMM yyyy\") + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s70\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n \n wb.println(\" <Row >\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Code </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Category</Data></Cell>\");\n \n if(type == 1){\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Sub Category</Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Sku </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Item Name</Data></Cell>\");\n }\n \n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Begining </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Incoming </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s85\\\"><Data ss:Type=\\\"String\\\">Incoming Ajustment</Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">RTV </Data></Cell>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Transfer </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Costing </Data></Cell>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Repack </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Shringkage </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">COGS </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Net Sales </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Ending </Data></Cell>\");\n wb.println(\" <Cell ss:MergeDown=\\\"1\\\" ss:StyleID=\\\"s84\\\"><Data ss:Type=\\\"String\\\">Inv. Turn Over</Data></Cell>\");\n wb.println(\" </Row>\");\n wb.println(\" <Row>\");\n if(type == 1){\n wb.println(\" <Cell ss:Index=\\\"10\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">In </Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:Index=\\\"7\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">In </Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Out </Data></Cell>\");\n if(type == 1){\n wb.println(\" <Cell ss:Index=\\\"13\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock Out </Data></Cell>\");\n }else{\n wb.println(\" <Cell ss:Index=\\\"10\\\" ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock Out </Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s87\\\"><Data ss:Type=\\\"String\\\">Stock In</Data></Cell>\");\n wb.println(\" </Row>\");\n\n if (result != null && result.size() > 0) {\n\n double totBegining = 0;\n double totReceiving = 0;\n double totRecAdj = 0;\n double totRtv = 0;\n double totTrafIn = 0;\n double totTrafOut = 0;\n double totCosting = 0;\n double totMutation = 0;\n double totRepackOut = 0;\n double totAdjustment = 0;\n double totCogs = 0;\n double totNetSales = 0;\n double totEnding = 0;\n double totTurnOver = 0;\n\n for (int i = 0; i < result.size(); i++) {\n\n InvReport iReport = (InvReport) result.get(i);\n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:StyleID=\\\"s82\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getCode() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getSectionName() + \"</Data></Cell>\");\n if(type ==1){\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getCodeClass() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getSku() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s81\\\"><Data ss:Type=\\\"String\\\">\" + iReport.getDesription() + \"</Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getBegining() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getReceiving() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getReceivingAdjustment() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getRtv() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTransferIn() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTransferOut() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getCosting() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getMutation() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getRepackOut() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getStockAdjustment() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getCogs() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getNetSales() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getEnding() + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s83\\\"><Data ss:Type=\\\"Number\\\">\" + iReport.getTurnOvr() + \"</Data></Cell>\");\n wb.println(\" </Row>\");\n \n totBegining = totBegining + iReport.getBegining();\n totReceiving = totReceiving + iReport.getReceiving();\n totRecAdj = totRecAdj + iReport.getReceivingAdjustment();\n totRtv = totRtv + iReport.getRtv();\n totTrafIn = totTrafIn + iReport.getTransferIn();\n totTrafOut = totTrafOut + iReport.getTransferOut();\n totCosting = totCosting + iReport.getCosting();\n totMutation = totMutation + iReport.getMutation();\n totRepackOut = totRepackOut + iReport.getRepackOut();\n totAdjustment = totAdjustment + iReport.getStockAdjustment();\n totCogs = totCogs + iReport.getCogs();\n totNetSales = totNetSales + iReport.getNetSales();\n totEnding = totEnding + iReport.getEnding();\n totTurnOver = totTurnOver + iReport.getTurnOvr();\n }\n \n wb.println(\" <Row>\");\n wb.println(\" <Cell ss:MergeAcross=\\\"1\\\" ss:StyleID=\\\"s86\\\"><Data ss:Type=\\\"String\\\">Total</Data></Cell>\");\n if(type ==1){\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n }\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totBegining + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totReceiving + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRecAdj + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRtv + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totTrafIn + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totTrafOut + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totCosting + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totMutation + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totRepackOut + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totAdjustment + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totCogs + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totNetSales + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"Number\\\">\" + totEnding + \"</Data></Cell>\");\n wb.println(\" <Cell ss:StyleID=\\\"s92\\\"><Data ss:Type=\\\"String\\\"></Data></Cell>\");\n wb.println(\" </Row>\");\n }\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <Print>\");\n wb.println(\" <ValidPrinterInfo/>\");\n wb.println(\" <HorizontalResolution>300</HorizontalResolution>\");\n wb.println(\" <VerticalResolution>300</VerticalResolution>\");\n wb.println(\" </Print>\");\n wb.println(\" <Selected/>\");\n wb.println(\" <DoNotDisplayGridlines/>\");\n wb.println(\" <Panes>\");\n wb.println(\" <Pane>\");\n wb.println(\" <Number>3</Number>\");\n wb.println(\" <ActiveRow>20</ActiveRow>\");\n wb.println(\" <ActiveCol>2</ActiveCol>\");\n wb.println(\" </Pane>\");\n wb.println(\" </Panes>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet2\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" <Worksheet ss:Name=\\\"Sheet3\\\">\");\n wb.println(\" <Table>\");\n wb.println(\" </Table>\");\n wb.println(\" <WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\" <PageSetup>\");\n wb.println(\" <Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\" <PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\" </PageSetup>\");\n wb.println(\" <ProtectObjects>False</ProtectObjects>\");\n wb.println(\" <ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\" </WorksheetOptions>\");\n wb.println(\" </Worksheet>\");\n wb.println(\" </Workbook>\");\n wb.println(\" \");\n wb.flush();\n }",
"@Override\r\n\tprotected final void renderMergedOutputModel(\r\n\t\t\tMap<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n\r\n\t\tExcelForm excelForm = (ExcelForm) model.get(\"excelForm\");\r\n\r\n\t\tHSSFWorkbook workbook;\r\n\t\tHSSFSheet sheet;\r\n\t\tif (excelForm.getTemplateFileUrl() != null) {\r\n\t\t\tworkbook = getTemplateSource(excelForm.getTemplateFileUrl(), request);\r\n\t\t\tsheet = workbook.getSheetAt(0);\r\n\t\t} else {\r\n\t\t\tString sheetName = excelForm.getSheetName();\r\n\r\n\t\t\tworkbook = new HSSFWorkbook();\r\n\t\t\tsheet = workbook.createSheet(sheetName);\r\n\t\t\tlogger.debug(\"Created Excel Workbook from scratch\");\r\n\t\t}\r\n\t\t\r\n\t\tresponse.setHeader( \"Content-Disposition\", \"attachment; filename=\" + URLEncoder.encode(excelForm.getFileName(), \"UTF-8\"));\r\n\r\n\t\tcreateColumnStyles(excelForm, workbook);\r\n\t\tcreateMetaRows(excelForm, workbook, sheet);\r\n\t\tcreateHeaderRow(excelForm, workbook, sheet);\r\n\t\tfor (Object review : excelForm.getData()) {\r\n\t\t\tcreateRow(excelForm, workbook,sheet, review);\r\n\t\t\tdetectLowMemory();\r\n\t\t}\r\n\t\t\r\n\t\t// Set the content type.\r\n\t\tresponse.setContentType(getContentType());\r\n\r\n\t\t// Should we set the content length here?\r\n\t\t// response.setContentLength(workbook.getBytes().length);\r\n\r\n\t\t// Flush byte array to servlet output stream.\r\n\t\tServletOutputStream out = response.getOutputStream();\r\n\t\tworkbook.write(out);\r\n\t\tout.flush();\r\n\t}",
"@RequestMapping(\"/userExcelExport.action\")\r\n @Secured(\"ROLE_ADMIN\")\r\n public void export(HttpServletResponse response) throws IOException {\n \r\n List<User> users = userService.findAll();\r\n\r\n response.setContentType(\"application/vnd.ms-excel\");\r\n response.setHeader(\"extension\", \"xls\");\r\n\r\n OutputStream out = response.getOutputStream();\r\n\r\n Workbook workbook = new HSSFWorkbook();\r\n CreationHelper createHelper = workbook.getCreationHelper();\r\n\r\n CellStyle headerStyle = workbook.createCellStyle();\r\n Font headerFont = workbook.createFont();\r\n headerFont.setFontHeightInPoints((short)10);\r\n headerFont.setBoldweight(Font.BOLDWEIGHT_BOLD);\r\n headerStyle.setFont(headerFont);\r\n\r\n Sheet sheet = workbook.createSheet();\r\n\r\n sheet.setColumnWidth(0, 20 * 256);\r\n sheet.setColumnWidth(1, 20 * 256);\r\n sheet.setColumnWidth(2, 20 * 256);\r\n\r\n Row row = sheet.createRow(0);\r\n\r\n Cell c = row.createCell(0);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"Username\"));\r\n\r\n c = row.createCell(1);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"First Name\"));\r\n\r\n c = row.createCell(2);\r\n c.setCellStyle(headerStyle);\r\n c.setCellValue(createHelper.createRichTextString(\"Last Name\"));\r\n\r\n int rowNo = 1;\r\n for (User user : users) {\r\n row = sheet.createRow(rowNo);\r\n\r\n c = row.createCell(0);\r\n c.setCellValue(createHelper.createRichTextString(user.getUserName()));\r\n\r\n c = row.createCell(1);\r\n c.setCellValue(createHelper.createRichTextString(user.getFirstName()));\r\n\r\n c = row.createCell(2);\r\n c.setCellValue(createHelper.createRichTextString(user.getName()));\r\n\r\n rowNo++;\r\n }\r\n\r\n workbook.write(out);\r\n\r\n out.close();\r\n\r\n }",
"public void download(HttpServletResponse response) throws IOException {\n\t\tString f;\n\t\tif (this.filename != null) {\n\t\t\tFile file = new File(this.filepath);\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new IOException(\"file does not exit:\" + filename);\n\t\t\t} else {\n\t\t\t\tf = toUtf8String(filename);\n\t\t\t\tresponse.setContentType(\"application/x-msdownload\");\n\t\t\t\tresponse.setContentLength((int) file.length());\n\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;\"\n\t\t\t\t\t\t+ \" filename=\" + f);\n\t\t\t\twrite(response.getOutputStream());\n\t\t\t}\n\t\t}\n\t}",
"public static void outputData(HSSFWorkbook workbook, String fileName) {\n \ttry {\n\t\t\tfileName = URLEncoder.encode(fileName + \".xls\", \"utf-8\");\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n ServletActionContext.getResponse().setHeader(\"Cache-Control\", \"\");\n ServletActionContext.getResponse().setContentType(\n \"application/data;charset=UTF-8\");\n ServletActionContext.getResponse().setHeader(\"Content-Disposition\",\n \"attachment; filename=\" + fileName);\n OutputStream out = null;\n try {\n out = new BufferedOutputStream(ServletActionContext.getResponse()\n .getOutputStream());\n workbook.write(out); // 输出文件\n out.flush();\n }\n catch (IOException e) {\n log.error(e.toString());\n }\n finally {\n FileUtils.close(out);\n }\n }",
"@RequestMapping(value = \"getCreditLedgerReportList\", method = { RequestMethod.POST })\n\tpublic ResponseEntity<JsonResponse<List<RestDebitCreditLedgerModel>>> getCreditLedgerReportDownload(\n\t\t\t@RequestBody DataTableRequest request) {\n\t\tlogger.info(\"Method : getCreditLedgerReportDownload starts\");\n\n\t\tlogger.info(\"Method : getCreditLedgerReportDownload ends\");\n\t\treturn creditLedgerDao.getCreditLedgerReportDownload(request);\n\t}",
"@RequestMapping(value = \"/downloadGroupDownloadFiles\", method = RequestMethod.GET)\r\n\tpublic void downloadGroupDownloadFiles(HttpServletRequest request, HttpServletResponse response) {\r\n\t\tlogger.log(IAppLogger.INFO, \"Enter: Controller - downloadGroupDownloadFiles\");\r\n\t\tString jobId = (String) request.getParameter(\"jobId\");\r\n\t\tString filePath = (String) request.getParameter(\"filePath\");\r\n\t\tString fileName = FileUtil.getFileNameFromFilePath(filePath);\r\n\t\tString orgLevel = (String) request.getParameter(\"orgLevel\");\r\n\t\tString requestType = (String) request.getParameter(\"requestType\");\r\n\t\t\r\n\t\tlogger.log(IAppLogger.INFO, \"jobId = \" + jobId);\r\n\t\tlogger.log(IAppLogger.INFO, \"filePath = \" + filePath);\r\n\t\tlogger.log(IAppLogger.INFO, \"fileName = \" + fileName);\r\n\t\tlogger.log(IAppLogger.INFO, \"orgLevel = \" + orgLevel);\r\n\t\tlogger.log(IAppLogger.INFO, \"requestType = \" + requestType);\r\n\t\t\r\n\t\tString customer = (String) request.getSession().getAttribute(IApplicationConstants.CUSTOMER);\r\n\t\t\r\n\t\tString envString = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// Get file bytes from Amazon S3\t\t\t\r\n\t\t\t\r\n\t\t\tif(fileName.endsWith(\".xml\")) {\r\n\t\t\t\t@SuppressWarnings(\"unchecked\")\r\n\t\t\t\tMap<String, Object> propertyMap = (Map<String,Object>)request.getSession().getAttribute(\"propertyMap\");\r\n\t\t\t\tif(propertyMap == null){\r\n\t\t\t\t\tMap<String, Object> tileParamMap = new HashMap<String, Object>();\r\n\t\t\t\t\ttileParamMap.put(\"contractName\", Utils.getContractName());\r\n\t\t\t\t\tpropertyMap = loginService.getContractProerty(tileParamMap);\r\n\t\t\t\t\trequest.getSession().setAttribute(\"propertyMap\", propertyMap);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tenvString = (String) propertyMap.get(IApplicationConstants.STATIC_PDF_LOCATION) + IApplicationConstants.SDF_XML_S3_LOCATION;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tbyte[] assetBytes = repositoryService.getAssetBytes(envString!=null ? envString + filePath: filePath);\r\n\t\t\tlogger.log(IAppLogger.INFO, \"Successfully read bytes from S3: \" + filePath);\r\n\r\n\t\t\t// For TASC Student Data File Download - the asset bytes are\r\n\t\t\t// converted to password protected zip bytes\r\n\t\t\tif (orgLevel.equals(\"1\") && requestType.equals(\"SDF\") && !fileName.endsWith(\".zip\") && !fileName.endsWith(\".xml\")) {\r\n\t\t\t\t// Save file in temp directory\r\n\t\t\t\tString fileLocation = CustomStringUtil.appendString(propertyLookup.get(\"pdfGenPathIC\"), File.separator, jobId, File.separator, fileName);\r\n\t\t\t\tfileLocation = fileLocation.replace(\"//\", \"/\");\r\n\r\n\t\t\t\tString tempDirectory = FileUtil.getDirFromFilePath(fileLocation);\r\n\t\t\t\tFile tempJobDirectory = new File(tempDirectory);\r\n\t\t\t\tif (!tempJobDirectory.exists()) {\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Creating directory ... \" + tempJobDirectory);\r\n\t\t\t\t\tboolean status = tempJobDirectory.mkdir();\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, tempJobDirectory + \" : \" + status);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Directory exists: \" + tempJobDirectory);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tFileUtil.createFile(fileLocation, assetBytes);\r\n\t\t\t\tlogger.log(IAppLogger.INFO, \"File saved successfully from S3: \" + fileLocation);\r\n\t\t\t\tString newFilePath = fileLocation.replace(\".DAT\", \".zip\");\r\n\t\t\t\tlogger.log(IAppLogger.INFO, \"newFilePath = \" + newFilePath);\r\n\t\t\t\tString password = propertyLookup.get(\"gdfpassword\");\r\n\t\t\t\tlogger.log(IAppLogger.INFO, \"password = \" + password);\r\n\r\n\t\t\t\t// create password protected zip file in disk\r\n\t\t\t\tFileUtil.createPasswordProtectedZipFile(fileLocation, newFilePath, password);\r\n\t\t\t\tbyte[] zipBytes = FileUtil.getBytes(newFilePath);\r\n\t\t\t\t\r\n\t\t\t\t// Download file from browser\r\n\t\t\t\tFileUtil.browserDownload(response, zipBytes, FileUtil.getFileNameFromFilePath(newFilePath));\r\n\r\n\t\t\t\t// Delete temp Job Directory\r\n\t\t\t\t// FileUtils.deleteDirectory(tempJobDirectory);\r\n\t\t\t\t// logger.log(IAppLogger.INFO, \"Temp Directory Deleted Successfully: \" + tempJobDirectory);\r\n\t\t\t} else {\r\n\t\t\t\tlogger.log(IAppLogger.INFO, \"Not a district user and Student data file\");\r\n\t\t\t\t// Download file from browser\r\n\t\t\t\tFileUtil.browserDownload(response, assetBytes, fileName);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.log(IAppLogger.ERROR, \"downloadGroupDownloadFiles - \", e);\r\n\t\t\tlogger.log(IAppLogger.INFO, \"File not found so getting from DB - \");\r\n\t\t\tif(fileName.endsWith(\".xml\")) {\r\n\t\t\t\t/*File need to be created from studentdata_extract clob and upload into s3*/\r\n\t\t\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\r\n\t\t\t\tparamMap.put(\"customer\", customer);\r\n\t\t\t\tparamMap.put(\"jobId\",jobId);\r\n\t\t\t\tStudentDataExtractTO studentDataExtractTO = usabilityService.getClobXMLFile(paramMap);\r\n\t\t\t\tString studentXML = studentDataExtractTO.getStudentDataXML();\r\n\r\n\t\t\t\tString fileLocation = CustomStringUtil.appendString(propertyLookup.get(\"xmlGenPath\"), fileName);\r\n\t\t\t\t\r\n\t\t\t\t//fileLocation = fileLocation.replace(\"//\", \"/\");\r\n\t\t\t\tString tempDirectory = FileUtil.getDirFromFilePath(fileLocation);\r\n\t\t\t\tFile tempJobDirectory = new File(tempDirectory);\r\n\t\t\t\t\r\n\t\t\t\tif (!tempJobDirectory.exists()) {\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Creating directory ... \" + tempJobDirectory);\r\n\t\t\t\t\tboolean status = tempJobDirectory.mkdir();\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, tempJobDirectory + \" : \" + status);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Directory exists: \" + tempJobDirectory);\r\n\t\t\t\t}\r\n\t\t\t\tFile tempFile = new File(fileLocation);\r\n\t\t\t\tFileUtil.createFile(fileLocation, studentXML.getBytes());\r\n\t\t\t\trepositoryService.uploadAsset(envString, tempFile);\r\n\t\t\t\t\r\n\t\t\t\tcom.ctb.prism.core.transferobject.JobTrackingTO jobTrackingTO = new com.ctb.prism.core.transferobject.JobTrackingTO();\r\n\t\t\t\tjobTrackingTO.setJobId(Long.valueOf(jobId));\r\n\t\t\t\tjobTrackingTO.setFileSize(FileUtil.fileSize(studentXML.getBytes()));\r\n\t\t\t\tjobTrackingTO.setFilePath(envString+filePath);\r\n\t\t\t\tjobTrackingTO.setRequestFilename(fileName);\t\r\n\t\t\t\t\r\n\t\t\t\tjobTrackingTO = usabilityService.updateFileSize(jobTrackingTO);\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean fileDeleteFlag = FileUtils.deleteQuietly(tempFile); //delete temp file\r\n\t\t\t\t//tempJobDirectory.delete(); //delete temp directory\r\n\t\t\t\tif(fileDeleteFlag){\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Temp file has been deleted successfully: \" + fileName);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tlogger.log(IAppLogger.INFO, \"Unable to delete Temp file: \" + fileName);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tFileUtil.browserDownload(response, studentXML.getBytes(), fileName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\tlogger.log(IAppLogger.INFO, \"Exit: Controller - downloadGroupDownloadFiles\");\r\n\t}",
"@GET(\"/resource/example.zip\")\n Call<ResponseBody> downloadFileWithFixedUrl();",
"@Override\r\n\tpublic void download() {\n\t\t\r\n\t}",
"public void FileDownloadView(PojoPropuestaConvenio pojo) throws IOException {\n BufferedOutputStream out = null;\n try {\n String extension = null;\n String nombre = null;\n String contentType = null;\n InputStream stream = null;\n listadoDocumento = documentoService.getDocumentFindCovenio(pojo.getID_PROPUESTA());\n\n for (Documento doc : listadoDocumento) {\n if (doc.getIdTipoDocumento().getNombreDocumento().equalsIgnoreCase(TIPO_DOCUMENTO)) {\n if (getFileExtension(doc.getNombreDocumento()).equalsIgnoreCase(\"pdf\")) {\n stream = new ByteArrayInputStream(doc.getDocumento());\n nombre = doc.getNombreDocumento();\n extension = \"pdf\";\n }\n }\n }\n\n if (extension != null) {\n if (extension.equalsIgnoreCase(\"pdf\")) {\n contentType = \"Application/pdf\";\n }\n content = new DefaultStreamedContent(stream, contentType, nombre);\n } else {\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, \"Documento\", \"No se cuenta con documento firmado para descargar\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (out != null) {\n out.close();\n }\n }\n\n }",
"private void downloadAlfrescoDocument(){\n\t\t//el boton solo esta activo si un fichero esta seleccionado en la tabla de ficheros\n\t\t//Se abre un filechooser y se elije un directorio\n\t\t//Se enviara la direccion y el nodo con el content alfresco y se generara un File a partir de ellos (si no hay una opcion mejor con alfresco api)\n\t\t//se descarga el documento en el directorio elegido\n\n\t\tif(getFileChooser(JFileChooser.DIRECTORIES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tAlfrescoNode node = (AlfrescoNode) getDynamicTreePanel().getDragTable().getValueAt(getDynamicTreePanel().getDragTable().getSelectedRow(),0);\n\t\t\t//if(alfrescoManager.downloadFile(new AlfrescoKey(node.getUuid(), AlfrescoKey.KEY_UUID), getFileChooser().getSelectedFile().getAbsolutePath()))\n\t\t\ttry {\n\t\t\t\talfrescoDocumentClient.downloadFile(new AlfrescoKey(node.getUuid(), AlfrescoKey.KEY_UUID), getFileChooser().getSelectedFile().getAbsolutePath(), node.getName());\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha descargado correctamente.\");\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al descargar el documento.\");\n\t\t\t}\n\t\t}\n\t}",
"@GetMapping(\"/api/download/csv/\")\n public void downloadFile(HttpServletResponse response) throws IOException {\n response.setContentType(\"text/csv\");\n response.setHeader(\"Content-Disposition\", \"attachment; filename=customers.csv\");\n uploadsService.loadFile(response.getWriter());\n }",
"@RequestMapping(value = \"download\", method = RequestMethod.GET)\n\tpublic String getDownloadPage() {\n\t\tLOGGER.debug(\"Received request to show download page\");\n\t\tLOGGER.info(\"Received request to show download page\");\n\t\tSystem.out.println(\"---------------Received request to show download page\");\n\n\t\t// Do your work here. Whatever you like\n\t\t// i.e call a custom service to do your business\n\t\t// Prepare a model to be used by the JSP page\n\n\t\t// This will resolve to /WEB-INF/jsp/downloadpage.jsp\n\t\treturn \"downloadpage\";\n\t}",
"private void redirectExport()\r\n {\r\n String viewId = Pages.getViewId(FacesContext.getCurrentInstance());\r\n String baseName = Pages.getCurrentBaseName();\r\n DocumentData documentData = new ByteArrayDocumentData(baseName, excelWorkbook.getDocumentType(), excelWorkbook.getBytes());\r\n String id = DocumentStore.instance().newId();\r\n String url = DocumentStore.instance().preferredUrlForContent(baseName, excelWorkbook.getDocumentType().getExtension(), id);\r\n url = Manager.instance().encodeConversationId(url, viewId);\r\n DocumentStore.instance().saveData(id, documentData);\r\n try\r\n {\r\n FacesContext.getCurrentInstance().getExternalContext().redirect(url);\r\n }\r\n catch (IOException e)\r\n {\r\n throw new ExcelWorkbookException(Interpolator.instance().interpolate(\"Could not redirect to #0\", url), e);\r\n }\r\n }",
"@GetMapping(\"/downloadFile/{fileName:.+}\")\n public ResponseEntity<Resource> downloadFile(@PathVariable String fileName, HttpServletRequest request) throws CustomizeExp {\n Resource resource = fileService.loadFileAsResource(fileName);\n\n // Try to determine file's content type\n String contentType = null;\n try {\n contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath());\n } catch (IOException ex) {\n log.warn(\"无法确定文件类型\");\n }\n\n // Fallback to the default content type if type could not be determined\n if(contentType == null) {\n contentType = \"application/octet-stream\";\n }\n\n return ResponseEntity.ok()\n .contentType(MediaType.parseMediaType(contentType))\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\n .body(resource);\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 }",
"@SuppressWarnings(\"resource\")\r\n\t@RestMethod(name=\"DOWNLOAD\")\r\n\tpublic void doDownload(RestRequest req, RestResponse res) throws Exception {\r\n\r\n\t\tif (! allowViews)\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"DOWNLOAD not enabled\");\r\n\r\n\t\tFile f = new File(rootDir.getAbsolutePath() + req.getPathInfo());\r\n\r\n\t\tif (!f.exists())\r\n\t\t\tthrow new RestException(SC_NOT_FOUND, \"File not found\");\r\n\r\n\t\tif (f.isDirectory())\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"DOWNLOAD not available on directories\");\r\n\r\n\t\tres.setOutput(new FileReader(f)).setContentType(\"application\");\r\n\t}",
"@RequestMapping(value = \"/topicsExcell\", method = RequestMethod.POST)\n\tpublic ModelAndView downloadExcel(@Valid @ModelAttribute(\"topicExcellForm\") mTopicExcellValidation topicValidExcell, BindingResult result, Map model, HttpSession session) {\n\t\tList<mAcademicYear> patentReportingAcademicDateList = academicYearService.list();\n\t model.put(\"reportingAcademicDate\", patentReportingAcademicDateList);\n\t\t \n\t // create some sample data\n\t\t if(result.hasErrors()) {\n\t return new ModelAndView(\"cp.generateTopics\");\n\t }else\n\t {\n\t \t/**\n\t \t * Get list of all Projects (Topics)\n\t \t */\n\t\t\tString yearForGenerating = topicValidExcell.getReportingAcademicDate();\n\t\t\tString currentUserName = session.getAttribute(\"currentUserName\").toString();\n\t\t\tString currentUserCode = session.getAttribute(\"currentUserCode\").toString();\n\t\t String userRole = session.getAttribute(\"currentUserRole\").toString();\n\t\t List<mTopics> topicsList = tProjectService.loadTopicListByYear(userRole, currentUserCode, yearForGenerating);\n\t\t \n\t\t /**\n\t\t * Get list of all Patents\n\t\t */\n\t\t List<mPatents> patentsList = patentService.loadPatentListByYear(userRole, currentUserCode, yearForGenerating);\n\t\t model.put(\"patentsList\", patentsList);\n\t\t /**\n\t\t * Get staff's information\n\t\t */\n\t\t\tmStaff staff = staffService.loadStaffByUserCode(currentUserCode);\n\t\t\tmodel.put(\"yearOfPaper\", yearForGenerating);\n\t\t\tif(staff != null){\n\t\t\t List<mDepartment> departmentList = departmentService.loadDepartmentList();\n\t\t\t model.put(\"staffEmail\", staff.getStaff_Email());\n\t\t\t model.put(\"staffName\", staff.getStaff_Name());\n\t\t\t model.put(\"staffPhone\", staff.getStaff_Phone());\n\t\t\t model.put(\"staffCategory\", staff.getStaffCategory().getStaff_Category_Name());\n\t\t\t model.put(\"staffDepartementName\", staff.getDepartment().getDepartment_Name());\n\t\t\t model.put(\"staffDepartementCode\", staff.getDepartment().getDepartment_Code());\n\t\t\t}\n\t\t\t// return a view which will be resolved by an excel view resolver\n\t\t\treturn new ModelAndView(\"excelTopicsView\", \"topicsList\", topicsList);\n\t }\n\t}",
"@Override\n protected void buildExcelDocument(Map<String, Object> model, Workbook workbook,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"Du Report.xls\\\"\");\n\n @SuppressWarnings(\"unchecked\")\n List<ReportByGroup> reportList = (List<ReportByGroup>) model.get(\"reportList\");\n\n String[] month = new String[] { \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\", \"January\",\n \"February\", \"March\" };\n\n // create excel xls sheet\n Sheet sheet = workbook.createSheet(\"Report Du Detail\");\n // sheet.setDefaultColumnWidth(12);\n\n // create style for header cells\n CellStyle style = workbook.createCellStyle();\n Font font = workbook.createFont();\n font.setFontName(\"Arial\");\n style.setFillForegroundColor(HSSFColor.BLUE.index);\n style.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n style.setAlignment(HorizontalAlignment.CENTER);\n style.setWrapText(true);\n style.setBorderRight(BorderStyle.THIN);\n style.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderLeft(BorderStyle.THIN);\n style.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderTop(BorderStyle.THIN);\n style.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderBottom(BorderStyle.THIN);\n style.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n font.setBold(true);\n font.setColor(HSSFColor.WHITE.index);\n style.setFont(font);\n\n CellStyle style1 = workbook.createCellStyle();\n // style1.setAlignment(HorizontalAlignment.CENTER);\n // style1.setWrapText(true);\n style1.setBorderRight(BorderStyle.THIN);\n style1.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderLeft(BorderStyle.THIN);\n style1.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderTop(BorderStyle.THIN);\n style1.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderBottom(BorderStyle.THIN);\n style1.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n // style1.setFont(font);\n\n // create header row\n Row header = sheet.createRow(0);\n Row header1 = sheet.createRow(1);\n Row header2 = sheet.createRow(2);\n\n header.createCell(0).setCellValue(\"STT\");\n header.getCell(0).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 0, // first column (0-based)\n 0 // last column (0-based)\n ));\n header.createCell(1).setCellValue(\"Vị trí\");\n header.getCell(1).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 1, // first column (0-based)\n 1 // last column (0-based)\n ));\n\n header.createCell(2).setCellValue(\"\");\n header.getCell(2).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 2, // first column (0-based)\n 2 // last column (0-based)\n ));\n\n header.createCell(3).setCellValue(\"Số lượng đã tuyển trong tháng\");\n header.getCell(3).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 0, // last row (0-based)\n 3, // first column (0-based)\n 26 // last column (0-based)\n ));\n header.createCell(27).setCellValue(\"SL tuyển dụng \" + this.year);\n header.getCell(27).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 27, // first column (0-based)\n 27 // last column (0-based)\n ));\n\n header1.createCell(0).setCellValue(\"\");\n header1.getCell(0).setCellStyle(style);\n header1.createCell(1).setCellValue(\"\");\n header1.getCell(1).setCellStyle(style);\n int k = 0;\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header1.createCell(i).setCellValue(month[k++]);\n header1.getCell(i).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(1, // first row (0-based)\n 1, // last row (0-based)\n i, // first column (0-based)\n i + 1 // last column (0-based)\n ));\n } else {\n header1.createCell(i).setCellValue(\"\");\n header1.getCell(i).setCellStyle(style);\n }\n }\n\n header2.createCell(0).setCellValue(\"\");\n header2.getCell(0).setCellStyle(style);\n header2.createCell(1).setCellValue(\"\");\n header2.getCell(1).setCellStyle(style);\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header2.createCell(i).setCellValue(\"NEW\");\n header2.getCell(i).setCellStyle(style);\n } else {\n header2.createCell(i).setCellValue(\"TT\");\n header2.getCell(i).setCellStyle(style);\n }\n }\n\n int rowCount = 3;\n\n for (ReportByGroup item : reportList) {\n Row row = sheet.createRow(rowCount++);\n row.createCell(0).setCellValue(rowCount - 3);\n if (item.getDepartment() == null) {\n row.createCell(1).setCellValue(item.getGroup());\n } else {\n row.createCell(1).setCellValue(\"\");\n }\n row.createCell(2).setCellValue(item.getDepartment());\n int a = 3;\n for (StatisticMonth number : item.getStatisticMonth()) {\n if (number.getNumberOfNew() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfNew());\n }\n if (number.getNumberOfTT() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfTT());\n }\n }\n if (item.getTotal() == 0) {\n row.createCell(a).setCellValue(\"\");\n } else {\n row.createCell(a).setCellValue(item.getTotal());\n }\n\n for (int i = 0; i < 28; i++) {\n row.getCell(i).setCellStyle(style1);\n }\n }\n sheet.autoSizeColumn(0);\n sheet.autoSizeColumn(1);\n sheet.autoSizeColumn(2);\n sheet.autoSizeColumn(3);\n sheet.autoSizeColumn(4);\n sheet.autoSizeColumn(5);\n sheet.autoSizeColumn(6);\n sheet.autoSizeColumn(7);\n sheet.autoSizeColumn(8);\n sheet.autoSizeColumn(9);\n sheet.autoSizeColumn(10);\n sheet.autoSizeColumn(11);\n sheet.autoSizeColumn(12);\n sheet.autoSizeColumn(13);\n sheet.autoSizeColumn(14);\n sheet.autoSizeColumn(15);\n sheet.autoSizeColumn(16);\n sheet.autoSizeColumn(17);\n sheet.autoSizeColumn(18);\n sheet.autoSizeColumn(19);\n sheet.autoSizeColumn(20);\n sheet.autoSizeColumn(21);\n sheet.autoSizeColumn(22);\n sheet.autoSizeColumn(23);\n sheet.autoSizeColumn(24);\n sheet.autoSizeColumn(25);\n }",
"@Override\n\tpublic void export(HttpServletRequest request, HttpServletResponse response, Map<String, Object> map) {\n\t\tString sheetName = \"石砌边沟过路涵\";\n\t\t//表头\n\t\tString[] head0 = new String[] { \"编号\", \"中心桩号\", \"孔数-孔径(孔-米)\", \"位置\", \"L(m)\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\", \"工程数量\",\"备注\"};\n\t\tString[] head1 = new String[] { \"过路板钢筋(Kg)\", \"过路板混凝土C30(m3)\", \"涂料(m2)\", \"涵面铺装钢筋(Kg)\",\"涵面铺装混凝土C30(m3)\", \"C20混凝土台帽(m3)\", \"M15浆砌片石涵台身及基础(m2)\", \"涵身顶面1cm厚油毛毡(m2)\",\"透水性砾料(m3)\" };\n\t\t//对应excel中的行和列,下表从0开始{\"开始行,结束行,开始列,结束列\"}\n\t\tString[] headnum0 = new String[] { \"2,3,0,0\", \"2,3,1,1\", \"2,3,2,2\",\"2,3,3,3\", \"2,3,4,4\", \"2,2,5,13\" ,\"2,3,14,14\"};\n\t\tString[] headnum1 = new String[] { \"3,3,5,5\",\"3,3,6,6\", \"3,3,7,7\", \"3,3,8,8\",\"3,3,9,9\", \"3,3,10,10\", \"3,3,11,11\",\"3,3,12,12\",\"3,3,13,13\"};\n\t\t List<Map<String, Object>> dataList = passingCulvertNumberDao.getPassingCulvertNumberListEX(map);\n\t\t for (int i = 0; i < dataList.size(); i++) {\n\t\t\t dataList.get(i).put(\"row\", i+1);\n\t\t}\n\t\t String[] colName = new String[] { \"row\", \"PileNumber\", \"HoleCount\", \"Position\", \"L\", \"CrossingRebar\", \"CrossingConcrete\", \n\t\t\t\t \"Coating\", \"SpreadRebar\",\"SpreadConcrete\", \"ConcreteCap\", \"RubbleBasics\", \"ThickFelt\", \"PermeableGranules\",\"Remarks\"};\n\t\t Date now = new Date(); \n\t\t String date = \"创建时间\" + now.toString();\n\t\t try {\n\t\t\t //request, response, 数值,标题,第一行表头名字,第一行合并坐标,第二行表头名字,第二行合并坐标,数值对应列名称,创建时间,一共多少列,开始第二行表头列,结束第二行表头列,合计开始列\n\t\t\tReportMergeXls.reportMergeXls(request, response, dataList, sheetName, head0,headnum0, head1, headnum1, colName, date,15,5,14,5);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@GetMapping(\"/downloadFile/{fileName:.+}\")\n\tpublic ResponseEntity<Resource> downloadFile(@PathVariable String fileName, HttpServletRequest request) {\n\t\tResource resource = service.loadFileAsResource(fileName);\n\n\t\t// Try to determine file's content type\n\t\tString contentType = null;\n\t\ttry {\n\t\t\tcontentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath());\n\t\t} catch (IOException ex) {\n\t\t\tlogger.info(\"Could not determine file type.\");\n\t\t}\n\n\t\t// Fallback to the default content type if type could not be determined\n\t\tif (contentType == null) {\n\t\t\tcontentType = \"application/octet-stream\";\n\t\t}\n\n\t\treturn ResponseEntity.ok().contentType(MediaType.parseMediaType(contentType))\n\t\t\t\t.header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\n\t\t\t\t.body(resource);\n\t}",
"@GetMapping(\"/downloadFile/{fileName:.+}\")\n public ResponseEntity<Resource> downloadFile(@PathVariable String fileName, HttpServletRequest request) {\n Resource resource = storageService.loadFileAsResource(fileName);\n\n // Try to determine file's content type\n String contentType = null;\n try {\n contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath());\n } catch (IOException ex) {\n //\n }\n\n // Fallback to the default content type if type could not be determined\n if (contentType == null) {\n contentType = \"application/octet-stream\";\n }\n\n return ResponseEntity.ok().contentType(MediaType.parseMediaType(contentType))\n .header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\\\"\" + resource.getFilename() + \"\\\"\")\n .body(resource);\n }",
"private void setExcelDownloadHeader(HttpServletResponse response, String fileName) {\n // 设置response参数,可以打开下载页面\n response.reset();\n response.setContentType(\"application/vnd.ms-excel;charset=utf-8\");\n try {\n response.setHeader(\"Content-Disposition\", \"attachment;filename=\" + new String((fileName + \".xlsx\").getBytes(), \"iso-8859-1\"));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }",
"@GetMapping(\"admin/ranrad/dowload_gov_prog/{id_prov}/{id_monper}\")\n @ResponseBody\n public void dowload_gov_prog(HttpServletResponse response, @PathVariable(\"id_prov\") String idprov, @PathVariable(\"id_monper\") int idmonper) throws IOException {\n response.setContentType(\"application/octet-stream\");\n response.setHeader(\"Content-Disposition\", \"attachment; filename=SDG-\"+\"govprog\"+\".xlsx\");\n ByteArrayInputStream stream = govprog(idprov, idmonper);\n IOUtils.copy(stream, response.getOutputStream());\n }",
"void downloadingFile(String path);",
"private void manageDownloadZipFile(HttpServletRequest request, HttpServletResponse response, String folderName, String exportFileName) {\n\t\tlogger.debug(\"IN\");\n\t\ttry {\n\t\t\tString fileExtension = \"zip\";\n\t\t\tmanageDownload(exportFileName, fileExtension, folderName, response, false);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Error while downloading importation log file\", e);\n\t\t} finally {\n\t\t\tlogger.debug(\"OUT\");\n\t\t}\n\t}",
"public FileInputStream downloadCompletedJobReport(String start, String end, int flag, int client) throws Exception;",
"@Override\n public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response) throws IOException {\n \n if(result==\"/downloadHermes\") {\n String hermesResultID = request.getRequestURI().replaceAll(result+\"/\", \"\");\n \n HermesResultDTO hermesResult = dao.findById(hermesResultID);\t\n archive = new File(hermesResult.dir, \"hermesResults.csv\");\t\n response.setContentLengthLong(archive.length());\n response.setHeader(\"Content-Disposition\", \"attachment; filename=hermesResults.csv;\");\n }\n return true; // allow all requests\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, java.io.IOException {\n System.out.println(\"---===| Excel Report |===---\");\n response.setContentType(\"application/x-msexcel\");\n \n Company cmp = new Company();\n try{\n Vector listCompany = DbCompany.list(0,0, \"\", \"\");\n if(listCompany!=null && listCompany.size()>0){\n cmp = (Company)listCompany.get(0);\n }\n }catch(Exception ext){\n System.out.println(ext.toString());\n }\n \n Vector result = new Vector();\n String userName = \"\";\n String filter = \"\";\n Vector temp = new Vector();\n Vector locations = DbLocation.list(0,0, \"\", \"name\");\n \n try{\n HttpSession session = request.getSession();\n \n temp = (Vector)session.getValue(\"REPORT_STOCK\");\n userName = (String)session.getValue(\"REPORT_STOCK_USER\");\n filter = (String)session.getValue(\"REPORT_STOCK_FILTER\");\n \n String srcCode = (String)temp.get(0);\n String srcName = (String)temp.get(1);\n int orderBy = Integer.parseInt((String)temp.get(2));\n int orderType = Integer.parseInt((String)temp.get(3));\n int supZero = Integer.parseInt((String)temp.get(4));\n \n String whereClause = \"\";\n String orderClause = \"\";\n\n if(srcCode!=null && srcCode.length()>0){\n whereClause = \" code like '%\"+srcCode+\"%'\"; \n }\n if(srcName!=null && srcName.length()>0){\n if(whereClause!=null && whereClause.length()>0){\n whereClause = whereClause + \" and \";\t\t\n }\n whereClause = whereClause + \" name like '%\"+srcName+\"%'\";\n }\n\n if(supZero==1){\n if(whereClause!=null && whereClause.length()>0){\n whereClause = whereClause + \" and \";\t\t\n }\n whereClause = whereClause + \" qtystock <> 0\";\n }\n\n if(orderBy==0){\n orderClause = \" name\";\n }\n else if(orderBy==1){\n orderClause = \" code\";\n }\n else{\n orderClause = \" qtystock\";\n }\n\n if(orderType==1){\n orderClause = orderClause + \" desc\";\n }\n \n \n result = SessStockReportView.getStockItemList(0, 0, whereClause, orderClause);\n\n \n }catch(Exception e){\n System.out.println(e.toString());\n }\n \n boolean gzip = false ;\n \n // response.setCharacterEncoding( \"UTF-8\" ) ;\n OutputStream gzo ;\n if ( gzip ) {\n response.setHeader( \"Content-Encoding\", \"gzip\" ) ;\n gzo = new GZIPOutputStream( response.getOutputStream() ) ;\n } else {\n gzo = response.getOutputStream() ;\n }\n PrintWriter wb = new PrintWriter( new OutputStreamWriter( gzo, \"UTF-8\" ) ) ;\n\n wb.println(\"<?xml version=\\\"1.0\\\"?>\");\n wb.println(\"<?mso-application progid=\\\"Excel.Sheet\\\"?>\");\n wb.println(\"<Workbook xmlns=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\" \");\n wb.println(\" xmlns:o=\\\"urn:schemas-microsoft-com:office:office\\\" \");\n wb.println(\" xmlns:x=\\\"urn:schemas-microsoft-com:office:excel\\\" \");\n wb.println(\" xmlns:ss=\\\"urn:schemas-microsoft-com:office:spreadsheet\\\" \");\n wb.println(\" xmlns:html=\\\"http://www.w3.org/TR/REC-html40\\\">\");\n wb.println(\"<DocumentProperties xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\" <Author>Eka D</Author>\");\n wb.println(\"<LastAuthor>Eka D</LastAuthor>\");\n wb.println(\"<Created>2014-09-10T15:22:44Z</Created>\");\n wb.println(\"<Company>Toshiba</Company>\");\n wb.println(\"<Version>14.00</Version>\");\n wb.println(\"</DocumentProperties>\");\n wb.println(\"<OfficeDocumentSettings xmlns=\\\"urn:schemas-microsoft-com:office:office\\\">\");\n wb.println(\"<AllowPNG/>\");\n wb.println(\"</OfficeDocumentSettings>\");\n wb.println(\"<ExcelWorkbook xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<WindowHeight>5190</WindowHeight>\");\n wb.println(\"<WindowWidth>13395</WindowWidth>\");\n wb.println(\"<WindowTopX>0</WindowTopX>\");\n wb.println(\"<WindowTopY>30</WindowTopY>\");\n wb.println(\"<ProtectStructure>False</ProtectStructure>\");\n wb.println(\"<ProtectWindows>False</ProtectWindows>\");\n wb.println(\"</ExcelWorkbook>\");\n wb.println(\"<Styles>\");\n wb.println(\"<Style ss:ID=\\\"Default\\\" ss:Name=\\\"Normal\\\">\");\n wb.println(\"<Alignment ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat/>\");\n wb.println(\"<Protection/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s16\\\" ss:Name=\\\"Comma\\\">\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0.00_);_(* \\\\(#,##0.00\\\\);_(* "-"??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s62\\\">\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s64\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* "-"??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s66\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Bottom\\\"/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"12\\\" ss:Color=\\\"#000000\\\" \");\n wb.println(\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s67\\\">\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s69\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"8\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s71\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"8\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* "-"??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s72\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* "-"??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s73\\\">\");\n wb.println(\"<Borders/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s75\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Center\\\" ss:Vertical=\\\"Center\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s76\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Left\\\" ss:Vertical=\\\"Center\\\" ss:Indent=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s77\\\" ss:Parent=\\\"s16\\\">\");\n wb.println(\"<Alignment ss:Horizontal=\\\"Right\\\" ss:Vertical=\\\"Center\\\" ss:Indent=\\\"1\\\" ss:WrapText=\\\"1\\\"/>\");\n wb.println(\"<Borders>\");\n wb.println(\"<Border ss:Position=\\\"Bottom\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Left\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Right\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"<Border ss:Position=\\\"Top\\\" ss:LineStyle=\\\"Continuous\\\" ss:Weight=\\\"1\\\"/>\");\n wb.println(\"</Borders>\");\n wb.println(\"<Font ss:FontName=\\\"Tahoma\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"7.5\\\" ss:Color=\\\"#333333\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"<NumberFormat ss:Format=\\\"_(* #,##0_);_(* \\\\(#,##0\\\\);_(* "-"??_);_(@_)\\\"/>\");\n wb.println(\"</Style>\");\n wb.println(\"<Style ss:ID=\\\"s78\\\">\");\n wb.println(\"<Font ss:FontName=\\\"Calibri\\\" x:Family=\\\"Swiss\\\" ss:Size=\\\"11\\\" ss:Color=\\\"#000000\\\" ss:Bold=\\\"1\\\"/>\");\n wb.println(\"<Interior/>\");\n wb.println(\"</Style>\");\n wb.println(\"</Styles>\");\n wb.println(\"<Worksheet ss:Name=\\\"Stock Total\\\">\");\n wb.println(\"<Table x:FullColumns=\\\"1\\\" x:FullRows=\\\"1\\\" ss:StyleID=\\\"s62\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"29.25\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:AutoFitWidth=\\\"0\\\" ss:Width=\\\"63\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s62\\\" ss:Width=\\\"180\\\"/>\");\n wb.println(\"<Column ss:StyleID=\\\"s64\\\" ss:AutoFitWidth=\\\"0\\\" ss:Span=\\\"9\\\"/>\");\n wb.println(\"<Column ss:Index=\\\"14\\\" ss:StyleID=\\\"s64\\\" ss:Width=\\\"49.5\\\"/>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"15.75\\\">\");\n wb.println(\"<Cell ss:MergeAcross=\\\"\"+(((locations!=null && locations.size()>0) ? locations.size() : 0)+3)+\"\\\" ss:StyleID=\\\"s66\\\"><Data ss:Type=\\\"String\\\">\"+cmp.getName().toUpperCase()+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"15.75\\\">\");\n wb.println(\"<Cell ss:MergeAcross=\\\"\"+(((locations!=null && locations.size()>0) ? locations.size() : 0)+3)+\"\\\" ss:StyleID=\\\"s66\\\"><Data ss:Type=\\\"String\\\">STOCK TOTAL BY LOCATION REPORT</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:Index=\\\"4\\\" ss:AutoFitHeight=\\\"0\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s78\\\"><Data ss:Type=\\\"String\\\">Date : \"+JSPFormater.formatDate(new Date(), \"dd/MM/yyyy\")+\", by : \"+userName+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s78\\\"><Data ss:Type=\\\"String\\\">\"+filter+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:Height=\\\"42\\\" ss:StyleID=\\\"s67\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">NO</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">CODE</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s69\\\"><Data ss:Type=\\\"String\\\">ITEM NAME</Data></Cell>\");\n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">\"+d.getName()+\"</Data></Cell>\");\n }\n }\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R19</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R22</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Bandara R28</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Blahkiuh</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Coco Mart Mas Ubud</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">DC1</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Gudang Costing</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Gudang Retur</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">xxx</Data></Cell>\");\n //wb.println(\"<Cell ss:StyleID=\\\"s71\\\"><Data ss:Type=\\\"String\\\">Office</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s72\\\"><Data ss:Type=\\\"String\\\">TOTAL</Data></Cell>\");\n wb.println(\"</Row>\");\n \n String wherex = \"(\";\n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n wherex = wherex +\" location_id=\"+d.getOID()+\" or\";\n }\n \n wherex = wherex.substring(0,wherex.length()-3)+\")\";\n }\n \n if(result!=null && result.size()>0){\n \n Hashtable hashQty = SessStockReportView.getStockByLocationByItem();//im.getOID(), wherex); \n \n for(int x=0; x<result.size(); x++){\n \n System.out.println(\"- processing line : \"+x);\n \n ItemMaster im = (ItemMaster)result.get(x);\n double totAv = 0;\n double totOtw = 0;\n double totSlp = 0;\n double tot = 0;\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\" ss:StyleID=\\\"s73\\\">\");\n wb.println(\"<Cell ss:StyleID=\\\"s75\\\"><Data ss:Type=\\\"Number\\\">\"+(x+1)+\"</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s76\\\"><Data ss:Type=\\\"String\\\">\"+im.getCode()+\"</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s76\\\"><Data ss:Type=\\\"String\\\">\"+im.getName()+\"</Data></Cell>\");\n \n //Hashtable hashQty = SessStockReportView.getStockByLocationByItem();//im.getOID(), wherex);\n \n if(locations!=null && locations.size()>0){\n for(int i=0; i<locations.size(); i++){\n Location d = (Location)locations.get(i);\n double qty = 0;\n if((String)hashQty.get(im.getOID()+\"\"+d.getOID())!=null && ((String)hashQty.get(im.getOID()+\"\"+d.getOID())).length()>0){\n qty = Double.parseDouble((String)hashQty.get(im.getOID()+\"\"+d.getOID()));\n }\n //SessStockReportView.getStockByLocationByItem(im.getOID(), d.getOID(), \"APPROVED\");\n double qtyOtw = 0;//SessStockReportView.getStockByLocationByItem(im.getOID(), d.getOID(), \"DRAFT\");\n double qtySlp = 0;\n //if(displayPending){\n // qtySlp = 0;//SessStockReportView.getSalesPendingLocationByItem(im.getOID(), d.getOID());\n //}\n\n //if(qtyOtw < 0){\n // qtyOtw = qtyOtw * -1;\n //}\n\n //qty = qty - qtyOtw - qtySlp;\n\n totAv = totAv + qty;\n //totOtw = totOtw + qtyOtw;\n //totSlp = totSlp + qtySlp;\n //tot = tot + qty + qtyOtw + qtySlp;\n \n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">\"+qty+\"</Data></Cell>\");\n }\n }\n \n /*wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">12345</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">24</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">0</Data></Cell>\");\n */ \n wb.println(\"<Cell ss:StyleID=\\\"s77\\\"><Data ss:Type=\\\"Number\\\">\"+(totAv + totOtw +totSlp)+\"</Data></Cell>\");\n wb.println(\"</Row>\");\n \n wb.flush() ;\n }\n }\n \n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<Print>\");\n wb.println(\"<ValidPrinterInfo/>\");\n wb.println(\"<PaperSizeIndex>9</PaperSizeIndex>\");\n wb.println(\"<VerticalResolution>0</VerticalResolution>\");\n wb.println(\"</Print>\");\n wb.println(\"<Selected/>\");\n wb.println(\"<Panes>\");\n wb.println(\"<Pane>\");\n wb.println(\"<Number>3</Number>\");\n wb.println(\"<ActiveRow>13</ActiveRow>\");\n wb.println(\"<ActiveCol>2</ActiveCol>\");\n wb.println(\"</Pane>\");\n wb.println(\"</Panes>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"<Worksheet ss:Name=\\\"Sheet2\\\">\");\n wb.println(\"<Table ss:ExpandedColumnCount=\\\"1\\\" ss:ExpandedRowCount=\\\"1\\\" x:FullColumns=\\\"1\\\" \");\n wb.println(\" x:FullRows=\\\"1\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\"/>\");\n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"<Worksheet ss:Name=\\\"Sheet3\\\">\");\n wb.println(\"<Table ss:ExpandedColumnCount=\\\"1\\\" ss:ExpandedRowCount=\\\"1\\\" x:FullColumns=\\\"1\\\"\");\n wb.println(\" x:FullRows=\\\"1\\\" ss:DefaultRowHeight=\\\"15\\\">\");\n wb.println(\"<Row ss:AutoFitHeight=\\\"0\\\"/>\");\n wb.println(\"</Table>\");\n wb.println(\"<WorksheetOptions xmlns=\\\"urn:schemas-microsoft-com:office:excel\\\">\");\n wb.println(\"<PageSetup>\");\n wb.println(\"<Header x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<Footer x:Margin=\\\"0.3\\\"/>\");\n wb.println(\"<PageMargins x:Bottom=\\\"0.75\\\" x:Left=\\\"0.7\\\" x:Right=\\\"0.7\\\" x:Top=\\\"0.75\\\"/>\");\n wb.println(\"</PageSetup>\");\n wb.println(\"<Unsynced/>\");\n wb.println(\"<ProtectObjects>False</ProtectObjects>\");\n wb.println(\"<ProtectScenarios>False</ProtectScenarios>\");\n wb.println(\"</WorksheetOptions>\");\n wb.println(\"</Worksheet>\");\n wb.println(\"</Workbook>\");\n\n wb.flush() ;\n }",
"@RequestMapping(value = \"/downloadExcelForPersonalDetails\", method = RequestMethod.GET)\n\n\tpublic ModelAndView downLoadExcelForPersonalDEtails(HttpServletRequest request, HttpSession session) {\n\t\tString adminId = (String) request.getSession().getAttribute(\"adminId\");\n\t\tif (adminId != null) {\n\n\t\t\tList<RespondentBean> list = admindao.getPersonDetails();\n\n\t\t\treturn new ModelAndView(\"PersonDetailsExcel\", \"list\", list);\n\t\t}\n\t\treturn new ModelAndView(\"redirect:/Login\");\n\t}",
"@RequestMapping(value = \"/{chatroomName}/{hash}\", method = RequestMethod.GET)\n\tpublic void download(@PathVariable String chatroomName, @PathVariable(\"hash\") String hash, HttpServletResponse response) throws IOException, NotFoundException {\n\t\t\n Chatroom chatroom = chatroomService.findByChatname(chatroomName);\n \n System.out.println(\"Get from: \" + chatroomName);\n\t\t\n\t\t// TODO: ensure hash is legal\n\t\tString path = Paths.get(fileDirectory, hash).toString();\n\t\t\n\t\tFile file = new File(path);\n\t\t\n\t\tif (file.exists()) {\n\t\t\t\n\t\t\tInputStream is = new FileInputStream(file);\n\t\t // copy it to response's OutputStream\n\t\t\tIOUtils.copy(is, response.getOutputStream());\n\t\t response.flushBuffer();\n\t\t} else {\n\t\t\t// SOMEHOW INDICATE IT FAILED\n\t\t\tresponse.sendError(404, \"Resource not found\");\n\t\t\tresponse.flushBuffer();\t\t\t\n\t\t}\n\t}",
"public void handle(HttpExchange t) throws IOException {\n os = t.getResponseBody();\n urlString = t.getRequestURI().toString();\n this.url =t.getRequestURI().toString().split(\"/\"); //getRequestURI for URL and split\n\n System.out.println(\"Base URI Received: \"+t.getRequestURI().toString());\n\n if(urlString.contains(\".\")) {\n Helper.returnRequestedFile(t, urlString, os);\n } else {\n if(url.length == 0 || url[url.length-1].equals(\"index.html\")) {\n //Returns index.html\n basePage = new File(\"src/StockMarketServer/client/index/index.html\"); //Write index.html to file\n t.getResponseHeaders().add(\"Content-type\", \"text/html\");\n t.sendResponseHeaders(200, basePage.length()); //Return okay code and length of file\n Files.copy(Paths.get(basePage.getAbsolutePath()), os); //Write index.html to response\n os = t.getResponseBody();\n }\n else {\n //Returns pageNotFound.html\n basePage = new File(\"src/StockMarketServer/client/pageNotFound/pageNotFound.html\"); //Write index.html to file\n t.sendResponseHeaders(404, basePage.length()); //Return okay code and length of file\n Files.copy(Paths.get(basePage.getAbsolutePath()), os); //Write index.html to response\n os = t.getResponseBody();\n }\n }\n os.close();\n }",
"void download(SearchResult result, String downloadPath);",
"public void downloadResume(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\n ResumeUploadActionForm resumeUploadActionForm = (ResumeUploadActionForm) form;\r\n HttpSession session = request.getSession();\r\n CmnUserMst lObjCmnUserMst = (CmnUserMst) session.getAttribute(\"cmnUserMst\");\r\n ResourceBundle resourceBundle = ResourceBundle.getBundle(\"common/resources/Constants\");\r\n\r\n\r\n File folder = new File(MessageFormat.format(resourceBundle.getString(\"UPLOADPATH.RESUME\"), System.getenv(resourceBundle.getString(\"UPLOADPATH.BASE\")), lObjCmnUserMst.getUserId()));\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (File file : listOfFiles) {\r\n if (file.isFile()) {\r\n \r\n// \r\n String fileName = file.getName(); \r\n response.setContentType(\"application/octet-stream\");\r\n response.setHeader(\"Content-Disposition\", \"attachment;filename=\" + fileName);\r\n\r\n try {\r\n //Get it from file system\r\n FileInputStream in = new FileInputStream(file);\r\n\r\n //Get it from web path\r\n //jndi:/localhost/StrutsExample/upload/superfish.zip\r\n //URL url = getServlet().getServletContext()\r\n // .getResource(\"upload/superfish.zip\");\r\n //InputStream in = url.openStream();\r\n\r\n //Get it from bytes array\r\n //byte[] bytes = new byte[4096];\r\n //InputStream in = new ByteArrayInputStream(bytes);\r\n\r\n ServletOutputStream out = response.getOutputStream();\r\n\r\n byte[] outputByte = new byte[4096];\r\n //copy binary content to output stream\r\n while (in.read(outputByte, 0, 4096) != -1) {\r\n out.write(outputByte, 0, 4096);\r\n }\r\n in.close();\r\n out.flush();\r\n out.close();\r\n\r\n } catch (Exception e) {\r\n\r\n e.printStackTrace();\r\n }\r\n\r\n \r\n }\r\n }\r\n\r\n\r\n\r\n\r\n }",
"@SuppressWarnings(\"unlikely-arg-type\")\r\n\t@Override\r\n\tpublic void handle(HttpExchange he) throws IOException {\n\t\t\r\n\t\tif(\"0:0:0:0:0:0:0:1\".equals(he.getLocalAddress().getHostName())) { //esta pagina es para el servidor\r\n\t\t\t\r\n\t\tString cad=\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/descarga\"+OpenFileDialog.ext+\"'\\\">\";\r\n\r\n\t\tString response=\t\t\t\r\n\t\t\t\"<!DOCTYPE html>\"+\r\n \t\t\"<html>\"+\r\n \t\t\"<body>\"+\r\n \t\t\r\n \t\t\"<h1> Direccion IP </h1>\" + \r\n \t\t\"<h2>\" + new Host().daDireccioIP()+\":\"+ Prueba10.puerto +\"</h2>\"+\r\n \t\t\r\n\t\t\t\"<p>Click para cargar direccion</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/openFileDialog'\\\">\" + \r\n\t\t\t\"</form>\"+\t\t\r\n\t\t\t\"<h4>\" + OpenFileDialog.ruta + \"</h4>\" +\r\n\t\t\t\r\n\t\t\t\"<p>Click para Descargar</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\tcad + \r\n\t\t\t\"</form>\"+\r\n \r\n\t\t\t\"<p>Click para apagar</p>\" + \r\n\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/apagado'\\\">\" + \r\n\t\t\t\"</form>\"+\r\n\t\t\t\t\t\t\t\r\n\t\t\t\"</body>\"+\r\n\t\t\t\"</html>\"\r\n\t\t\t;\r\n\t\t\r\n\t\the.sendResponseHeaders(200, response.length()); \r\n\t\tOutputStream outputStream = he.getResponseBody();\r\n\t\toutputStream.write(response.getBytes());\r\n\t\toutputStream.close();\r\n\t\t\r\n\t\t}else {//esta pagina es para el cliente, el cual solo puede descargar archivos\r\n\t\t\t\r\n\t\t\tString cad=\"<input type=\\\"button\\\" value=\\\"CLICK\\\" onclick=\\\"window.location.href='/descarga\"+OpenFileDialog.ext+\"'\\\">\";\r\n\r\n\t\t\tString response=\t\t\t\r\n\t\t\t\t\"<!DOCTYPE html>\"+\r\n\t \t\t\"<html>\"+\r\n\t \t\t\"<body>\"+\r\n\r\n\t\t\t\t\"<p>Click para Descargar</p>\" + \r\n\t\t\t\t\"<form method=\\\"get\\\">\" + \r\n\t\t\t\tcad + \r\n\t\t\t\t\"</form>\"+\r\n\t\t\t\t\r\n \t\t\t\"<h1> Archivo </h1>\" + \r\n \t\t\t\"<h2>\" + OpenFileDialog.nombreArch + \"</h2>\"+\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\"</body>\"+\r\n\t\t\t\t\"</html>\"\r\n\t\t\t\t;\r\n\t\t\t\r\n\t\t\the.sendResponseHeaders(200, response.length()); \r\n\t\t\tOutputStream outputStream = he.getResponseBody();\r\n\t\t\toutputStream.write(response.getBytes());\r\n\t\t\toutputStream.close();\r\n\t\t\t\r\n\t\t}\r\n\t}",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n String sts = \"Tickets downloaded.\";\n String filename = request.getParameter(\"tripid\") + \".zip\";\n /* TODO output your page here. You may use following sample code. */\n File file = new File(\"F:\\\\vifer\\\\Project Doc\\\\8th sem project\\\\Full project\\\\HolidayPlanner\\\\HolidayPlanner\\\\Tickets\" + filename);\n\n if (!file.exists()) {\n\n sts = \"Tickets are not available. Contact vendor.\";\n\n } else {\n\n\n ServletContext ctx = getServletContext();\n\n InputStream fis = new FileInputStream(file);\n\n String mimeType = ctx.getMimeType(file.getAbsolutePath());\n\n response.setContentType(mimeType != null ? mimeType : \"application/octet-stream\");\n\n response.setContentLength((int) file.length());\n\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"\" + filename + \"\\\"\");\n\n ServletOutputStream os = response.getOutputStream();\n\n byte[] bufferData = new byte[1024];\n\n int read = 0;\n\n while ((read = fis.read(bufferData)) != -1) {\n\n os.write(bufferData, 0, read);\n\n }\n\n os.flush();\n\n os.close();\n\n fis.close();\n }\n request.setAttribute(\"Status\", sts);\n RequestDispatcher rd = request.getRequestDispatcher(\"BookedTripServlet\");\n rd.forward(request, response);\n\n } catch (Exception e) {\n // out.println(e.toString());\n } finally {\n // out.close();\n }\n }",
"@Override\r\n public void execute(Workbook workbook) {\n InputStream fileStream = this.getResourceStream(\"xlsx/Employee absence schedule.xlsx\");\r\n workbook.open(fileStream);\r\n }",
"protected HSSFWorkbook getTemplateSource(String url, HttpServletRequest request) throws Exception {\r\n\t\tLocalizedResourceHelper helper = new LocalizedResourceHelper(getApplicationContext());\r\n\t\tLocale userLocale = RequestContextUtils.getLocale(request);\r\n\t\tResource inputFile = helper.findLocalizedResource(url, EXTENSION, userLocale);\r\n\r\n\t\t// Create the Excel document from the source.\r\n\t\tif (logger.isDebugEnabled()) {\r\n\t\t\tlogger.debug(\"Loading Excel workbook from \" + inputFile);\r\n\t\t}\r\n\t\tPOIFSFileSystem fs = new POIFSFileSystem(inputFile.getInputStream());\r\n\t\treturn new HSSFWorkbook(fs);\r\n\t}",
"@Override\n public void handle(HttpExchange exchange) throws IOException {\n boolean wasSuccessful = false;\n try {\n // Only allow POST requests for this operation.\n // This operation requires a POST request, because the\n // client is \"posting\" information to the server for processing.\n if (exchange.getRequestMethod().toLowerCase().equals(\"get\")) {\n\n //String containing the url desired\n String URLrequested = exchange.getRequestURI().toString();\n\n //Checks to see if it is just the open URL as ex: localhost:8080, this is mapped to index.html, this is the case for nothing added.\n if (URLrequested.length() == 1){\n\n\n String location = \"web/index.html\";\n Path path = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n Files.copy(path, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n } else if (URLrequested.equals(\"/\")) {\n\n //\n String location = \"web\" + URLrequested;\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the exchange's responsive body header\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else if(URLrequested.equals(\"/css/main.css\")){\n String location = \"web/css/main.css\";\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else{\n String location = \"web/HTML/404.html\";\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n //Response header needs to come first.\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_NOT_FOUND, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n wasSuccessful = true;\n\n\n }\n\n if (!wasSuccessful) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_BAD_REQUEST, 0);\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n }\n catch (IOException e) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_SERVER_ERROR, 0);\n //Completes the exchange\n exchange.getResponseBody().close();\n e.printStackTrace();\n }\n }",
"protected void processResponse(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ClassNotFoundException {\r\n String obsdate = request.getParameter(\"date\");\r\n String obsid = request.getParameter(\"id\");\r\n String server = BambooConfig.url_ftp_bamboo;\r\n int port = BambooConfig.port_ftp_bamboo;\r\n String user = BambooConfig.user_ftp_bamboo;\r\n String pass = BambooConfig.pass_ftp_bamboo;\r\n\r\n String filePath = \"/\" + BambooConfig.nameFolder_ftp_bamboo + \"/Observations/\" + obsid + \"_\" + obsdate + \"/\";\r\n FTPClient ftpClient = new FTPClient();\r\n ftpClient.connect(server, port);\r\n ftpClient.login(user, pass);\r\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\r\n if (ftpClient.changeWorkingDirectory(filePath)) {\r\n String s[] = ftpClient.listNames();\r\n filePath = s[0];\r\n InputStream inStream = ftpClient.retrieveFileStream(s[0]);\r\n // obtains ServletContext\r\n ServletContext context = request.getServletContext();\r\n String appPath = context.getRealPath(\"\");\r\n System.out.println(\"appPath = \" + appPath);\r\n\r\n // gets MIME type of the file\r\n String mimeType = context.getMimeType(filePath);\r\n if (mimeType == null) {\r\n // set to binary type if MIME mapping not found\r\n mimeType = \"application/octet-stream\";\r\n }\r\n System.out.println(\"MIME type: \" + mimeType);\r\n\r\n // modifies response\r\n response.setContentType(mimeType);\r\n\r\n // forces download\r\n String headerKey = \"Content-Disposition\";\r\n String headerValue = String.format(\"attachment; filename=\\\"%s\\\"\", filePath);\r\n response.setHeader(headerKey, headerValue);\r\n IOUtils.copy(inStream, response.getOutputStream());\r\n\r\n response.flushBuffer();\r\n }\r\n //response.sendRedirect(request.getContextPath());\r\n }",
"String download(String path) throws IOException;",
"@RequestMapping(value = \"**\", method = {RequestMethod.GET})\r\n public ResponseEntity<?> getFileResponse(HttpServletRequest request, @RequestHeader HttpHeaders headers)\r\n throws WapException {\r\n return super.getFileResponse(request, headers);\r\n }",
"protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException, ClassNotFoundException, SQLException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n HttpSession session = request.getSession();\r\n String fname = request.getParameter(\"fname\");\r\n System.out.println(\"ggggggggggggggggggggggg\" + fname);\r\n RequestDispatcher rd = null;\r\n String userName = session.getAttribute(\"downloadUserMail\").toString();\r\n String data = \"\";\r\n String uploadedFileLocation =\"C://ServerFile/\";\r\n DBQuery db = new DBQuery();\r\n System.out.println(\"fname = \" + fname);\r\n //fname = db.getData(userName, fname);\r\n System.out.println(\"fname = \" + fname);\r\n System.out.println(\"uploadedFileLocation + fname = \" + uploadedFileLocation + fname);\r\n try {\r\n BufferedReader br = null;\r\n FileReader fr1 = null;\r\n FileInputStream fis;\r\n LineNumberReader lnr1 = null;\r\n fis = new FileInputStream(uploadedFileLocation + fname);\r\n br = new BufferedReader(new InputStreamReader(fis));\r\n fr1 = new FileReader(uploadedFileLocation + fname);\r\n lnr1 = new LineNumberReader(fr1);\r\n while (lnr1.readLine() != null) {\r\n String line_content = br.readLine();\r\n data += line_content + \"\\n\";\r\n }\r\n // out.print(data);\r\n response.setContentType(\"APPLICATION/OCTET-STREAM\");\r\n response.setHeader(\"Content-Disposition\", \"attachment; fname=\\\"\" + fname + \"\\\"\");\r\n java.io.FileInputStream fileInputStream = new java.io.FileInputStream(uploadedFileLocation + \"/\" + fname);\r\n int i;\r\n while ((i = fileInputStream.read()) != -1) {\r\n out.write(i);\r\n }\r\n fileInputStream.close();\r\n out.close();\r\n\r\n\r\n session.setAttribute(\"DownloadFile\", \"File Download Successful!!!\");\r\n rd = request.getRequestDispatcher(\"DownloadStatus.jsp\");\r\n rd.forward(request, response);\r\n \r\n \r\n \r\n \r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n \r\n \r\n \r\n }",
"@RequestMapping(method = RequestMethod.GET, path = \"/{filename}\", produces = \"application/octet-stream\")\n\tpublic ResponseEntity<InputStreamResource> download(\n\t\t\t@RequestHeader(name = \"Range\", defaultValue = \"bytes=0-\") String rangeSpec,\n\t\t\t@PathVariable(\"filename\") String filename) throws IOException {\n\t\tfinal File baseFileDir = new File(\"D:\\\\Downloads\");\n\t\tFileInputStream fis;\n\t\tFile file = new File(baseFileDir, filename);\n\t\tfis = new FileInputStream(file);\n\t\tString[] range = rangeSpec.trim().split(\"[=\\\\- ]\");\n\t\tint offset = 0;\n\t\tif (\"bytes\".equals(range[0])) {\n\t\t\toffset = Integer.parseInt(range[1]);\n\t\t\tfis.skip(offset);\n\t\t}\n\n\t\tSystem.out.println(\"filename=\" + filename + \", range=\" + rangeSpec + \", offset=\" + offset);\n\t\tInputStreamResource isr = new InputStreamResource(fis);\n\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setContentLength(file.length() - offset);\n\t\theaders.set(\"Content-Disposition\",\n\t\t\t\t\"attachment; filename=\" + (offset == 0 ? filename : filename + \"@\" + offset));\n\t\theaders.set(\"Accept-Ranges\", \"bytes\");\n\t\theaders.set(\"Content-Range\", \"bytes \" + offset + \"-\" + (file.length() - offset) + \"/\" + file.length());\n\n\t\treturn new ResponseEntity<>(isr, headers, HttpStatus.OK);\n\t}",
"@RequestMapping(value = CaerusAnnotationURLConstants.CANDIDATE_DOWNLOAD_CV)\n\tpublic void downloadCV(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException,CaerusCommonException\n\t{\n\t\t//Spring security authentication containing the logged in user details\n\t\tAuthentication auth = SecurityContextHolder.getContext().getAuthentication();\n\t\tString emailId = auth.getName();\n\t\t\n\t\t\tStudentDom file = studentManager.getDetailsByEmailId(emailId);\n\t\t\t\n\t\t\t String fileName = file.getResumeName();\n\t\t\t if(fileName != null && !fileName.equals(null))\n\t\t\t {\n\t\t \t response.setHeader(\"Content-Disposition\",\"inline; filename=\\\"\" + file.getResumeName() +\"\\\"\");\n\t\t \t FileCopyUtils.copy(file.getFileData(), response.getOutputStream());\n\t\t } \n\t\t\t else\n\t\t\t {\n\t\t \t throw new CaerusCommonException(\"Resume is not available in database, Please upload your resume\");\n\t\t\t }\n\t}",
"@Override\n\tpublic List<String> beginDownloadReport(String interTye,\n\t\t\tAppDisRecomReq req, AppDisResponse resp) throws AppDisException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic List<String> beginDownloadReport(String interTye,\n\t\t\tAppDisRecomReq req, AppDisResponse resp) throws AppDisException {\n\t\treturn null;\n\t}",
"protected void renderMergedOutputModel(Map model, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tFile file = (File)model.get(\"downloadFile\");\n\t\tresponse.setContentType(super.getContentType());\n\t\tresponse.setContentLength((int)file.length());\n\t\tresponse.setHeader(\"Content-Transfer-Encoding\",\"binary\");\n\t\tresponse.setHeader(\"Content-Disposition\",\"attachment;fileName=\\\"\"+java.net.URLEncoder.encode(file.getName(),\"utf-8\")+\"\\\";\");\n\t\tOutputStream out = response.getOutputStream();\n\t\tFileInputStream fis = null;\n\t\ttry\n\t\t{\n\t\t\tfis = new FileInputStream(file);\n\t\t\tFileCopyUtils.copy(fis, out);\n\t\t}\n\t\tcatch(java.io.IOException ioe)\n\t\t{\n\t\t\tioe.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif(fis != null) fis.close();\n\t\t}\n\t\tout.flush();\n\t}",
"public void downloadDay(){\n\n}",
"@RequestMapping(value = \"/uploadHoliday\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody\r\n\tvoid uploadHoliday(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tfinal String fileUrl = \"/home/esh/Holiday.xls\";\r\n\r\n\t\tnew UploadHolidayService().insertDB(fileUrl);\r\n\t}",
"protected abstract File download(Exception previousException) throws Exception;",
"@RequestMapping(value = \"/groupDownloadMapIsr\")\r\n\tpublic void groupDownloadMapIsr(HttpServletRequest request, HttpServletResponse response) {\r\n\t\ttry {\r\n\t\t\tString currentUser = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSER);\r\n\t\t\tString currentUserId = (String) request.getSession().getAttribute(IApplicationConstants.CURRUSERID);\r\n\t\t\tString customer = (String) request.getSession().getAttribute(IApplicationConstants.CUSTOMER);\r\n\t\t\t\r\n\t\t\t// fall back for PDF utility\r\n\t\t\tcurrentUser = (currentUser == null) ? request.getParameter(\"username\") : currentUser;\r\n\t\t\tcurrentUserId = (currentUserId == null) ? request.getParameter(\"userid\") : currentUserId;\r\n\t\t\tcustomer = (customer == null) ? request.getParameter(\"customerid\") : customer;\r\n\t\t\t\r\n\t\t\tString theme = Utils.getContractName();\r\n\t\t\tif(theme != null && theme.trim().length() == 0) {\r\n\t\t\t\ttheme = request.getParameter(\"theme\");\r\n\t\t\t\tthemeResolver.setThemeName(request, response, theme);\r\n\t\t\t}\r\n\t\t\tGroupDownloadTO groupDownloadTO = new GroupDownloadTO(); \r\n\t\t\t\r\n\t\t\tgroupDownloadTO.setUdatedBy((currentUserId == null) ? 0 : Long.parseLong(currentUserId));\r\n\t\t\tgroupDownloadTO.setUserName(currentUser);\r\n\t\t\tgroupDownloadTO.setTestAdministrationVal(request.getParameter(\"p_test_administration\"));\r\n\t\t\tgroupDownloadTO.setSchool(request.getParameter(\"p_school\"));\r\n\t\t\tgroupDownloadTO.setDistrict(request.getParameter(\"p_district_Id\"));\r\n\t\t\tgroupDownloadTO.setGrade(request.getParameter(\"p_grade\"));\r\n\t\t\tgroupDownloadTO.setCustomerId(customer);\r\n\t\t\tgroupDownloadTO.setButton(request.getParameter(\"mode\"));\r\n\t\t\tgroupDownloadTO.setFileName(request.getParameter(\"fileName\"));\r\n\t\t\tgroupDownloadTO.setStudents(request.getParameter(\"studentId\"));\r\n\t\t\tgroupDownloadTO.setSubtest(request.getParameterValues(\"p_subtest\"));\r\n\t\t\tgroupDownloadTO.setGroupFile(\"ISR\");\r\n\t\t\tgroupDownloadTO.setEmail(request.getParameter(\"email\"));\r\n\t\t\tgroupDownloadTO.setGradeCode(request.getParameter(\"p_gradeCode\"));\r\n\t\t\tif(request.getParameter(\"p_curAdmin\")!=null)\r\n\t\t\t\tgroupDownloadTO.setCurrentAdmin(request.getParameter(\"p_curAdmin\"));\r\n\t\t\t\r\n\t\t\t//To check the call from PDF Utility\r\n\t\t\tif(\"BULK\".equals(groupDownloadTO.getFileName()) && \"BULK\".equals(groupDownloadTO.getEmail())){\r\n\t\t\t\tString studentDetails = groupDownloadTO.getStudents();\r\n\t\t\t\tstudentDetails = studentDetails + \":\"+groupDownloadTO.getGradeCode()\r\n\t\t\t\t\t\t+\":\"+groupDownloadTO.getGrade()+\":\"+groupDownloadTO.getCurrentAdmin();\r\n\t\t\t\tgroupDownloadTO.setStudents(studentDetails);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tMap<String,Object> paramMapCode = new HashMap<String, Object>();\r\n\t\t\tparamMapCode.put(\"district\", request.getParameter(\"p_district_Id\"));\r\n\t\t\tparamMapCode.put(\"school\",request.getParameter(\"p_school\"));\r\n\t\t\tparamMapCode.put(\"contractName\", theme);\r\n\t\t\tMap<String,Object> codeMap = inorsService.getCode(paramMapCode);\r\n\t\t\tgroupDownloadTO.setDistrictCode((String) codeMap.get(\"districtCode\"));\r\n\t\t\tgroupDownloadTO.setSchoolCode((String) codeMap.get(\"schoolCode\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tString jobTrackingId = reportService.createJobTracking(groupDownloadTO);\r\n\r\n\t\t\tlogger.log(IAppLogger.INFO, \"sending messsage to JMS --------------- \");\r\n\t\t\tif(IApplicationConstants.CONTRACT_NAME.usmo.toString().equals(theme)){\r\n\t\t\t\tmessageProducer.sendJobForProcessing(jobTrackingId, theme);\r\n\t\t\t} else {\r\n\t\t\t\tinorsService.asyncPDFDownload(jobTrackingId, Utils.getContractName());\r\n\t\t\t}\r\n\r\n\t\t\tString status = \"Success\";\r\n\r\n\t\t\tresponse.setContentType(\"application/json\");\r\n\t\t\tresponse.getWriter().write(\"\");\r\n\t\t\tresponse.getWriter().write(\"{\\\"status\\\":\\\"\" + status + \"\\\"}\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\r\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{\n File blueCheck = new File(request.getParameter(\"filename\"));\r\n String pathToWeb = getServletContext().getRealPath(\"/\" + blueCheck);\r\n\r\n ServletContext cntx= request.getServletContext();\r\n String mime = cntx.getMimeType(pathToWeb);\r\n\r\n response.setContentType(mime);\r\n try {\r\n File file = new File(pathToWeb);\r\n response.setContentLength((int) file.length());\r\n\r\n FileInputStream in = new FileInputStream(file);\r\n OutputStream out = response.getOutputStream();\r\n\r\n // Copy the contents of the file to the output stream\r\n byte[] buf = new byte[1024];\r\n int count;\r\n while ((count = in.read(buf)) >= 0) {\r\n out.write(buf, 0, count);\r\n }\r\n out.close();\r\n in.close();\r\n\r\n response.setHeader(\"Content-Transfer-Encoding\", \"binary\");\r\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"\" + blueCheck.getName() + \"\\\"\");//fileName;\r\n } catch(Exception e) {\r\n response.getWriter().write(e.getMessage());\r\n }\r\n\r\n\r\n }",
"@Override\r\n\tpublic void downloadHomework() {\n\t\t\r\n\t}",
"@Override\n public void serveDownload(ServletContext context, HttpServletResponse response, Download download)\n throws IOException {\n File file = FileUtility.getFromDrive(download);\n\n if (file != null) {\n try (FileInputStream inStream = new FileInputStream(file)) {\n String mimeType = context.getMimeType(file.getAbsolutePath());\n if (mimeType == null) {\n // set to binary type if MIME mapping not found\n mimeType = \"application/octet-stream\";\n }\n\n // modifies response\n response.setContentType(mimeType);\n response.setContentLength((int) file.length());\n\n // forces download\n String headerKey = \"Content-Disposition\";\n String headerValue = String.format(\"attachment; filename=\\\"%s\\\"\", download.getFilename());\n response.setHeader(headerKey, headerValue);\n\n // obtains response's output stream\n OutputStream outStream = response.getOutputStream();\n\n byte[] buffer = new byte[4096];\n int bytesRead = -1;\n\n while ((bytesRead = inStream.read(buffer)) != -1) {\n outStream.write(buffer, 0, bytesRead);\n }\n }\n }\n }",
"private void viewDocument() throws Exception{ \r\n CoeusVector cvDataObject = new CoeusVector();\r\n HashMap hmDocumentDetails = new HashMap();\r\n hmDocumentDetails.put(\"awardNumber\", awardBaseBean.getMitAwardNumber());\r\n hmDocumentDetails.put(\"sequenceNumber\", EMPTY_STRING+awardBaseBean.getSequenceNumber());\r\n hmDocumentDetails.put(\"fileName\", awardAddDocumentForm.txtFileName.getText());\r\n hmDocumentDetails.put(\"document\", getBlobData()); \r\n cvDataObject.add(hmDocumentDetails);\r\n RequesterBean requesterBean = new RequesterBean();\r\n DocumentBean documentBean = new DocumentBean();\r\n Map map = new HashMap();\r\n map.put(\"DATA\", cvDataObject);\r\n map.put(DocumentConstants.READER_CLASS, \"edu.mit.coeus.award.AwardDocumentReader\");\r\n map.put(\"USER\", CoeusGuiConstants.getMDIForm().getUserId());\r\n map.put(\"MODULE_NAME\", \"VIEW_DOCUMENT\");\r\n documentBean.setParameterMap(map);\r\n requesterBean.setDataObject(documentBean);\r\n requesterBean.setFunctionType(DocumentConstants.GENERATE_STREAM_URL); \r\n AppletServletCommunicator appletServletCommunicator = new\r\n AppletServletCommunicator(STREAMING_SERVLET, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responder = appletServletCommunicator.getResponse(); \r\n if(!responder.isSuccessfulResponse()){\r\n throw new CoeusException(responder.getMessage(),0);\r\n }\r\n map = (Map)responder.getDataObject();\r\n String url = (String)map.get(DocumentConstants.DOCUMENT_URL);\r\n if(url == null || url.trim().length() == 0 ) {\r\n CoeusOptionPane.showErrorDialog(\r\n coeusMessageResources.parseMessageKey(\"protocolUpload_exceptionCode.1009\"));\r\n return;\r\n }\r\n url = url.replace('\\\\', '/') ;\r\n try{\r\n URL urlObj = new URL(url);\r\n URLOpener.openUrl(urlObj);\r\n }catch (MalformedURLException malformedURLException) {\r\n malformedURLException.printStackTrace();\r\n }catch( Exception ue) {\r\n ue.printStackTrace() ;\r\n }\r\n }",
"public static String renderPaginatedListAsExcel(HttpServletRequest request, HttpServletResponse response) {\n String strPaginatorName = request.getParameter(\"paginatorName\");\n String strOpentapsApplicationName = request.getParameter(\"opentapsApplicationName\");\n if (StringUtils.isEmpty(strPaginatorName)) {\n Debug.logError(\"The parameter [paginatorName] is missing in the request.\", module);\n return \"error\";\n }\n \n if (StringUtils.isEmpty(strOpentapsApplicationName)) {\n Debug.logError(\"The parameter [opentapsApplicationName] is missing in the request.\", module);\n return \"error\";\n }\n \n String retval = exportPaginatedListToExcel(strPaginatorName, strOpentapsApplicationName, request, response);\n \n return retval;\n }",
"@RequestMapping(value = \"/manualDocFileDownload\", method = RequestMethod.GET)\n\tpublic void downloadInstructionDocFiles(HttpServletRequest request, HttpServletResponse response, \n\t\t\tHttpSession session, @RequestParam(\"f\") String fileId, @RequestParam(\"i\") String isImageStr){\n\t\ttry {\n\t\t\t//System.out.println(\"downloadDocFiles ---> \" + fileId);\n\t\t\tString fileName = \"\";\n\t\t\tString downloadName=\"\";\n\t\t\tif (isImageStr.equalsIgnoreCase(\"n\")) {\n\t\t\t\tfileName = manualService.getDocFileName( Integer.parseInt(fileId), false );\n\t\t\t\tdownloadName = manualService.getDownloadDocFileName( Integer.parseInt(fileId), false );\n\t\t\t} else {\n\t\t\t\tfileName = manualService.getDocFileName( Integer.parseInt(fileId), true );\n\t\t\t\tdownloadName = manualService.getDownloadDocFileName( Integer.parseInt(fileId), true );\n\t\t\t}\n\t\t\tPharmacyUtil.downloadFile(fileName, downloadName, response);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tprotected void buildExcelDocument(Map<String, Object> model, HSSFWorkbook workbook, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception \n\t{\n\t\t\n\t\tString formName = (String)model.get(\"formName\");\n\t\tif (\"Supplier\".equals(formName))\n\t\t\tsetSupplierExcelData(model, workbook);\n\t\telse if (\"Customer\".equals(formName))\n\t\t\tsetCustomerExcelData(model, workbook);\n\t\telse if (\"Item\".equals(formName))\n\t\t\tsetItemExcelData(model, workbook);\n\t\telse if (\"NonInventoryItem\".equals(formName))\n\t\t\tsetNonInventoryExcelData(model, workbook);\n\t\telse if (\"Project\".equals(formName))\n\t\t\tsetProjectExcelData(model, workbook);\n\t\telse if (\"Warehouse\".equals(formName))\n\t\t\tsetWarehouseExcelData(model, workbook);\n\t\t\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\" + formName);\n\t\n\t}",
"@RequestMapping(value=\"board/downloadResume.do\",method = RequestMethod.POST)\t\r\n\tpublic ModelAndView resumeDown(SearchVO search , HttpServletRequest req, ModelAndView mView) {\n\t\tString dftFilePath = \"E:\\\\JAVA\\\\workspace\\\\.metadata\\\\.plugins\\\\org.eclipse.wst.server.core\\\\tmp0\\\\wtpwebapps\\\\Portfolio\\\\\";\r\n\t\tString filePath = dftFilePath + \"boardFile\" + File.separator;\r\n\r\n\t\t//서버에 있는 파일 경로\r\n\t\tString saveFileNm = filePath + \"DOCX.docx\";\r\n\t\tString orgFileNm = \"웹개발자이력서_이규섭.docx\";\r\n\t\tmView.setView(download);\r\n\t\t\r\n\t\tFile downloadFile = new File(saveFileNm);\r\n\t\tmView.addObject(\"downloadFile\", downloadFile);\r\n\t\tmView.addObject(\"orgFileNm\", orgFileNm);\r\n\t\t\r\n\t\treturn mView;\r\n\t}",
"public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tHttpSession session = request.getSession();\n\t\tRegistrationService registrationService = (RegistrationService) session.getAttribute(\"registrationService\");\n\t\t\t\n\t\tOutputStream out = null;\n\t\ttry {\n\t\t\tresponse.setContentType(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=confirmation.xls\");\n\t\t\t\n\t\t\t// build the Excel confirmation\n\t\t\tWritableWorkbook w = Workbook.createWorkbook(response.getOutputStream());\n\t\t\tWritableSheet s = w.createSheet(\"Confirmation\", 0);\n\t\t\tint column1 = 0;\n\t\t\tint column2 = 4;\n\t\t\tint row = 0;\n\t\t\ts.addCell(new Label(column1, row, \"JOHN HOPKINS ANNUAL SOFTWARE DEVELOPMENT SEMINAR\"));\n\t\t\trow = row + 2;\n\t\t\ts.addCell(new Label(column1, row, registrationService.getRegistrationInfo().getName()));\n\t\t\trow = row + 2;\n\t\t\ts.addCell(new Label(column1, row, \"You are registered for the following courses as a \" + registrationService.getRegistrationInfo().getEmploymentStatus() + \":\"));\n\t\t\tList<String> courses = registrationService.getRegistrationInfo().getCourses();\n\t\t\trow++;\n for (String course : courses) {\n \ts.addCell(new Label(column1, row, course));\n \ts.addCell(new Label(column2, row, \"$\" + Double.toString(registrationService.getCostInfo().getEmployeeStatusCost()) + \"0\"));\n \trow++;\n }\n row++;\n if (!StringUtils.isEmpty(registrationService.getRegistrationInfo().getHotel())) {\n \ts.addCell(new Label(column1, row, \"Hotel Accommodation\"));\n \ts.addCell(new Label(column2, row, \"$\" + Double.toString(registrationService.getCostInfo().getHotelCost()) + \"0\"));\n \trow++;\n }\n if (!StringUtils.isEmpty(registrationService.getRegistrationInfo().getParking())) {\n \ts.addCell(new Label(column1, row, \"Parking\"));\n \ts.addCell(new Label(column2, row, \"$\" + Double.toString(registrationService.getCostInfo().getParkingCost()) + \"0\"));\n \trow++;\n }\n s.addCell(new Label(column1, row, \"Total:\"));\n s.addCell(new Label(column2, row, \"$\" + Double.toString(registrationService.getCostInfo().getTotal()) + \"0\"));\n\t\t\tw.write();\n\t\t\tw.close();\n\t\t} catch (Exception e) {\n\t\t\tthrow new ServletException(\"Exception in Excel Sample Servlet\", e);\n\t\t} finally {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t}",
"@Test\n public void downloadTest() throws ApiException {\n Integer devid = null;\n String path = null;\n File response = api.download(devid, path);\n\n // TODO: test validations\n }"
] | [
"0.6454535",
"0.63777316",
"0.6305103",
"0.6266585",
"0.62482005",
"0.6239341",
"0.6213529",
"0.60605496",
"0.6014967",
"0.59994596",
"0.5990834",
"0.59879446",
"0.59779495",
"0.5937033",
"0.59184116",
"0.58776355",
"0.5833623",
"0.58205533",
"0.5808595",
"0.58036065",
"0.58007133",
"0.5758928",
"0.5757196",
"0.57271117",
"0.5726482",
"0.5725047",
"0.5690592",
"0.56716937",
"0.5657742",
"0.5626235",
"0.56191486",
"0.5617533",
"0.5609477",
"0.560379",
"0.55906236",
"0.55848026",
"0.55679333",
"0.55570585",
"0.55514485",
"0.55453944",
"0.5523059",
"0.5518075",
"0.55072284",
"0.5502194",
"0.54803956",
"0.5452186",
"0.5432166",
"0.54288155",
"0.54142594",
"0.5409693",
"0.5402123",
"0.53899974",
"0.53763354",
"0.53549695",
"0.5351638",
"0.53233534",
"0.53226316",
"0.53218526",
"0.5302934",
"0.52939326",
"0.52733696",
"0.52716094",
"0.5269404",
"0.5266492",
"0.526425",
"0.52630734",
"0.5249842",
"0.524675",
"0.5245285",
"0.523995",
"0.5233106",
"0.5231646",
"0.52264947",
"0.5191668",
"0.518756",
"0.51870495",
"0.5169653",
"0.51652676",
"0.5155077",
"0.5154053",
"0.514095",
"0.5135116",
"0.5130674",
"0.51138246",
"0.51138246",
"0.5110186",
"0.5094645",
"0.50653946",
"0.50535446",
"0.5023515",
"0.50208527",
"0.5020575",
"0.5016994",
"0.50133634",
"0.50095874",
"0.5008856",
"0.50020653",
"0.50006354",
"0.4996427",
"0.49915504"
] | 0.5374994 | 53 |
TODO this may be sped up by not needing to create a list in getInEdges | public int inDegree(N v) {
return getInEdges(v).size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<Node, Edge> getInEdges() {\n return inEdges;\n }",
"public Set<E> getEdges();",
"String getEdges();",
"public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();",
"Set<CyEdge> getExternalEdgeList();",
"List<CyEdge> getInternalEdgeList();",
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}",
"int[] getInEdges(int... nodes);",
"Collection<E> edges();",
"ArrayList<Edge> getEdges(ArrayList<ArrayList<Vertex>> v) {\n ArrayList<Edge> all = new ArrayList<Edge>();\n for (ArrayList<Vertex> verts : v) {\n for (Vertex vt : verts) {\n for (Edge ed : vt.outEdges) {\n all.add(ed);\n }\n }\n }\n return all;\n }",
"int[] getEdgesIncidentTo(int... nodes);",
"private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}",
"ArrayList<Edge> getAdjacencies();",
"public abstract List<? extends DiGraphEdge<N, E>> getInEdges(N nodeValue);",
"public abstract List<? extends GraphEdge<N, E>> getEdges();",
"private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"private List<Graph.Edge> getEdge(PathMap map) {\n // record the visited coordinates\n List<Coordinate> visited = new ArrayList<>();\n // get all coordinates from the map\n List<Coordinate> allCoordinates = map.getCoordinates();\n // for record all generated edges\n List<Graph.Edge> edges = new ArrayList<>();\n\n\n while (visited.size() <= allCoordinates.size() - 1) {\n for (Coordinate temp : allCoordinates) {\n\n if (visited.contains(temp)) {\n continue;\n }\n visited.add(temp);\n List<Coordinate> neighbors = map.neighbours(temp);\n for (Coordinate tempNeighbour : neighbors) {\n edges.add(new Graph.Edge(temp, tempNeighbour, tempNeighbour.getTerrainCost()));\n }\n }\n }\n // trim impassable coordinates\n List<Graph.Edge> fEdges = new ArrayList<>();\n for (Graph.Edge dd : edges) {\n if (dd.startNode.getImpassable() || dd.endNode.getImpassable()) {\n continue;\n }\n fEdges.add(dd);\n }\n return fEdges;\n }",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"List<IEdge> getAllEdges();",
"private static void InitializeEdges()\n {\n edges = new ArrayList<Edge>();\n\n for (int i = 0; i < Size -1; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n edges.add(new Edge(cells[i][j].Point, cells[i + 1][ j].Point));\n edges.add(new Edge(cells[j][i].Point, cells[j][ i + 1].Point));\n }\n }\n\n for (Edge e : edges)\n {\n if ((e.A.X - e.B.X) == -1)\n {\n e.Direction = Edge.EdgeDirection.Vertical;\n }\n else\n {\n e.Direction = Edge.EdgeDirection.Horizontal;\n }\n }\n }",
"default Iterator<E> edgeIterator() {\n return getEdges().iterator();\n }",
"public List<IEdge> getAllEdges();",
"private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}",
"public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}",
"public Enumeration edges();",
"public synchronized Set<String> getIncomingEdges(String currentEdge) {\n\t\tif (currentEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tSumoEdge currentSumoEdge = getEdge(currentEdge);\n\t\tif (currentSumoEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tString currentEdgeEnd = graph.getEdgeTarget(currentSumoEdge);\n\t\tSet<SumoEdge> edges = graph.incomingEdgesOf(currentEdgeEnd);\n\t\t\n\t\tSet<String> edgeIds = new HashSet<String>();\n\t\tfor (SumoEdge edge: edges) {\n\t\t\tedgeIds.add(edge.getId());\n\t\t}\n\t\t\n\t\treturn edgeIds;\n\t}",
"public Enumeration undirectedEdges();",
"public int getNumberOfEdges();",
"public int getNumEdges();",
"public Set<Edge<V>> edgeSet();",
"List<Edge<V>> getEdgeList();",
"public Enumeration directedEdges();",
"public abstract Set<? extends EE> edgesOf(VV vertex);",
"private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }",
"private Set<Edge> reachableDAG(Vertex start, Vertex obstacle) {\n \tHashSet<Edge> result = new HashSet<Edge>();\n \tVector<Vertex> currentVertexes = new Vector<Vertex>();\n \tint lastResultNumber = 0;\n \tcurrentVertexes.add(start);\n \t\n \tdo {\n \t\t//System.out.println(\"size of currentVertexes:\" + currentVertexes.size());\n \t\t\n \t\tVector<Vertex> newVertexes = new Vector<Vertex>();\n \t\tlastResultNumber = result.size();\n \t\t\n \t\tfor (Vertex v : currentVertexes) {\n \t\t\t//System.out.println(\"layerID:\" + v.layerID + \"\\tlabel:\" + v.label);\n \t\t\taddIncomingEdges(v, obstacle, result, newVertexes);\n \t\t\taddOutgoingEdges(v, obstacle, result, newVertexes);\n \t\t}\n \t\t\n \t\t//System.out.println(\"size of newVertexes:\" + newVertexes.size());\n \t\t\n \t\tcurrentVertexes = newVertexes;\t\n \t\t//System.out.println(\"lastResultNumber:\" + lastResultNumber);\n \t\t//System.out.println(\"result.size():\" + result.size());\n \t} while (lastResultNumber != result.size());\n \t\n\t\treturn result;\n }",
"int[] getOutEdges(int... nodes);",
"@Override\n\tpublic List<Path> getOutEdges(Location src) {\n\t\treturn \tpaths.get(locations.indexOf(src));\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}",
"public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }",
"private static void makeEdgesSet() {\n edges = new Edge[e];\r\n int k = 0;\r\n for (int i = 0; i < n; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (g[i][j] != 0)\r\n edges[k++] = new Edge(j, i, g[i][j]);\r\n }\r\n }\r\n }",
"public ArrayList<Integer> getInNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> inNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of incoming edge ids\r\n\t\tSet<Integer> edgeSet = mInEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\tinNeighbors.add( getEdge(edgeId).getFromId() );\r\n\t\t}\r\n\t\treturn inNeighbors;\r\n\t}",
"int getNumberOfEdges();",
"public void testEdgesSet_ofVertex() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i));\n\n Assert.assertEquals(set.size(), i % 2 == 0 ? 25 : 23);\n for (Edge<Integer> edge : set) {\n Assert.assertTrue((edge.getTargetVertex() + i) % 2 == 0);\n }\n }\n }",
"public void testEdgesSet_ofVertices() {\n System.out.println(\"edgesSet\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n Set<Edge<Integer>> set = graph.edgesSet(new Integer(i), new Integer(j));\n\n if ((i + j) % 2 == 0) {\n Assert.assertEquals(set.size(), 1);\n } else {\n Assert.assertEquals(set.size(), 0);\n }\n }\n }\n }",
"private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}",
"Map<Node, Edge> getOutEdges() {\n return outEdges;\n }",
"public Set<Pair<V,V>> neighbourEdgesOf(V vertex);",
"@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}",
"private void checkEdgesToSearch() {\n if (edgesToSearch == null || edgesToSearch.length == 0) {\n Graph hg;\n if (Lookup.getDefault().lookup(DataTablesController.class).isShowOnlyVisible()) {\n hg = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraphVisible();\n } else {\n hg = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraph();\n }\n edgesToSearch = hg.getEdges().toArray();\n }\n }",
"public void subsetOneBundlePerEdge() {\n Set<Bundle> set = new HashSet<Bundle>();\n for (int ent_i=0;ent_i<digraph.getNumberOfEntities();ent_i++) {\n for (int i=0;i<digraph.getNumberOfNeighbors(ent_i);i++) {\n int nbor_i = digraph.getNeighbor(ent_i,i);\n\tIterator<Bundle> it = digraph.linkRefIterator(digraph.linkRef(ent_i,nbor_i));\n\tset.add(it.next());\n }\n }\n getRTParent().push(getRTParent().getRootBundles().subset(set));\n }",
"public Set<E> getEdges(V tail);",
"public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }",
"private void initializeEdges() {\n for (NasmInst inst : nasm.listeInst) {\n if (inst.source == null || inst.destination == null)\n return;\n Node from = inst2Node.get(label2Inst.get(inst.source.toString()));\n Node to = inst2Node.get(label2Inst.get(inst.destination.toString()));\n if (from == null || to == null)\n return;\n graph.addEdge(from, to);\n }\n }",
"public HashMap<String, Edge> getEdgeList () {return edgeList;}",
"public Collection<Edge> edges() {\n Collection<Collection<Edge>> copyOfEdges = new ArrayList<Collection<Edge>>();\n //values = myGraph.values(); OLD\n //create a copy of all the edges in the map to restrict any reference\n //to interals of this class\n copyOfEdges.addAll(myGraph.values());\n Collection<Edge> allValues = new ArrayList<Edge>();\n Iterator<Collection<Edge>> eachColl = copyOfEdges.iterator();\n while(eachColl.hasNext()){\n allValues.addAll(eachColl.next());\n }\n\n return allValues;\n }",
"public DEdge[] getEdges(){\n return listOfEdges;\n }",
"public int numEdges();",
"@Override\n\tpublic List<ET> getEdgeList()\n\t{\n\t\treturn new ArrayList<ET>(edgeList);\n\t}",
"@Test\n public void getEdges() {\n\n for (int i = 0; i < 5; i++) {\n\n Edge temp = new Edge(i + \"\",testVertices.get(i),testVertices.get(i+1) ,(i*10));\n assertEquals(temp.getId(),testGraph.getEdges().get(i).getId());\n\n }\n }",
"private void buildIndex(Collection<Edge> edges) {\n\t\tfor (Edge e : edges) {\r\n\t\t\tList<Integer> ids = getCells(e);\r\n\t\t\tfor (int j = 0; j < ids.size(); j++) {\r\n\t\t\t\tList<Edge> list = dict.get(ids.get(j));\r\n\t\t\t\tif (list == null) {\r\n\t\t\t\t\tlist = new ArrayList<Edge>();\r\n\t\t\t\t\tdict.put(ids.get(j), list);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Collection< EDataT > edgeData();",
"@Override\r\n\tpublic Iterable<EntityGraphEdge> getEdges()\r\n\t{\n\t\treturn null;\r\n\t}",
"private ScheduleGrph initializeIdenticalTaskEdges(ScheduleGrph input) {\n\n\t\tScheduleGrph correctedInput = (ScheduleGrph) SerializationUtils.clone(input);\n\t\t// FORKS AND TODO JOINS\n\t\t/*\n\t\t * for (int vert : input.getVertices()) { TreeMap<Integer, List<Integer>> sorted\n\t\t * = new TreeMap<Integer, List<Integer>>(); for (int depend :\n\t\t * input.getOutNeighbors(vert)) { int edge = input.getSomeEdgeConnecting(vert,\n\t\t * depend); int weight = input.getEdgeWeightProperty().getValueAsInt(edge); if\n\t\t * (sorted.get(weight) != null) { sorted.get(weight).add(depend); } else {\n\t\t * ArrayList<Integer> a = new ArrayList(); a.add(depend); sorted.put(weight, a);\n\t\t * }\n\t\t * \n\t\t * } int curr = -1; for (List<Integer> l : sorted.values()) { for (int head : l)\n\t\t * {\n\t\t * \n\t\t * if (curr != -1) { correctedInput.addDirectedSimpleEdge(curr, head); } curr =\n\t\t * head; }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tfor (int vert : input.getVertices()) {\n\t\t\tfor (int vert2 : input.getVertices()) {\n\t\t\t\tint vertWeight = input.getVertexWeightProperty().getValueAsInt(vert);\n\t\t\t\tint vert2Weight = input.getVertexWeightProperty().getValueAsInt(vert2);\n\n\t\t\t\tIntSet vertParents = input.getInNeighbors(vert);\n\t\t\t\tIntSet vert2Parents = input.getInNeighbors(vert2);\n\n\t\t\t\tIntSet vertChildren = input.getOutNeighbors(vert);\n\t\t\t\tIntSet vert2Children = input.getOutNeighbors(vert2);\n\n\t\t\t\tboolean childrenEqual = vertChildren.containsAll(vert2Children)\n\t\t\t\t\t\t&& vert2Children.containsAll(vertChildren);\n\n\t\t\t\tboolean parentEqual = vertParents.containsAll(vert2Parents) && vert2Parents.containsAll(vertParents);\n\n\t\t\t\tboolean inWeightsSame = true;\n\t\t\t\tfor (int parent : vertParents) {\n\t\t\t\t\tfor (int parent2 : vert2Parents) {\n\t\t\t\t\t\tif (parent == parent2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent, vert)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent2, vert2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!inWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tboolean outWeightsSame = true;\n\t\t\t\tfor (int child : vertChildren) {\n\t\t\t\t\tfor (int child2 : vert2Children) {\n\t\t\t\t\t\tif (child == child2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert, child)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert2, child2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!outWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboolean alreadyEdge = correctedInput.areVerticesAdjacent(vert, vert2)\n\t\t\t\t\t\t|| correctedInput.areVerticesAdjacent(vert2, vert);\n\n\t\t\t\tif (vert != vert2 && vertWeight == vert2Weight && parentEqual && childrenEqual && inWeightsSame\n\t\t\t\t\t\t&& outWeightsSame && !alreadyEdge) {\n\t\t\t\t\tint edge = correctedInput.addDirectedSimpleEdge(vert, vert2);\n\t\t\t\t\tcorrectedInput.getEdgeWeightProperty().setValue(edge, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn correctedInput;\n\t}",
"public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getOrigin());\n\t\t\tlist.add(e);\n\t\t\t\n\t\t\tif (!ret.containsKey(e.getDestination())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getDestination(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getDestination());\n\t\t\tlist.add(e);\n\t\t}\n\t\treturn ret;\n\t}",
"public ArrayList<Pair> getEdges(int x, int y, int size)\n\t{\n\t\tArrayList<Pair> pairs = new ArrayList<Pair>();\n\t\tpairs.add(new Pair(x, y));\n\n\t\tfor (int i = 1; i <= size; i++)\n\t\t{\n\t\t\tpairs.add(new Pair(x, y + i));\n\t\t\tpairs.add(new Pair(x + size, y + i));\n\t\t\tpairs.add(new Pair(x + i, y));\n\t\t\tpairs.add(new Pair(x + i, y + size));\n\t\t}\n\n\t\treturn pairs;\n\t}",
"List<Edge<V>> getIncidentEdgeList(V v);",
"@Test\r\n public void testOutboundEdges() {\r\n System.out.println(\"outboundEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n Object v3Element = 3;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n Vertex v3 = instance.insertVertex(v3Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e1 = instance.insertEdge(v1, v2, edgeElement);\r\n Edge e2 = instance.insertEdge(v1, v3, edgeElement);\r\n Edge e3 = instance.insertEdge(v2, v3, edgeElement);\r\n\r\n Collection e1OutboundEdges = instance.outboundEdges(v2);\r\n Collection e2OutboundEdges = instance.outboundEdges(v3);\r\n Collection e3OutboundEdges = instance.outboundEdges(v3);\r\n\r\n boolean e1Result = e1OutboundEdges.contains(e1);\r\n boolean e2Result = e2OutboundEdges.contains(e2);\r\n boolean e3Result = e3OutboundEdges.contains(e3);\r\n\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, e1Result);\r\n assertEquals(expectedResult, e2Result);\r\n assertEquals(expectedResult, e3Result);\r\n }",
"@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }",
"@Override\n public Collection<? extends IEdge> getEdges() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.edgeMap\n .values()));\n }",
"Set<Edge> getUpwardOutgoingNeighborEdges() {\n\t\t\tif(!_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling upward pass neighbor method on downward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID > v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"Graph(List<Edge> edges) {\n\n //one pass to find all vertices\n // this step avoid add isolated coordinates to the graph\n for (Edge e : edges) {\n if (!graph.containsKey(e.startNode)) {\n graph.put(e.startNode, new Node(e.startNode));\n }\n if (!graph.containsKey(e.endNode)) {\n graph.put(e.endNode, new Node(e.endNode));\n }\n }\n\n //another pass to set neighbouring vertices\n for (Edge e : edges) {\n graph.get(e.startNode).neighbours.put(graph.get(e.endNode), e.weight);\n //graph.get(e.v2).neighbours.put(graph.get(e.v1), e.dist); // also do this for an undirected graph\n }\n }",
"public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }",
"Set<Edge> getDownwardOutgoingNeighborEdges() {\n\t\t\tif(_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling downward pass neighbor method on upward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"public Edge[] getEdges()\r\n {\r\n if(edges == null)\r\n\t{\r\n\t edges = new Edge[numEdges()];\r\n\t int i = 0;\r\n\t for (final EdgeTypeHolder eth : ethMap.values())\r\n\t\tfor (final Edge e : eth.getEdges())\r\n\t\t edges[i++] = e;\r\n\t}\r\n return edges.clone();\r\n }",
"public Iterable<DirectedEdge> edges() {\n ArrayList<DirectedEdge> list = new ArrayList<DirectedEdge>();\n for (int v = 0; v < V; v++) {\n for (DirectedEdge e : adj(v)) {\n list.add(e);\n }\n }\n return list;\n }",
"int getEdgeCount();",
"public void removeAllEdges() {\n }",
"@Override\n public Collection<edge_data> getE(int node_id) {\n return ((NodeData) this.nodes.get(node_id)).getNeighborEdges().values();\n }",
"public Collection<LazyRelationship2> getEdges() {\n long relCount=0;\n ArrayList l = new ArrayList();\n \n for(Path e : getActiveTraverser()){\n for(Path p : getFlushTraverser(e.endNode())){\n if((relCount++%NEO_CACHE_LIMIT)==0){\n l.add(p.lastRelationship());\n clearNeoCache();\n }\n }\n }\n return l; \n }",
"public String getEdges(){\n double Lx = super.getCentre().x - (this.length / 2);\r\n double Rx = super.getCentre().x + (this.length / 2);\r\n double Dy = super.getCentre().y - (this.width / 2);\r\n double Uy = super.getCentre().y + (this.width / 2);\r\n Point UL = new Point(Lx, Uy);\r\n Point UR = new Point(Rx, Uy);\r\n Point DL = new Point(Lx, Dy);\r\n Point DR = new Point(Rx, Dy);\r\n Point[] Edges = {DL, UL, UR, DR};\r\n this.edge = Edges;\r\n return Arrays.toString(Edges);\r\n }",
"public int getEdgeCount() \n {\n return 3;\n }",
"ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }",
"public Graph createGraph() {\n String fileName;\n// fileName =\"./428333.edges\";\n String line;\n Graph g = new Graph();\n// List<String> vertexNames = new ArrayList<>();\n// try\n// {\n// BufferedReader in=new BufferedReader(new FileReader(fileName));\n// line=in.readLine();\n// while (line!=null) {\n////\t\t\t\tSystem.out.println(line);\n// String src = line.split(\" \")[0];\n// String dst = line.split(\" \")[1];\n//// vertexNames.add(src);\n//// vertexNames.add(dst);\n//// System.out.println(src+\" \"+dst);\n// g.addEdge(src, dst, 1);\n// line=in.readLine();\n// }\n// in.close();\n// } catch (Exception e) {\n//\t\t\te.printStackTrace();\n// }\n\n fileName=\"./788813.edges\";\n// List<String> vertexNames = new ArrayList<>();\n try\n {\n BufferedReader in=new BufferedReader(new FileReader(fileName));\n line=in.readLine();\n while (line!=null) {\n//\t\t\t\tSystem.out.println(line);\n String src = line.split(\" \")[0];\n String dst = line.split(\" \")[1];\n g.addEdge(src, dst, 1);\n line=in.readLine();\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n// Graph g = new Graph(new String[]{\"v0\", \"v1\", \"v2\", \"v3\", \"v4\", \"v5\", \"v6\", \"v7\", \"v8\"});\n// // Add the required edges.\n// g.addEdge(\"v0\", \"v1\", 4); g.addEdge(\"v0\", \"v7\", 8);\n// g.addEdge(\"v1\", \"v2\", 8); g.addEdge(\"v1\", \"v7\", 11); g.addEdge(\"v2\", \"v1\", 8);\n// g.addEdge(\"v2\", \"v8\", 2); g.addEdge(\"v2\", \"v5\", 4); g.addEdge(\"v2\", \"v3\", 7);\n// g.addEdge(\"v3\", \"v2\", 7); g.addEdge(\"v3\", \"v5\", 14); g.addEdge(\"v3\", \"v4\", 9);\n// g.addEdge(\"v4\", \"v3\", 9); g.addEdge(\"v4\", \"v5\", 10);\n// g.addEdge(\"v5\", \"v4\", 10); g.addEdge(\"v5\", \"v3\", 9); g.addEdge(\"v5\", \"v2\", 4);\n// g.addEdge(\"v5\", \"v6\", 2);\n// g.addEdge(\"v6\", \"v7\", 1); g.addEdge(\"v6\", \"v8\", 6); g.addEdge(\"v6\", \"v5\", 2);\n// g.addEdge(\"v7\", \"v0\", 8); g.addEdge(\"v7\", \"v8\", 7); g.addEdge(\"v7\", \"v1\", 11);\n// g.addEdge(\"v7\", \"v6\", 1);\n// g.addEdge(\"v8\", \"v2\", 2); g.addEdge(\"v8\", \"v7\", 7); g.addEdge(\"v8\", \"v6\", 6);\n\n//\n return g;\n }",
"public Set<V> getNeighbours(V vertex);",
"public ArrayList<DrawableGraphEdge> getEdges() {\r\n\t\treturn new ArrayList<DrawableGraphEdge>(edges);\r\n\t}",
"public Iterator<LayoutEdge> edgeIterator() {\n\treturn edgeList.iterator();\n }",
"@Test\r\n public void testEdges() {\r\n System.out.println(\"edges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n Collection colection = instance.edges();\r\n boolean result = colection.contains(e);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeEdge(e);\r\n result = colection.contains(e);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }",
"@Override\n\tpublic synchronized Set<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> getEdges() {\n\t\tSet<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>> edges = new HashSet<PetrinetEdge<? extends PetrinetNode, ? extends PetrinetNode>>();\n\t\tedges.addAll(this.arcs);\n\t\treturn edges;\n\t}",
"public List<Integer> getNeighbourIds() {\n List<Integer> neighbours = new ArrayList<>();\n // get references from the neighbouring cells.\n for (VoronoiHalfEdge halfEdge : halfEdges) {\n VoronoiEdge edge = halfEdge.getEdge();\n if (edge.getLeftSite() != null && edge.getLeftSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getLeftSite().getIdentifier());\n } else if (edge.getRightSite() != null && edge.getRightSite().getIdentifier() != site.getIdentifier()) {\n neighbours.add(edge.getRightSite().getIdentifier());\n }\n }\n return neighbours;\n }",
"List<Edge> getPath() throws NoPathFoundException;",
"public Set getNonEscapingEdges() {\n if (addedEdges == null) return Collections.EMPTY_SET;\n return addedEdges.entrySet();\n }",
"java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();",
"@Override\n\tpublic Set<ET> getAdjacentEdges(N node)\n\t{\n\t\t// implicitly returns null if gn is not in the nodeEdgeMap\n\t\tSet<ET> adjacentEdges = nodeEdgeMap.get(node);\n\t\treturn adjacentEdges == null ? null : new HashSet<ET>(adjacentEdges);\n\t}",
"public Iterable<Edge> edges() {\r\n\t\treturn mst;\r\n\t}",
"public Enumeration inIncidentEdges(Position vp) throws InvalidPositionException;",
"public DSALinkedList<DSAGraphEdge<E>> getAdjacentEdges()\n {\n return edgeList;\n }",
"@Test\n public void testEdges() {\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\n Edge<Vertex> e1 = new Edge<>(v1, v2, 5);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 7);\n Edge<Vertex> e3 = new Edge<>(v1, v4, 9);\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.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n Set<Edge> expectedEdges = new HashSet<>();\n expectedEdges.add(e1);\n expectedEdges.add(e2);\n expectedEdges.add(e3);\n\n assertEquals(expectedEdges, g.allEdges());\n\n expectedEdges.remove(e2);\n assertEquals(expectedEdges, g.allEdges(v1));\n\n assertEquals(e3, g.getEdge(v1, v4));\n }",
"public void testContainsEdge() {\n System.out.println(\"containsEdge\");\n\n Graph<Integer, Edge<Integer>> graph = generateGraph();\n\n for (int i = 0; i < 25; i++) {\n for (int j = 0; j < 25; j++) {\n if ((i + j) % 2 != 0) {\n Assert.assertFalse(graph.containsEdge(new Integer(i), new Integer(j)));\n } else {\n Assert.assertTrue(graph.containsEdge(new Integer(i), new Integer(j)));\n }\n }\n }\n\n }"
] | [
"0.70304185",
"0.68992954",
"0.6840946",
"0.67345977",
"0.6659359",
"0.66491514",
"0.66049707",
"0.6563459",
"0.6559416",
"0.6477783",
"0.64587086",
"0.6451454",
"0.64464843",
"0.64453316",
"0.6437285",
"0.6423014",
"0.63517505",
"0.6351368",
"0.63152397",
"0.62979007",
"0.62776977",
"0.626566",
"0.62653184",
"0.62548673",
"0.62300056",
"0.62146044",
"0.6191295",
"0.61735445",
"0.6171693",
"0.61691713",
"0.61546457",
"0.6150581",
"0.6134446",
"0.61233413",
"0.6113566",
"0.6109242",
"0.61054206",
"0.6103068",
"0.60977143",
"0.6088977",
"0.60857546",
"0.608375",
"0.6080719",
"0.6057492",
"0.6045066",
"0.6037818",
"0.6036863",
"0.6025841",
"0.6021798",
"0.6015139",
"0.6013772",
"0.60135573",
"0.5997028",
"0.599267",
"0.5985721",
"0.59788966",
"0.5969474",
"0.59446436",
"0.59439075",
"0.5942855",
"0.59424835",
"0.5939327",
"0.5932893",
"0.5929877",
"0.59263754",
"0.5919198",
"0.59160954",
"0.5908653",
"0.5898328",
"0.5892322",
"0.58911836",
"0.5891064",
"0.5884323",
"0.5874988",
"0.5855832",
"0.5849393",
"0.5841357",
"0.5820905",
"0.58194685",
"0.58039975",
"0.58037394",
"0.5802801",
"0.57986236",
"0.5791853",
"0.57870114",
"0.5780026",
"0.5779979",
"0.57761997",
"0.5772633",
"0.57712585",
"0.5770661",
"0.5770278",
"0.5765938",
"0.57651585",
"0.57650423",
"0.5763519",
"0.5762405",
"0.5760738",
"0.57557434",
"0.5750471",
"0.57451737"
] | 0.0 | -1 |
TODO this may be sped up by not needing to create a list in getOutEdges | public int outDegree(N v) {
return getOutEdges(v).size();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<Node, Edge> getOutEdges() {\n return outEdges;\n }",
"int[] getOutEdges(int... nodes);",
"public abstract List<? extends DiGraphEdge<N, E>> getOutEdges(N nodeValue);",
"@Override\n\tpublic List<Path> getOutEdges(Location src) {\n\t\treturn \tpaths.get(locations.indexOf(src));\n\t}",
"Set<Edge> getIncomingNeighborEdges(boolean onUpwardPass) {\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"InternalRoad getOutEgde(){\r\n\t\tSet out = this.getOutEdges();\r\n\t\tIterator iter = out.iterator();\r\n\t\treturn (InternalRoad)iter.next();\r\n\t}",
"Set<Edge> getUpwardOutgoingNeighborEdges() {\n\t\t\tif(!_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling upward pass neighbor method on downward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID > v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"Set<Edge> getDownwardOutgoingNeighborEdges() {\n\t\t\tif(_bumpOnUpwardPass) {\n\t\t\t\tSystem.err.println(\"calling downward pass neighbor method on upward pass!\");\n\t\t\t}\n//\t\t\tif(_outgoingEdges.size() == 0) { // only compute if we have to\n\t\t\t\tSet<Edge> outgoingEdges = new HashSet<Edge>();\n\t\t\t\tIterator<Edge> it = _neighborEdges.keySet().iterator();\n\t\t\t\twhile(it.hasNext()) {\n\t\t\t\t\tEdge e = it.next();\n\t\t\t\t\tVertex v = e.getOtherVertex(this);\n\t\t\t\t\tif(this._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops i am unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(v._orderID == UNMARKED) {\n\t\t\t\t\t\tSystem.err.println(\"whoops neighbor unmarked\");\n\t\t\t\t\t}\n\t\t\t\t\tif(this._orderID < v._orderID) {\n\t\t\t\t\t\toutgoingEdges.add(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t_outgoingEdges = outgoingEdges;\n//\t\t\t}\n//\t\t\treturn _outgoingEdges;\n\t\t\t\tSystem.out.println(this.toString()+\"'s outgoing edges:\\n\"+ outgoingEdges);\n\t\t\t\treturn outgoingEdges;\n\t\t}",
"public ArrayList<Integer> getOutNeighbors (int nodeId) {\r\n\t\tArrayList<Integer> outNeighbors = new ArrayList<Integer>();\r\n\t\t// the set of outgoing edge ids\r\n\t\tSet<Integer> edgeSet = mOutEdges.get(nodeId);\r\n\t\tfor(Integer edgeId: edgeSet) {\r\n\t\t\toutNeighbors.add( getEdge(edgeId).getToId() );\r\n\t\t}\r\n\t\treturn outNeighbors;\r\n\t}",
"String getEdges();",
"public abstract ArrayList<Pair<Vector2, Vector2>> getEdges();",
"public void outIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"Map<Node, Edge> getInEdges() {\n return inEdges;\n }",
"ArrayList<Edge> getEdges(ArrayList<ArrayList<Vertex>> v) {\n ArrayList<Edge> all = new ArrayList<Edge>();\n for (ArrayList<Vertex> verts : v) {\n for (Vertex vt : verts) {\n for (Edge ed : vt.outEdges) {\n all.add(ed);\n }\n }\n }\n return all;\n }",
"List<CyEdge> getInternalEdgeList();",
"private ArrayList<Edge>getFullyConnectedGraph(){\n\t\tArrayList<Edge> edges = new ArrayList<>();\n\t\tfor(int i=0;i<nodes.size();i++){\n\t\t\tfor(int j=i+1;j<nodes.size();j++){\n\t\t\t\tEdge edge = new Edge(nodes.get(i), nodes.get(j),Utils.distance(nodes.get(i), nodes.get(j)));\n\t\t\t\tedges.add(edge);\n\t\t\t}\n\t\t}\n\t\treturn edges;\n\t}",
"private int numEdges()\r\n\t{\r\n\t return eSet.size();\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<Node<A>> neighbours(){\n\t\t\n\t\tArrayList<Node<A>> output = new ArrayList<Node<A>>();\n\t\t\n\t\tif (g == null) return output;\n\t\t\n\t\tfor (Object o: g.getEdges()){\n\n\t\t\t\n\t\t\tif (((Edge<?>)o).getTo().equals(this)) {\n\t\t\t\t\n\t\t\t\tif (!output.contains(((Edge<?>)o).getFrom()))\n\t\t\t\t\t\toutput.add((Node<A>) ((Edge<?>)o).getFrom());\n\t\t\t\t\n\t\t\t}\n\n\t\t} \n\t\treturn output;\n\t\t\n\t}",
"public Set<E> getEdges();",
"@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }",
"Set<CyEdge> getExternalEdgeList();",
"@Test\r\n public void testOutboundEdges() {\r\n System.out.println(\"outboundEdges\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n Object v3Element = 3;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n Vertex v3 = instance.insertVertex(v3Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e1 = instance.insertEdge(v1, v2, edgeElement);\r\n Edge e2 = instance.insertEdge(v1, v3, edgeElement);\r\n Edge e3 = instance.insertEdge(v2, v3, edgeElement);\r\n\r\n Collection e1OutboundEdges = instance.outboundEdges(v2);\r\n Collection e2OutboundEdges = instance.outboundEdges(v3);\r\n Collection e3OutboundEdges = instance.outboundEdges(v3);\r\n\r\n boolean e1Result = e1OutboundEdges.contains(e1);\r\n boolean e2Result = e2OutboundEdges.contains(e2);\r\n boolean e3Result = e3OutboundEdges.contains(e3);\r\n\r\n Object expectedResult = true;\r\n assertEquals(expectedResult, e1Result);\r\n assertEquals(expectedResult, e2Result);\r\n assertEquals(expectedResult, e3Result);\r\n }",
"public Collection getNonEscapingEdgeTargets() {\n if (addedEdges == null) return Collections.EMPTY_SET;\n return new FlattenedCollection(addedEdges.values());\n }",
"public Enumeration undirectedEdges();",
"public void removeAllEdges() {\n }",
"private List<Graph.Edge> getEdge(PathMap map) {\n // record the visited coordinates\n List<Coordinate> visited = new ArrayList<>();\n // get all coordinates from the map\n List<Coordinate> allCoordinates = map.getCoordinates();\n // for record all generated edges\n List<Graph.Edge> edges = new ArrayList<>();\n\n\n while (visited.size() <= allCoordinates.size() - 1) {\n for (Coordinate temp : allCoordinates) {\n\n if (visited.contains(temp)) {\n continue;\n }\n visited.add(temp);\n List<Coordinate> neighbors = map.neighbours(temp);\n for (Coordinate tempNeighbour : neighbors) {\n edges.add(new Graph.Edge(temp, tempNeighbour, tempNeighbour.getTerrainCost()));\n }\n }\n }\n // trim impassable coordinates\n List<Graph.Edge> fEdges = new ArrayList<>();\n for (Graph.Edge dd : edges) {\n if (dd.startNode.getImpassable() || dd.endNode.getImpassable()) {\n continue;\n }\n fEdges.add(dd);\n }\n return fEdges;\n }",
"public void inIncidentEdges() {\r\n\t\tfor (int i = 0; i < currentVertex.inList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.inList.get(i).edge + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public boolean hasEdge(Edge e) {\n for (Edge outEdge : outEdges) {\n if (outEdge.equals(e) && e.getTo() == outEdge.getTo()) {\n return true;\n }\n }\n return false;\n }",
"int[] getEdgesIncidentTo(int... nodes);",
"private Collection<Edge> getEdges()\r\n\t{\r\n\t return eSet;\r\n\t}",
"ArrayList<Edge> getAdjacencies();",
"public abstract List<? extends GraphEdge<N, E>> getEdges();",
"public int getNumberOfEdges();",
"public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}",
"private static void makeEdgesSet() {\n edges = new Edge[e];\r\n int k = 0;\r\n for (int i = 0; i < n; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (g[i][j] != 0)\r\n edges[k++] = new Edge(j, i, g[i][j]);\r\n }\r\n }\r\n }",
"public Enumeration directedEdges();",
"Collection<E> edges();",
"private int createEdges() {\n\t\t// Use random numbers to generate random number of edges for each vertex\n\t\tint avgNumEdgesPerVertex = this.desiredTotalEdges / this.vertices.size();\n\t\tint countSuccessfulEdges = 0;\n\t\t// In order to determine the number of edges to create for each vertex\n\t\t// get a random number between 0 and 2 times the avgNumEdgesPerVertex\n\t\t// then add neighbors (edges are represented by the number of neighbors each\n\t\t// vertex has)\n\t\tfor (int i = 0; i < this.vertices.size(); i++) {\n\t\t\tfor (int j = 0; j <= (this.randomGen(avgNumEdgesPerVertex * 50) + 1); j++) {\n\t\t\t\t// select a random vertex from this.vertices (vertex list) and add as neighbor\n\t\t\t\t// ensure we don't add a vertex as a neighbor of itself\n\t\t\t\tint neighbor = this.randomGen(this.vertices.size());\n\t\t\t\tif (neighbor != i)\n\t\t\t\t\tif (this.vertices.get(i).addNeighbor(this.vertices.get(neighbor))) {\n\t\t\t\t\t\tthis.vertices.get(neighbor).addNeighbor(this.vertices.get(i));\n\t\t\t\t\t\tcountSuccessfulEdges++;\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn countSuccessfulEdges;\n\t}",
"public int getNumEdges();",
"public Enumeration outIncidentEdges(Position vp) throws InvalidPositionException;",
"private Set<Edge> reachableDAG(Vertex start, Vertex obstacle) {\n \tHashSet<Edge> result = new HashSet<Edge>();\n \tVector<Vertex> currentVertexes = new Vector<Vertex>();\n \tint lastResultNumber = 0;\n \tcurrentVertexes.add(start);\n \t\n \tdo {\n \t\t//System.out.println(\"size of currentVertexes:\" + currentVertexes.size());\n \t\t\n \t\tVector<Vertex> newVertexes = new Vector<Vertex>();\n \t\tlastResultNumber = result.size();\n \t\t\n \t\tfor (Vertex v : currentVertexes) {\n \t\t\t//System.out.println(\"layerID:\" + v.layerID + \"\\tlabel:\" + v.label);\n \t\t\taddIncomingEdges(v, obstacle, result, newVertexes);\n \t\t\taddOutgoingEdges(v, obstacle, result, newVertexes);\n \t\t}\n \t\t\n \t\t//System.out.println(\"size of newVertexes:\" + newVertexes.size());\n \t\t\n \t\tcurrentVertexes = newVertexes;\t\n \t\t//System.out.println(\"lastResultNumber:\" + lastResultNumber);\n \t\t//System.out.println(\"result.size():\" + result.size());\n \t} while (lastResultNumber != result.size());\n \t\n\t\treturn result;\n }",
"default Iterator<E> edgeIterator() {\n return getEdges().iterator();\n }",
"private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tVertex vertexF = new Vertex(\"F\");\n\t\tVertex vertexG = new Vertex(\"G\");\n\n\t\tList<Edge> edges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 2));\n\t\tedges.add(new Edge(vertexD, 6));\n\t\tedges.add(new Edge(vertexF, 5));\n\t\tvertexA.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 2));\n\t\tedges.add(new Edge(vertexC, 7));\n\t\tvertexB.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexB, 7));\n\t\tedges.add(new Edge(vertexD, 9));\n\t\tedges.add(new Edge(vertexF, 1));\n\t\tvertexC.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 6));\n\t\tedges.add(new Edge(vertexC, 9));\n\t\tedges.add(new Edge(vertexE, 4));\n\t\tedges.add(new Edge(vertexG, 8));\n\t\tvertexD.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 4));\n\t\tedges.add(new Edge(vertexF, 3));\n\t\tvertexE.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexA, 5));\n\t\tedges.add(new Edge(vertexC, 1));\n\t\tedges.add(new Edge(vertexE, 3));\n\t\tvertexF.incidentEdges = edges;\n\n\t\tedges = new ArrayList<Edge>();\n\t\tedges.add(new Edge(vertexD, 8));\n\t\tvertexG.incidentEdges = edges;\n\n\t\tgraph.add(vertexA);\n\t\tgraph.add(vertexB);\n\t\tgraph.add(vertexC);\n\t\tgraph.add(vertexD);\n\t\tgraph.add(vertexE);\n\t\tgraph.add(vertexF);\n\t\tgraph.add(vertexG);\n\n\t\treturn graph;\n\t}",
"public String getEdges(){\n double Lx = super.getCentre().x - (this.length / 2);\r\n double Rx = super.getCentre().x + (this.length / 2);\r\n double Dy = super.getCentre().y - (this.width / 2);\r\n double Uy = super.getCentre().y + (this.width / 2);\r\n Point UL = new Point(Lx, Uy);\r\n Point UR = new Point(Rx, Uy);\r\n Point DL = new Point(Lx, Dy);\r\n Point DR = new Point(Rx, Dy);\r\n Point[] Edges = {DL, UL, UR, DR};\r\n this.edge = Edges;\r\n return Arrays.toString(Edges);\r\n }",
"private static void InitializeEdges()\n {\n edges = new ArrayList<Edge>();\n\n for (int i = 0; i < Size -1; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n edges.add(new Edge(cells[i][j].Point, cells[i + 1][ j].Point));\n edges.add(new Edge(cells[j][i].Point, cells[j][ i + 1].Point));\n }\n }\n\n for (Edge e : edges)\n {\n if ((e.A.X - e.B.X) == -1)\n {\n e.Direction = Edge.EdgeDirection.Vertical;\n }\n else\n {\n e.Direction = Edge.EdgeDirection.Horizontal;\n }\n }\n }",
"public Enumeration edges();",
"public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}",
"int getNumberOfEdges();",
"private void initializeEdges() {\n for (NasmInst inst : nasm.listeInst) {\n if (inst.source == null || inst.destination == null)\n return;\n Node from = inst2Node.get(label2Inst.get(inst.source.toString()));\n Node to = inst2Node.get(label2Inst.get(inst.destination.toString()));\n if (from == null || to == null)\n return;\n graph.addEdge(from, to);\n }\n }",
"public static void mergeOutEdge(Vertex res, Vertex src) {\n res.outEdges.addAll(src.outEdges);\n }",
"public Set getNonEscapingEdges() {\n if (addedEdges == null) return Collections.EMPTY_SET;\n return addedEdges.entrySet();\n }",
"public Edge[] getEdges()\r\n {\r\n if(edges == null)\r\n\t{\r\n\t edges = new Edge[numEdges()];\r\n\t int i = 0;\r\n\t for (final EdgeTypeHolder eth : ethMap.values())\r\n\t\tfor (final Edge e : eth.getEdges())\r\n\t\t edges[i++] = e;\r\n\t}\r\n return edges.clone();\r\n }",
"private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}",
"void getSinkSet(){\n\t\tsink = new HashSet<>(inlinks.keySet());\n\t\tfor(String node : outlinks.keySet()){\n\t\t\tif(!(sink.add(node))){\n\t\t\t\tsink.remove(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Sink Size : \"+sink.size());\n\t }",
"int[] getInEdges(int... nodes);",
"public List<IEdge> getAllEdges();",
"List<IEdge> getAllEdges();",
"private List<Node> getAdjacentNodes(Node current, List<Node> closedSet, Node dest) {\n\t\tList<Node> adjacent = new ArrayList<Node>();\n\t\t\n\t\tfor (int i = -1; i <=1; i++) {\n\t\t\tinner:\n\t\t\tfor (int j = -1; j <=1; j++) {\n\t\t\t\tif (i == 0 && j == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint x = current.getX() + i;\n\t\t\t\tint y = current.getY() + j;\n\t\t\t\tif (!currentState.inBounds(x, y)\n\t\t\t\t\t\t|| board.getHasTree(x, y)\n\t\t\t\t\t\t|| peasantAt(x,y)\n\t\t\t\t\t\t|| board.getTowerProbability(x, y) == 1\n\t\t\t\t\t\t|| isTownHallAt(x, y, dest)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tNode node = new Node(x, y, getHitProbability(x, y), current);\n\t\t\t\tfor (Node visitedNode : closedSet) {\n\t\t\t\t\tif (node.equals(visitedNode)) {\n\t\t\t\t\t\tcontinue inner;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tadjacent.add(node);\n\t\t\t}\n\t\t}\n//\t\tSystem.out.println(\"AT \" + current);\n//\t\tSystem.out.println(\"NEIGHBORS:\");\n//\t\tfor (Node node : adjacent) {\n//\t\t\tSystem.out.println(\"\\t\" + node);\n//\t\t}\n\t\t\n\t\treturn adjacent;\n\t}",
"public Set<E> getEdges(V tail);",
"private void removeEdges()\r\n\t{\r\n\t final String edgeTypeName = edgeType.getName();\r\n\t for (final Edge e : eSet)\r\n\t\te.getSource().removeEdge(edgeTypeName, e.getDest());\r\n\t eSet.clear();\r\n\t}",
"@Override\n\tpublic List<ET> getEdgeList()\n\t{\n\t\treturn new ArrayList<ET>(edgeList);\n\t}",
"private ScheduleGrph initializeIdenticalTaskEdges(ScheduleGrph input) {\n\n\t\tScheduleGrph correctedInput = (ScheduleGrph) SerializationUtils.clone(input);\n\t\t// FORKS AND TODO JOINS\n\t\t/*\n\t\t * for (int vert : input.getVertices()) { TreeMap<Integer, List<Integer>> sorted\n\t\t * = new TreeMap<Integer, List<Integer>>(); for (int depend :\n\t\t * input.getOutNeighbors(vert)) { int edge = input.getSomeEdgeConnecting(vert,\n\t\t * depend); int weight = input.getEdgeWeightProperty().getValueAsInt(edge); if\n\t\t * (sorted.get(weight) != null) { sorted.get(weight).add(depend); } else {\n\t\t * ArrayList<Integer> a = new ArrayList(); a.add(depend); sorted.put(weight, a);\n\t\t * }\n\t\t * \n\t\t * } int curr = -1; for (List<Integer> l : sorted.values()) { for (int head : l)\n\t\t * {\n\t\t * \n\t\t * if (curr != -1) { correctedInput.addDirectedSimpleEdge(curr, head); } curr =\n\t\t * head; }\n\t\t * \n\t\t * } }\n\t\t */\n\n\t\tfor (int vert : input.getVertices()) {\n\t\t\tfor (int vert2 : input.getVertices()) {\n\t\t\t\tint vertWeight = input.getVertexWeightProperty().getValueAsInt(vert);\n\t\t\t\tint vert2Weight = input.getVertexWeightProperty().getValueAsInt(vert2);\n\n\t\t\t\tIntSet vertParents = input.getInNeighbors(vert);\n\t\t\t\tIntSet vert2Parents = input.getInNeighbors(vert2);\n\n\t\t\t\tIntSet vertChildren = input.getOutNeighbors(vert);\n\t\t\t\tIntSet vert2Children = input.getOutNeighbors(vert2);\n\n\t\t\t\tboolean childrenEqual = vertChildren.containsAll(vert2Children)\n\t\t\t\t\t\t&& vert2Children.containsAll(vertChildren);\n\n\t\t\t\tboolean parentEqual = vertParents.containsAll(vert2Parents) && vert2Parents.containsAll(vertParents);\n\n\t\t\t\tboolean inWeightsSame = true;\n\t\t\t\tfor (int parent : vertParents) {\n\t\t\t\t\tfor (int parent2 : vert2Parents) {\n\t\t\t\t\t\tif (parent == parent2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent, vert)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(parent2, vert2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tinWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!inWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tboolean outWeightsSame = true;\n\t\t\t\tfor (int child : vertChildren) {\n\t\t\t\t\tfor (int child2 : vert2Children) {\n\t\t\t\t\t\tif (child == child2 && input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert, child)) == input.getEdgeWeightProperty()\n\t\t\t\t\t\t\t\t.getValue(input.getSomeEdgeConnecting(vert2, child2))) {\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutWeightsSame = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!outWeightsSame) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboolean alreadyEdge = correctedInput.areVerticesAdjacent(vert, vert2)\n\t\t\t\t\t\t|| correctedInput.areVerticesAdjacent(vert2, vert);\n\n\t\t\t\tif (vert != vert2 && vertWeight == vert2Weight && parentEqual && childrenEqual && inWeightsSame\n\t\t\t\t\t\t&& outWeightsSame && !alreadyEdge) {\n\t\t\t\t\tint edge = correctedInput.addDirectedSimpleEdge(vert, vert2);\n\t\t\t\t\tcorrectedInput.getEdgeWeightProperty().setValue(edge, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn correctedInput;\n\t}",
"public ArrayList<Node> getNeighbors(){\n ArrayList<Node> result = new ArrayList<Node>();\n for(Edge edge: edges){\n result.add(edge.end());\n }\n return result;\n }",
"public Stack<Vertex> next() {\n Vertex u = lov.pop();\n for (Edge e : u.outEdges) {\n if (!e.to.visited) {\n cameFromEdge.put(e.to.toIdentifier(), e.from);\n if (e.to.x == MazeWorld.width - 1 && e.to.y == MazeWorld.height - 1) {\n reconstruct(cameFromEdge, e.to);\n lov = new Stack<Vertex>();\n }\n else {\n lov.push(u);\n e.to.visited = true;\n lov.push(e.to);\n break;\n }\n }\n }\n return lov;\n }",
"ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }",
"@Override\n\tpublic Collection<IEdge<S>> getEdges()\n\t{\n\t\tfinal List<IEdge<S>> set = new ArrayList<>(map.size());\n\t\tfor (final Entry<S, Integer> entry : map.entrySet())\n\t\t{\n\t\t\tset.add(createEdge(entry.getKey(), entry.getValue()));\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(set);\n\t}",
"public abstract List<? extends DiGraphEdge<N, E>> getInEdges(N nodeValue);",
"public synchronized Set<String> getNextEdges(String currentEdge) {\n\t\tif (currentEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tSumoEdge currentSumoEdge = getEdge(currentEdge);\n\t\tif (currentSumoEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tString currentEdgeEnd = graph.getEdgeTarget(currentSumoEdge);\n\t\tSet<SumoEdge> edges = graph.outgoingEdgesOf(currentEdgeEnd);\n\t\t\n\t\tSet<String> edgeIds = new HashSet<String>();\n\t\tfor (SumoEdge edge: edges) {\n\t\t\tedgeIds.add(edge.getId());\n\t\t}\n\t\t\n\t\treturn edgeIds;\n\t}",
"public Collection<LazyRelationship2> getEdges() {\n long relCount=0;\n ArrayList l = new ArrayList();\n \n for(Path e : getActiveTraverser()){\n for(Path p : getFlushTraverser(e.endNode())){\n if((relCount++%NEO_CACHE_LIMIT)==0){\n l.add(p.lastRelationship());\n clearNeoCache();\n }\n }\n }\n return l; \n }",
"public List<Piece> getEdges() {\n List<Piece> result = new ArrayList<>();\n result.add(_board[0][1]);\n result.add(_board[1][0]);\n result.add(_board[1][2]);\n result.add(_board[2][1]);\n return result;\n }",
"public void addAllEdges(ArrayList<Node> nList, ArrayList<Obstacle> oList) {\n\t\tfor (int i = 0; i < nList.size(); i++) {\n\t\t\tNode node = nList.get(i);\n\t\t\tdouble w = node.vertex.distanceTo(this.vertex);\n\t\t\tEdge e = new Edge(w, node);\n\t\t\tif (!e.intersectObstacleHuh(oList, this) && !(w == 0.0)){\n\t\t\t\t//if this edge does not intersect any obstacles in give map, add\n\t\t\t\t//as a visible edge to node\n\t\t\t\tthis.addEdge(e);\n\t\t\t}\n\t\t}\n\t}",
"GraphObj() {\n this._V = 0;\n this._E = 0;\n inListArray = new ArrayList<>();\n inListArray.add(null);\n outListArray = new ArrayList<>();\n outListArray.add(null);\n selfEdges = new ArrayList<>();\n selfEdges.add(-1);\n edgeList = new ArrayList<>();\n edgeList.add(null);\n }",
"public char[] getOutermostEdges(int num) {\n int width = points[0].length;\n switch (num) {\n case 0:\n return points[0];\n case 1:\n return points[width - 1];\n case 2:\n char[] ret1 = new char[width];\n for (int i = 0; i < width; i++) {\n ret1[i] = points[i][0];\n }\n return ret1;\n case 3:\n char[] ret2 = new char[width];\n for (int i = 0; i < width; i++) {\n ret2[i] = points[i][width - 1];\n }\n return ret2;\n case 4:\n return reverse(getOutermostEdges(0));\n case 5:\n return reverse(getOutermostEdges(1));\n case 6:\n return reverse(getOutermostEdges(2));\n case 7:\n return reverse(getOutermostEdges(3));\n default:\n return null;\n }\n }",
"public int getEdgeCount() \n {\n return 3;\n }",
"public ArrayList< Edge > incidentEdges( ) {\n return incidentEdges;\n }",
"@Override\n public Collection<? extends IEdge> getEdges() {\n\n return new LinkedList<>(Collections.unmodifiableCollection(this.edgeMap\n .values()));\n }",
"IList<Edge> getWalls(ArrayList<ArrayList<Vertex>> v, ArrayList<Edge> all) {\n IList<Edge> finalEdges = new Empty<Edge>();\n for (Edge e : all) {\n boolean valid = true;\n for (ArrayList<Vertex> l : v) {\n for (Vertex vt : l) {\n for (Edge e2 : vt.outEdges) {\n if (e.equals(e2) || (e.to == e2.from && e.from == e2.to)) {\n valid = false;\n }\n }\n }\n }\n if (valid) {\n finalEdges = finalEdges.add(e);\n }\n }\n return finalEdges;\n }",
"public int outDegree() {\r\n\t\treturn currentVertex.outList.size();\r\n\t}",
"public Iterable<Edge> edges() {\r\n\t\treturn mst;\r\n\t}",
"@Override\r\n\tpublic PointInterface[] edgeEndPoints() {\n\t\treturn p;\r\n\t}",
"@Override\r\n\tpublic Iterable<EntityGraphEdge> getEdges()\r\n\t{\n\t\treturn null;\r\n\t}",
"public int numEdges();",
"@Override\n\tpublic List<Edge> getAllMapEdges() {\n\n\t\tList<Edge> res = new ArrayList<Edge>();\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\t\t\tString getAllEdges = \"SELECT node_from, node_to, distance FROM routefinder.maprelations\";\n\t\t\tresultSet = null;\n\t\t\tpstmt = conn.prepareStatement(getAllEdges);\n\t\t\tresultSet = pstmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tEdge edge = new Edge();\n\t\t\t\tedge.setNode1(Database.getNodeFromId(resultSet.getInt(\"node_from\")));\n\t\t\t\tedge.setNode2(Database.getNodeFromId(resultSet.getInt(\"node_to\")));\n\t\t\t\tedge.setDist(resultSet.getDouble(\"distance\"));\n\t\t\t\tres.add(edge);\n\t\t\t}\n\t\t\treturn res;\n\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\tJdbcConnect.resultClose(resultSet, pstmt);\n\t\t}\n\n\t\treturn null;\n\t}",
"public DEdge[] getEdges(){\n return listOfEdges;\n }",
"private void checkEdgesToSearch() {\n if (edgesToSearch == null || edgesToSearch.length == 0) {\n Graph hg;\n if (Lookup.getDefault().lookup(DataTablesController.class).isShowOnlyVisible()) {\n hg = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraphVisible();\n } else {\n hg = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getGraph();\n }\n edgesToSearch = hg.getEdges().toArray();\n }\n }",
"public synchronized Set<String> getIncomingEdges(String currentEdge) {\n\t\tif (currentEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tSumoEdge currentSumoEdge = getEdge(currentEdge);\n\t\tif (currentSumoEdge == null) {\n\t\t\treturn new HashSet<String>();\n\t\t}\n\t\t\n\t\tString currentEdgeEnd = graph.getEdgeTarget(currentSumoEdge);\n\t\tSet<SumoEdge> edges = graph.incomingEdgesOf(currentEdgeEnd);\n\t\t\n\t\tSet<String> edgeIds = new HashSet<String>();\n\t\tfor (SumoEdge edge: edges) {\n\t\t\tedgeIds.add(edge.getId());\n\t\t}\n\t\t\n\t\treturn edgeIds;\n\t}",
"public Iterable<Edge> edges() {\r\n Bag<Edge> list = new Bag<Edge>();\r\n for (int v = 0; v < V; v++) {\r\n for (Edge e : adj(v)) {\r\n list.add(e);\r\n }\r\n }\r\n return list;\r\n }",
"private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}",
"@Override\n public Iterator<Edge> edgeIterator(int source) {\n return null;\n }",
"@Override\r\n\tpublic String toString() {\r\n\t\tStringBuilder out = new StringBuilder();\r\n\t\tMap<Integer,Integer> tmp;\r\n\t\tout.append(\"{\");\r\n\t\tfor(int i = 0; i < edges.length; i++) {\r\n\t\t\ttmp = edges[i];\r\n\t\t\tif (tmp == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tfor(Map.Entry entry : tmp.entrySet()) {\r\n\t\t\t\t\tif ((int)entry.getValue() == -1) {\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \")\" + \",\");\r\n\t\t\t\t} else{\r\n\t\t\t\t\tout.append(\"(\" + i + \",\" + entry.getKey() + \",\" + entry.getValue() + \")\" + \",\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (out.length() > 2) {\r\n\t\tout.setLength(out.length() - 2);\r\n\t\tout.append(\")\");\r\n\t\t}\r\n\r\n\t\tout.append(\"}\");\r\n\t\treturn out.toString();\r\n\t}",
"public HashMap<String, Edge> getEdgeList () {return edgeList;}",
"public void buildEdges(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tEdgeLocation edgeLoc1 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthWest);\n\t\t\tEdge edge1 = new Edge(edgeLoc1);\n\t\t\tedges.put(edgeLoc1, edge1);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc2 = new EdgeLocation(entry.getKey(), EdgeDirection.North);\n\t\t\tEdge edge2 = new Edge(edgeLoc2);\n\t\t\tedges.put(edgeLoc2, edge2);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc3 = new EdgeLocation(entry.getKey(), EdgeDirection.NorthEast);\n\t\t\tEdge edge3 = new Edge(edgeLoc3);\n\t\t\tedges.put(edgeLoc3, edge3);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc4 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthEast);\n\t\t\tEdge edge4 = new Edge(edgeLoc4);\n\t\t\tedges.put(edgeLoc4, edge4);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc5 = new EdgeLocation(entry.getKey(), EdgeDirection.South);\n\t\t\tEdge edge5 = new Edge(edgeLoc5);\n\t\t\tedges.put(edgeLoc5, edge5);\n\t\t\t\n\t\t\tEdgeLocation edgeLoc6 = new EdgeLocation(entry.getKey(), EdgeDirection.SouthWest);\n\t\t\tEdge edge6 = new Edge(edgeLoc6);\n\t\t\tedges.put(edgeLoc6, edge6);\n\t\t}\n\t}",
"public void createEdges() {\n \tfor(String key : ways.keySet()) {\n \t Way way = ways.get(key);\n \t if(way.canDrive()) {\n \t\tArrayList<String> refs = way.getRefs();\n \t\t\t\n \t\tif(refs.size() > 0) {\n \t\t GPSNode prev = (GPSNode) this.getNode(refs.get(0));\n \t\t drivableNodes.add(prev);\n \t\t \n \t\t GPSNode curr = null;\n \t\t for(int i = 1; i <refs.size(); i++) {\n \t\t\tcurr = (GPSNode) this.getNode(refs.get(i));\n \t\t\tif(curr == null || prev == null)\n \t\t\t continue;\n \t\t\telse {\n \t\t\t double distance = calcDistance(curr.getLatitude(), curr.getLongitude(),\n \t\t\t\t prev.getLatitude(), prev.getLongitude());\n\n \t\t\t GraphEdge edge = new GraphEdge(prev, curr, distance, way.id);\n \t\t\t prev.addEdge(edge);\n \t\t\t curr.addEdge(edge);\n \t\t\t \n \t\t\t drivableNodes.add(curr);\n \t\t\t prev = curr;\n \t\t\t}\n \t\t }\t\n \t\t}\n \t }\n \t}\n }",
"public Collection<Edge> edges() {\n Collection<Collection<Edge>> copyOfEdges = new ArrayList<Collection<Edge>>();\n //values = myGraph.values(); OLD\n //create a copy of all the edges in the map to restrict any reference\n //to interals of this class\n copyOfEdges.addAll(myGraph.values());\n Collection<Edge> allValues = new ArrayList<Edge>();\n Iterator<Collection<Edge>> eachColl = copyOfEdges.iterator();\n while(eachColl.hasNext()){\n allValues.addAll(eachColl.next());\n }\n\n return allValues;\n }",
"public void outAdjacentVertices() {\r\n\t\tfor (int i = 0; i < currentVertex.outList.size(); i++) {\r\n\t\t\tSystem.out.print(currentVertex.outList.get(i).vertex.label + \" \");\r\n\t\t}\r\n\t\tprintLine();\r\n\t}",
"public List<MoveEdge> getEdgeNeighborhood(final LabeledUndirectedGraph<N, E> sk) {\n final List<MoveEdge> neighborood = new ArrayList<>();\n final LabeledUndirectedGraph<N, E> csk = new LabeledUndirectedGraph<>(sk);\n // For each spanning edges...\n csk.getEdges().forEach(edge -> {\n csk.removeEdge(edge);\n final List<Set<N>> nodes = new ArrayList<>(csk.getSubGraphsNodes());\n if (nodes.size() == 2) {\n final Set<E> candidates = new HashSet<>();\n csk.getRemovedEdges().stream()\n .filter(redge -> (!redge.equals(edge))\n && ((nodes.get(0).contains(redge.getNode1()) && nodes.get(1).contains(redge.getNode2()))\n || (nodes.get(0).contains(redge.getNode2()) && nodes.get(1).contains(redge.getNode1()))))\n .forEachOrdered(redge -> candidates.add(redge));\n candidates.forEach(candidate -> neighborood.add(new MoveEdge(edge, candidate, sk)));\n }\n csk.addEdge(edge);\n });\n return neighborood;\n }",
"public void fillEdges() {\n\t\tfor (int y = 0; y < mapSize; y++) {\n\t\t\tfor (int x = 0; x < mapSize; x++) {\n\t\t\t\tCoordinates coordinates = new Coordinates(x, y);\n\t\t\t\tint vertexSrc = coordinateToVertex(coordinates);\n\n\t\t\t\tif (deletedVertices.contains(vertexSrc)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tDirection[] directions = Direction.values();\n\n\t\t\t\tfor (Direction direction : directions) {\n\t\t\t\t\tCoordinates destCoordinates = new Coordinates(x, y);\n\n\t\t\t\t\tdestCoordinates = destCoordinates.addCoordinates(direction.coordinates());\n\n\t\t\t\t\tif (destCoordinates.areCorrect(mapSize)) {\n\t\t\t\t\t\tint vertexDest = coordinateToVertex(destCoordinates);\n\t\t\t\t\t\tif (!deletedVertices.contains(vertexDest)) {\n\t\t\t\t\t\t\taddEdge(vertexSrc, vertexDest);\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}\n\t}",
"@Override\n\tpublic Set<ET> getAdjacentEdges(N node)\n\t{\n\t\t// implicitly returns null if gn is not in the nodeEdgeMap\n\t\tSet<ET> adjacentEdges = nodeEdgeMap.get(node);\n\t\treturn adjacentEdges == null ? null : new HashSet<ET>(adjacentEdges);\n\t}",
"private final void computeAllEdgeLevelsFast() {\n int[] currentLevelEdgeNodes = new int[nEdges*2];\n int[] currentLevelEdgeIndexes = new int[nEdges*2];\n int currEdge = 0;\n int nextLevelEnd = 0;\n\n /**\n * \\ neighbours are behind the current edge.\n * '. \\\n * '. \\ nNeighbours[vi][ei] = 2\n * '.\\\n * O-----------> [next]\n * vi ei\n */\n\n\n int[][] nNeighbours = new int[nNodes][];\n for (int vi=0; vi<nNodes; ++vi) {\n int currX = xPositions[vi];\n int currY = yPositions[vi];\n\n int nOutgoingEdges = nOutgoingEdgess[vi];\n int[] outgoingEdges = outgoingEdgess[vi];\n \n int[] currNodeNNeighbours = new int[nOutgoingEdges];\n for (int ei=0; ei<nOutgoingEdges; ++ei) {\n // For each directed edge\n int ni = outgoingEdges[ei];\n int nextX = xPositions[ni];\n int nextY = yPositions[ni];\n\n // Count taut outgoing edges\n int count = 0;\n\n int nNextOutgoingEdges = nOutgoingEdgess[vi];\n int[] nextOutgoingEdges = outgoingEdgess[vi];\n for (int j=0; j<nNextOutgoingEdges; ++j) {\n int di = nextOutgoingEdges[j];\n if (graph.isTaut(nextX, nextY, currX, currY, xPositions[di], yPositions[di])) {\n ++count;\n }\n }\n\n currNodeNNeighbours[ei] = count;\n if (count == 0) {\n currentLevelEdgeNodes[nextLevelEnd] = vi;\n currentLevelEdgeIndexes[nextLevelEnd] = ei;\n ++nextLevelEnd;\n }\n }\n nNeighbours[vi] = currNodeNNeighbours;\n }\n\n \n int currLevel = 1;\n while (currEdge < nextLevelEnd && currLevel < levelLimit) {\n\n int currentLevelEnd = nextLevelEnd;\n for (; currEdge < currentLevelEnd; ++currEdge) {\n int currNode = currentLevelEdgeNodes[currEdge];\n int currEdgeIndex = currentLevelEdgeIndexes[currEdge];\n\n if (edgeLevels[outgoingEdgeIndexess[currNode][currEdgeIndex]] != LEVEL_W) continue;\n // Set edge level\n edgeLevels[outgoingEdgeIndexess[currNode][currEdgeIndex]] = currLevel;\n\n /**\n * Curr side must have no neighbours.\n * Opp side (next node) may have neighbours.\n * So remove neighbours from opposite side.\n * __\n * /| __\n * / .-'|\n * (no neighbours) / .-'\n * /.-'\n * O-----------> [n]\n * vi ei\n */\n // No need to remove neighbours from opposite edge. They are ignored automatically.\n\n\n int nextNode = outgoingEdgess[currNode][currEdgeIndex];\n\n int currX = xPositions[currNode];\n int currY = yPositions[currNode];\n int nextX = xPositions[nextNode];\n int nextY = yPositions[nextNode];\n\n int[] outgoingEdges = outgoingEdgess[nextNode];\n int nOutgoingEdges = nOutgoingEdgess[nextNode];\n\n int[] outgoingEdgeIndexes = outgoingEdgeIndexess[nextNode];\n\n int[] nextNodeNNeighbours = nNeighbours[nextNode];\n for (int j=0; j<nOutgoingEdges; ++j) {\n if (edgeLevels[outgoingEdgeIndexes[j]] != LEVEL_W) continue;\n int nextnextNode = outgoingEdges[j];\n int nextnextX = xPositions[nextnextNode];\n int nextnextY = yPositions[nextnextNode];\n if (!graph.isTaut(currX, currY, nextX, nextY, nextnextX, nextnextY)) continue;\n\n --nextNodeNNeighbours[j];\n if (nextNodeNNeighbours[j] == 0) {\n // push into next level's list.\n currentLevelEdgeNodes[nextLevelEnd] = nextNode;\n currentLevelEdgeIndexes[nextLevelEnd] = j;\n ++nextLevelEnd;\n }\n\n if (nextNodeNNeighbours[j] < 0) System.out.println(\"ERROR\");\n }\n }\n\n ++currLevel;\n }\n }",
"public Collection< EDataT > edgeData();",
"private ArrayList<Integer> getCityEdges(HashMap<Integer,Integer> table){\n ArrayList<Integer> edges = new ArrayList<Integer>();\n edges.addAll(table.keySet());\n return edges;\n }"
] | [
"0.737541",
"0.7156602",
"0.7064077",
"0.6945678",
"0.6813843",
"0.67379564",
"0.6737883",
"0.6702033",
"0.6689952",
"0.6674034",
"0.6620964",
"0.66027987",
"0.655001",
"0.65419734",
"0.6515224",
"0.64930236",
"0.64490664",
"0.64286834",
"0.63961613",
"0.62633055",
"0.6258828",
"0.62554157",
"0.6254502",
"0.6218506",
"0.6211872",
"0.6192041",
"0.612682",
"0.6069516",
"0.6065678",
"0.6027683",
"0.6021445",
"0.60181254",
"0.60129017",
"0.601114",
"0.6006498",
"0.59850234",
"0.59754765",
"0.59698284",
"0.5967352",
"0.594677",
"0.59461373",
"0.5942538",
"0.59367067",
"0.59010625",
"0.5900539",
"0.5896178",
"0.5888441",
"0.5882959",
"0.58741874",
"0.58508354",
"0.58493537",
"0.58433515",
"0.5840034",
"0.58362263",
"0.58312",
"0.5830525",
"0.5821764",
"0.582119",
"0.5819084",
"0.5817364",
"0.5812894",
"0.5809826",
"0.58064586",
"0.57967997",
"0.57938945",
"0.57910633",
"0.5782294",
"0.5779451",
"0.5777696",
"0.5776067",
"0.57727754",
"0.5768345",
"0.5764427",
"0.5763499",
"0.57556975",
"0.57540864",
"0.5735997",
"0.57330424",
"0.5732893",
"0.5732681",
"0.57268345",
"0.57223684",
"0.5722302",
"0.5715253",
"0.57127047",
"0.56986105",
"0.56974405",
"0.56969917",
"0.56966865",
"0.56960577",
"0.5688929",
"0.56805193",
"0.56779885",
"0.5674952",
"0.5671328",
"0.566924",
"0.56672305",
"0.5660637",
"0.5654676",
"0.56509984",
"0.5650302"
] | 0.0 | -1 |
ver documentacao do banco para saber qual a ordem deste campo | private String getCampo3() {
String campo = this.campoLivre.substring(15);
return boleto.getDigitoCampo(campo);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void verificaNome() {\r\n\t\thasErroNome(nome.getText());\r\n\t\tisCanSave();\r\n\t}",
"public boolean getEditando() {\n return this.aluno.getId() != null;\n }",
"@Test\n public void nao_deve_aceitar_descricao_nula() {\n telefone.setDescricao(null);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }",
"@Test\n public void nao_deve_aceitar_descricao_vazia() {\n telefone.setDescricao(EMPTY);\n assertFalse(isValid(telefone, \"A descrição não pode ser nula ou vazia.\", Find.class));\n }",
"@Test\n public void deve_aceitar_descricao_valida() {\n telefone.setDescricao(\"Celular pessoal.\");\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }",
"boolean hasFieldId();",
"public Boolean EsDefecto()\n {\n return (m_szTextoDefecto.isEmpty()) || (getText().toString().trim().equals(m_szTextoDefecto));\n }",
"@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }",
"public int getId_docente() {\n return id_docente;\n }",
"java.lang.String getField1016();",
"java.lang.String getField1064();",
"Documento getDocumento();",
"public int getDocenteId() {\r\n return this.docenteId;\r\n }",
"public boolean isObjectDifferentiaField(CharField cf) {\n return false;\n }",
"java.lang.String getField1007();",
"public String getApellidos() { return (this.apellidos == null) ? \"\" : this.apellidos; }",
"boolean hasField2();",
"java.lang.String getField1066();",
"public DocumentoVO getDocumento() {\n return documento;\n }",
"boolean hasField3();",
"java.lang.String getField1231();",
"public boolean isSubjectField(CharField cf) {\n return cf.getName().equals(\"AnnotatedEntity\");\n }",
"private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }",
"boolean hasSecondField();",
"java.lang.String getField1005();",
"java.lang.String getField1048();",
"@Override\r\n\tprotected boolean beforeDelete() {\r\n\t\t\r\n\t\tString valida = DB.getSQLValueString(null,\"SELECT DocStatus FROM C_Hes WHERE C_Hes_ID=\" + getC_Hes_ID());\r\n if (!valida.contains(\"DR\")){\r\n \t\r\n \tthrow new AdempiereException(\"No se puede Eliminar este documento por motivos de Auditoria\");\r\n\r\n }\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"@Override\n protected void validaCampos(ArquivoLoteVO entity) {\n\n }",
"private boolean validarDatos() {\r\n\t\tboolean _esValido = true;\r\n\r\n\t\tif (txField_lugar.getText() == null || txField_lugar.getText().isEmpty())\r\n\t\t\t_esValido = false;\r\n\t\treturn _esValido;\r\n\t}",
"boolean hasField0();",
"boolean hasField4();",
"public boolean getField(Cursor c);",
"@Override\n\tpublic boolean shouldSkipField(FieldAttributes classe) {\n\t\t\n\t\tfinal Expose expose = classe.getAnnotation(Expose.class);\n return expose != null && !expose.serialize();\n\t\t\n/*\t\tString className = classe.getDeclaringClass().getName();\n\t\tString fieldName = classe.getName();\n\t\t\n\t\t\t\n\t\t\n\t\treturn \n\t className.equals(Produto.class.getName())\n\t && (fieldName.equals(\"versoes\") || fieldName.equals(\"clientes\"));*/\n\t}",
"java.lang.String getField1301();",
"java.lang.String getField1202();",
"private boolean seleccionarItemEnListado(){\n\t\t\n\t\tint indice = this.getUltIdDoc();\n\t\tif (indice > -1){ //solo si se eligió un doc\n\t\t\tif ((indice+1) > tablaDocs.getItemCount()){ //se pasa de la cantidad de elemento en la lista, poner el de mas arriba en su lugar\n\t\t\t\tthis.setUltIdDoc(tablaDocs.getItemCount()-1);\n\t\t\t\tindice = this.getUltIdDoc(); \n\t\t\t}\n\t\t\ttablaDocs.setSelection(indice); \n\t\t\tlistaDocumentos.setSelection(indice);\n\t\t}\n\t\treturn true;\n\t}",
"String getEditore();",
"public boolean hasAllowedByRobotsTXT() {\n return fieldSetFlags()[0];\n }",
"java.lang.String getField1015();",
"java.lang.String getField1307();",
"@Override\n\t@Transactional\n\tpublic boolean validarColumnasTxt(String ubicacion, Registro registro, int formato) { // Formato = 2(TXT) , 3(CSV)\n\t\tboolean columnasCoinciden = false;\n\t\tVersionPlantilla plantillaDb = versionPlantillaServiceImpl.recuperarVersionPlantillaHabilitada(registro.getId());\t\t\n\t\t//Plantilla plantillaDb = plantillaRepositoryImpl.buscarPlantillaPorRegistroJpa(registro.getId()); // Recuperar la plantilla que pertenece al registro\n\t\tList<String> listadoColumnasBd = new ArrayList<String>(); // Almacenar columnas de BD\n\t\tList<String> listadocolumnasSpss=new ArrayList<String>();\n\t\tswitch(formato)\n\t\t{\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\t listadocolumnasSpss = leerColumnasTxtDelServidor(ubicacion); // Listado columnas txt\n\t\t\t\t break;\n\t\t\tcase 3:\n\t\t\t\t listadocolumnasSpss = leerColumnasCsvDelServidor(ubicacion); // Listado columnas csv\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\tfor (ColumnaVersionPlantilla pc : plantillaDb.getVersionesColumna()) {\n\t\t\tlistadoColumnasBd.add(pc.getPlantillaColumna().getNombre().toUpperCase());\n\t\t\t\n\t\t}\n\t\tString col1;\n\t\tfor (String col : listadocolumnasSpss) {\n\t\t\tif (listadocolumnasSpss.size() != listadoColumnasBd.size()) {\n\t\t\t\tcolumnasCoinciden = false;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tcol=col.toLowerCase();\n\t\t\t\tint i=0;\n\t\t\t\tcol=col.replace(\";\", \"\");\n\t\t\t\tint ascii = (int) col.charAt(0);\n\t\t\t\t//System.out.println(\"col ascii:\"+ascii);\n\t\t\t\t\n\t\t\t\tif(ascii==65279)\n\t\t\t\t{\n\t\t\t\t\tcol=col.substring(1);\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tif (listadoColumnasBd.contains(col.toUpperCase())) {\n\t\t\t\t\tcolumnasCoinciden = true;\n\t\t\t\t\tcontinue;// Continue funciona par for, while, y Do-while\n\t\t\t\t} else {\n\t\t\t\t\tcolumnasCoinciden = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOG.info(\"RETORNO : \" + columnasCoinciden);\n\t\treturn columnasCoinciden;\n\t}",
"@Override\n\t@Field(offset=214, length=8, paddingChar=' ', align=Align.LEFT)\n\tpublic String getMotivoOcorrencia() {\n\t\treturn super.getMotivoOcorrencia();\n\t}",
"java.lang.String getField1362();",
"String getClobField();",
"java.lang.String getField1341();",
"private void cargarCodDocente() {\n ClsNegocioDocente negoDoc = new ClsNegocioDocente(); \n txtCodDocente.setText(negoDoc.ObtenerCodigo());\n try {\n negoDoc.conexion.close();\n } catch (SQLException ex) {\n Logger.getLogger(FrmCRUDDocente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"java.lang.String getField1040();",
"public int getTipoDocumento();",
"java.lang.String getField1003();",
"public int getToDocType ()\n {\n return this.toDocType;\n }",
"@Override\n\tpublic String getQueryDeExiste(Onibus entidade) {\n\t\treturn null;\n\t}",
"java.lang.String getField1312();",
"java.lang.String getField1078();",
"java.lang.String getField1610();",
"public void ach_doc_type_txt_test () {\n\t\t\n\t}",
"@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }",
"java.lang.String getField1221();",
"public String getApellido(){\n return this.apellido;\n }",
"java.lang.String getField1031();",
"java.lang.String getField1531();",
"private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}",
"java.lang.String getField1646();",
"java.lang.String getField1382();",
"public void setApellidos(String apellidos) { this.apellidos = apellidos; }",
"java.lang.String getField1431();",
"boolean hasField1();",
"java.lang.String getField1710();",
"@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }",
"java.lang.String getField1381();",
"java.lang.String getField1843();",
"java.lang.String getField1702();",
"java.lang.String getField1366();",
"java.lang.String getField1216();",
"public void setApellidos(String p) { this.apellidos = p; }",
"public interface DocumentoInternoSinBinarios {\n Long getId();\n Integer getNivel();\n TipoDocumento getTipo();\n String getCodigo();\n}",
"boolean getField0();",
"java.lang.String getField1213();",
"java.lang.String getField1032();",
"java.lang.String getField1406();",
"public int escolhasDocente(Long idDocente){\n Session session = getSessionFactory().openSession();\n Criteria criteria = session.createCriteria(TurmaDocente.class);\n criteria.add(Restrictions.eq(\"idDocente\", idDocente));\n\n List result = criteria.list();\n session.close();\n\n return result.size();\n }",
"@Column(name = \"C_SEGUNDO_APELLIDO\")\n public String getSegundoApellido() {\n return segundoApellido;\n }",
"java.lang.String getField1017();",
"@Test\n public void fieldOcx() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n FieldOcx field = (FieldOcx) builder.insertField(FieldType.FIELD_OCX, true);\n\n Assert.assertEquals(field.getFieldCode(), \" OCX \");\n //ExEnd\n\n TestUtil.verifyField(FieldType.FIELD_OCX, \" OCX \", \"\", field);\n }",
"java.lang.String getField1131();",
"java.lang.String getField1352();",
"java.lang.String getField1025();",
"java.lang.String getField1392();",
"java.lang.String getField1833();",
"public String getInoDocname();",
"java.lang.String getField1337();",
"@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }",
"java.lang.String getField1306();",
"java.lang.String getField1230();",
"java.lang.String getField1021();",
"java.lang.String getField1035();",
"java.lang.String getField1361();",
"java.lang.String getField1399();",
"boolean hasFirstField();",
"java.lang.String getField1521();",
"java.lang.String getField1372();",
"java.lang.String getField1430();"
] | [
"0.59007967",
"0.58532697",
"0.5819034",
"0.5741357",
"0.5708051",
"0.568766",
"0.5625916",
"0.55866295",
"0.5406792",
"0.54002655",
"0.53948486",
"0.5385524",
"0.538551",
"0.53657466",
"0.53607476",
"0.5359764",
"0.53564227",
"0.53557605",
"0.5334001",
"0.53299",
"0.5327624",
"0.53227705",
"0.5320758",
"0.5309575",
"0.5304651",
"0.53039277",
"0.53008294",
"0.5295004",
"0.5294679",
"0.52870154",
"0.52743405",
"0.527269",
"0.5263637",
"0.5258961",
"0.5255968",
"0.52431124",
"0.5239002",
"0.5237625",
"0.5236274",
"0.52345854",
"0.5234295",
"0.5232511",
"0.52317464",
"0.52192414",
"0.52146155",
"0.52127624",
"0.521274",
"0.52070105",
"0.52006143",
"0.5197202",
"0.51961267",
"0.51894397",
"0.5188378",
"0.5187898",
"0.5186543",
"0.5185602",
"0.5183732",
"0.51830924",
"0.5174762",
"0.51725185",
"0.5162741",
"0.5159629",
"0.51594114",
"0.5159326",
"0.5156303",
"0.51508296",
"0.51507735",
"0.51489496",
"0.51477015",
"0.5143144",
"0.5139536",
"0.51352715",
"0.51335216",
"0.51315784",
"0.5131355",
"0.5128976",
"0.51266295",
"0.5126266",
"0.51250255",
"0.5120535",
"0.5119503",
"0.51193565",
"0.5117911",
"0.51140815",
"0.5111856",
"0.51109684",
"0.5110039",
"0.5108861",
"0.51082104",
"0.51074576",
"0.5107398",
"0.510486",
"0.510412",
"0.51019937",
"0.5101764",
"0.509963",
"0.5097492",
"0.5095187",
"0.50951195",
"0.50939274",
"0.5093611"
] | 0.0 | -1 |
Metodos especificos do banco | public String getDv43(String numero) {
int total = 0;
int fator = 2;
int numeros, temp;
for (int i = numero.length(); i > 0; i--) {
numeros = Integer.parseInt( numero.substring(i-1,i) );
temp = numeros * fator;
if (temp > 9) temp=temp-9; // Regra do banco NossaCaixa
total += temp;
// valores assumidos: 212121...
fator = (fator % 2) + 1;
}
int resto = total % 10;
if (resto > 0)
resto = 10 - resto;
return String.valueOf( resto );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Banco<B> {\n \n \n /**\n * Método para inserir um produto no banco de dados\n * @param b Produto a ser cadastrado\n * @return Retorna true para produto cadastrado e\n * false para produto não cadastrado\n */\n boolean cadastrar(B b);\n \n /**\n * Método para remover um produto no banco de dados\n * @param cod Código do produto a ser removido\n * @return Retorna o produto removido\n */\n B remover(int cod);\n \n /**\n * Método para buscar um produto no banco de dados\n * @param cod Código do produto a ser buscado\n * @return Int - Produto buscado\n */\n B buscar(int cod); \n \n /**\n * Método para listar os clientes cadastrados\n * @return Todos os clientes cadastrados\n */\n List<B> listar();\n \n}",
"public int getBloco() {\r\n\t\treturn bloco;\r\n\t}",
"@Override\n\tpublic void imprimirBancoDados() {\n\t\tSystem.out.println(\"Nome do Banco: \"+nomeBanco);\n\t\tSystem.out.println(\"Tipo do Banco: \"+tipoBanco);\n\t\tSystem.out.println(\"Lista de Metodos: \"+listaMetodos);\n\t}",
"public Banco(String nome) { // essa linha é uma assinatura do metodo\n \tthis.nome = nome;\n }",
"public CriaBanco (Context context){\n\n super (context, NOME_BD, null, VERSAO);\n }",
"public CuentaBancaria (Double saldo, Integer cbu, Cliente cliente) {\n\t\tthis.saldo=saldo;\n\t\tthis.cbu=cbu;\n\t\tthis.cliente=cliente;\n\t}",
"@Override\n\tpublic int getBancoCobrador() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getBancoCobrador();\n\t}",
"@Override\r\n\tpublic Bloco0 criarBloco(MovimentoMensalIcmsIpi movimentoMensalIcmsIpi) {\n\t\tLOG.log(Level.INFO, \"Montando o BLOCO 0, com INICIO em: {0} e TERMINO: {1} \", movimentoMensalIcmsIpi.getDataInicio());\r\n\t\tBloco0 bloco0 = new Bloco0();\r\n\t\t\r\n\t\t/**\r\n\t\t * TODO (Para ver/pensar melhor)\r\n\t\t * Ver se eu tenho que fazer alguma validação aqui. Ex.: irá preecher registro X para aquele Mês?\r\n\t\t * Tentar capturar possiveis erros.: Ex o famosão -> @NullPointerException\r\n\t\t */\r\n\t\t\r\n\t\tbloco0.setReg0000(reg0000Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0001(reg0001Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0005(reg0005Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0100(reg0100Service.montarGrupoDeRegistroSimples(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0150(reg0150Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0190(reg0190Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0200(reg0200Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0400(reg0400Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n\t\tbloco0.setReg0450(reg0450Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0460(reg0460Service.montarGrupoDeRegistro(movimentoMensalIcmsIpi));\r\n//\t\tbloco0.setReg0990(montarEncerramentoDoBloco0(bloco0));\r\n\t\t\r\n\t\tLOG.log(Level.INFO, \"Montagem do BLOCO 0, TEMINADA! {0} \" ,bloco0);\r\n\t\treturn bloco0;\r\n\t}",
"@Override // Métodos que fazem a anulação\n\tpublic void getBonificação() {\n\t\t\n\t}",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"public SubTipoBancaBD(SubTipoBanca stb) {\n this.stb = stb;\n }",
"List<BInformation> findAll();",
"public void chocoContraBomba(Bomba bomba){}",
"public int getVelocidadBala() {\n return velocidadBala;\n }",
"public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }",
"public void setBonos(List<BonoEntity> bonos) {\r\n this.bonos = bonos;\r\n }",
"@Override\n public void procesarBoleto(Boleto boleto) throws CRUDException {\n\n //1 Obtenemos la configuracion de la contabilidad del boleto de acuerdo a la empresa\n HashMap<String, Integer> parameters = new HashMap<>();\n parameters.put(\"idEmpresa\", boleto.getIdEmpresa());\n\n ContabilidadBoletaje contabilidad = (ContabilidadBoletaje) get(\"ContabilidadBoletaje.find\", ContabilidadBoletaje.class, parameters);\n\n Optional op = Optional.ofNullable(contabilidad);\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe configuracion de Boletaje para la Entidad \" + boleto.getIdEmpresa());\n }\n\n }",
"public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }",
"public Banco(){}",
"public java.lang.String getBloqueado(){\n return localBloqueado;\n }",
"@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }",
"public void setBunga(int tipeBunga){\n }",
"private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }",
"public void setBloqueado(java.lang.String param){\n \n this.localBloqueado=param;\n \n\n }",
"public Bancaire getBanque() {\n\t\treturn banque;\n\t}",
"public FiltroBoletoBancarioLancamentoEnvio() {\n\n\t}",
"public DatiBancari[] findWhereBanCapEquals(String banCap) throws DatiBancariDaoException;",
"protected FanisamBato(){\n\t}",
"public List<BonoEntity> getBonos() {\r\n return bonos;\r\n }",
"public DatiBancari[] findWhereBanNominativoEquals(String banNominativo) throws DatiBancariDaoException;",
"public DatiBancari[] findWhereBanBicSwiftEquals(String banBicSwift) throws DatiBancariDaoException;",
"public void setVelocidadBala(int velodidad) {\n this.velocidadBala = velodidad;\n }",
"@Override\n\tpublic void exibitQtadeBancoDados() {\n\t\tSystem.out.println(\"Existem \"+qtadeBancoDadosMetodos+\" Bancos de dados de Métodos.\");\n\t}",
"public List<DietaBalanceada> consultar_dietaBalanceada();",
"public ContaBancaria() {\n }",
"public DatiBancari[] findWhereBanIbanEquals(String banIban) throws DatiBancariDaoException;",
"public Bodega(@JsonProperty(value=\"id\") int id, @JsonProperty(value=\"estado\") char estado, @JsonProperty(value=\"tipo\") char tipo,@JsonProperty(value=\"ancho\") double ancho\r\n\t\t\t,@JsonProperty(value=\"largo\") double largo,@JsonProperty(value=\"plataformaExterna\") boolean plataformaExterna\r\n\t\t\t,@JsonProperty(value=\"tipoDeCarga\")TipoDeCarga tipoDeCarga,@JsonProperty(value=\"separacion\") double separacion\r\n\t\t\t, @JsonProperty(value=\"cuartosFrios\") List<CuartoFrio> cuartosFrios,@JsonProperty(value=\"entradas\") List<Operacion>entradas, @JsonProperty(value=\"salidas\") List<Operacion>salidas)\r\n\t{\r\n\t\tsuper(id,estado,tipo,entradas,salidas);\r\n\t\t\r\n\t\tthis.ancho=ancho;\r\n\t\tthis.largo=largo;\r\n\t\tthis.plataformaExterna=plataformaExterna;\r\n\t\tthis.tipoDeCarga=tipoDeCarga;\r\n\t\tthis.separacion=separacion;\r\n\t\tthis.setCuartosFrios(cuartosFrios);\r\n\t}",
"public List<AccesorioBicicletaEntity> getAccesorioBici() {\r\n LOGGER.info(\"Inicia proceso de consultar todas las Bicicletaes\");\r\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\r\n List<AccesorioBicicletaEntity> acc = persistence.findAll();\r\n LOGGER.info(\"Termina proceso de consultar todas las Bicicletaes\");\r\n return acc;\r\n }",
"public DatiBancari[] findWhereBanNomeBancaEquals(String banNomeBanca) throws DatiBancariDaoException;",
"public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}",
"public String getNomBloque() {\n return nomBloque;\n }",
"@Override\n\tpublic List<Besoin> getAllBesion() {\n\t\treturn dao.getAllBesion();\n\t}",
"public Banca consultar(int id) throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n String sql = \"SELECT * FROM banca WHERE idBanca = \" + id;\n\n Transacao.consultar(sql);\n\n b.setAno(Transacao.getRs().getInt(\"ano\"));\n b.setDescricao(Transacao.getRs().getString(\"descricao\"));\n b.getTipoBanca().setIdTipoBanca(Transacao.getRs().getInt(\"idTipoBanca\"));\n b.getSubTipoBanca().setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n b.setIdLattes(Transacao.getRs().getInt(\"idLattes\"));\n b.setIdBanca(id);\n\n return b;\n }",
"public void setBanque(Bancaire banque) {\n\t\tthis.banque = banque;\n\t}",
"public Boleta(){\r\n\t\tsuper();\r\n\t}",
"public ArrayList<Comobox> listaUserBancos(String valor)\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n ResultSet rs = null;\n\n sql=\"select * FROM table(FUNCT_LOAD_BANCO_SIMULACAO(?,?,?))\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n cs = conexao.getCon().prepareCall(sql);\n cs.setInt(1, SessionUtil.getUserlogado().getIdAgencia());\n cs.setString(2, SessionUtil.getUserlogado().getNif());\n cs.setFloat(3, Float.valueOf(valor));\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n al.add(new Comobox(\"Selecione\", \"Selecione\"));\n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\"), rs.getString(\"QUANTIDADE DE CHEQUES VARIAVEL\")));\n } \n }\n rs.close();\n \n if(al.size() == 1){\n FacesContext context = FacesContext.getCurrentInstance();\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Cheque\", \"Nenhum Cheque disponivel para essa agencia!\") );\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter bancos \"+ex.getMessage());\n }\n }\n return al;\n }",
"public String elegirBloque() throws SQLException {\n\t\tCRUD crud = new CRUD();\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tBloque bloque = context.getApplication().evaluateExpressionGet(context, \"#{bloque}\", Bloque.class);\n\t\tActividad actividad = new Actividad();\n\t\tactividad.setNombresA(crud.select_Bloque_actividad(bloque.getTematica()));\n\t\tSystem.out.println(\"look: \"+bloque.getTematica()+\" \"+actividad.getNombresA().get(0));\n\t\t\n\t\t// put the user object into the POST request \n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"actividad\", actividad);\n\t\t\n\t\treturn\"elegirActividad.xhtml?faces-redirect=false\";\n\t}",
"@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\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\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().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 Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\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(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }",
"public RepositorioTransacaoHBM() {\n\n\t}",
"public interface TipoBan {\n\n public void cambiarBan(Usuario u);\n}",
"private void criaBlocos() {\n\t\tif (fase == 1) {\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(x, 27));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(x, 36));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(x, 45));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 54));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 63));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 72));\n\n\t\t\t}\n\t\t} else if (fase == 2) {\n\t\t\tint y = 8;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\ty += 9;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.GRAY);\n\t\t\t\tlinhaUm[i].setPosition(new Point(2, y));\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaDois[i].setPosition(new Point(46, y));\n\t\t\t\tlinhaTres[i] = new Bloco(Color.BLUE);\n\t\t\t\tlinhaTres[i].setPosition(new Point(92, y));\n\t\t\t\tlinhaQuatro[i] = new Bloco(Color.YELLOW);\n\t\t\t\tlinhaQuatro[i].setPosition(new Point(138, y));\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.MAGENTA);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(184, y));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.GREEN);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(230, y));\n\t\t\t}\n\t\t}else{\n\t\t\tint contFalPon = 0;\n\t\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\t\tint x = (i % 10) * 25 + 2;\n\t\t\t\t\n\t\t\t\tlinhaUm[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaUm[i].setPosition(new Point(x, 20));\n\t\t\t\t}else{linhaUm[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaDois[i] = new Bloco(Color.RED);\n\t\t\t\tif(i >= 2 && i <= 7){\n\t\t\t\t\tlinhaDois[i].setPosition(new Point(x, 29));\n\t\t\t\t}else{linhaDois[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaTres[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaTres[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaTres[i].setPosition(new Point(x, 38));\n\t\t\t\t}else{linhaTres[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tif(i == 3 || i == 6){\n\t\t\t\t\tlinhaQuatro[i] = new Bloco(Color.BLACK);\n\t\t\t\t}else{linhaQuatro[i] = new Bloco(Color.RED);}\n\t\t\t\tif(i >= 1 && i <= 8){\n\t\t\t\t\tlinhaQuatro[i].setPosition(new Point(x, 47));\n\t\t\t\t}else{linhaQuatro[i].naoDesenha(); contFalPon++;}\n\t\t\t\t\n\t\t\t\tlinhaCinco[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaCinco[i].setPosition(new Point(x, 56));\n\t\t\t\tlinhaSeis[i] = new Bloco(Color.RED);\n\t\t\t\tlinhaSeis[i].setPosition(new Point(x, 65));\n\n\t\t\t}\n\t\t\tmudaFase -= contFalPon * 100;\n\t\t}//fecha else para formar a fase 3\n\n\t}",
"public ArrayList<Comobox> listaTodosBanco()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_BANCO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n if(conexao.getCon()!=null)\n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\")));\n } \n }\n rs.close();\n }\n else\n {\n al.add(new Comobox(\"djdj\",\"ddj\"));\n al.add(new Comobox(\"1dj\",\"dmsmdj\"));\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }",
"@Override\n @TransactionAttribute(TransactionAttributeType.REQUIRED)\n public synchronized Boleto procesarBoleto(Boleto b) throws CRUDException {\n Optional op;\n Aerolinea a = em.find(Aerolinea.class, b.getIdAerolinea().getIdAerolinea());\n Cliente c = em.find(Cliente.class, b.getIdCliente().getIdCliente());\n NotaDebito notaDebito = null;\n NotaDebitoTransaccion transaccion = null;\n ComprobanteContable comprobanteAsiento = null, comprobanteIngreso = null;\n AsientoContable totalCancelar = null, montoPagarLinea = null,\n montoDescuento = null, montoComision = null, montoFee = null;\n\n AsientoContable ingTotalCancelarCaja = null, ingTotalCancelarHaber = null;\n IngresoCaja ingreso = null;\n IngresoTransaccion ingTran = null;\n\n try {\n // Revisamos que el boleto no este registrado\n if (isBoletoRegistrado(b)) {\n throw new CRUDException(\"El Numero de Boleto ya ha sido registrado\");\n }\n\n //4. Obtenemos la configuracion del Boleto para guardar en el comprobanteAsiento\n HashMap<String, Integer> parameters = new HashMap<>();\n parameters.put(\"idEmpresa\", b.getIdEmpresa());\n List lconf = ejbComprobante.get(\"ContabilidadBoletaje.find\", ContabilidadBoletaje.class, parameters);\n if (lconf.isEmpty()) {\n throw new CRUDException(\"Los parametros de Contabilidad para la empresa no estan Configurados\");\n }\n\n AerolineaCuenta av = getAerolineCuenta(b, \"V\");\n\n if (av == null) {\n throw new CRUDException(\"No existe Cuenta asociada a la Aerolinea para Ventas\");\n }\n\n AerolineaCuenta ac = getAerolineCuenta(b, \"C\");\n\n if (ac == null) {\n throw new CRUDException(\"No existe Cuenta asociada a la Aerolinea para Comisiones\");\n }\n\n //Obtenemos la configuracion de las cuentas para el boletaje\n ContabilidadBoletaje cbconf = (ContabilidadBoletaje) lconf.get(0);\n\n // SI no existiera alguna configuraion, no hace nada\n if (validarConfiguracion(cbconf)) {\n //1. Registra el nombre del pasajero en la tabla cnt_cliente_pasajero\n saveClientePasajero(b);\n\n //2. CRear nota de debito para el boleto en la tabla cnt_nota_debito\n notaDebito = ejbNotaDebito.createNotaDebito(b);\n notaDebito.setIdNotaDebito(insert(notaDebito));\n\n b.setIdNotaDebito(notaDebito.getIdNotaDebito());\n b.setEstado(Boleto.Estado.EMITIDO);\n insert(b);\n //notaDebito.getNotaDebitoPK().setIdNotaDebito(insert(notaDebito));\n //crea la transaccion de la nota de Debito\n transaccion = ejbNotaDebito.createNotaDebitoTransaccion(b, notaDebito);\n //transaccion.getNotaDebitoTransaccionPK().setIdNotaDebitoTransaccion(insert(transaccion));\n transaccion.setIdNotaDebitoTransaccion(insert(transaccion));\n //3. Registramos el Boleto\n\n //insert(b);\n // creamos el Comprobante Contable\n comprobanteAsiento = ejbComprobante.createAsientoDiarioBoleto(b);\n comprobanteAsiento.setIdNotaDebito(notaDebito.getIdNotaDebito());\n comprobanteAsiento.setIdLibro(insert(comprobanteAsiento));\n // se crean los asientos de acuerdo a la configuracion.\n b.setIdLibro(comprobanteAsiento.getIdLibro());\n\n //TotalCancelar\n //totalCancelar = ejbComprobante.crearTotalCancelar(b, comprobanteAsiento, cbconf, a, transaccion.getIdNotaDebitoTransaccion());\n totalCancelar = ejbComprobante.crearTotalCancelar(b, comprobanteAsiento, cbconf, a, transaccion);\n insert(totalCancelar);\n //ejbComprobante.insert(totalCancelar);\n //DiferenciaTotalBoleto\n montoPagarLinea = ejbComprobante.crearMontoPagarLineaAerea(b, comprobanteAsiento, cbconf, av, notaDebito, transaccion);\n //ejbComprobante.insert(montoPagarLinea);\n insert(montoPagarLinea);\n //Comision\n montoComision = ejbComprobante.crearMontoComision(b, comprobanteAsiento, a, ac, notaDebito, transaccion);\n //ejbComprobante.insert(montoComision);\n insert(montoComision);\n //Fee\n montoFee = ejbComprobante.crearMontoFee(b, comprobanteAsiento, cbconf, a, notaDebito, transaccion);\n //ejbComprobante.insert(montoFee);\n insert(montoFee);\n //Descuento\n montoDescuento = ejbComprobante.crearMontoDescuentos(b, comprobanteAsiento, cbconf, a, notaDebito, transaccion);\n //ejbComprobante.insert(montoDescuento);\n insert(montoDescuento);\n\n //actualizamos los montos Totales del Comprobante.\n double totalDebeNac = 0;\n double totalDebeExt = 0;\n double totalHaberNac = 0;\n double totalHaberExt = 0;\n //Se realizan las sumas para el comprobanteAsiento.\n if (b.getTipoCupon().equals(Boleto.Cupon.INTERNACIONAL)) {\n op = Optional.ofNullable(totalCancelar.getMontoDebeExt());\n if (op.isPresent()) {\n totalDebeExt += totalCancelar.getMontoDebeExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoDescuento);\n if (op.isPresent()) {\n totalDebeExt += montoDescuento.getMontoDebeExt().doubleValue();\n }\n\n op = Optional.ofNullable(totalDebeExt);\n if (op.isPresent()) {\n totalDebeNac = totalDebeExt * b.getFactorCambiario().doubleValue();\n }\n // Haber\n\n op = Optional.ofNullable(montoPagarLinea.getMontoHaberExt());\n if (op.isPresent()) {\n totalHaberExt += montoPagarLinea.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoComision);\n if (op.isPresent()) {\n totalHaberExt += montoComision.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(montoFee);\n if (op.isPresent()) {\n totalHaberExt += montoFee.getMontoHaberExt().doubleValue();\n }\n\n op = Optional.ofNullable(totalHaberExt);\n if (op.isPresent()) {\n totalHaberNac = totalHaberExt * b.getFactorCambiario().doubleValue();\n }\n\n } else if (b.getTipoCupon().equals(Boleto.Cupon.NACIONAL)) {\n op = Optional.ofNullable(totalCancelar.getMontoDebeNac());\n if (op.isPresent()) {\n totalDebeNac += totalCancelar.getMontoDebeNac().doubleValue();\n }\n\n op = Optional.ofNullable(montoDescuento.getMontoDebeNac());\n if (op.isPresent()) {\n totalDebeNac += montoDescuento.getMontoDebeNac().doubleValue();\n }\n op = Optional.ofNullable(totalDebeNac);\n if (op.isPresent()) {\n totalDebeExt = totalDebeNac / b.getFactorCambiario().doubleValue();\n }\n //\n\n op = Optional.ofNullable(montoPagarLinea.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoPagarLinea.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(montoComision.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoComision.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(montoFee.getMontoHaberNac());\n if (op.isPresent()) {\n totalHaberNac += montoFee.getMontoHaberNac().doubleValue();\n }\n op = Optional.ofNullable(totalHaberNac);\n if (op.isPresent()) {\n totalHaberExt = totalHaberNac / b.getFactorCambiario().doubleValue();\n }\n }\n\n comprobanteAsiento.setTotalDebeExt(new BigDecimal(totalDebeExt));\n comprobanteAsiento.setTotalHaberExt(new BigDecimal(totalHaberExt));\n comprobanteAsiento.setTotalDebeNac(new BigDecimal(totalDebeNac));\n comprobanteAsiento.setTotalHaberNac(new BigDecimal(totalHaberNac));\n\n em.merge(comprobanteAsiento);\n\n // creamos para las formas de pago\n //Si son Contado o Tarjeta, se crea el Ingreso a Caja y el Comprobante de Ingreso\n if (b.getFormaPago().equals(FormasPago.CONTADO) || b.getFormaPago().equals(FormasPago.TARJETA)) {\n //Crear Ingreso a Caja\n ingreso = ejbIngresoCaja.createIngresoCaja(b, notaDebito);\n ingreso.setIdIngresoCaja(insert(ingreso));\n b.setIdIngresoCaja(ingreso.getIdIngresoCaja());\n\n ingTran = ejbIngresoCaja.createIngresoCajaTransaccion(b, notaDebito, transaccion, ingreso);\n ingTran.setIdTransaccion(insert(ingTran));\n b.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n\n //Crear Comprobante de Ingreso\n comprobanteIngreso = ejbComprobante.createComprobante(a, b, c, ComprobanteContable.Tipo.COMPROBANTE_INGRESO);\n comprobanteIngreso.setIdNotaDebito(notaDebito.getIdNotaDebito());\n /* if (ingreso.getMoneda().equals(Moneda.EXTRANJERA)) {\n comprobanteIngreso.setTotalDebeExt(ingreso.getMontoAbonadoUsd());\n comprobanteIngreso.setTotalHaberExt(ingreso.getMontoAbonadoUsd());\n comprobanteIngreso.setTotalDebeNac(ingreso.getMontoAbonadoUsd().multiply(ingreso.getFactorCambiario()));\n comprobanteIngreso.setTotalHaberNac(ingreso.getMontoAbonadoUsd().multiply(ingreso.getFactorCambiario()));\n\n notaDebito.setMontoAdeudadoUsd(notaDebito.getMontoTotalUsd().subtract(ingreso.getMontoAbonadoUsd()));\n } else {\n comprobanteIngreso.setTotalDebeExt(ingreso.getMontoAbonadoBs());\n comprobanteIngreso.setTotalHaberExt(ingreso.getMontoAbonadoBs());\n comprobanteIngreso.setTotalDebeNac(ingreso.getMontoAbonadoBs().divide(ingreso.getFactorCambiario()));\n comprobanteIngreso.setTotalHaberNac(ingreso.getMontoAbonadoBs().divide(ingreso.getFactorCambiario()));\n\n notaDebito.setMontoAdeudadoBs(notaDebito.getMontoTotalBs().subtract(ingreso.getMontoAbonadoBs()));\n }*/\n insert(comprobanteIngreso);\n\n /**\n *\n */\n // ESTAS TRANSACCIONES PASARLAS. al nuevo metodo de cada uno\n /*ingTotalCancelarCaja = ejbComprobante.createTotalCancelarIngresoCajaDebe(comprobanteIngreso, cbconf, a, b);\n ingTotalCancelarCaja.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n insert(ingTotalCancelarCaja);\n\n ingTotalCancelarHaber = ejbComprobante.createTotalCancelarIngresoClienteHaber(comprobanteIngreso, cbconf, a, b);\n ingTotalCancelarHaber.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n insert(ingTotalCancelarHaber);*/\n /**\n *\n */\n //actualizar nota debito\n em.merge(notaDebito);\n }\n\n //b.setIdLibro(notaDebito.getIdNotaDebito());\n if (ingTran != null) {\n b.setIdIngresoCajaTransaccion(ingTran.getIdTransaccion());\n }\n\n em.merge(b);\n }\n } catch (Exception e) {\n\n em.clear();\n\n Optional opex = Optional.ofNullable(notaDebito);\n if (opex.isPresent()) {\n remove(notaDebito);\n }\n\n opex = Optional.ofNullable(transaccion);\n if (opex.isPresent()) {\n remove(transaccion);\n }\n\n opex = Optional.ofNullable(comprobanteAsiento);\n if (opex.isPresent()) {\n remove(comprobanteAsiento);\n }\n\n opex = Optional.ofNullable(totalCancelar);\n if (opex.isPresent()) {\n remove(totalCancelar);\n }\n\n opex = Optional.ofNullable(montoPagarLinea);\n if (opex.isPresent()) {\n remove(montoPagarLinea);\n }\n opex = Optional.ofNullable(montoDescuento);\n if (opex.isPresent()) {\n remove(montoDescuento);\n }\n opex = Optional.ofNullable(montoComision);\n if (opex.isPresent()) {\n remove(montoComision);\n }\n opex = Optional.ofNullable(montoFee);\n if (opex.isPresent()) {\n remove(montoFee);\n }\n\n opex = Optional.ofNullable(b);\n if (opex.isPresent() && b.getIdBoleto() > 0) {\n remove(b);\n }\n\n opex = Optional.ofNullable(ingreso);\n if (opex.isPresent()) {\n remove(ingreso);\n }\n\n opex = Optional.ofNullable(ingTran);\n if (opex.isPresent()) {\n remove(ingTran);\n }\n\n opex = Optional.ofNullable(ingTotalCancelarCaja);\n if (opex.isPresent()) {\n remove(ingTotalCancelarCaja);\n }\n\n opex = Optional.ofNullable(ingTotalCancelarHaber);\n if (opex.isPresent()) {\n remove(ingTotalCancelarHaber);\n }\n\n throw new CRUDException(e.getMessage());\n\n }\n\n em.flush();\n return b;\n }",
"public Bonus (){\n\t\tsuper (); \n\t\t//TODO [CORRECCION] Tiene una clase Config, utilizarla para estos valores fijos.\n\t\tthis.tiempoDeVida = Config.BONUS_VIDA; // cantidad de turnos\n\t\tPosicion posicion = new Posicion(randX.nextInt(), randY.nextInt());\n\t\tTamanio tamanio = new Tamanio(Config.BONUS_ANCHO, Config.BONUS_ALTO);\n\t\tthis.setPosicion(posicion);\n\t\tthis.setTamanio(tamanio);\n\t}",
"public void imprimeDados() {\n System.out.println(\"Banco: \" + nome + \"\\tNumero do banco \" + numero);\n }",
"public BancaBD(Banca b, int idCurriculoLattes){\n this.b = b;\n this.idCurriculoLattes = idCurriculoLattes;\n }",
"private static Bala tipoBala(int idPj, Vector2 posicionRelativaRecibido, int tamanoBala) {\n Bala bala;\n Array<TextureRegion> arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/\" + idPj));\n switch (idPj) {\n //Balas con forma rectangular\n case 1:\n case 4:\n case 7:\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma circular\n case 2:\n bala = new BalaCirc(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n //Balas con forma poligonal\n case 3:\n case 5:\n case 6:\n case 8:\n case 9:\n case 10:\n bala = new BalaPol(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n default:\n arrayTexturas = Util.ficherosEnDirectorio(Gdx.files.internal(\"Balas/1\"));\n bala = new BalaRect(posicionRelativaRecibido, velocidadBalas, arrayTexturas, idPj, tamanoBala);\n break;\n }\n return bala;\n }",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"public String borra() { \n clienteDAO.borra(c.getId());\n return \"listado\";\n }",
"public TarjetaDebito() {\n\t\tsuper();\n\t}",
"@Test\n public void getBonosTest() {\n List<BonoEntity> lista = bonoLogic.getBonos();\n Assert.assertEquals(data.size(), lista.size());\n for (BonoEntity entity : lista) {\n if(!data.contains(entity))\n fail(\"Ambas listas deberían contener los mismos bonos\");\n }\n }",
"public void setBloqueado(Boolean bloqueado) {\n\t\tthis.bloqueado = bloqueado;\n\t}",
"public fechBalance() {\n initComponents(); \n \n bd=new coneccionBD();\n acum1=0;\n acum2=0;\n acum3=0;\n acum4=0;\n acum5=0;\n padreNivel=\"\";\n }",
"private void esconderBotao() {\n\t\tfor (int i = 0; i < dificuldade.getValor(); i++) {// OLHAM TODOS OS BOTOES\r\n\t\t\tfor (int j = 0; j < dificuldade.getValor(); j++) {\r\n\t\t\t\tif (celulaEscolhida(botoes[i][j]).isVisivel() && botoes[i][j].isVisible()) {// SE A CELULA FOR VISIVEL E\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// O BOTAO FOR VISIVEL,\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// ESCONDE O BOTAO\r\n\t\t\t\t\tbotoes[i][j].setVisible(false);//DEIXA BOTAO INVISIVEL\r\n\t\t\t\t\tlblNumeros[i][j].setVisible(true);//DEIXA O LABEL ATRAS DO BOTAO VISIVEL\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private NodoBin<T> buscarAS(T dato){\n if(esVacio())\n return (null);\n return (biselar(super.getRaiz(), dato));\n }",
"public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}",
"public List viewTotalInscritosBD();",
"private RepositorioOrdemServicoHBM() {\n\n\t}",
"public Billete(Usuario usuario, LocalDate fechaIda, LocalDate fechaVuelta, float precio_billete) {\r\n\t\t\r\n\t\tthis.nombrePasajero=usuario.getNombre();\r\n\t\tthis.apellido1_pasajero=usuario.getApellido1();\r\n\t\tthis.apellido2_pasajero=usuario.getApellido2();\r\n\t\tthis.pasaporte= usuario.getPasaporte();\r\n\t\tthis.idPasajero= usuario.getIdUsuario();\r\n\t\tthis.numeroBillete= idBillete++;\r\n\t\tthis.fechaIda = fechaIda;\r\n\t\tthis.fechaVuelta= fechaVuelta;\r\n\t\tthis.precioBillete = precio_billete;\r\n\t}",
"public int getIdBoleta() {\n return idBoleta;\n }",
"@Test\n public void getBonosPTest() {\n ProveedorEntity proveedor = pData.get(0);\n List<BonoEntity> lista = bonoLogic.getBonos(proveedor.getId());\n Assert.assertEquals(proveedor.getBonos().size(), lista.size());\n for (BonoEntity entity : lista) {\n if(!data.contains(entity))\n fail(\"Ambas listas deberían contener los mismos bonos\");\n }\n }",
"public List<IbBeneficiariosPjDTO> listarIbBeneficiariosPjDTO(Long idBeneficiario, Short estatusCarga, String idCanal, String codigoCanal);",
"@Override\r\n public BoletoLocal onGerarBoleto(Contrato contrato, ConfiguracoesBoleto config) {\r\n int diaVencimento = contrato.getDiaVencimento();\r\n Calendar dataHj = Calendar.getInstance();\r\n\r\n //SE O DIA DO VENCIMENTO DO BOLETO FOR MENOR OU IGUAL\r\n // A DATA DE HJ GERA NORMAL, SE NÃO ELE GERA PRO PROXIMO MES\r\n if (dataHj.get(Calendar.DAY_OF_MONTH) <= diaVencimento) {\r\n\r\n } else {\r\n dataHj.add(Calendar.MONTH, 1);\r\n }\r\n\r\n dataHj.set(Calendar.DAY_OF_MONTH, diaVencimento);\r\n Calendar dataMaxima = Calendar.getInstance();\r\n dataMaxima.add(Calendar.DAY_OF_MONTH, 20);\r\n\r\n //SE A DATA FOR MAIOS QUE O MÁXIMO CONFIGURADO NÃO GERA NADA.\r\n if (dataHj.after(dataMaxima)) {\r\n System.out.println(\"data depois de 20 dias\");\r\n return null;\r\n }\r\n\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O CEDENTE.\r\n */\r\n Cedente cedente = new Cedente(config.getBanco().getNomeBeneficiado(), config.getDocBeneficiado());\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O SACADO.\r\n */\r\n Sacado sacado = new Sacado(contrato.getLocatario().getNome(), contrato.getLocatario().getDocumento());\r\n\r\n // Informando o endereço do sacado.\r\n org.jrimum.domkee.comum.pessoa.endereco.Endereco enderecoSac = new org.jrimum.domkee.comum.pessoa.endereco.Endereco();\r\n enderecoSac.setUF(UnidadeFederativa.valueOfSigla(contrato.getLocatario().getEndereco().getCodUf()));\r\n enderecoSac.setLocalidade(contrato.getLocatario().getEndereco().getCidade());\r\n enderecoSac.setCep(new CEP(contrato.getLocatario().getEndereco().getDesCep()));\r\n enderecoSac.setBairro(contrato.getLocatario().getEndereco().getDesBairro());\r\n enderecoSac.setLogradouro(contrato.getLocatario().getEndereco().getDesLogradouro());\r\n enderecoSac.setNumero(contrato.getLocatario().getEndereco().getDesNumero());\r\n sacado.addEndereco(enderecoSac);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O TÍTULO.\r\n */\r\n // Informando dados sobre a conta bancária do título.\r\n ContaBancaria contaBancaria = null;\r\n if (config.getBanco().getBanco() == BancosEnum.ITAU) {\r\n contaBancaria = new ContaBancaria(BancosSuportados.BANCO_ITAU.create());\r\n }\r\n\r\n if (contaBancaria == null) {\r\n System.out.println(\"Conta bancária não cadastrada\");\r\n return null;\r\n }\r\n\r\n contaBancaria.setNumeroDaConta(new NumeroDaConta(Integer.parseInt(config.getBanco().getContaNumero()), config.getBanco().getContaDigito()));\r\n contaBancaria.setCarteira(new Carteira(Integer.parseInt(config.getCarteira())));\r\n contaBancaria.setAgencia(new Agencia(Integer.parseInt(config.getBanco().getAgenciaNumero()), config.getBanco().getAgenciaDigito()));\r\n\r\n Titulo titulo = new Titulo(contaBancaria, sacado, cedente);\r\n titulo.setNumeroDoDocumento(config.getNumeroDocumento());\r\n titulo.setNossoNumero(config.getNossoNumero());\r\n titulo.setDigitoDoNossoNumero(config.getNossoNumeroDigito());\r\n titulo.setValor(contrato.getValor());\r\n titulo.setDataDoDocumento(new Date());\r\n\r\n titulo.setDataDoVencimento(dataHj.getTime());\r\n titulo.setTipoDeDocumento(TipoDeTitulo.DM_DUPLICATA_MERCANTIL);\r\n titulo.setAceite(Aceite.A);\r\n//\t\ttitulo.setDesconto(BigDecimal.ZERO);\r\n//\t\ttitulo.setDeducao(BigDecimal.ZERO);\r\n//\t\ttitulo.setMora(BigDecimal.ZERO);\r\n//\t\ttitulo.setAcrecimo(BigDecimal.ZERO);\r\n//\t\ttitulo.setValorCobrado(BigDecimal.ZERO);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O BOLETO.\r\n */\r\n Boleto boletoBank = new Boleto(titulo);\r\n\r\n boletoBank.setLocalPagamento(config.getLocalPagamento());\r\n boletoBank.setInstrucaoAoSacado(config.getInstrucaoSacado());\r\n boletoBank.setInstrucao1(config.getInstrucao1());\r\n boletoBank.setInstrucao2(config.getInstrucao2());\r\n boletoBank.setInstrucao3(config.getInstrucao3());\r\n boletoBank.setInstrucao4(config.getInstrucao4());\r\n boletoBank.setInstrucao5(config.getInstrucao5());\r\n boletoBank.setInstrucao6(config.getInstrucao6());\r\n boletoBank.setInstrucao7(config.getInstrucao7());\r\n boletoBank.setInstrucao8(config.getInstrucao8());\r\n\r\n /*\r\n\t\t * GERANDO O BOLETO BANCÁRIO.\r\n */\r\n // Instanciando um objeto \"BoletoViewer\", classe responsável pela\r\n // geração do boleto bancário.\r\n BoletoViewer boletoViewer = new BoletoViewer(boletoBank);\r\n\r\n // Alterado para pegar o path do sistema automático , gerando dentro\r\n // do projeto.\r\n // Gerando o arquivo. No caso o arquivo mencionado será salvo na mesma\r\n // pasta do projeto. Outros exemplos:\r\n // WINDOWS: boletoViewer.getAsPDF(\"C:/Temp/MeuBoleto.pdf\");\r\n // LINUX: boletoViewer.getAsPDF(\"/home/temp/MeuBoleto.pdf\");\r\n String pasta = \"/boletos\";\r\n\r\n String caminhoCompletoPasta = FacesUtil.getExternalContext().getRealPath(pasta) + \"/\";\r\n BoletoLocal boletoLocal = new BoletoLocal();\r\n contrato.getBoletos().add(boletoLocal);\r\n boletoLocal.setContrato(contrato);\r\n\r\n String nomeArquivoPDF = contrato.getLocatario().getNome().replace(\" \", \"_\") + boletoLocal.getMes() + boletoLocal.getAno() + \".pdf\";\r\n\r\n System.out.println(caminhoCompletoPasta + nomeArquivoPDF);\r\n File arquivoPdf = boletoViewer.getPdfAsFile(caminhoCompletoPasta + nomeArquivoPDF);\r\n\r\n boletoLocal.setPath(pasta + nomeArquivoPDF);\r\n\r\n super.save(boletoLocal);\r\n\r\n return boletoLocal;\r\n }",
"private void atualizarBandeirasIa() {\n\t\tnumeroBombas = mapa.getBombas();\r\n\t\tfor(int i = 0; i < this.mapa.getCampo().length; i++) {\r\n\t\t\tfor(int j = 0; j < this.mapa.getCampo().length; j++) {\r\n\t\t\t\tif(celulaEscolhida(botoes[i][j]).isBandeira()) {\r\n\t\t\t\t\tbotoes[i][j].setEnabled(false);\r\n\t\t\t\t\tnumeroBombas--;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tbotoes[i][j].setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(numeroBombas);\r\n\t}",
"public List<Pagamento> buscarPorBusca(String busca)throws DaoException;",
"public List<Bloques> getDataListBloques() {\n\t\tif(dataListBloques == null){\n\t\t\tdataListBloques = new ArrayList<Bloques>();\n\t\t\tdataListBloques = bloquesFacade.findByLike(\"SELECT B FROM Bloques B ORDER BY B.nombre\");\n\t\t}\n\t\treturn dataListBloques;\n\t}",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"@Test\r\n\tpublic void CT04ConsultarLivroComNomeEmBranco() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_branco();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"private bildeBaseColumns() {\n\n }",
"public Contribuinte()\n {\n this.nif = \"\";\n this.nome = \"\";\n this.morada = \"\"; \n }",
"public DatiBancari findByPrimaryKey(long banId) throws DatiBancariDaoException;",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"public DatiBancari[] findWhereBanIndirizzoEquals(String banIndirizzo) throws DatiBancariDaoException;",
"public void setContrasena(String contrasena) {this.contrasena = contrasena;}",
"private void initBoutons() {\n bMonterDomaine.setText(null);\n bMonterCompte.setText(null);\n bDescendreDomaine.setText(null);\n bDescendreCompte.setText(null);\n bMonterDomaineMax.setText(null);\n bMonterCompteMax.setText(null);\n bDescendreDomaineMax.setText(null);\n bDescendreCompteMax.setText(null);\n bAjoutDomaine.setText(null);\n bAjoutCompte.setText(null);\n bModificationDomaine.setText(null);\n bModificationCompte.setText(null);\n bSuppressionDomaine.setText(null);\n bSuppressionCompte.setText(null);\n\n // Tootips\n bMonterDomaine.setTooltip(new Tooltip(\"Monter le domaine sélectionné d'une place\"));\n bMonterCompte.setTooltip(new Tooltip(\"Monter le compte sélectionné d'une place\"));\n bDescendreDomaine.setTooltip(new Tooltip(\"Descendre le domaine sélectionné d'une place\"));\n bDescendreCompte.setTooltip(new Tooltip(\"Descendre le compte sélectionné d'une place\"));\n bMonterDomaineMax.setTooltip(new Tooltip(\"Monter le domaine sélectionné jusqu'en première place\"));\n bMonterCompteMax.setTooltip(new Tooltip(\"Monter le compte sélectionné jusqu'en première place\"));\n bDescendreDomaineMax.setTooltip(new Tooltip(\"Descendre le domaine sélectionné jusqu'en dernière place\"));\n bDescendreCompteMax.setTooltip(new Tooltip(\"Descendre le compte sélectionné jusqu'en dernière place\"));\n bAjoutDomaine.setTooltip(new Tooltip(\"Ajouter un nouveau domaine\"));\n bAjoutCompte.setTooltip(new Tooltip(\"Ajouter un nouveau compte\"));\n bModificationDomaine.setTooltip(new Tooltip(\"Modifier le domaine sélectionné\"));\n bModificationCompte.setTooltip(new Tooltip(\"Modifier le compte sélectionné\"));\n bSuppressionDomaine.setTooltip(new Tooltip(\"Supprimer le domaine sélectionné\"));\n bSuppressionCompte.setTooltip(new Tooltip(\"Supprimer le compte sélectionné\"));\n\n // Gestion des activations de boutons\n bMonterDomaine.setDisable(true);\n bMonterCompte.setDisable(true);\n bDescendreDomaine.setDisable(true);\n bDescendreCompte.setDisable(true);\n bMonterDomaineMax.setDisable(true);\n bMonterCompteMax.setDisable(true);\n bDescendreDomaineMax.setDisable(true);\n bDescendreCompteMax.setDisable(true);\n bAjoutCompte.setDisable(true);\n bModificationDomaine.setDisable(true);\n bModificationCompte.setDisable(true);\n bSuppressionDomaine.setDisable(true);\n bSuppressionCompte.setDisable(true);\n\n // Setup les images\n bMonterDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bMonterCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_UP, 16, 16, true));\n bDescendreDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bDescendreCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOWN, 16, 16, true));\n bMonterDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bMonterCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_UP, 16, 16, true));\n bDescendreDomaineMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bDescendreCompteMax.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_DOUBLE_DOWN, 16, 16, true));\n bAjoutDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bAjoutCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_ADD, 16, 16, true));\n bModificationDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bModificationCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_INFO, 16, 16, true));\n bSuppressionDomaine.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n bSuppressionCompte.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n\n // Cas particulier: ecraserFiltre\n bEcraserFiltre.setText(null);\n bEcraserFiltre.setTooltip(new Tooltip(\"Retirer le filtre\"));\n bEcraserFiltre.setGraphic(imageManager.constructImageViewFrom(ImageManager.ICONE_REMOVE, 16, 16, true));\n }",
"public void remplireListeOptions(){\r\n bddOptions.add(\"id\");\r\n bddOptions.add(\"EnvoieMail\");\r\n bddOptions.add(\"MailPeriode\");\r\n bddOptions.add(\"PeriodeJour\");\r\n bddOptions.add(\"PeriodeHeure\");\r\n bddOptions.add(\"PeriodeLun\");\r\n bddOptions.add(\"PeriodeMar\");\r\n bddOptions.add(\"PeriodeMerc\");\r\n bddOptions.add(\"PeriodeJeu\");\r\n bddOptions.add(\"PeriodeVen\");\r\n bddOptions.add(\"PeriodeSam\");\r\n bddOptions.add(\"PeriodeDim\");\r\n }",
"@GetMapping(\"/balanceador-test\")\n\tpublic ResponseEntity<?> balanceadorTest(){\n\t\tMap<String, Object> response = new HashMap<>();\n\t\tresponse.put(\"balanceador\", balanceadorTest);\n\t\tresponse.put(\"cursos\", service.findAll());\n\t\t\n\t\t// Va a generar un json con dos atributos. por ej, dentro del atributo cursos anida el json de los cursos\n\t\treturn ResponseEntity.ok(response);\n\t}",
"@RequestMapping(value = \"/bancos/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Banco> getBanco(@PathVariable Long id) {\n log.debug(\"REST request to get Banco : {}\", id);\n Banco banco = bancoService.findOne(id);\n return Optional.ofNullable(banco)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }",
"public int getNrBolasBrancasGanhas(){\n return jogo.getNrBolasBrancasGanhas();\n }",
"public Billete(Usuario usuario, LocalDate fechaIda, float precio_billete) {\r\n\t\t\r\n\t\tthis.nombrePasajero=usuario.getNombre();\r\n\t\tthis.apellido1_pasajero=usuario.getApellido1();\r\n\t\tthis.apellido2_pasajero=usuario.getApellido2();\r\n\t\tthis.pasaporte= usuario.getPasaporte();\r\n\t\tthis.idPasajero= usuario.getIdUsuario();\r\n\t\tthis.numeroBillete= idBillete++;\r\n\t\tthis.fechaIda = fechaIda;\r\n\t\tthis.precioBillete = precio_billete;\r\n\t}",
"@RequestMapping(value = \"/bancos\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Banco> createBanco(@Valid @RequestBody Banco banco) throws URISyntaxException {\n log.debug(\"REST request to save Banco : {}\", banco);\n if (banco.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"banco\", \"idexists\", \"A new banco cannot already have an ID\")).body(null);\n }\n Banco result = bancoService.save(banco);\n return ResponseEntity.created(new URI(\"/api/bancos/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"banco\", result.getId().toString()))\n .body(result);\n }",
"@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\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 comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\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 return comprobante;\n }",
"public Integer getBloque() {\r\n return bloque;\r\n }",
"BankDetail() {\n this.isValid = new Boolean(false);\n this.bankAccountNo = new String();\n this.bankAccountHolderName = new String();\n this.bankCountry = new String();\n this.IFSC = new String();\n }",
"public BurbujaInmaculada(){\n\t\tthis.afectador = new AfectadorPorTurnos(2, new EfectoBurbujaInmaculada());\n\t}",
"public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }",
"private void selecionarOpcoesDeBackup() {\n try {\n if (dao.opcaoDeBackupAtual().equals(\"Não fazer Backup Automático\")) {\n rbNãofazerBackup.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada\")) {\n rbFazerBackupnaEntrada.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Saída\")) {\n rbFazerBackupnaSaída.setSelected(true);\n }\n if (dao.opcaoDeBackupAtual().equals(\"Fazer Backup na Entrada e na Saída\")) {\n rbFazerBackupnaEntradaenaSaida.setSelected(true);\n }\n } catch (SQLException ex) {\n Logger.getLogger(Backup.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }",
"List<TabelaIRRFLegadoDTO> consultarPorAnoBase(Integer anoBase) throws BancoobException;",
"public static void main(String[] args) {\n\t\t\n\t\tBanco banco1;\n\t\t\n\t\tbanco1 = new BancoPatagonia();\n\t\tSystem.out.println(BancoPatagonia.CODIGOBANCARIO);\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\t \n\t banco1 = new BancoNacion();\n\t\t\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\n\t}",
"public int getTipoAtaque(){return tipoAtaque;}"
] | [
"0.640554",
"0.6371688",
"0.63160014",
"0.627977",
"0.6226897",
"0.61317056",
"0.6086773",
"0.5957697",
"0.5812986",
"0.57768065",
"0.57000345",
"0.5694587",
"0.56762224",
"0.56671304",
"0.56293285",
"0.5595627",
"0.5559766",
"0.5555979",
"0.5527607",
"0.5518397",
"0.551812",
"0.5514566",
"0.5511197",
"0.54961884",
"0.5491487",
"0.5482796",
"0.545995",
"0.5447081",
"0.54427946",
"0.54424053",
"0.5419663",
"0.540941",
"0.5402195",
"0.54003775",
"0.5392274",
"0.5391516",
"0.5373153",
"0.5363633",
"0.536242",
"0.53503287",
"0.5346272",
"0.5336199",
"0.53361857",
"0.5334659",
"0.53345984",
"0.5333787",
"0.5331458",
"0.53277737",
"0.53167015",
"0.5316058",
"0.5299933",
"0.5294805",
"0.527766",
"0.5276601",
"0.52669275",
"0.52487147",
"0.5246206",
"0.5242894",
"0.5240133",
"0.5239551",
"0.5211497",
"0.5209787",
"0.52018267",
"0.52015597",
"0.51993513",
"0.51828235",
"0.5181232",
"0.51806",
"0.51799184",
"0.51788485",
"0.5169846",
"0.5155731",
"0.5154515",
"0.5150192",
"0.5147442",
"0.5142613",
"0.5135584",
"0.5124424",
"0.5119928",
"0.5105197",
"0.51022464",
"0.50923765",
"0.50916034",
"0.5080292",
"0.5079432",
"0.50786805",
"0.50774187",
"0.50756097",
"0.50721276",
"0.5065694",
"0.5064915",
"0.5060858",
"0.5060528",
"0.5055433",
"0.5049636",
"0.5048398",
"0.5046029",
"0.5042757",
"0.50408185",
"0.5039612",
"0.50392205"
] | 0.0 | -1 |
Recupera a carteira no padrao especificado pelo banco | public String getCarteiraFormatted() {
return boleto.getCarteira();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"VentaJPA obtenerVenta(int comprobante);",
"@Override\n\tpublic int getBancoCobrador() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getBancoCobrador();\n\t}",
"@Override\n\tpublic String getCodigoCarteira() {\n\t\treturn \"0\";\n\t}",
"@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }",
"public BCliente obtenerCliente(int codigo)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\treturn daoCliente.obtenerCliente(codigo);\r\n\t}",
"public String borra() { \n clienteDAO.borra(c.getId());\n return \"listado\";\n }",
"public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }",
"public Fornecedor BuscarPorID(int codigo) throws SQLException {\r\n\t\ttry {\r\n\t\t\tString query = \"select * from fornecedor where cd_fornecedor=?\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(query);\r\n\t\t\tpreparedStatement.setInt(1, codigo);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\tFornecedor fornecedor = new Fornecedor();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tfornecedor.setCodigoFornecedor(rs.getInt(\"cd_fornecedor\"));\r\n\t\t\t\tfornecedor.setNomeLocal(rs.getString(\"nm_local\"));\r\n\t\t\t\tfornecedor.setValorFornecedor(rs.getDouble(\"vl_fornecedor\"));\r\n\t\t\t\tfornecedor.setQuantidadePeso(rs.getInt(\"qt_peso\"));\r\n\t\t\t\tfornecedor.setNomeFornecedor(rs.getString(\"nm_fornecedor\"));\r\n\t\t\t\tfornecedor.setDescricao(rs.getString(\"ds_descricao\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn fornecedor;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}",
"private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}",
"public Banca consultar(int id) throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n String sql = \"SELECT * FROM banca WHERE idBanca = \" + id;\n\n Transacao.consultar(sql);\n\n b.setAno(Transacao.getRs().getInt(\"ano\"));\n b.setDescricao(Transacao.getRs().getString(\"descricao\"));\n b.getTipoBanca().setIdTipoBanca(Transacao.getRs().getInt(\"idTipoBanca\"));\n b.getSubTipoBanca().setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n b.setIdLattes(Transacao.getRs().getInt(\"idLattes\"));\n b.setIdBanca(id);\n\n return b;\n }",
"GestionPrecioDTO findCampania(String codigoCampaniaReferencia);",
"public String borra(Cliente cliente) {\n clienteDAO.borra(cliente.getId());\n return \"listado\";\n }",
"List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"public int getLBR_BankAccount_Carteira_ID () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_LBR_BankAccount_Carteira_ID);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}",
"@DirectMethod\r\n\tpublic List<LlenaComboGralDto> obtenerBancosRaiz(int idEmpresa, String idDivisa)\r\n\t{\r\n\t\tList<LlenaComboGralDto>lista=new ArrayList<LlenaComboGralDto>();\r\n\t\ttry{\r\n\t\t\tif(Utilerias.haveSession(WebContextManager.get()) && Utilerias.tienePermiso(WebContextManager.get(),50)){\r\n\t\t\t\tBarridosFondeosService barridosFondeosService = (BarridosFondeosService)contexto.obtenerBean(\"barridosFondeosBusinessImpl\");\r\n\t\t\t\tlista = barridosFondeosService.consultarBancosRaiz(idEmpresa, idDivisa);\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e)\r\n\t\t\t+\"P:Egresos, C:CapturaSolicitudesPagoAction, M:obtenerEmpresas\");\t\t\t\r\n\t\t}\r\n\t\treturn lista;\r\n\t}",
"public void chocoContraBomba(Bomba bomba){}",
"@Override\n public Venda Buscar(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n\n// transaction.commit();\n return v;\n }",
"@Override\n public String getCarteiraFormatted() {\n return boleto.getCarteira();\n }",
"QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;",
"public List<Pago> findByCuentaOrigen(Cuenta cuentaOrigen);",
"List<TabelaIRRFLegadoDTO> consultarPorAnoBase(Integer anoBase) throws BancoobException;",
"public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}",
"private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }",
"public List<Pagamento> buscarPorBusca(String busca)throws DaoException;",
"@Override\n\tpublic Ingresso buscarIngressoPorCodigo(int codigo) throws DBException {\n\t\treturn null;\n\t}",
"@Override\n public void procesarBoleto(Boleto boleto) throws CRUDException {\n\n //1 Obtenemos la configuracion de la contabilidad del boleto de acuerdo a la empresa\n HashMap<String, Integer> parameters = new HashMap<>();\n parameters.put(\"idEmpresa\", boleto.getIdEmpresa());\n\n ContabilidadBoletaje contabilidad = (ContabilidadBoletaje) get(\"ContabilidadBoletaje.find\", ContabilidadBoletaje.class, parameters);\n\n Optional op = Optional.ofNullable(contabilidad);\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe configuracion de Boletaje para la Entidad \" + boleto.getIdEmpresa());\n }\n\n }",
"teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCazuri(int index);",
"public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }",
"Reserva Obtener();",
"private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"public Cosa findByNome(String isbn) {\r\n\t\tCosa cosa = (Cosa) jdbcTemplate.queryForObject(\r\n\t\t\t\t\"select * from persone where nome= ?\", new Object[] { isbn },\r\n\t\t\t\tnew CosaRowMapper());\r\n\t\treturn cosa;\r\n\t}",
"@Test\r\n\tpublic void CT02ConsultarLivroComRaEmBranco() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comRA_branco();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"RA inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"public int getBloco() {\r\n\t\treturn bloco;\r\n\t}",
"public SgfensBanco findByPrimaryKey(int idBanco) throws SgfensBancoDaoException;",
"public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }",
"public SgfensBanco findByPrimaryKey(SgfensBancoPk pk) throws SgfensBancoDaoException;",
"public SgfensBanco[] findWhereNumeroCuentaEquals(String numeroCuenta) throws SgfensBancoDaoException;",
"public TipoDestino findByCodigo(String codigo);",
"public CriaBanco (Context context){\n\n super (context, NOME_BD, null, VERSAO);\n }",
"@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\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\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().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 Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\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(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }",
"public void riempiProceduraComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT P.schema, P.nomeProcedura FROM Procedura P\";\n \n proceduraComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //le Procedure nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeProcedura\n //in quanto Procedure appartenenti a Schemi diversi possono avere lo stesso nome\n proceduraComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n proceduraComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }",
"public Lista obtenerListaClientesAdicionales(int codigoCuenta)throws SQLException{\r\n\t\tLista listadoCliente=null;\r\n\t\tICuenta daoCliente = new DCuenta();\r\n\t\t\r\n\t\tlistadoCliente = daoCliente.obtenerListadoCuentaAdicional(codigoCuenta);\r\n\t\t\r\n\t\treturn listadoCliente;\r\n\t}",
"ConsultaDto<ProdutorVO> obterByNome(String nome, Integer idInstituicao, int pagina, int tamanhoPagina) throws BancoobException;",
"public List<DietaBalanceada> consultar_dietaBalanceada();",
"public synchronized MensagemPromocional findByCodigo(int codPromocao,int codServico,int codConteudo,Connection con) throws SQLException\n\t{\n\t\t// Inicializa variavel que sera o objeto Servico retornado \n\t\tMensagemPromocional msg = (MensagemPromocional)poolMensagens.get(new Integer(codPromocao));\n\t\tif (msg == null)\n\t\t{\n\t\t\t// Prepara e realiza a consulta. Caso o registro nao exista entao\n\t\t\t// a referencia nula sera retornada senao o valor sera preenchido\n\t\t\t// pelo metodo getServico\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet \t\t rs = null;\n\t\t\ttry\n\t\t\t{\n\t\t\t\tpstmt = con.prepareStatement(sqlPesquisa);\n\t\t\t\tpstmt.setInt(1,codPromocao);\n\t\t\t\tpstmt.setInt(2,codServico);\n\t\t\t\tpstmt.setInt(3,codConteudo);\n\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\tif (rs.next())\n\t\t\t\t\tmsg = getMensagemPromocional(rs);\n\t\t\t}\n\t\t\tcatch(SQLException e){\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tfinally{\n\t\t\t\ttry{// Fecha os objetos de consulta\n\t\t\t\t\tif (rs != null) rs.close();\n\t\t\t\t\tif (pstmt != null) pstmt.close();\n\t\t\t\t}catch(Exception e){};\n\t\t\t}\n\t\t}\n\t\treturn msg;\n\t}",
"Databank getBank();",
"@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }",
"List<CustomerOrderBroadbandASID> selectCustomerOrderBroadbandASID(CustomerOrderBroadbandASID cobasid);",
"ShopAccount selectByPrimaryKey(Integer spAccount);",
"Basicinfo selectByPrimaryKey(String taxregcode);",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate Long buscarIdPais() {\r\n\t\tString cad = \"select p.* from general.pais p where lower(p.descripcion) = 'paraguay'\";\r\n\t\tList<Pais> lista = new ArrayList<Pais>();\r\n\t\tlista = em.createNativeQuery(cad, Pais.class).getResultList();\r\n\t\tif (lista.size() > 0)\r\n\t\t\treturn lista.get(0).getIdPais();\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public Cliente[] findWherePermisoVentaCreditoEquals(int permisoVentaCredito) throws ClienteDaoException;",
"List<Videogioco> retriveByNome(String nome);",
"public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}",
"public DatiBancari[] findByComuni(long fkComune) throws DatiBancariDaoException;",
"BookDO selectByPrimaryKey(String bookIsbn);",
"ConsultaDto<ProdutorVO> obterByNomeApelido(String nomeApelido, Integer idInstituicao, int pagina, int tamanhoPagina) throws BancoobException;",
"public void colocarBomba() \r\n {\r\n \tBomba bom;\r\n \tCelda c= miJuego.getNivel(0).getCelda(this.posX, this.posY);\r\n \tif(!dios)\r\n \t{\r\n \t\tif(misBombas.size()>0)\r\n \t\t{\r\n \t\t\tif(c.getBomba()==null){\r\n \t\t\t\tbom=misBombas.remove(misBombas.size()-1);\r\n \t\t\t\tbom.setUbicacion(c);\r\n \t\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\t\t\tbom.getGrafico().setPos(posX, posY);\r\n \t\t\t\tc.colocarBomba(bom);\r\n \t\t\t\tbom=null;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tbom=new Bomba(this);\r\n \t\tbom.setUbicacion(c);\r\n\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\tbom.getGrafico().setPos(posX, posY);\r\n \t\tc.colocarBomba(bom);\r\n \t\tbom=null;\r\n \t}\r\n \r\n }",
"CusBankAccount selectByPrimaryKey(Integer id);",
"public Banco(String nome) { // essa linha é uma assinatura do metodo\n \tthis.nome = nome;\n }",
"Maycta findFirstByCuenta(String cuenta);",
"public void carrega_cidade() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUF.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidade.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidade.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n Conexao.desConectar();\n \n }",
"Tipologia selectByPrimaryKey(BigDecimal id);",
"Especialidad getEspecialidadPorId(Integer especialidadId);",
"public Cuenta obtenerCuentaConMasDinero(String codigo_cliente) {\n Cuenta cuenta = new Cuenta();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo_Cliente = ? order by Credito desc limit 1\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo_Cliente\"));\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return cuenta;\n }",
"TblSecuencia findByIdSecuencia(long idSecuencia );",
"VehiculoEntity findByPlaca(String placa);",
"public Conge find( Integer idConge ) ;",
"public List<Cliente> findByNombreCli(String nombreCli);",
"public ResultSet getAccno(Long ano)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select balance from bank where Accno=\"+ano+\"\");\r\n\treturn rs;\r\n}",
"public void pedirCantidadProducto(String codBarra){\n this.productoSeleccionado = codBarra;\n }",
"public List<Comentario> listaComentarioPorCodigo(Long codigo);",
"public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }",
"@Override\n public ComprobanteContable createComprobante(Aerolinea a, Boleto boleto, Cliente cliente, String tipo, NotaDebito nota) throws CRUDException {\n\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n\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 comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\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 return comprobante;\n }",
"public DatiBancari[] findWhereBanCapEquals(String banCap) throws DatiBancariDaoException;",
"public Cliente[] findWherePerioricidadEquals(int perioricidad) throws ClienteDaoException;",
"public Corriente(int numero, long saldo, Persona titular, String tipoCuenta) {\r\n super(numero, saldo, titular, tipoCuenta);\r\n\r\n }",
"public Cliente findClienteById(Long cedula) throws SQLException, Exception\n\t{\n\t\tCliente cliente = null;\n\n\t\tString sql = String.format(\"SELECT * FROM %1$s.CLIENTE WHERE CEDULA = %2$d\", USUARIO, cedula); \n\n\t\tPreparedStatement prepStmt = conn.prepareStatement(sql);\n\t\trecursos.add(prepStmt);\n\t\tResultSet rs = prepStmt.executeQuery();\n\n\t\tif(rs.next()) {\n\t\t\tcliente = convertResultSetToCliente(rs);\n\t\t}\n\n\t\treturn cliente;\n\t}",
"public Cuenta obtenerCuenta(String codigo_cuenta) {\n Cuenta cuenta = new Cuenta();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo_Cliente\"));\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return cuenta;\n }",
"public static Comentario buscar(Integer id)\n {\n String idComentario = id.toString();\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario where u.id='\"+idComentario+\"'\";\n Comentario comentario = (Comentario)sessionRecheio.createQuery(hql).uniqueResult();\n tr.commit();\n return comentario;\n }",
"@GET\n\t@Path(\"listado/{codigo}\") //ruta -> metodo que al que llama\n\t@Produces(\"application/json\") \n\tpublic String buscar(@PathParam(\"codigo\") String isbn) {\n\t\tLibro libro = negocio.consultarISBN(isbn);\n\t\tJSONObject json = new JSONObject(libro);\n\t\treturn json.toString();\n\t}",
"public Candidato obterCandidato(Eleicao eleicao, int id) {\r\n\t\tCandidato candidato = null;\r\n\t\tcandidato = (Candidato) em.createNamedQuery(\"buscaCandidatoPorId\")\r\n\t\t\t\t.setParameter(1, eleicao).setParameter(2, id).getSingleResult();\r\n\t\treturn candidato;\r\n\t}",
"public List<vacante> cargarvacante() {\n\t\treturn vacantesrepo.findAll();\n\t}",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"@Override\n\t\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\t\treturn daoCliente.buscarPorId(id);\n\t\t}",
"public DatiBancari findByPrimaryKey(long banId) throws DatiBancariDaoException;",
"List<CapituloDTO> findAll();",
"List<BookAccount> findAllDebtors();",
"@Override\n\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\treturn daoCliente.buscarPorId(id);\n\t}",
"Book selectByPrimaryKey(String bid);",
"public Assunto buscar(String nome){\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.nome =:nome\");\r\n query.setParameter(\"nome\", nome);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }",
"public Produit getProduit(int theId);",
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\r\n\tpublic Departamento buscar(int numId){\r\n\t\treturn em.find(Departamento.class, numId);\r\n\t}",
"OcCustContract selectByPrimaryKey(String contractNo);",
"private void cargaComboBoxTipoLaboreo() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoLaboreoEntity p\");\n java.util.List<TipoLaboreoEntity> listaTipoLaboreoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoLaboreoEntity tipoLaboreo : listaTipoLaboreoEntity) {\n miVectorTipoLaboreo.add(tipoLaboreo.getTpoNombre());\n cboMomentos.addItem(tipoLaboreo);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }",
"List<BookAccount> findAllForAccount(long idAccount);",
"public Maquina buscarPorId(int idMaquina)\r\n/* 29: */ {\r\n/* 30: 63 */ return (Maquina)this.maquinaDao.buscarPorId(Integer.valueOf(idMaquina));\r\n/* 31: */ }",
"public Account getAccount(int accound_index){\n return accounts[accound_index];\n }"
] | [
"0.60372233",
"0.5943185",
"0.58365214",
"0.57879883",
"0.57443863",
"0.5639191",
"0.56040794",
"0.55771476",
"0.55198675",
"0.55013776",
"0.54985726",
"0.54736346",
"0.54294497",
"0.5425619",
"0.5418427",
"0.5415304",
"0.53837067",
"0.5375511",
"0.53589857",
"0.53537387",
"0.5344718",
"0.5330472",
"0.531608",
"0.52862644",
"0.52675766",
"0.5266674",
"0.526001",
"0.5259929",
"0.5259171",
"0.5239101",
"0.5237013",
"0.5236901",
"0.5235498",
"0.5233262",
"0.52226925",
"0.5221729",
"0.5204991",
"0.51954406",
"0.5183791",
"0.5174795",
"0.5154633",
"0.51532626",
"0.51531196",
"0.5152095",
"0.5148899",
"0.5141832",
"0.5138213",
"0.5118732",
"0.51148814",
"0.5111833",
"0.5107134",
"0.5103776",
"0.5103776",
"0.5102264",
"0.5100938",
"0.50974846",
"0.5091866",
"0.50800884",
"0.50788254",
"0.507873",
"0.507791",
"0.50778633",
"0.5077617",
"0.5067156",
"0.5063132",
"0.5061194",
"0.50551176",
"0.5050316",
"0.50493985",
"0.5046836",
"0.50460625",
"0.50313836",
"0.5028371",
"0.5027411",
"0.502568",
"0.50110215",
"0.5010981",
"0.5005376",
"0.5003509",
"0.50035",
"0.50031084",
"0.5000446",
"0.49976972",
"0.49964058",
"0.4994774",
"0.49912935",
"0.49816763",
"0.49802867",
"0.4978638",
"0.49766475",
"0.49753258",
"0.49746525",
"0.49746162",
"0.497061",
"0.49677643",
"0.4965447",
"0.49594197",
"0.49592698",
"0.4957516",
"0.49546933"
] | 0.52379173 | 30 |
Recupera a agencia / codigo cedente no padrao especificado pelo banco | public String getAgenciaCodCedenteFormatted() {
return boleto.getAgencia() + " / " + boleto.getContaCorrente() + " " + boleto.getDvContaCorrente();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getCodigo_agencia();",
"@Override\n\tpublic String getDvAgenciaCedente() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getDvAgenciaCedente();\n\t}",
"public String getCODIGO() {\r\n return CODIGO;\r\n }",
"@Override\n public String getAgenciaCodCedenteFormatted() {\n return boleto.getAgencia() + \"/\" + boleto.getContaCorrente() + \" \" + boleto.getDvContaCorrente();\n }",
"public abstract java.lang.Long getCod_actividad();",
"String getCidade();",
"public abstract java.lang.String getCod_tecnico();",
"@Override\n\tpublic String getDvAgenciaContaCedente() {\n\t\treturn super.getDvAgenciaContaCedente();\n\t}",
"@Override\n\tpublic int getBancoCobrador() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getBancoCobrador();\n\t}",
"public BCliente obtenerCliente(int codigo)throws SQLException{\r\n\t\tICliente daoCliente = new DCliente();\r\n\t\treturn daoCliente.obtenerCliente(codigo);\r\n\t}",
"public Long getCodigo() {\n return codigo;\n }",
"public int getCadastro() {\r\n\t\treturn cadastro;\r\n\t}",
"VentaJPA obtenerVenta(int comprobante);",
"public int getCodigo() {\r\n return Codigo;\r\n }",
"public String getCodigo() {\n return codigo;\n }",
"public String getCodigo() {\n return codigo;\n }",
"public java.lang.String getCodigo_pcom();",
"public Cuenta obtenerCuentaConMasDinero(String codigo_cliente) {\n Cuenta cuenta = new Cuenta();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo_Cliente = ? order by Credito desc limit 1\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo_Cliente\"));\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return cuenta;\n }",
"public int getAtencionAlCliente(){\n return atencion_al_cliente; \n }",
"@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }",
"public int getCodigo() {\n return codigo;\n }",
"public int getCodigo() {\n return codigo;\n }",
"public int getCodigo() {\n return codigo;\n }",
"public int getCodigo() {\n return codigo;\n }",
"@AutoEscape\n\tpublic String getCodDistrito();",
"Reserva Obtener();",
"public String getCROSG_CODIGO(){\n\t\treturn this.myCrosg_codigo;\n\t}",
"String getCodiceFiscale();",
"public abstract java.lang.String getCod_dpto();",
"public void agregarDatosCliente(Integer codCliente){\n try{\n ClienteDao clienteDao = new ClienteDaoImp();\n //obtenemos la instancia de Cliente en Base a su codigo\n this.cliente = clienteDao.obtenerClientePorCodigo(codCliente);\n //Mensaje de confirmacion de exito de la operacion\n FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO,\"Correcto\", \"Cliente agregado correctamente!\");\n FacesContext.getCurrentInstance().addMessage(null, message);\n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"private void cargarCodDocente() {\n ClsNegocioDocente negoDoc = new ClsNegocioDocente(); \n txtCodDocente.setText(negoDoc.ObtenerCodigo());\n try {\n negoDoc.conexion.close();\n } catch (SQLException ex) {\n Logger.getLogger(FrmCRUDDocente.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public String getCUSU_CODIGO(){\n\t\treturn this.myCusu_codigo;\n\t}",
"public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}",
"public java.lang.String getCodigo(){\n return localCodigo;\n }",
"public String getCodigo() {\n\t\treturn codigo;\n\t}",
"public void setCedula(Integer cedula) {this.cedula = cedula;}",
"public String getCidade() {\n\t\treturn cidade;\n\t}",
"public java.lang.String getCodigo() {\n return codigo;\n }",
"public int obtenerDatos() {\n codigo =Integer.parseInt(modelo.getValueAt(fila,0).toString());\n return codigo;\n }",
"public int getCaixa() {\n\t\treturn controlador.getCaixa();\n\t}",
"public String getAutorizacionCompleto()\r\n/* 184: */ {\r\n/* 185:316 */ return this.establecimiento + \"-\" + this.puntoEmision + \" \" + this.autorizacion;\r\n/* 186: */ }",
"public Integer getCodigo() {\n return codigo;\n }",
"public int getCodigo_producto() {\n return codigo_producto;\n }",
"public String getCVCTG_CODIGO(){\n\t\treturn this.myCvctg_codigo;\n\t}",
"@Override\n\tpublic String getCodigoCarteira() {\n\t\treturn \"0\";\n\t}",
"public Integer getCboEspecialidad() {\n return cboEspecialidad;\n }",
"public abstract java.lang.String getAcma_valor();",
"public void setCodigo_agencia(java.lang.String newCodigo_agencia);",
"public long getIdCargaTienda();",
"public int getCodigo() {\n\t\treturn codigo;\n\t}",
"public Integer getCodigo() {\n\t\treturn codigo;\n\t}",
"public String getCodigoDeBarras() {\n\t\treturn producto.getCodigoDeBarras();\n\t}",
"public int getId_cabecera_pedido() {\n return id_cabecera_pedido;\n }",
"@AutoEscape\n\tpublic String getCodProvincia();",
"public Cuenta obtenerCuenta(String codigo_cuenta) {\n Cuenta cuenta = new Cuenta();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n cuenta.setCodigo(rs.getString(\"Codigo\"));\n cuenta.setCreacion(rs.getDate(\"Creacion\"));\n cuenta.setCredito(rs.getDouble(\"Credito\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo_Cliente\"));\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return cuenta;\n }",
"public String getCadena() {\n return cadena;\n }",
"public String getCordno() {\n return cordno;\n }",
"public CriaBanco (Context context){\n\n super (context, NOME_BD, null, VERSAO);\n }",
"public long getIdCadastroSelecionado(){\r\n \treturn idCadastroSelecionado;\r\n }",
"public int getCaixa() {\n\t\treturn caixa;\n\t}",
"public int getCaixa() {\n\t\treturn caixa;\n\t}",
"public String getCodigo() {\n\t\treturn this.codigo;\n\t}",
"public int getId_coodinador() {\n return id_coodinador;\n }",
"@Override\n protected int getCodigoJuego() {\n return 5;\n }",
"public int getIdCargaEmpleado()\r\n/* 103: */ {\r\n/* 104:185 */ return this.idCargaEmpleado;\r\n/* 105: */ }",
"public String getCodice() {\n\t\treturn codice;\n\t}",
"@Override\n\tpublic long getCodTecnico() {\n\t\treturn model.getCodTecnico();\n\t}",
"public int getComuneNascitaCod() {\r\n return comuneNascitaCod;\r\n }",
"public BigDecimal getIdContrato() {\r\n return idContrato;\r\n }",
"public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }",
"public Computador getComputador(long codigo)throws Exception{\n\t\tString sql = \"select * from \" + TABELA + \" where codigo=?\";\n\n\t\tPreparedStatement stmt = connection.prepareStatement(sql);\n\n\t\t//setar parametro na query sql\n\t\tstmt.setLong(1, codigo);\n\n\t\tResultSet rs = stmt.executeQuery();\n\n\t\t//se não retornar resultados o objeto não existe no banco de dados\n\t\tif(!rs.first()){\n\t\t\tthrow new Exception(\"Produto com codigo \" +codigo+\" não encontrado no banco\");\n\t\t}\n\n\t\tComputador computador = new Computador();\n\t\tcomputador.setCodigo(rs.getLong(\"codigo\"));\n\t\tcomputador.setDescricao(rs.getString(\"descricao\"));\n\t\tcomputador.setPreco(rs.getFloat(\"preco\"));\n\n\t\treturn computador;\n\t}",
"public Integer getCodTienda();",
"public void generarCodigo(){\r\n this.setCodigo(\"c\"+this.getNombre().substring(0,3));\r\n }",
"public void carregarCadastro() {\n\n try {\n\n if (codigo != null) {\n\n ClienteDao fdao = new ClienteDao();\n\n cliente = fdao.buscarCodigo(codigo);\n\n } else {\n cliente = new Cliente();\n\n }\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n\n }",
"public String getCROFM_CODIGO(){\n\t\treturn this.myCrofm_codigo;\n\t}",
"public Estudiante(String nombre, int codigo, String carrera) {\r\n this.nombre = nombre;\r\n this.codigo = codigo;\r\n this.carrera = carrera;\r\n }",
"public String borra() { \n clienteDAO.borra(c.getId());\n return \"listado\";\n }",
"public Cliente ddCliente(String modo){\n ClienteDAO cd = new ClienteDAO();\n Cliente c = null;\n String rz = txtCliRz.getText()+\"\";\n String nFantasia = txtCliNFant.getText()+\"\";\n String DDDTel = txtCliDDD.getText()+\"\";\n String tel = txtCliTel.getText()+\"\";\n String DDDCel = txtCliDDDTel2.getText()+\"\";\n String cel = txtCliTel2.getText()+\"\";\n String rsp = txtCliResp.getText()+\"\"; \n String cnpj = txtCliCNPJ.getText()+\"\";\n c = new Cliente();\n \n if(modo.equalsIgnoreCase(\"a\")){ \n int cod = Integer.parseInt(txtCliCod.getText());\n c.setId(cod);\n } \n \n c.setCNPJ(cnpj);\n c.setRSocial(rz);\n c.setNFantasia(nFantasia);\n c.setDDDCel(DDDCel);\n c.setTel2(cel);\n c.setRsp(rsp);\n c.setDDDTel(DDDTel);\n c.setTel(tel);\n \n return c;\n }",
"public String getCidade() {// Retorna o nome da cidade.\r\n\t\treturn cidade;\r\n\t}",
"public Integer getCodigo() { return this.codigo; }",
"public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }",
"protected void filtrarEstCid() {\r\n\t\tif (cmbx_cidade.getSelectedItem() != \"\" && cmbx_estado.getSelectedItem() != \"\") {\r\n\t\t\tStringBuilder filtracomando = new StringBuilder();\r\n\r\n\t\t\tfiltracomando\r\n\t\t\t\t\t.append(comando + \" WHERE ESTADO = '\" + Estado.validar(cmbx_estado.getSelectedItem().toString())\r\n\t\t\t\t\t\t\t+ \"' AND CIDADE = '\" + cmbx_cidade.getSelectedItem().toString() + \"'\");\r\n\t\t\tlistacliente = tabelaCliente.mostraRelatorio(filtracomando.toString());\r\n\r\n\t\t\ttablecliente.setModel(tabelaCliente);\r\n\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Escolha a Cidade e o Estado que deseja Filtrar\");\r\n\t\t}\r\n\t}",
"@java.lang.Override\n public java.lang.String getCodigo() {\n java.lang.Object ref = codigo_;\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 codigo_ = s;\n return s;\n }\n }",
"public String getCuenta() {\r\n return cuenta;\r\n }",
"public String getComentario( )\n\t{\n\t\treturn comentario;\n\t}",
"public Integer getAnnoCorso() {\r\n return this.annoCorso;\r\n }",
"public void setCodigo(String codigo) {\n this.codigo = codigo;\n }",
"public int obtenerSiguienteNumeroOrden() {\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return controlOC.obtenerSiguienteNumeroOrden();\n }",
"public String getCod_catedratico() {\n return cod_catedratico;\n }",
"public int getAnnoCorso() {\r\n return this.annoCorso;\r\n }",
"@Override\n\tpublic long getNumeroContrato() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getNumeroContrato();\n\t}",
"public Fornecedor BuscarPorID(int codigo) throws SQLException {\r\n\t\ttry {\r\n\t\t\tString query = \"select * from fornecedor where cd_fornecedor=?\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(query);\r\n\t\t\tpreparedStatement.setInt(1, codigo);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\tFornecedor fornecedor = new Fornecedor();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tfornecedor.setCodigoFornecedor(rs.getInt(\"cd_fornecedor\"));\r\n\t\t\t\tfornecedor.setNomeLocal(rs.getString(\"nm_local\"));\r\n\t\t\t\tfornecedor.setValorFornecedor(rs.getDouble(\"vl_fornecedor\"));\r\n\t\t\t\tfornecedor.setQuantidadePeso(rs.getInt(\"qt_peso\"));\r\n\t\t\t\tfornecedor.setNomeFornecedor(rs.getString(\"nm_fornecedor\"));\r\n\t\t\t\tfornecedor.setDescricao(rs.getString(\"ds_descricao\"));\r\n\t\t\t}\r\n\r\n\t\t\treturn fornecedor;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}",
"public int getComuneResidenzaCod() {\r\n return comuneResidenzaCod;\r\n }",
"public int getBloco() {\r\n\t\treturn bloco;\r\n\t}",
"public String getCompoId() {\n\t return compoId;\r\n\t }",
"int getIdRondaCancion(Cancion cancion,Date fecha) throws ExceptionDao;",
"@Override\n\tpublic Integer alta(Cliente cliente) {\n\t\treturn null;\n\t}",
"public void setCodigo( String codigo ) {\n this.codigo = codigo;\n }",
"public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}"
] | [
"0.71476084",
"0.6514138",
"0.6497906",
"0.64217883",
"0.637938",
"0.636841",
"0.63430566",
"0.63286674",
"0.6303069",
"0.6288847",
"0.6211669",
"0.61424917",
"0.6116512",
"0.61084175",
"0.6094663",
"0.6094663",
"0.60892594",
"0.60734284",
"0.60499585",
"0.6018331",
"0.6001995",
"0.6001995",
"0.6001995",
"0.6001995",
"0.60011446",
"0.6000028",
"0.5999927",
"0.59893876",
"0.59886754",
"0.5974931",
"0.5971592",
"0.5966184",
"0.5954225",
"0.5946991",
"0.59287286",
"0.59203374",
"0.59140265",
"0.5912977",
"0.591136",
"0.5908367",
"0.59076655",
"0.59055364",
"0.5899813",
"0.58943385",
"0.58858013",
"0.58820057",
"0.58737946",
"0.586451",
"0.58595866",
"0.58324116",
"0.5826402",
"0.5824171",
"0.5814009",
"0.5807122",
"0.58028394",
"0.57954305",
"0.5785077",
"0.57776237",
"0.57738394",
"0.57733953",
"0.57733953",
"0.57617027",
"0.57510495",
"0.572908",
"0.572792",
"0.5725389",
"0.5722196",
"0.57221055",
"0.57087475",
"0.57078797",
"0.57007307",
"0.5699115",
"0.56966424",
"0.568836",
"0.5687929",
"0.56873524",
"0.5684555",
"0.5682089",
"0.5673974",
"0.56707627",
"0.5668152",
"0.56675977",
"0.56644464",
"0.56558233",
"0.5655743",
"0.56556296",
"0.5655143",
"0.56526524",
"0.5634374",
"0.5632207",
"0.56312406",
"0.5630627",
"0.56287354",
"0.5628286",
"0.5620523",
"0.56078666",
"0.56060565",
"0.5601862",
"0.559663",
"0.5594188"
] | 0.6621149 | 1 |
Recupera a nossoNumero no padrao especificado pelo banco | public String getNossoNumeroFormatted() {
return boleto.getNossoNumero();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getNumero()\r\n/* 190: */ {\r\n/* 191:202 */ return this.numero;\r\n/* 192: */ }",
"private int getNumero() {\n\t\treturn numero;\n\t}",
"@Override\n public String getNossoNumeroFormatted() {\n return \"24\" + boleto.getNossoNumero();\n }",
"public int getNumero() { return this.numero; }",
"int generarNumeroNota();",
"public int getNumero() {\n return numero;\n }",
"public void setNumero(int numero) { this.numero = numero; }",
"@Override\n\t@Field(offset=41, length=9, paddingChar='0', align=Align.RIGHT)\n\tpublic String getNossoNumero() {\n\t\treturn super.getNossoNumero();\n\t}",
"public int getNumero() {\n\t\treturn numero;\n\t}",
"public int getNumero() {\n\t\treturn numero;\n\t}",
"public int getNumero() {\n\t\treturn numero;\n\t}",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"public int getNumero() {\n return dado1;\n }",
"int obtenerNumeroMovimiento();",
"public String getNumeroId() {\r\n return NumeroId;\r\n }",
"public java.lang.String getNossoNumero() {\n return nossoNumero;\n }",
"BigInteger getTelefone();",
"public String getFreeNumber() throws SQLException {\r\n\t\tString freeNumber = \"\";\r\n\t\tif (bankAccountExists) {\r\n\t\t\t// Angefangen bei 1000 werden die Nummern auf Verfügbarkeit geprüft\r\n\t\t\tfor (int i = 1000; i <= 9999; i++) {\r\n\t\t\t\tString iString = String.valueOf(i);\r\n\t\t\t\t// Prüfung, ob die Nummer schon einem Konto zugeordnet oder\r\n\t\t\t\t// reserviert ist\r\n\t\t\t\tif (!numberExists(iString) && !reservedNumbers.contains(iString)) {\r\n\t\t\t\t\tfreeNumber = iString;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfreeNumber = \"0000\";\r\n\t\t}\r\n\t\t// Reservierung der Nummer\r\n\t\treservedNumbers.add(freeNumber);\r\n\t\treturn freeNumber;\r\n\t}",
"public void setNumeroId(String NumeroId) {\r\n this.NumeroId = NumeroId;\r\n }",
"public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}",
"public String getPremierNumeroLibre() {\n\t\tString requete_s = \"SELECT id from LIVRES\";\n\t\tint i = 0;\n\t\tboolean egalite = true;\n\t\t\n\t\ttry{\n\t\t\trequete.execute(requete_s);\n\t\t\t\n\t\t\tResultSet rs = requete.getResultSet();\n\t\t\t\n\t\t\tdo{\n\t\t\t\ti++;\n\t\t\t\trs.next();\n\t\t\t\tegalite = (i ==((Integer) rs.getObject(1)));\n\t\t\t}while(egalite);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString s = \"\" + i;\n\t\t\n\t\treturn s;\n\t}",
"private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}",
"public int getNumNudo() {\n return numNudo;\n }",
"public int obtenerSiguienteNumeroOrden() {\n try {\n controlOC = new ControlOrdenCompra();\n bitacora.info(\"Registro OrdenCompra Iniciado correctamente\");\n } catch (IOException ex) {\n bitacora.error(\"No se pudo iniciar el registro OrdenCompra por \" + ex.getMessage());\n }\n return controlOC.obtenerSiguienteNumeroOrden();\n }",
"public void setNossoNumero(java.lang.String nossoNumero) {\n this.nossoNumero = nossoNumero;\n }",
"public void setNUM_BICO(String NUM_BICO) {\n this.NUM_BICO = NUM_BICO;\n }",
"java.lang.String getNumb();",
"public void setNumero(int numero) {\n this.dado1 = numero;\n }",
"public String getNumber() throws Exception;",
"public void registriereNummer (int nr) {\n this.nr = nr;\n }",
"public void setNumero(int numero) {\n\t\tthis.numero = numero;\n\t}",
"public void setNumero(int numero) {\n\t\tthis.numero = numero;\n\t}",
"public int getNumber() {\n\t\treturn 666;\n\t}",
"public void setNUMARGEO(int value) {\n this.numargeo = value;\n }",
"private void registroNumeroOrden(int _carnet, String _tipo) {\n if (modeloRegistroServicio.guardar(_carnet, _tipo)) {\n if (_tipo.equals(\"portatil\")) {\n Portatiles();\n }\n if (_tipo.equals(\"impresora\")) {\n Impresoras();\n }\n if (_tipo.equals(\"pc\")) {\n Pcs();\n }\n if (_tipo.equals(\"otros\")) {\n Others();\n }\n } else {\n System.out.println(\"Error al registrar\");\n }\n }",
"BigInteger getNumber();",
"public java.lang.Long getPeti_numero();",
"public java.lang.Long getPeti_numero();",
"public int getBN()\n {\n return bNum;\n }",
"public void setTelefono(Integer telefono) {\r\n this.telefono = telefono;\r\n }",
"private ZapNumberSpinner getTxtNumBro() {\n \t\tif (txtNumBro == null) {\n\t\t\ttxtNumBro = new ZapNumberSpinner(1, 1, Integer.MAX_VALUE);\n \t\t}\n \t\treturn txtNumBro;\n \t}",
"public int getNum() { return Num;}",
"private static String findNumber() {\n\t\treturn null;\r\n\t}",
"private void autonumber(){\n //txtkode.setVisible(false);\n txtkode.setText(\"\");\n\n try{\n sql = \"select * from tblpembayaran order by kode_pembayaran desc\";\n Statement st = (Statement) conek.getConnection().createStatement();\n rs = st.executeQuery(sql);\n if (rs.next()) {\n String kode = rs.getString(\"kode_pembayaran\").substring(1);\n String AN = \"\" + (Integer.parseInt(kode) + 1);\n String Nol = \"\";\n\n if(AN.length()==1)\n {Nol = \"00\";}\n else if(AN.length()==2)\n {Nol = \"0\";}\n else if(AN.length()==3)\n {Nol = \"\";}\n\n txtkode.setText(\"B\" + Nol + AN);\n } else {\n txtkode.setText(\"B001\");\n //kodepembayaran = \"B\" + Nol + AN;\n }\n }catch(Exception e){\n JOptionPane.showMessageDialog(rootPane,\"DATABASE BELUM NYALA!\");\n }\n }",
"public int getNumeroInicial()\r\n/* 180: */ {\r\n/* 181:194 */ return this.numeroInicial;\r\n/* 182: */ }",
"public void getnumber() {\n\r\n\t\tnumberofticket[numberposition] = number;\r\n\t\tticketnumber[numberposition] = numberresult;\r\n\t\ttickettype[numberposition] = ticketname[btn_menu1_int];\r\n\t\tnumberposition++;\r\n\r\n\t}",
"public String getNUM_BICO() {\n return NUM_BICO;\n }",
"public void generarNumeroFacura(){\n try{\n FacturaDao facturaDao = new FacturaDaoImp();\n //Comprobamos si hay registros en la tabla Factura de la BD\n this.numeroFactura = facturaDao.numeroRegistrosFactura();\n \n //Si no hay registros hacemos el numero de factura igual a 1\n if(numeroFactura <= 0 || numeroFactura == null){\n numeroFactura = Long.valueOf(\"1\");\n this.factura.setNumeroFactura(this.numeroFactura.intValue());\n this.factura.setTotalVenta(new BigDecimal(0));\n }else{\n //Recuperamos el ultimo registro que existe en la tabla Factura\n Factura factura = facturaDao.getMaxNumeroFactura();\n //Le pasamos a la variable local el numero de factura incrementado en 1\n this.numeroFactura = Long.valueOf(factura.getNumeroFactura() + 1);\n this.factura.setNumeroFactura(this.numeroFactura.intValue());\n this.factura.setTotalVenta(new BigDecimal(0));\n }\n \n \n }catch(Exception e){\n e.printStackTrace();\n }\n \n }",
"@Override\n public int getNumber() {\n if(flightNumber == null)\n return 42;\n else\n return Integer.parseInt(flightNumber);\n }",
"BigInteger getFieldNumber();",
"public String getNumber() \n\t{\n\t\treturn this.number;\n\t}",
"public String getNum() {\r\n return num;\r\n }",
"public int getNumero() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNumero() - start\");\n\t\t}\n\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNumero() - end\");\n\t\t}\n\t\treturn numero;\n\t}",
"public String getNumber() {\r\n\t\treturn number;\r\n\t}",
"public String getNumber() {\n return this.mNumber;\n }",
"@Override\n\tpublic long getNumeroContrato() {\n\t\t// TODO Auto-generated method stub\n\t\treturn super.getNumeroContrato();\n\t}",
"public long getTelefono() {\r\n return telefono;\r\n }",
"public int getNUMARGEO() {\n return numargeo;\n }",
"public String getNum() {\n return num;\n }",
"public String getNum() {\n return num;\n }",
"public int getNumero(int index){\n\t\treturn numeros.get(index);\n\t}",
"public long getnNum() {\n return nNum;\n }",
"public int getNumero(int index){\r\n\t\treturn numeros.get(index);\r\n\t}",
"java.lang.String getAccountNumber();",
"public int getPhoneNuber() {\r\n return phoneNuber;\r\n }",
"public String getNumber() {\n return number;\n }",
"public String getNumber() {\n return number;\n }",
"public String getNumber() {\n return number;\n }",
"public String getNumber() {\n return number;\n }",
"public String getNumber(){\r\n return number;\r\n }",
"BigInteger getNumRegistro();",
"public long getNumber(){\n return number;\r\n }",
"com.google.protobuf.ByteString getNumberBytes();",
"public byte[] getNr() {\n return nr;\n }",
"java.lang.String getNume();",
"java.lang.String getNume();",
"public int getNum()\n {\n return num;\n }",
"public int getNum()\n {\n return num;\n }",
"@Override\n\tpublic void teclaCorrigeDigitada() {\n\t\t\n\t}",
"private static void obterNumeroLugar(String nome) {\n\t\tint numero = gestor.obterNumeroLugar(nome);\n\t\tif (numero > 0)\n\t\t\tSystem.out.println(\"O FUNCIONARIO \" + nome + \" tem LUGAR no. \" + numero);\n\t\telse\n\t\t\tSystem.out.println(\"NAO EXISTE LUGAR de estacionamento atribuido a \" + nome);\n\t}",
"public String getlbr_NFeID();",
"public String getlbr_NFeID();",
"public java.lang.String getNumber() {\n java.lang.Object ref = number_;\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 number_ = s;\n }\n return s;\n }\n }",
"private void atualizarNumeroBombas() {\n\t\tlblNumeroBombas.setText(Integer.toString(this.numeroBombas));\r\n\t}",
"public String getNumber() {\n return (String) get(\"number\");\n }",
"public int getNumber(){\n\t\treturn number;\n\t}",
"String getIdNumber();",
"public String getNumeroAbonado() {\n return numAbonadoTextField.getText();\n }",
"@Override\n\tpublic void createccuntNum() {\n\t\t\n\t}",
"public int getNumber(){\n\treturn number;\n }",
"private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }",
"public static void generator(String nro){\n Integer.parseInt(nro);\r\n }",
"Integer getNLNDreu();",
"public int getNum();",
"public int getNum() {\r\n return num;\r\n }",
"java.lang.String getNum2();",
"public String getTelNum() throws Exception \n\t{\n\t\tString tel=\"\";\n\t\ttry(Connection connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/usersdb?useTimezone=true&serverTimezone=UTC\", \"root\", \"123\");\n\t\t\tPreparedStatement preparedStatement = connection.prepareStatement(\"SELECT telephone_number FROM usersdb.telephone_numbers WHERE clients_username = ?;\"))\n\t\t{\n\t\t\tpreparedStatement.setString(1,username);\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(result.next()) \n\t\t\t{\n\t\t\t\ttel = result.getString(\"telephone_number\");\n\t\t\t\ttelnum = result.getString(\"telephone_number\");\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn tel;\n\t}",
"public String getCustIdNbr()\n\t{\n\t\treturn mCustIdNbr;\t\n\t}"
] | [
"0.6996787",
"0.69093",
"0.6823092",
"0.67824584",
"0.6671417",
"0.65795755",
"0.653008",
"0.65076846",
"0.64767754",
"0.64767754",
"0.64767754",
"0.64369744",
"0.64369744",
"0.64369744",
"0.64333993",
"0.641886",
"0.64027166",
"0.6368942",
"0.6360926",
"0.6336792",
"0.63296145",
"0.63099366",
"0.6304989",
"0.62196773",
"0.61938614",
"0.61778134",
"0.61551684",
"0.6122663",
"0.61194384",
"0.61161864",
"0.61122274",
"0.6097909",
"0.6072047",
"0.6072047",
"0.6005944",
"0.5992882",
"0.5990062",
"0.598428",
"0.59777653",
"0.59777653",
"0.5959961",
"0.594881",
"0.59426475",
"0.59325606",
"0.59294134",
"0.5901848",
"0.5895905",
"0.58946043",
"0.58919686",
"0.5889239",
"0.58813757",
"0.5880347",
"0.5876079",
"0.5873431",
"0.5871857",
"0.58653504",
"0.58613837",
"0.5850671",
"0.5850239",
"0.5847974",
"0.58478427",
"0.58478427",
"0.5818904",
"0.5818594",
"0.5811869",
"0.5797771",
"0.57849544",
"0.57806754",
"0.57806754",
"0.57806754",
"0.57806754",
"0.57701176",
"0.57688195",
"0.5764452",
"0.57569903",
"0.5751757",
"0.5749105",
"0.5749105",
"0.5747767",
"0.5747767",
"0.5741756",
"0.5730402",
"0.5720668",
"0.5720668",
"0.5716661",
"0.57147336",
"0.5712502",
"0.571171",
"0.57105714",
"0.57056457",
"0.57052135",
"0.57035965",
"0.5702332",
"0.5700115",
"0.57001007",
"0.5699537",
"0.5683201",
"0.5679054",
"0.5677663",
"0.5670831"
] | 0.6642418 | 5 |
Gets e Sets para auxilio Get e set entre String(front) e Calendar(Objeto) Recebe a String da data e insere no objeto como calendar | public void setDataNascimentoString(String dataNascimento) {
try {
java.util.Date date = new SimpleDateFormat("dd/MM/yyyy").parse(dataNascimento);
Calendar dataCalendar = Calendar.getInstance();
dataCalendar.setTime(date);
this.dataNascimento = dataCalendar;
} catch (ParseException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setFechaSolicitud(java.util.Calendar param){\n \n this.localFechaSolicitud=param;\n \n\n }",
"public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }",
"@Test\n public void getterCalendar(){\n ScheduleEntry entry = new ScheduleEntry();\n entry.setCalendar(calendar);\n entry.setDepartureTime(DepartureTime);\n Assert.assertEquals(2018,calendar.getYear());\n Assert.assertEquals(4,calendar.getMonth());\n Assert.assertEquals(25,calendar.getDayOfMonth());\n }",
"public abstract void setFecha_inicio(java.lang.String newFecha_inicio);",
"public abstract void setFecha_termino(java.lang.String newFecha_termino);",
"public java.util.Calendar getFechaSolicitud(){\n return localFechaSolicitud;\n }",
"public void setFechaFacturado(java.util.Calendar param){\n \n this.localFechaFacturado=param;\n \n\n }",
"public Calendario getCalendar(){\r\n\t\treturn calendar;\r\n\t}",
"public Mencacao()\r\n {\r\n texto = \"\";\r\n deUtilizador = \"\";\r\n data = new GregorianCalendar();\r\n }",
"public String getDataMain(){\n\n calendar = Calendar.getInstance();\n thisYear = calendar.get(Calendar.YEAR);\n Log.d(TAG, \"# thisYear : \" + thisYear);\n\n thisMonth = calendar.get(Calendar.MONTH);\n Log.d(TAG, \"@ thisMonth : \" + thisMonth);\n\n thisDay = calendar.get(Calendar.DAY_OF_MONTH);\n Log.d(TAG, \"$ thisDay : \" + thisDay);\n\n mese = monthIntToString(thisMonth);\n\n /*\n switch (thisMonth){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n */\n return mese;\n }",
"public void setCalendar(Calendar cal) {\n this.cal = cal;\n }",
"public void setCalendar(Calendar cal) {\n this.cal = cal;\n }",
"public void setCalendar(Calendar cal) {\n this.cal = cal;\n }",
"@SuppressWarnings(\"deprecation\")\r\n\tprivate void createCalendarEntry(){\r\n\t\t\r\n\t\tUri calendars = Uri.parse(CALENDAR_URI);\r\n\t\t \r\n\t\tCursor managedCursor = managedQuery(calendars, projection, null, null, null);\r\n\t\tString calName = \"\"; \r\n\t\tString calId = \"\"; \r\n\t\tif (managedCursor.moveToFirst()) {\r\n\t\t\t \r\n\t\t\t int idColumn = managedCursor.getColumnIndex(projection[0]);\r\n\t\t\t int nameColumn = managedCursor.getColumnIndex(projection[1]); \r\n\t\t\t \r\n\t\t\t do {\r\n\t\t\t calName = managedCursor.getString(nameColumn);\r\n\t\t\t calId = managedCursor.getString(idColumn);\r\n\t\t\t if (calName.contains(\"gmail\"))\r\n\t\t\t \tbreak;\r\n\t\t\t } while (managedCursor.moveToNext());\r\n\t }\r\n\t\t\r\n\t\tlong start = System.currentTimeMillis() + 120000;\r\n\t\tlong duration = DURATION + start;\r\n\t\t\r\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(DATE_START, start);\r\n\t\tvalues.put(DATE_END, duration);\r\n\t\tvalues.put(EVENT_TITLE, ocrData.getMedicine().getMedicine());\r\n\t\tvalues.put(EVENT_DESCRIPTION, \"Take \" + ocrData.getPatient2Medicine().getFrequencyOfIntake() \r\n\t\t\t\t+ \" by \" + ocrData.getPatient2Medicine().getMode());\r\n\t\tvalues.put(CALENDAR_ID, calId);\r\n\t\tvalues.put(EVENT_RULE, \"FREQ=\" + ocrData.getPatient2Medicine().getFrequencyOfIntake() + \";\");\r\n\t\tvalues.put(HAS_ALARM, 1);\r\n\t\t\r\n\t\tContentResolver cr = getContentResolver();\r\n\t\tUri event = cr.insert(Uri.parse(EVENT_URI), values);\r\n\t\t\r\n\t\tvalues = new ContentValues();\r\n\t\tvalues.put(\"event_id\", Long.parseLong(event.getLastPathSegment()));\r\n\t\tvalues.put(\"method\", 1);\r\n\t\tvalues.put(\"minutes\", 10 );\r\n\t\tcr.insert(Uri.parse(REMINDER_URI), values);\r\n\t}",
"private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }",
"public String getCalendarString() {\n return calendarString;\n }",
"public void setDataNascimento(Calendar dataNascimento) {\r\n\t\tthis.dataNascimento = dataNascimento;\r\n\t}",
"private void set(Calendar mCalendar) {\n\n //get the values from the calendar\n\n int date = mCalendar.get(Calendar.DATE);\n int month = mCalendar.get(Calendar.MONTH);\n int year = mCalendar.get(Calendar.YEAR);\n\n //update the textViews\n mTextDate.setText(date+\"\");\n mTextYear.setText(year+\"\");\n\n //use the formatter to display the month as Jan\n mTextMonth.setText(mFormatter.format(mCalendar.getTime()));\n\n\n }",
"public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\n }",
"@Test\n public void testSetEndDate() {\n System.out.println(\"setEndDate\");\n Calendar newEnd = new GregorianCalendar(2000, 01, 01);\n String endDate = newEnd.toString();\n DTO_Ride instance = dtoRide;\n instance.setEndDate(endDate);\n \n String result = endDate.toString();\n assertEquals(newEnd, newEnd);\n }",
"public void Cliente1(String string, Calendar instance) {\n\t}",
"public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }",
"private void getIntialCalender() {\n\n\t\ttry {\n\n\t\t\tc = Calendar.getInstance();\n\t\t\tString[] fields = Global_variable.str_booking_date.split(\"[-]\");\n\n\t\t\tString str_year = fields[0];\n\t\t\tString str_month = fields[1];\n\t\t\tString str_day = fields[2];\n\n\t\t\tSystem.out.println(\"!!!!\" + fields[0]);\n\t\t\tSystem.out.println(\"!!!!\" + fields[1]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields[2]);\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tyear = Integer.parseInt(str_year);\n\t\t\t} else {\n\t\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\t}\n\n\t\t\tif (str_month.length() != 0) {\n\t\t\t\tmonth = Integer.parseInt(str_month) - 1;\n\t\t\t} else {\n\t\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tday = Integer.parseInt(str_day);\n\t\t\t} else {\n\t\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t}\n\n\t\t\tString[] fields1 = Global_variable.str_booking_time.split(\"[:]\");\n\n\t\t\tString str_hour = fields1[0];\n\t\t\tString str_minutes = fields1[1];\n\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[0]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[1]);\n\n\t\t\tif (str_hour.length() != 0) {\n\t\t\t\thour = Integer.parseInt(str_hour);\n\t\t\t} else {\n\t\t\t\thour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t}\n\n\t\t\tif (str_minutes.length() != 0) {\n\t\t\t\tminutes = Integer.parseInt(str_minutes);\n\t\t\t} else {\n\t\t\t\tminutes = c.get(Calendar.MINUTE);\n\t\t\t}\n\n\t\t\tcurrDate = new java.sql.Date(System.currentTimeMillis());\n\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tCalendar c1 = Calendar.getInstance();\n\t\t\tc1.setTime(new Date()); // Now use today date.\n\t\t\tc1.add(Calendar.DATE, 30); // Adding 30 days\n\t\t\toutput = sdf.format(c1.getTime());\n\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!\" + output);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public String getFechaInicio(){\n return fechaInicio;\n }",
"public void setupCalendar() { \n\t\tcal = whenIsIt();\n\t\tLocale here = Locale.US;\n\t\tthisMonth = cal.getDisplayName(2, Calendar.LONG_STANDALONE, here);\n\t\tdate = cal.get(5); //lesson learned: if it's a number do this\n\t\t//ADD CODE FOR ORDINALS HERE\n\t\tyear = cal.get(1);\n\t\tthisHour = cal.get(10);\n\t\tthisMinute = cal.get(12);\n\t\tthisSecond = cal.get(13);\n\t\tamPm = cal.getDisplayName(9, Calendar.SHORT, here);\n\t\tthisDay = thisMonth +\" \"+ addOrdinal(date) + \", \" + year;\n\t\tcurrentTime = fix.format(thisHour) + \":\" + fix.format(thisMinute) + \":\" + fix.format(thisSecond) + \" \" + amPm;\n\t}",
"public void setCalendari(Dia[] c) {\n\t\tcal = c;\n\t}",
"@Override\n public void setDate(Date value, Calendar cal) throws SQLException {\n if (value == null) {\n setNull();\n return;\n }\n\n setDate(getDatatypeCoder().encodeDate(value, cal));\n }",
"public StockDate GetCalendar()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public void initCalendarFirst() {\n getCurrentDate();\n mCalendar.setOnDateChangedListener(new OnDateSelectedListener() {\n @Override\n public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay select, boolean selected) {\n mSelectedDate = select.toString();\n String string[] = mSelectedDate.split(\"\\\\{|\\\\}\");\n String s = string[1]; //2017-8-14\n String string1[] = s.split(\"-\");\n int tempMonth = Integer.parseInt(string1[1]);\n String month = Integer.toString(tempMonth + 1);\n mDate1 = string1[0] + \"-\" + month + \"-\" + string1[2];\n }\n });\n }",
"public CtrlCalendario(Calendario C) {\r\n\t\tcalendar = C;\r\n\t}",
"private void salvarVenda(String nomeCliente, double precoFinal, double desconto ,String mesAnoAt,String dataCompra,String formaDePagamento) {\n\n\t\tFirebaseAuth autenticacion = configFireBase.getFireBaseAutenticacao();\n\n\t\tString idUsuario = Base64Custom.codificarBase64(autenticacion.getCurrentUser().getEmail());\n\t\tDatabaseReference VendaRef=mDatabase.child(\"vendas\");\n\n\n\t\tvenda.setIdVenda(VendaRef.push().getKey());\n\t\tvenda.setNomeCliente(nomeCliente);\n\t\tvenda.setValorTotal(precoFinal);\n\t\tvenda.setMesAno(mesAnoAt);\n\t\tvenda.setDesconto(desconto);\n\t\tvenda.setDataCompra(dataCompra);\n\t\tvenda.setLista(ListagemDeProdutosParaCompras.produtosSelecionados);\n\t\tvenda.setFormaDePagamento(formaDePagamento);\n\n\t\tmDatabase.child(\"armazenamento\").child(idUsuario).child(\"vendas\").child(venda.getIdVenda()).setValue(venda).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(@NonNull Task<Void> task) {\n\n\t\t\t}\n\n\t\t});\n\n\t\tToast.makeText(CadastrarVendaActivity.this, \"Venda Realizada\", Toast.LENGTH_SHORT).show();\n\t\tstartActivity(new Intent(getApplicationContext(), ListagemDeVendasRealizadas.class));\n\t\tvenda.subtrairVendas();\n\n\t\tthis.finish();\n\t}",
"public abstract java.lang.String getFecha_inicio();",
"public void setDataNascimentoFromSQL(Date dataNascimento) {\r\n\r\n\t\t// montando a data atrav�s do Calendar\r\n\t\tCalendar data = Calendar.getInstance();\r\n\t\tdata.setTime(dataNascimento);\r\n\t\tthis.dataNascimento = data;\r\n\r\n\t}",
"public abstract void setAcma_cierre(java.lang.String newAcma_cierre);",
"Calendar getCalendar();",
"public Entry(Calendar date){\n this.date = date; \n }",
"public void setString (String s) { //set method\n full_Date = s;\n if(!isValidDate(full_Date)) throw new IllegalArgumentException(\"Invalid Date Format!\");\n\n Year = Integer.parseInt(full_Date.substring(0,3));\n Month = Integer.parseInt(full_Date.substring(4,5));\n Day = Integer.parseInt(full_Date.substring(6,7));\n\n \n}",
"@Override\n\tpublic CalendarEdit addCalendar(String ref) throws IdUsedException,\n\t\t\tIdInvalidException, PermissionException {\n\t\treturn null;\n\t}",
"public Calendar getCal() {\n return cal;\n }",
"public interface CalendarEventDO {\n long getCalendarId();\n\n String getEventTitle();\n\n boolean isAllDay();\n\n long getStartDT();\n\n long getEndDT();\n\n String getRrule();\n\n String getRdate();\n\n String getExrule();\n\n String getExdate();\n\n long getEventID();\n}",
"public void setCalendarForModel(Calendar calend) {\n this.cal = calend;\n //fireTableDataChanged();\n refresh();\n}",
"public void ustawDate(Date data) {\n\t\tcalendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(data);\r\n\t\tthis.rok = calendar.get(Calendar.YEAR);\r\n\t\tthis.miesiac = calendar.get(Calendar.MONTH);\r\n\t\tif ((this.rok % 4 == 0 && this.rok % 100 != 0) || this.rok % 400 == 0) {\r\n\t\t\tmiesiace[1] = 29;\r\n\t\t} else {\r\n\t\t\tmiesiace[1] = 28;\r\n\t\t}\r\n\r\n\t\twypelnijTabele();\r\n\t}",
"int insert(CalendarDate record);",
"public DefaultScheduleEvent getEventosCalendario(DateTime data, Servico servico) throws NullPointerException {\n\t\tList<ServicoJanelaAtendimento> servicoJanelaAtendimentos = new ArrayList<>();\n\t\tList<SolicitacaoServico> solicitacaoServicos = new ArrayList<>();\n\t\t\n\t\t\n\t\t\n\t\tgetServicoJanelaAtendimentoDAO().beginTransaction();\n\t\tservicoJanelaAtendimentos = getServicoJanelaAtendimentoDAO().getServicoJanelaPorDataJanela(data.toDate(), servico);\n\t\tgetServicoJanelaAtendimentoDAO().closeTransaction();\n\t\t\n\t\tDefaultScheduleEvent defaultScheduleEvent= new DefaultScheduleEvent();\n\t\tdefaultScheduleEvent.setAllDay(true);\n\t\tdefaultScheduleEvent.setData(data.toDate());\n\t\tdefaultScheduleEvent.setStartDate(data.toDate());\n\t\tdefaultScheduleEvent.setEndDate(data.plusHours(20).toDate());\n\t\t\n\t\t\n\t\tif(!servicoJanelaAtendimentos.isEmpty()) {\n\t\t\t\n\t\t\t\n\t\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\t\tsolicitacaoServicos = getSolicitacaoServicoDAO().getSolicitacoesPorDataeServico(data.toDate(), servico);\n\t\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\t\n\t\t\tint janelaServico = 0;\n\t\t\tint janelaSolicitacao = 0;\n\t\t\t\tfor(ServicoJanelaAtendimento servicoJanelaAtendimento: servicoJanelaAtendimentos) {\n\t\t\t\t\tjanelaServico = janelaServico + servicoJanelaAtendimento.getCapacidadePeriodo();\n\t\t\t\t}\n\t\t\t\tjanelaSolicitacao = solicitacaoServicos.size();\n\t\t\tint disponivel = janelaServico-janelaSolicitacao;\n\t\t\tif(disponivel > 0) {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"DisponÃvel\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"green\");\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"Encaixe\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"red\");\n\t\t\t\t\n\t\t\t}\n\t\t}else {\n\t\tdefaultScheduleEvent.setTitle(\"Não DisponÃvel\");\n\t\tdefaultScheduleEvent.setStyleClass(\"no-color\");\n\t\t}\n\t\t\n\t\treturn defaultScheduleEvent;\n\t}",
"@Test\n public void testSetStartDate() {\n System.out.println(\"setStartDate\");\n Calendar newStart = new GregorianCalendar(2000, 01, 01);\n String startDate = newStart.toString();\n DTO_Ride instance = dtoRide;\n instance.setStartDate(startDate);\n \n String result = instance.getStartDate();\n assertEquals(newStart, newStart);\n }",
"public static void updateCalendar() {\n time = Calendar.getInstance();\n hour = time.get(Calendar.HOUR_OF_DAY);\n minute = time.get(Calendar.MINUTE);\n day = time.get(Calendar.DAY_OF_MONTH);\n month = time.get(Calendar.MONTH) + 1; \n year = time.get(Calendar.YEAR);\n\n }",
"void setDate(int index, Date value, Calendar cal)\n throws SQLException;",
"private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}",
"public native final Calendar id(String val) /*-{\n\t\tthis[\"id\"] = val;\n\t\treturn this;\n\t}-*/;",
"public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }",
"public void setFechaInsercion(String p) { this.fechaInsercion = p; }",
"public void setFechaInsercion(String p) { this.fechaInsercion = p; }",
"public void setEstablecimiento(String establecimiento)\r\n/* 119: */ {\r\n/* 120:198 */ this.establecimiento = establecimiento;\r\n/* 121: */ }",
"private void makeLocalCalendar() {\n\t\t// TODO Auto-generated method stub\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(Calendars.ACCOUNT_NAME, PATIENT_ACCOUNT_NAME);\n\t\tvalues.put(Calendars.ACCOUNT_TYPE, CalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tvalues.put(Calendars.NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_DISPLAY_NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_COLOR, Color.BLACK);\n\t\tvalues.put(Calendars.CALENDAR_ACCESS_LEVEL, Calendars.CAL_ACCESS_OWNER);\n\t\tvalues.put(Calendars.OWNER_ACCOUNT, PATIENT_EMAIL);\n\t\tvalues.put(Calendars.CALENDAR_TIME_ZONE, TimeZone.getAvailableIDs()\n\t\t\t\t.toString());\n\t\tvalues.put(Calendars.SYNC_EVENTS, 1);\n\n\t\tUri.Builder builder = CalendarContract.Calendars.CONTENT_URI\n\t\t\t\t.buildUpon();\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_NAME,\n\t\t\t\t\"com.grokkingandroid\");\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_TYPE,\n\t\t\t\tCalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tbuilder.appendQueryParameter(CalendarContract.CALLER_IS_SYNCADAPTER,\n\t\t\t\t\"true\");\n\n\t\tUri uri = getContentResolver().insert(builder.build(), values);\n\n\t}",
"public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }",
"public void setCalendarId(final String val) {\n if (Util.checkNull(val) != null) {\n calendarId.setA(val);\n }\n }",
"public Calendar setReservationDate(){\n\t\t\n\t\t\n\t\tint currentMonth = Calendar.getInstance().get(Calendar.MONTH)+1; //Month starts from zero in Java\n\t\tint currentYear = Calendar.getInstance().get(Calendar.YEAR);\n\t\tint currentDate = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\tint currentHour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\n\t\tint currentMinute = Calendar.getInstance().get(Calendar.MINUTE);\n\t\t\n\t\t\n\t\tSystem.out.println(\"Current Year \"+ currentYear );\n\t\tSystem.out.println(\"Current Month \"+ currentMonth );\n\t\tSystem.out.println(\"Today's date \"+ currentDate );\n\t\tSystem.out.println(\"Current Hour \"+ currentHour );\n\t\tSystem.out.println(\"Current Minute \"+ currentMinute );\n\t\tSystem.out.println(\"\\t---\\t---\\t---\\t---\\t---\");\n\t\tint inputMonth, inputYear, inputDate, inputHour, inputMinute;\n\t\t\n\t\tCalendar reserveDate = Calendar.getInstance();\n\t\t\n\t\tSystem.out.print(\"Enter the year: \");\n\t\tinputYear = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputYear < currentYear){\n\t\t\tSystem.out.println(\"Old year entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the year: \");\n\t\t\tinputYear = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\t\n\t\treserveDate.set(Calendar.YEAR,inputYear); \n\t\n\t\tSystem.out.print(\"Enter the month: \");\n\t\tinputMonth = scan.nextInt();\t\n\t\tscan.nextLine();\n\t\t\n\t\twhile (inputMonth < 1 || inputMonth > 12){\n\t\t\tSystem.out.println(\"Invalid Month entry!\");\n\t\t\tSystem.out.print(\"Enter the month again: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMonth < currentMonth) && (inputYear == currentYear)){\n\t\t\t\t\t\n\t\t\tSystem.out.println(\"Old month entry is not allowed !\\n\");\n\t\t\tSystem.out.print(\"Enter the month: \");\n\t\t\tinputMonth = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t\t\n\t\t}\n\t\treserveDate.set(Calendar.MONTH,inputMonth-1);//MONTH is from 0 to 11.\n\t\t\n\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\tinputDate = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputDate < 1 || inputDate > 31){\n\t\t\tSystem.out.println(\"Invalid date entry!\");\n\t\t\tSystem.out.print(\"Enter the date again: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputDate < currentDate) && (inputMonth == currentMonth)&&(inputYear==currentYear)){\n\t\t\tSystem.out.println(\"Past Day is not allowed!\\n\");\n\t\t\tSystem.out.print(\"Enter the date for reservation: \");\n\t\t\tinputDate = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\treserveDate.set(Calendar.DAY_OF_MONTH,inputDate);\n\t\t\n\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\tinputHour = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile( inputHour < 0 || inputHour > 23){\n\t\t\tSystem.out.println(\"Invalid hour entry!\");\n\t\t\tSystem.out.print(\"Enter the hour again: \");\n\t\t\tinputHour = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile(inputHour < currentHour && inputDate == currentDate&&inputMonth == currentMonth&&inputYear==currentYear){\n\t\t\t\n\t\t\tif (inputHour < 0 && inputHour > 23){\n\t\t\t\tSystem.out.println(\"Invalid Hour entry\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Past hour is not allowed!\\n\");\n\t\t\t\tSystem.out.print(\"Enter hour (24-hr format): \");\n\t\t\t\tinputHour = scan.nextInt();\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\t\t}\n\t\treserveDate.set(Calendar.HOUR_OF_DAY,inputHour); //This uses 24 hour clock\n\t\t\n\t\tSystem.out.print(\"Enter minute: \");\n\t\tinputMinute = scan.nextInt();\n\t\tscan.nextLine();\n\t\t\n\t\twhile(inputMinute < 0 || inputMinute > 59){\n\t\t\tSystem.out.println(\"Invalid Minute entry\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\twhile((inputMinute-currentMinute) <= 0 && inputHour == currentHour){\n\t\t\t\n\t\t\t//System.out.println(\"Reservation can only be made 30 minutes earlier or invalid input !\");\n\t\t\tSystem.out.print(\"Invalid minute\");\n\t\t\tSystem.out.print(\"Enter minute again: \");\n\t\t\tinputMinute = scan.nextInt();\t\n\t\t\tscan.nextLine();\n\t\t}\n\t\t\n\t\treserveDate.set(Calendar.MINUTE,inputMinute);\n\t\tSystem.out.println(\"Date Reserved!\");\n\t\treturn reserveDate;\n\t}",
"public Calendar getDate(){\n return date;\n }",
"public void setTextFechaInsercionEd(String text) { doSetText(this.$element_FechaInsercionEd, text); }",
"public ICalendar getCalendar() {\n return calendar;\n }",
"void setDate(Date data);",
"public void setCalendar (jkt.hrms.masters.business.MstrCalendar calendar) {\n\t\tthis.calendar = calendar;\n\t}",
"public Calendar getCalendar() {\n return _calendar;\n }",
"public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }",
"public Calendar getCalendar() {\n return cal;\n }",
"public static void getCalendar(Calendar cal, QuoteShort q) {\n\t\tcal.set(q.getYear(), q.getMonth()-1, q.getDay(), q.getHh(), q.getMm(),q.getSs());\r\n\t}",
"public void setCal(Calendar cal) {\n\t\tthis.year = (short) cal.get(Calendar.YEAR);\r\n\t\tthis.month = (byte) (cal.get(Calendar.MONTH)+1);\r\n\t\tthis.day = (byte) cal.get(Calendar.DAY_OF_MONTH);\r\n\t\tthis.hh = (byte) cal.get(Calendar.HOUR_OF_DAY);\r\n\t\tthis.mm = (byte) cal.get(Calendar.MINUTE);\r\n\t\tthis.ss = (byte) cal.get(Calendar.SECOND);\r\n\t}",
"static synchronized BasisGoogleCalendar getCalendar(UpodWorld w)\n{\n if (DATA_STORE_DIR == null) return null;\n if (cal_service == null) {\n try {\n\t cal_service = getCalendarService();\n }\n catch (IOException e) {\n\t BasisLogger.logE(\"GOOGLECAL: Authorization problem with calendar api: \" + e);\n\t DATA_STORE_DIR = null;\n\t HTTP_TRANSPORT = null;\n\t DATA_STORE_FACTORY = null;\n\t return null;\n }\n }\n\n BasisGoogleCalendar rslt = the_calendars.get(w);\n if (rslt == null) {\n rslt = new BasisGoogleCalendar();\n the_calendars.put(w,rslt);\n }\n\n return rslt;\n}",
"public void Add_date(String d)\n {\n\n date = new String(d);\t\n }",
"public void setDate(Calendar date)\n {\n this.date = date;\n }",
"public java.lang.String getObservacion(){\n return localObservacion;\n }",
"public abstract java.lang.String getFecha_termino();",
"public void registaFogo(Calendar data, List<Par<Integer,Integer>> sitios) {\n\t\tthis.dataUltimoFogo = data;\n\t\tpreenchePosicoes(sitios, EstadoAmbiente.ARDIDO);\n\t}",
"@Override\n public Date getDate(Calendar cal) throws SQLException {\n if (isNull()) return null;\n return getDatatypeCoder().decodeDate(getDate(), cal);\n }",
"public interface CalendarService {\n\n CalendarVo getCalendarById(String id);\n\n CalendarListVo getCalendarList();\n\n CalendarListVo getCalendarListByPage(int page, int size);\n\n boolean addCalendar(Date days, String title, String description, String remark, UserInfo userInfo);\n\n boolean modifyCalendar(String id, Date days, String title, String description, String remark, UserInfo userInfo);\n\n boolean delCalendarById(String id, UserInfo userInfo);\n}",
"@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n String myFormat = \"yyyy-MM-dd\"; //In which you need put here\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n ed_date.setText(sdf.format(myCalendar.getTime()));\n sel_date=sdf.format(myCalendar.getTime());\n int dd=myCalendar.get(Calendar.DAY_OF_WEEK);\n switch (dd){\n case 1: sel_day=\"SUNDAY\";\n break;\n case 2: sel_day=\"MONDAY\";\n break;\n case 3: sel_day=\"TUESDAY\";\n break;\n case 4: sel_day=\"WEDNESDAY\";\n break;\n case 5: sel_day=\"THURSDAY\";\n break;\n case 6: sel_day=\"FRIDAY\";\n break;\n case 7: sel_day=\"SATURDAY\";\n break;\n }\n schedule_load();\n SharedPreferences sh=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor ed=sh.edit();\n ed.putString(\"date\",ed_date.getText().toString());\n ed.commit();\n }",
"public String MuestraCualquiera() {//PARA MOSTRAR CUALQUIER TIPO DE CLIENTE\nString Muestra=\"\";\n\nif(getTipoCliente().equals(\"Docente\")) {//SI ES DOCENTE\nMuestra=MuestraDocente();//SE MUESTRAN SOLO LOS DATOS DE DOCENTE\n}else if(getTipoCliente().equalsIgnoreCase(\"Administrativo\")) {//SI ES ADMINISTRATIVO\nMuestra=MuestraAdministrativo();//SE MUESTRAN SOLO LOS DATOS DE ADMINISTRATIVO\n}\n\nreturn Muestra;\n}",
"public void abrirCalendario(View v){\r\n fecha.setText(\"\");\r\n //Obtengo la fecha actual\r\n calendario = Calendar.getInstance();\r\n dia=calendario.get(Calendar.DAY_OF_MONTH);\r\n mes=calendario.get(Calendar.MONTH);\r\n anyo=calendario.get(Calendar.YEAR);\r\n\r\n //Creo el DatePickerDialog con la fecha actual y le indico que el escuchador es la propia clase\r\n datePickerDialog = new DatePickerDialog(this, this,anyo, mes, dia);\r\n //Muestro el DatePickerDialog\r\n datePickerDialog.show();\r\n }",
"public void set(String value){\n switch (field){\n case 0:\n nomComplet = value;\n break;\n case 1:\n rv1 = value;\n break;\n case 2:\n dateDispo = LocalDate.parse(value,formatter);\n break;\n case 3:\n competencePrincipale = value;\n break;\n case 4:\n exp = Double.parseDouble(value);\n break;\n case 5:\n trancheExp = value;\n break;\n case 6:\n ecole = value;\n break;\n case 7:\n classeEcole = value;\n break;\n case 8:\n fonctions = value;\n break;\n case 9:\n dateRV1 = LocalDate.parse(value,formatter);\n case 10:\n rv2 = value;\n break;\n case 11:\n metiers = value;\n break;\n case 12:\n originePiste = value;\n break;\n }\n field++;\n }",
"public abstract void setCod_tecnico(java.lang.String newCod_tecnico);",
"public String obtenerFechaSistema() {\n Calendar fecha = new GregorianCalendar();\r\n//Obtenemos el valor del año, mes, día,\r\n//hora, minuto y segundo del sistema\r\n//usando el método get y el parámetro correspondiente\r\n int anio = fecha.get(Calendar.YEAR);\r\n int mes = fecha.get(Calendar.MONTH)+1;\r\n int dia = fecha.get(Calendar.DAY_OF_MONTH);\r\n// int hora = fecha.get(Calendar.HOUR_OF_DAY);\r\n// int minuto = fecha.get(Calendar.MINUTE);\r\n// int segundo = fecha.get(Calendar.SECOND);\r\n// String ff = \"\" + dia + \"/\" + (mes + 1) + \"/\" + anio;\r\n String ff;\r\n// = System.out.println(\"Fecha Actual: \"\r\n// + dia + \"/\" + (mes + 1) + \"/\" + año);\r\n// System.out.printf(\"Hora Actual: %02d:%02d:%02d %n\",\r\n// hora, minuto, segundo);\r\n// ff = hora + \":\" + minuto + \":\" + segundo + \".0\";\r\n ff = anio + \"-\" + mes + \"-\" + dia;\r\n return ff;\r\n }",
"public void setCalorias(int calorias) {this.calorias = calorias;}",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}",
"private String tilStandardDatostreng(Calendar c)\n {\n return c.get(Calendar.DATE) + \"/\" + (c.get(Calendar.MONTH) + 1) + \"/\" + c.get(Calendar.YEAR);\n }",
"public CalendarBasi()\n {\n dia = new DisplayDosDigitos(31);\n mes = new DisplayDosDigitos(13);\n anio = new DisplayDosDigitos(100);\n }",
"public void setId(Date dataInicialCota) {\n\t\tif(dataInicialCota != null){\n\t\t\tthis.dataInicialCota = new Date(dataInicialCota.getTime());\n\t\t} else{\n\t\t\tthis.dataInicialCota = null;\n\t\t}\n\t}",
"public abstract void setAcma_valor(java.lang.String newAcma_valor);",
"public void setCalendar(VCalendar calendar) {\n this.calendar = calendar;\n }",
"public jkt.hrms.masters.business.MstrCalendar getCalendar () {\n\t\treturn calendar;\n\t}",
"private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}",
"public Dia[] getCalendari() {\n\t\treturn cal;\n\t}",
"public void setEdificio (String pEdificio)\r\n {\r\n this.edificio = pEdificio;\r\n }",
"public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}",
"public Data() {\n\t\tCalendar now = new GregorianCalendar();\n\t\tthis.anno = now.get(Calendar.YEAR);\n\t\tthis.giorno = now.get(Calendar.DAY_OF_MONTH);\n\t\tthis.mese = Data.MESI[now.get(Calendar.MONTH)];\n\t}",
"public void setDate(Calendar date) {\n\tthis.date = date;\n }",
"public abstract void setConfiguracion(ArrayList<String> DateEntrada);",
"public interface IVenda extends Serializable{\n /**\n * Metodo que devolve o codigo de produto da venda\n *\n * @return o codigo do produto \n */\n public IProduto getCodProd();\n \n /**\n * Metodo que devolve preco unitario de cada produto da venda\n *\n * @return o preco\n */\n public double getPreco();\n \n /**\n * Metodo que devolve a quantidade de produtos da venda\n *\n * @return o codigo do produto \n */\n public int getQuantidade();\n \n /**\n * Metodo que devolve o tipo da venda\n *\n * @return o tipo\n */\n public String getTipo();\n \n /**\n * Metodo que devolve o codigo de cliente da venda\n *\n * @return o codigo do cliente\n */\n public ICliente getCodCli();\n \n /**\n * Metodo que devolve o mes da venda\n *\n * @return o mes\n */\n public int getMes();\n \n /**\n * Metodo que devolve a filial da venda\n *\n * @return a filial\n */\n public int getFilial();\n \n /**\n * Metodo que altera o codigo de produto da venda\n *\n * @param codigo o codigo do produto \n */\n public void setCodProd(IProduto codigo);\n \n /**\n * Metodo que altera o preco da venda\n *\n * @param preco o preco\n */\n public void setPreco(Double preco);\n \n /**\n * Metodo que altera a quantidade da venda\n *\n * @param quantos a quantidade da venda\n */\n public void setQuantidade(int quantos);\n \n /**\n * Metodo que altera o tipo da venda\n *\n * @param tipo o tipo\n */\n public void setTipo(String tipo);\n \n /**\n * Metodo que altera o codigo de cliente da venda\n *\n * @param codigo o codigo do cliente \n */\n public void setCodCli(ICliente codigo);\n \n /**\n * Metodo que altera o mes da venda\n *\n * @param mes o mes da venda\n */\n public void setMes(int mes);\n \n /**\n * Metodo que altera a filial da venda\n *\n * @param filial a filial da venda\n */\n public void setFilial(int filial);\n \n /**\n * Metodo que converte uma venda numa string\n * \n * @return a venda convertida\n */\n public String toString();\n \n /**\n * Metodo que verifica se duas vendas sao iguais\n * \n * @param o o objeto\n * @return o resultado da comparacao\n */\n public boolean equals(Object o);\n \n /**\n * Metodo que duplica uma venda\n * \n * @return o clone\n */\n public IVenda clone ();\n \n /**\n * Metodo que calcula o hashcode de uma venda\n * \n * @return o hashcode\n */\n public int hashcode();\n \n /**\n * Metodo que verifica se uma dada venda e valida\n * \n * @param linha que vai ser convertida em IVenda\n * @param catCli clientes\n * @param catProd produtos\n * \n * @return IVenda caso seja valida, null caso contrario\n */\n public IVenda linhaToVenda(String linha, ICatCli catCli, ICatProd catProd);\n \n /**\n * Metodo que converte uma IVenda numa IFatura\n * \n * @param v IVenda a converter\n * \n * @return IFatura caso seja convertida, null caso contrario\n */\n public IFatura vendaToFatura();\n \n /**\n * Metodo que converte uma IVenda numa IFilialAux\n * \n * @param v IVenda a converter\n * \n * @return IFilialAux caso seja convertida, null caso contrario\n */\n public IFilialAux vendaToFilial();\n}",
"private void populaDuracaoTreinoCat()\n {\n DuracaoTreinoCat duracao = new DuracaoTreinoCat(\"Até 15 min\");\n duracaoTreinoCatDAO.insert(duracao);\n DuracaoTreinoCat duracao2 = new DuracaoTreinoCat(\"De 15 a 30 min\");\n duracaoTreinoCatDAO.insert(duracao2);\n DuracaoTreinoCat duracao3 = new DuracaoTreinoCat(\"De 30 a 45 min\");\n duracaoTreinoCatDAO.insert(duracao3);\n DuracaoTreinoCat duracao4 = new DuracaoTreinoCat(\"De 45 a 60 min\");\n duracaoTreinoCatDAO.insert(duracao4);\n DuracaoTreinoCat duracao5 = new DuracaoTreinoCat(\"De 60 a 75 min\");\n duracaoTreinoCatDAO.insert(duracao5);\n DuracaoTreinoCat duracao6 = new DuracaoTreinoCat(\"De 75 a 90 min\");\n duracaoTreinoCatDAO.insert(duracao6);\n DuracaoTreinoCat duracao7 = new DuracaoTreinoCat(\"De 90 a 120 min\");\n duracaoTreinoCatDAO.insert(duracao7);\n DuracaoTreinoCat duracao8 = new DuracaoTreinoCat(\"Mais de 120 min\");\n duracaoTreinoCatDAO.insert(duracao8);\n }",
"public void setFecha(java.util.Calendar fecha)\r\n {\r\n this.fecha = fecha;\r\n }"
] | [
"0.60908645",
"0.6072113",
"0.58870375",
"0.58680063",
"0.58157414",
"0.58119076",
"0.57981735",
"0.57943904",
"0.56669617",
"0.56523323",
"0.5639815",
"0.5639815",
"0.56171155",
"0.5504525",
"0.54933774",
"0.54855424",
"0.54640496",
"0.54475886",
"0.54097205",
"0.5369647",
"0.535431",
"0.5347942",
"0.5345186",
"0.5339912",
"0.53364444",
"0.5335789",
"0.5310576",
"0.5303256",
"0.52880996",
"0.5286293",
"0.5273553",
"0.5272433",
"0.52706355",
"0.52591485",
"0.5257167",
"0.5229871",
"0.5224809",
"0.52240574",
"0.52194816",
"0.52117425",
"0.52075315",
"0.51622087",
"0.51424164",
"0.5139036",
"0.51212114",
"0.51182413",
"0.51151115",
"0.51124",
"0.5108862",
"0.5093915",
"0.5093862",
"0.5093862",
"0.50930196",
"0.5091838",
"0.5084724",
"0.5081843",
"0.5081222",
"0.50670415",
"0.5060424",
"0.50534016",
"0.50516915",
"0.503468",
"0.50231475",
"0.50192285",
"0.50189406",
"0.50176996",
"0.5017037",
"0.4997356",
"0.49970004",
"0.49895716",
"0.49886763",
"0.49879956",
"0.49846527",
"0.49832734",
"0.49809825",
"0.49783143",
"0.49775487",
"0.4970056",
"0.4961873",
"0.49615532",
"0.4961085",
"0.4959802",
"0.49558425",
"0.4954957",
"0.49520698",
"0.49516585",
"0.49411163",
"0.4929876",
"0.49295008",
"0.49061778",
"0.4899467",
"0.4898035",
"0.48943427",
"0.48893028",
"0.4887246",
"0.4884181",
"0.48817188",
"0.48807785",
"0.48760843",
"0.4871454"
] | 0.5981612 | 2 |
Retorna String ja formatada | public String getDataNascimentoString() {
SimpleDateFormat data = new SimpleDateFormat("dd/MM/yyyy");
return data.format(this.dataNascimento.getTime());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract String format();",
"@VTID(8)\r\n java.lang.String format();",
"String getFormat();",
"String getFormat();",
"String getFormat();",
"public String format(String key) {\r\n return getString(key);\r\n }",
"public String format () {\n\t\treturn format;\n\t}",
"public String ToStr(){\n\t\tswitch(getTkn()){\n\t\tcase Kali:\n\t\t\treturn \"*\";\n\t\tcase Bagi:\n\t\t\treturn \"/\";\n\t\tcase Div:\n\t\t\treturn \"div\";\n\t\tcase Tambah:\n\t\t\treturn \"+\";\n\t\tcase Kurang:\n\t\t\treturn \"-\";\n\t\tcase Kurungbuka:\n\t\t\treturn \"(\";\n\t\tcase Kurungtutup:\n\t\t\treturn \")\";\n\t\tcase Mod:\n\t\t\treturn \"mod\";\n\t\tcase And:\n\t\t\treturn \"and\";\n\t\tcase Or:\n\t\t\treturn \"or\";\n\t\tcase Xor:\n\t\t\treturn \"xor\";\n\t\tcase Not:\n\t\t\treturn \"!\";\n\t\tcase Bilangan:\n\t\t\tString s = new String();\n\t\t\tswitch (getTipeBilangan()){\n\t\t\tcase _bool:\n\t\t\t\tif (getBilanganBool())\n\t\t\t\t\treturn \"true\";\n\t\t\t\telse\treturn \"false\";\n\t\t\tcase _int:\n\t\t\t\ts+=(getBilanganInt());\n\t\t\t\tbreak;\n\t\t\tcase _float:\n\t\t\t\ts+=(getBilanganFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}",
"String getValueFormat();",
"String getValueFormatted();",
"void format();",
"String documentFormat();",
"public String toString()\n {\n return toString((Format) null);\n }",
"public final static String getFormatAsString(int dbIdx, int format) {\n\t\tString formatStr = \"\";\n\n\n\t\tif (format > 0) {\n\t\t\tformatStr = getStandardConversion().getFormatAsString(dbIdx,format);\n\t\t} else {\n\t\t\tformatStr = \"\";\n\t\t}\n\n\t\treturn formatStr;\n\t}",
"String getFormattedString(IRenamable f);",
"private String getFormatattedTxt(String inputTxt, int txtLength) {\n\t\tint fulllength = inputTxt.length(); // full length gives the length of IR number\n\t\tint rellength = txtLength + 4; //Inv Number + 'IRX' + '-'\n\t\tint temp = fulllength - rellength;\n\t\tString formattedTxt = \"\";\n\n\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: int temp \" + temp);\n\n\t\tinputTxt = inputTxt.substring(rellength, fulllength);\n\n\n\t\tformattedTxt = \"IRX-\" + inputTxt;\n\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: formattedTxt \" + formattedTxt);\n\t\treturn formattedTxt;\n\n\t\t}",
"R format(O value);",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"String toString();",
"public String getStringRepresentation() {\n StringJoiner joiner = new StringJoiner(STRING_FORMAT_DELIMITER);\n\n joiner.add(this.getCaller())\n .add(this.getCallee())\n .add(SIMPLE_DATE_FORMAT.format(startTime))\n .add(SIMPLE_DATE_FORMAT.format(endTime));\n\n return joiner.toString();\n }",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn toString(Locale.getDefault(Locale.Category.FORMAT));\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 getFormat() {\n/* 206 */ return getValue(\"format\");\n/* */ }",
"public String toString(Format format)\n {\n // The result to return.\n String res = null;\n\n // Check for null value passed in.\n if (format == null) {\n format = getTheirDefaultFormat();\n }\n\n // Check for the special values.\n if (isASAP()) {\n res = \"ASAP\";\n } else if (isNEVER()) {\n res = \"NEVER\";\n } else {\n // Check format against each available format.\n switch (format.ord()) {\n case Format.HEX_BAT_ORD: {\n // Just use the default hex conversion function, and prepend\n // the \"0x\".\n res = \"0x\" + Long.toHexString(itsValue);\n break;\n }\n case Format.FORMATTED_BAT_ORD: {\n // String to hold the zero filled BAT.\n String fBAT;\n\n // Make the filled BAT string.\n fBAT = fillStr(Long.toHexString(itsValue), 16);\n // Disect the filled BAT string and create the formatted\n // string.\n res = fBAT.substring(0, 4) + \" \" + fBAT.substring(4, 8) + \" \" + fBAT.substring(8, 12) + \" \"\n + fBAT.substring(12, 16);\n break;\n }\n case Format.DECIMAL_BAT_ORD: {\n // Just use the default decimal conversion function.\n res = Long.toString(itsValue);\n break;\n }\n case Format.SECS_BAT_ORD: {\n // Convert it to a string as DECIMAL_BAT, then insert the\n // decimal point.\n res = toString(Format.DECIMAL_BAT);\n res = res.substring(0, res.length() - 6) + \".\" + res.substring(res.length() - 6);\n break;\n }\n case Format.UTC_STRING_ORD: {\n // Convert to UTC date/time string\n Date d = this.getAsDate();\n DateFormat outdfm = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n outdfm.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n res = outdfm.format(d);\n break;\n }\n default: {\n assert false;\n break;\n }\n }\n }\n\n return res;\n }",
"public String asString();",
"String getContentFormat();",
"String getCitationString();",
"String getString();",
"String getString();",
"String getString();",
"public String Formatting(){\n\t\t\t return String.format(\"%03d-%02d-%04d\", getFirstSSN(),getSecondSSN(),getThirdSSN());\n\t\t }",
"private String formatStr(String s) {\r\n\t\treturn formatStr(s, null, null);\r\n\t}",
"public static String formatarData(String data) {\r\n\t\tString retorno = \"\";\r\n\r\n\t\tif (data != null && !data.equals(\"\") && data.trim().length() == 8) {\r\n\r\n\t\t\tretorno = data.substring(6, 8) + \"/\" + data.substring(4, 6) + \"/\" + data.substring(0, 4);\r\n\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}",
"public String getStringRecord() {\n NumberFormat nf = new DecimalFormat(\"0000.00\");\n String delimiter = \",\";\n\n return String.format(\"%05d\", orderLineId) + delimiter + String.format(\"%05d\", orderId) + delimiter\n + String.format(\"%05d\", userId) + delimiter + String.format(\"%05d\", productId) + delimiter\n + String.format(\"%05d\", orderLineQuantity) + delimiter + nf.format(salesPrice)\n + System.getProperty(\"line.separator\");\n }",
"public String format(Object value);",
"public String toString ()\r\n\t{\r\n\t\tString format = \r\n\t\t\t\t\"*****************************************************************\" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The name of the contact is \"+ firstName + \" \" + surname + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The ID number of the contact is \" + uniqueID + \". \" + \"\\n\" +\r\n\t\t\t\t\t\t\"\\t\" + \"The phone number of the contact is \" + phoneNumber + \".\" + \"\\n\" +\r\n\t\t\t\t\t\t\"*****************************************************************\" + \"\\n\";\r\n\r\n\t\treturn format;\r\n\t}",
"public String convierteFormatoFecha(String fecha) {\n\t\tString resultado = \"\";\n\t\tresultado = fecha.substring(6,8)+\"/\"+fecha.substring(4,6)+\"/\"+fecha.substring(0, 4);\n\t\treturn resultado;\n\t}",
"String getFormatter();",
"public String getDataString() {\r\n return formatoData.format(data);\r\n }",
"public String toFancyString(){\r\n\t\t\r\n\t\tString line = \"Last name : \" + this.getLastName()\r\n\t\t\t+ \"\\tFirst name : \" + this.getFirstName()\r\n\t\t\t+ \"\\tPhone number : \" + this.getPhoneNumber()\r\n\t\t\t+ \"\\n\\t\\t Address : \" + this.getAddress()\r\n\t\t\t+ \"\\t City : \" + this.getCity() ;\r\n\t\t\r\n\t\treturn line ;\r\n\t}",
"public abstract String format(T t);",
"public String getString() {\n\t\treturn renderResult(this._result).trim();\n\t}",
"public String getPrintableFormat() {\n String output = new String(\"Articoli del gruppo \" + groupName + \":\\n\");\n for (int i = 0; i < list.size(); i++) {\n Article article = list.get(i);\n output += String.format(\"%2d %s\\n\",i,article.getPrintableFormat());\n }\n return output;\n }",
"String getFormat(Object elementID) throws Exception;",
"protected String formatField() {\n \tif(!updated) return \"No record set.\";\n \t\n \tif(firstFieldP.getText() != null && lastFieldP.getText() != null) {\n\t \tfirstNameString = firstFieldP.getText();\n\t \tlastNameString = lastFieldP.getText();\n \t} else\t{\n \tfirstNameString = firstFieldC.getText();\n \tlastNameString = lastFieldC.getText();\n \ttribeString = tribeField.getText();\t\n \t}\n\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"<html><p align=center>\");\n \tsb.append(firstNameString);\n \tsb.append(\" \");\n \tsb.append(lastNameString);\n \tsb.append(\"<br>\");\n \tsb.append(tribeString);\n \tsb.append(\"</p></html>\");\n \t\n \treturn sb.toString(); \t\n }",
"public String toString() {\n\t\t\tStringBuilder sb = new StringBuilder(\"%\");\n\t\t\t// Flags.UPPERCASE is set internally for legal conversions.\n\t\t\tFlags dupFlag = flag.dup().remove(Flags.UPPERCASE);\n\t\t\tsb.append(dupFlag.toString());\n\t\t\tif (index > 0) {\n\t\t\t\tsb.append(index).append('$');\n\t\t\t}\n\t\t\tif (width != -1) {\n\t\t\t\tsb.append(width);\n\t\t\t}\n\t\t\tif (precision != -1) {\n\t\t\t\tsb.append('.').append(precision);\n\t\t\t}\n\t\t\tif (isDateConversion) {\n\t\t\t\tsb.append(flag.contains(Flags.UPPERCASE) ? 'T' : 't');\n\t\t\t}\n\t\t\tsb.append(flag.contains(Flags.UPPERCASE)\n\t\t\t\t\t? Character.toUpperCase(conversionChar) : conversionChar);\n\t\t\treturn sb.toString();\n\t\t}",
"private static String formatFamily (FamilyCard fc) {\n\t\tString res = \"\";\n\n\t\tFamilyHeadGuest fhg = fc.getCapoFamiglia();\n\t\tres += FamilyHeadGuest.CODICE;\n\t\tres += DateUtils.format(fc.getDate());\n\t\tres += String.format(\"%02d\", fc.getPermanenza());\n\t\tres += padRight(fhg.getSurname().trim().toUpperCase(),50);\n\t\tres += padRight(fhg.getName().trim().toUpperCase(),30);\n\t\tres += fhg.getSex().equals(\"M\") ? 1 : 2;\n\t\tres += DateUtils.format(fhg.getBirthDate());\n\n\t\t//Setting luogo et other balles is a bit more 'na rottura\n\t\tres += formatPlaceOfBirth(fhg.getPlaceOfBirth());\n\n\t\tPlace cita = fhg.getCittadinanza(); //banana, box\n\t\tres += cita.getId();\n\n\t\tres += fhg.getDocumento().getDocType().getCode();\n\t\tres += padRight(fhg.getDocumento().getCodice(),20);\n\t\tres += fhg.getDocumento().getLuogoRilascio().getId();\n\t\t//Assert.assertEquals(168,res.length()); //if string lenght is 168 we are ok\n\t\tres += \"\\r\\n\";\n\n\t\tfor (FamilyMemberGuest fmg : fc.getFamiliari()){\n\t\t\tres += formatFamilyMember(fmg, fc.getDate(), fc.getPermanenza());\n\t\t\t//res += \"\\r\\n\";\n\t\t}\n\n\t\treturn res;\n\t}",
"public String getFormattedString(String format, Object... objects) {\n return (String.format(format, objects));\n }",
"public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}",
"public String toString() {\n\t\tString s1,s2,s3,s4;\r\n\t\ts1 = \"{FIR ID: \"+id + \"\\nname= \" + name + \", phone number=\" + phone_no \r\n\t\t\t\t+\"\\nDate: \"+filing_date+\", Address: \" +address\r\n\t\t\t\t+\"\\nFIR Category: \"+category;\r\n\t\t\r\n\t\tif(statement_uploaded) {\r\n\t\t\ts2 = \", Statement Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts2 = \", Statement Not Uploaded\";\r\n\t\t}\r\n\t\tif(id_proof_uploaded) {\r\n\t\t\ts3 = \", ID Proof Uploaded\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\ts3 = \", ID Proof Not Uploaded\";\r\n\t\t}\r\n\t\ts4 = \"\\nStatus : \"+status+\"}\";\r\n\t\treturn s1+s2+s3+s4;\r\n\t}",
"public String toString() {\n\t\treturn GrilleLoader.serialize(this, false); //isGrlFormat=false\n\t}",
"public String getFormat() {\n Object ref = format_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n format_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"Object getFormat();",
"@Override\n public String toString() {\n // Jahr, immer 4-stellig (führenden Nullen)\n String j = String.format(\"%04d\", jahr());\n\n // Monat, immer 2-stellig (führende Null)\n String m = String.format(\"%02d\", monat());\n\n // Tag, immer 2-stellig (führende Null)\n String t = String.format(\"%02d\", tag());\n\n // Trennzeichen (char -> String für String.join())\n String tz = String.valueOf(separator);\n\n // Setzt Datum entsprechend dem festgelegten format zusammen\n String datum = switch (format) {\n case \"jmt\" -> String.join(tz, j, m, t);\n case \"tmj\" -> String.join(tz, t, m, j);\n case \"mtj\" -> String.join(tz, m, t, j);\n default -> \"Usage: jmt/tmj/mtj\";\n };\n return datum;\n }",
"public static String formatearRut(String rut){\r\n int cont = 0;\r\n String format;\r\n rut= rut.replace(\".\", \"\");\r\n rut = rut.replace(\"-\", \"\");\r\n format= \"-\" + rut.substring(rut.length()-1);\r\n for(int i = rut.length()-2; i>=0;i--){\r\n format=rut.substring(i,i+1)+format;\r\n cont++;\r\n if(cont==3 && i!=0){\r\n format= \".\"+format;\r\n cont=0;\r\n }\r\n }\r\n return format;\r\n }",
"@Override\n public String toString() {\n if (isValid()) {\n return String.format(\n Locale.US,\n \"%+02f%+02f%s/\",\n coordinates.get(1), coordinates.get(0), coordinateSystem.toString());\n }\n return \"\";\n }",
"public String getFormat() {\n\t\treturn formatString;\n\t}",
"public String getDateString(){\n return Utilities.dateToString(date);\n }",
"public String toString(int format)\n {\n StringBuilder outString = new StringBuilder();\n\n //outString.ensureCapacity();\n\n outString.ensureCapacity(3*(cardAry.length+2));\n\n for (int i=0; i<cardAry.length; i++)\n {\n if (i%13 == 0 )\n outString.append(\"\\n\");\n\n //System.err.println(\"cardNum is \" + i);\n if( cardAry[i] != null) {\n\n if(i>0 && cardAry[i-1].hashCode() > cardAry[i].hashCode())\n outString.append(\"*\");\n\n outString.append(cardAry[i].toString(format));\n if (format == Card.VERBOSE)\n outString.append(\"\\n\");\n else if (format == Card.SHORT)\n outString.append(\", \");\n }\n\n else \n {\n outString.append(\" nul \");\n }\n }\n\n return new String( outString);\n }",
"String format(T value);",
"protected String formatValue (Object value)\n {\n return String.valueOf(value);\n }",
"private String gettxt(String num) {\n\t\tString str=\"Full Time\";\n\t\tif(num.equals(\"1\"))\n\t\t\tstr = \"Volunteer\";\n\t\telse if(num.equals(\"2\")){\n\t\t\tstr =\"Part Time\";\n\t\t}\n\t\telse if(num.equals(\"4\")){\n\t\t\tstr =\"Internship\";\n\t\t}\n\t\telse if(num.equals(\"5\")){\n\t\t\tstr =\"Freelancer\";\n\t\t}\n\t\t\n\t\treturn str;\n\t}",
"public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}",
"public String toString(){ \n\t\tString s = String.format(\"%s: %d, rating: %f, price:%f\", TITLE, YEAR_RELEASED, user_rating, getPrice());\n\t\treturn s; \n\t}",
"public static String getDadoFormatado(String pDado, TiposDadosQuery pTipo) {\n String dadoFormatado;\n if (pDado != null) {\n switch (pTipo)\n {\n case TEXTO:\n dadoFormatado = \"'\" + verificaAspaSimples(pDado) + \"'\";\n break;\n case DATA:\n dadoFormatado = \"'\" + pDado + \"'\";\n break;\n default:\n dadoFormatado = pDado; \n break;\n }\n }\n else {\n dadoFormatado = \"null\";\n }\n \n return dadoFormatado;\n \n }",
"public String getFormat() {\n Object ref = format_;\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 format_ = s;\n return s;\n }\n }",
"public static String getAppropriateFormat(long timestamp) {\n String str = \"\";\n long now = System.currentTimeMillis();\n str = \"\" + DateUtils.getRelativeTimeSpanString(timestamp, now, 0);\n return str;\n }",
"public final String getFormatString() {\n final Exp formatExp =\n (Exp) getProperty(Property.FORMAT_EXP_PARSED.name, null);\n if (formatExp == null) {\n return \"Standard\";\n }\n final Calc formatCalc = root.getCompiled(formatExp, true, null);\n final Object o = formatCalc.evaluate(this);\n if (o == null) {\n return \"Standard\";\n }\n return o.toString();\n }",
"public StringFormatter getStringFormatter();",
"public String getFormat()\n {\n return format;\n }",
"String formatPhoneNumber(String phoneNumber);",
"public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }",
"public String toString() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // 4\n\t\tString hours = String.format(\"%02d\", this.hours);\n\t\tString minutes = String.format(\"%02d\", this.minutes);\n\t\tString seconds = String.format(\"%05.2f\", this.seconds);\n\n\t\tString time = hours + \":\" + minutes + \":\" + seconds;\n\t\treturn time;\n\t}",
"private String formatGrade(String grade) {\n\t\treturn StringUtils.removeEnd(grade, \".0\");\t\t\n\t}",
"protected String obterData(String format) {\n\t\tDateFormat formato = new SimpleDateFormat(format);\n\t\tDate data = new Date();\n\t\treturn formato.format(data).toString();\n\t}"
] | [
"0.75547606",
"0.73208594",
"0.7006393",
"0.7006393",
"0.7006393",
"0.66975355",
"0.65464246",
"0.6541735",
"0.65192556",
"0.6517303",
"0.6470899",
"0.64596903",
"0.6442487",
"0.6425059",
"0.6409482",
"0.6372122",
"0.63363165",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331379",
"0.6331168",
"0.6326634",
"0.63072854",
"0.6253922",
"0.6237471",
"0.6234734",
"0.623163",
"0.6216622",
"0.61752933",
"0.61752933",
"0.61752933",
"0.6171313",
"0.61599964",
"0.6156436",
"0.6150995",
"0.614889",
"0.614579",
"0.6121757",
"0.61168396",
"0.6111159",
"0.61023563",
"0.6061348",
"0.6036698",
"0.6027674",
"0.6014142",
"0.6010161",
"0.6002464",
"0.59974414",
"0.5988158",
"0.597472",
"0.59742904",
"0.5967985",
"0.5959164",
"0.5940289",
"0.59402716",
"0.5935191",
"0.59199524",
"0.5910514",
"0.59088486",
"0.5904462",
"0.590099",
"0.5900521",
"0.589232",
"0.5873381",
"0.586185",
"0.5860849",
"0.5858358",
"0.5845893",
"0.58327276",
"0.5824495",
"0.5813983",
"0.5810327",
"0.579816",
"0.57960886",
"0.5794296",
"0.5792212"
] | 0.0 | -1 |
Get e set para trabalhar com o banco Trabalhar com a data Vindo ou Indo para o Banco Recebe a data do Sql e insere no formado Calendar | public void setDataNascimentoFromSQL(Date dataNascimento) {
// montando a data atrav�s do Calendar
Calendar data = Calendar.getInstance();
data.setTime(dataNascimento);
this.dataNascimento = data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setDataSituacao(DateTimeDB dataSituacao) {\n this.dataSituacao = dataSituacao;\n }",
"private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }",
"public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }",
"private void salvarVenda(String nomeCliente, double precoFinal, double desconto ,String mesAnoAt,String dataCompra,String formaDePagamento) {\n\n\t\tFirebaseAuth autenticacion = configFireBase.getFireBaseAutenticacao();\n\n\t\tString idUsuario = Base64Custom.codificarBase64(autenticacion.getCurrentUser().getEmail());\n\t\tDatabaseReference VendaRef=mDatabase.child(\"vendas\");\n\n\n\t\tvenda.setIdVenda(VendaRef.push().getKey());\n\t\tvenda.setNomeCliente(nomeCliente);\n\t\tvenda.setValorTotal(precoFinal);\n\t\tvenda.setMesAno(mesAnoAt);\n\t\tvenda.setDesconto(desconto);\n\t\tvenda.setDataCompra(dataCompra);\n\t\tvenda.setLista(ListagemDeProdutosParaCompras.produtosSelecionados);\n\t\tvenda.setFormaDePagamento(formaDePagamento);\n\n\t\tmDatabase.child(\"armazenamento\").child(idUsuario).child(\"vendas\").child(venda.getIdVenda()).setValue(venda).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(@NonNull Task<Void> task) {\n\n\t\t\t}\n\n\t\t});\n\n\t\tToast.makeText(CadastrarVendaActivity.this, \"Venda Realizada\", Toast.LENGTH_SHORT).show();\n\t\tstartActivity(new Intent(getApplicationContext(), ListagemDeVendasRealizadas.class));\n\t\tvenda.subtrairVendas();\n\n\t\tthis.finish();\n\t}",
"private void prepareData() throws InputException {\n String dia_db = getDate(dia.getValue());\n int semana_db = getWeek(dia_db);\n hrs = horas.getText();\n\n if (hrs.length() > 0) {\n horasDB = Integer.parseInt(String.valueOf(horas.getText()));\n } else {\n throw new InputException(\"Hora deve ser um valor entre 0 e 24\");\n }\n\n if( horasDB <= 0 || horasDB > 24 || hrs == null){\n throw new InputException(\"Hora deve ser um valor entre 0 e 24\");\n }\n\n TI ti_db = new TI(dia_db, semana_db, horasDB);\n Atividade atividade_db = null;\n int operation = INVALIDO;\n\n atividadeEscolhida = atividade.getSelectedItem().toString();\n if (atividadeEscolhida.equals(getString(R.string.nova_atividade))) {\n nomeAtividadeDB = nomeAtividade.getText().toString();\n if(nomeAtividadeDB.trim().equals(\"\")){\n throw new InputException(\"Nome da Atividade Inválido!\");\n }\n Categoria categoria_db = null;\n if(categoria.getValue() == TRABALHO) {\n categoria_db = Categoria.TRABALHO;\n } else if (categoria.getValue() == LAZER) {\n categoria_db = Categoria.LAZER;\n }\n\n Prioridade prioridade_db = null;\n int item_prioridade = prioridade.getSelectedItemPosition();\n if(item_prioridade == BAIXA) {\n prioridade_db = Prioridade.BAIXA;\n } else if (item_prioridade == MEDIA) {\n prioridade_db = Prioridade.MEDIA;\n } else if (item_prioridade == ALTA) {\n prioridade_db = Prioridade.ALTA;\n }\n\n operation = INSERIR;\n atividade_db = new Atividade(nomeAtividadeDB, categoria_db, prioridade_db, null);\n } else {\n operation = ATUALIZAR;\n atividade_db = mAtividade;\n }\n\n saveData(operation, atividade_db, ti_db);\n }",
"public void Raport2(){\r\n try {\r\n Long id = idUtilizatorCurent;\r\n System.out.println(id);\r\n Utilizator u = service.findOne(id);\r\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"MM/dd/yyyy\");\r\n model.setAll(\r\n creareLista(u.getId())\r\n );\r\n Utilizator prieten = tableView.getSelectionModel().getSelectedItem();\r\n\r\n if (u == null)\r\n MessageAlert.showErrorMessage(null, \"Nu am gasit userul\");\r\n else if (prieten == null)\r\n MessageAlert.showErrorMessage(null, \"Nu ati selectat niciun prieten\");\r\n else if (DataPickerData.getEditor().getText().equals(\"\") ||\r\n DataPickerDataFinal.getEditor().getText().equals(\"\")) {\r\n MessageAlert.showErrorMessage(null, \"Una dintre date este vida!\");\r\n return;\r\n }\r\n\r\n String data = DataPickerData.getEditor().getText();\r\n List<String> attr = Arrays.asList(data.split(\"/\"));\r\n String data1 = \"\";\r\n if (attr.get(1).length() == 1 || attr.get(0).length() == 1) {\r\n for (String s : attr) {\r\n if (s.equals(attr.get(1)) && attr.get(1).length() == 1) {\r\n data1 = data1 + \"0\" + s + \"/\";\r\n } else if (s.equals(attr.get(0)) && attr.get(0).length() == 1) {\r\n data1 = data1 + \"0\" + s + \"/\";\r\n } else {\r\n data1 = data1 + s + \"/\";\r\n }\r\n }\r\n data1 = data1.substring(0, 10);\r\n } else data1 = data;\r\n\r\n LocalDateTime d = LocalDate.parse(data1, formatter).atStartOfDay();\r\n String datafinal = DataPickerDataFinal.getEditor().getText();\r\n List<String> attr1 = Arrays.asList(datafinal.split(\"/\"));\r\n String data2 = \"\";\r\n if (attr1.get(1).length() == 1 || attr1.get(0).length() == 1) {\r\n for (String s : attr1) {\r\n if (s.equals(attr1.get(1)) && attr1.get(1).length() == 1) {\r\n data2 = data2 + \"0\" + s + \"/\";\r\n } else if (s.equals(attr1.get(0)) && attr1.get(0).length() == 1) {\r\n data2 = data2 + \"0\" + s + \"/\";\r\n } else {\r\n data2 = data2 + s + \"/\";\r\n }\r\n }\r\n data2 = data2.substring(0, 10);\r\n } else data2 = datafinal;\r\n LocalDateTime d2 = LocalDate.parse(data2, formatter).atStartOfDay();\r\n List<String> rez = service.getMesajeDelaPrieten(u, prieten, d, d2);\r\n //for (String s : rez) System.out.println(s);\r\n CreatePdf createPdf = new CreatePdf();\r\n createPdf.creare(rez, \"C:\\\\Users\\\\alini\\\\Desktop\\\\pdfCerinta2.pdf\", \"Raport mesaje primite pentru \" + u.getFirstName()+\" \" + u.getLastName());\r\n MessageAlert.showMessage(null, Alert.AlertType.INFORMATION, \"Generare raport\", \"Raportul a fost generat cu succes!\");\r\n } catch (Exception e) {\r\n // MessageAlert.showErrorMessage(null,\"Selectati un user din tabel\");\r\n }\r\n\r\n }",
"boolean setDadosInsercao(Object dados);",
"public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}",
"private boolean crearResponsable(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoResponsable, String estado, String usuarioInsercion) {\n/* */ try {\n/* 578 */ String s = \"select estado from cal_plan_responsables_meta r where r.codigo_ciclo=\" + codigoCiclo + \" and r.codigo_plan=\" + codigoPlan + \" and r.codigo_meta=\" + codigoMeta + \" and r.codigo_responsable=\" + codigoResponsable;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 585 */ this.dat.parseSql(s);\n/* 586 */ this.rs = this.dat.getResultSet();\n/* 587 */ if (this.rs.next()) {\n/* 588 */ s = \"update cal_plan_responsables_meta set estado='\" + estado + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioInsercion + \"'\" + \" where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and codigo_responsable=\" + codigoResponsable;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 599 */ s = \"insert into cal_plan_responsables_meta (codigo_ciclo,codigo_plan,codigo_meta,codigo_responsable,estado,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + codigoMeta + \",\" + \"\" + codigoResponsable + \",\" + \"'\" + estado + \"',\" + \"\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 617 */ return this.dat.executeUpdate(s);\n/* */ \n/* */ }\n/* 620 */ catch (Exception e) {\n/* 621 */ e.printStackTrace();\n/* 622 */ Utilidades.writeError(\"CalResponsablesMetaFactory:crearRegistro\", e);\n/* */ \n/* 624 */ return false;\n/* */ } \n/* */ }",
"public void novoDebito(Debitos debitos, String conCodigo, Contas contaComSaldo) throws SQLException {\r\n String sqls = \"select * from contas where concodigo = \" + conCodigo + \" \";\r\n\r\n PreparedStatement psc = null;\r\n ResultSet rsc = null;\r\n try {\r\n psc = connection.prepareStatement(sqls);\r\n rsc = psc.executeQuery();\r\n while (rsc.next()) {\r\n contaComSaldo.setConCodigo(rsc.getInt(\"concodigo\"));\r\n contaComSaldo.setConDescricao(rsc.getString(\"condescricao\"));\r\n contaComSaldo.setTipoCodigo(rsc.getInt(\"tipocodigo\"));\r\n contaComSaldo.setConSaldo(rsc.getDouble(\"consaldo\"));\r\n }\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(ContaDAO.class.getName()).log(Level.SEVERE, null, e);\r\n\r\n }\r\n\r\n String sqlUltimoCredito = \"select * from creditos order by crecodigo desc limit 1\";\r\n\r\n PreparedStatement pscUltimoCredito = null;\r\n ResultSet rscUltimoCredito = null;\r\n\r\n Creditos creditos = new Creditos();\r\n\r\n try {\r\n\r\n pscUltimoCredito = connection.prepareStatement(sqlUltimoCredito);\r\n rscUltimoCredito = pscUltimoCredito.executeQuery();\r\n while (rscUltimoCredito.next()) {\r\n\r\n creditos.setCreCodigo(rscUltimoCredito.getInt(\"crecodigo\"));\r\n creditos.setCreData(rscUltimoCredito.getDate(\"credata\"));\r\n creditos.setConCodigo(rscUltimoCredito.getInt(\"concodigo\"));\r\n creditos.setCreValor(rscUltimoCredito.getInt(\"crevalor\"));\r\n creditos.setCreHistorico(rscUltimoCredito.getString(\"crehistorico\"));\r\n creditos.setConSaldo(rscUltimoCredito.getDouble(\"consaldo\"));\r\n }\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(DebitoDAO.class.getName()).log(Level.SEVERE, null, e);\r\n\r\n }\r\n\r\n String sql = \"insert into debitos (debdata,concodigo,debvalor,debhistorico,consaldo,creditoid) values (?,?,?,?,?,?)\";\r\n PreparedStatement ps = null;\r\n try {\r\n ps = connection.prepareStatement(sql);\r\n ps.setDate(1, new java.sql.Date(debitos.getDebData().getTime()));\r\n ps.setInt(2, debitos.getConCodigo());\r\n ps.setDouble(3, debitos.getDebValor() * -1);\r\n ps.setString(4, debitos.getDebHistorico());\r\n ps.setDouble(5, contaComSaldo.getConSaldo());\r\n ps.setInt(6, creditos.getCreCodigo());\r\n\r\n ps.execute();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CreditoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n connection.close();\r\n ps.close();\r\n }\r\n }",
"private boolean crearRecurso(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoRecurso, String estado, String usuarioInsercion) {\n/* */ try {\n/* 513 */ String s = \"select estado from cal_plan_recursos_meta r where r.codigo_ciclo=\" + codigoCiclo + \" and r.codigo_plan=\" + codigoPlan + \" and r.codigo_meta=\" + codigoMeta + \" and r.codigo_recurso=\" + codigoRecurso;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 520 */ this.dat.parseSql(s);\n/* 521 */ this.rs = this.dat.getResultSet();\n/* 522 */ if (this.rs.next()) {\n/* 523 */ s = \"update cal_plan_recursos_meta set \";\n/* 524 */ s = s + \" estado='\" + estado + \"',\";\n/* 525 */ s = s + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\";\n/* 526 */ s = s + \" usuario_modificacion='\" + usuarioInsercion + \"'\";\n/* 527 */ s = s + \" where \";\n/* 528 */ s = s + \" codigo_ciclo=\" + codigoCiclo;\n/* 529 */ s = s + \" and codigo_plan=\" + codigoPlan;\n/* 530 */ s = s + \" and codigo_meta=\" + codigoMeta;\n/* 531 */ s = s + \" and codigo_recurso=\" + codigoRecurso;\n/* */ } else {\n/* */ \n/* 534 */ s = \"insert into cal_plan_recursos_meta (codigo_ciclo,codigo_plan,codigo_meta,codigo_recurso,estado,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + codigoMeta + \",\" + \"\" + codigoRecurso + \",\" + \"'\" + estado + \"',\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 552 */ return this.dat.executeUpdate(s);\n/* */ \n/* */ }\n/* 555 */ catch (Exception e) {\n/* 556 */ e.printStackTrace();\n/* 557 */ Utilidades.writeError(\"CalMetasDAO:crearRegistro\", e);\n/* */ \n/* 559 */ return false;\n/* */ } \n/* */ }",
"public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Banco\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tBanco entity = new Banco();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=BancoDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,BancoDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Tesoreria.Banco.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseBanco(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }",
"@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"private void insertData() {\r\n PodamFactory factory = new PodamFactoryImpl();\r\n for (int i = 0; i < 3; i++) {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n em.persist(entity);\r\n dataUsuario.add(entity);\r\n }\r\n for (int i = 0; i < 3; i++) {\r\n CarritoDeComprasEntity entity = factory.manufacturePojo(CarritoDeComprasEntity.class);\r\n if (i == 0 ){\r\n entity.setUsuario(dataUsuario.get(0));\r\n }\r\n em.persist(entity);\r\n data.add(entity);\r\n }\r\n }",
"public void encerraServico(Servico servico) throws SQLException {\r\n\r\n servico.setStatus(0);\r\n servico.setDtEncerramento(LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\")));\r\n\r\n System.out.println(servico.toString());\r\n update(servico);\r\n String sql = \"UPDATE solicitacoes SET em_chamado=4 WHERE servico_id_servico= \" + servico.getCell(0).getValue();\r\n\r\n stmt = conn.createStatement();\r\n stmt.execute(sql);\r\n stmt.close();\r\n\r\n }",
"public void inserir(Conserto conserto) throws SQLException{\r\n conecta = FabricaConexao.conexaoBanco();\r\n Date dataentradasql = new Date(conserto.getDataEntrada().getTime());\r\n //Date datasaidasql = new Date(conserto.getDataSaida().getTime());\r\n sql = \"insert into conserto (concodigo, condataentrada, condatasaida, concarchassi, conoficodigo) values (?, ?, ?, ?, ?)\";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, conserto.getCodigo());\r\n pstm.setDate(2, (Date) dataentradasql);\r\n pstm.setDate(3, null);\r\n pstm.setString(4, conserto.getCarro().getChassi());\r\n pstm.setInt(5, conserto.getOficina().getCodigo());\r\n pstm.execute();\r\n FabricaConexao.fecharConexao();\r\n \r\n }",
"@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }",
"public void getSavedRecord(MealVoucherConfiguration mealVoucher) {\n\r\n\t\tString query = \" SELECT MEAL_CONFIG_CASH, MEAL_CONFIG_FREQUENCY, MEAL_CONFIG_COUPEN, MEAL_CONFIG_DEBIT \"\r\n\t\t\t\t+ \" ,CASH.CREDIT_NAME,COUPEN.CREDIT_NAME,DEBIT_NAME , \" +\r\n\t\t\t\t\" MEAL_CONFIG_FROM, MEAL_CONFIG_TO, MEAL_CONFIG_AMT_LIMIT, MEAL_CONFIG_AMT_DECLARE, MEAL_FROM_PERIOD, MEAL_TO_PERIOD \"\r\n\t\t\t\t+ \" FROM HRMS_MEAL_VOUCHER_CONFIG \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD CASH ON(CASH.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_CASH) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_CREDIT_HEAD COUPEN ON(COUPEN.CREDIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_COUPEN) \"\r\n\t\t\t\t+ \" INNER JOIN HRMS_DEBIT_HEAD ON(HRMS_DEBIT_HEAD.DEBIT_CODE=HRMS_MEAL_VOUCHER_CONFIG.MEAL_CONFIG_DEBIT) \";\r\n\r\n\t\tObject dataObj[][] = getSqlModel().getSingleResult(query);\r\n\r\n\t\tif (dataObj != null && dataObj.length > 0) {\r\n\t\t\t\r\n\t\t\tmealVoucher.setCreditCode(String.valueOf(dataObj[0][0]));\r\n\t\t\tmealVoucher.setFreqencyOfChange(String.valueOf(dataObj[0][1]));\r\n\t\t\tmealVoucher.setCoupenCode(String.valueOf(dataObj[0][2]));\r\n\t\t\tmealVoucher.setDebitCode(String.valueOf(dataObj[0][3]));\r\n\t\t\tmealVoucher.setCreditHead(String.valueOf(dataObj[0][4]));\r\n\t\t\tmealVoucher.setCoupenHead(String.valueOf(dataObj[0][5]));\r\n\t\t\tmealVoucher.setDebitHead(String.valueOf(dataObj[0][6]));\r\n\t\t\t\r\n\t\t\tmealVoucher.setFromYear(String.valueOf(dataObj[0][7]));\r\n\t\t\tmealVoucher.setToYear(String.valueOf(dataObj[0][8]));\r\n\t\t\tmealVoucher.setMealVoucherAmtLimit(String.valueOf(dataObj[0][9]));\r\n\t\t\tmealVoucher.setMealVoucherAmtDeclare(String.valueOf(dataObj[0][10]));\r\n\t\t\tmealVoucher.setFromPeriod(checkNull(String.valueOf(dataObj[0][11])));\r\n\t\t\tmealVoucher.setToPeriod(checkNull(String.valueOf(dataObj[0][12])));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}",
"public Ventas() {\n setIdVenta(1);\n setIdCliente(1);\n setFecha(new Date());\n setEstado(0); \n }",
"public void introducirConsumosHabitacion(TablaModelo modelo,String idHabitacion) {\n int idHabitacionInt = Integer.parseInt(idHabitacion);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Id_Habitacion=?\");\n declaracion.setInt(1, idHabitacionInt);// mira los consumo de unas fechas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[7];// mira los consumo de unas fechas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);// mira los consumo de unas fechas\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"private void insertData() {\n compra = factory.manufacturePojo(CompraVentaEntity.class);\n compra.setId(1L);\n compra.setQuejasReclamos(new ArrayList<>());\n em.persist(compra);\n\n for (int i = 0; i < 3; i++) {\n QuejasReclamosEntity entity = factory.manufacturePojo(QuejasReclamosEntity.class);\n entity.setCompraVenta(compra);\n em.persist(entity);\n data.add(entity);\n compra.getQuejasReclamos().add(entity);\n }\n }",
"public void recupera() {\n Cliente clienteActual;\n clienteActual=clienteDAO.buscaId(c.getId());\n if (clienteActual!=null) {\n c=clienteActual;\n } else {\n c=new Cliente();\n }\n }",
"@Column(name=\"DataCadastroCota\")\n\t@Temporal(TemporalType.TIMESTAMP)\n\tpublic Date getDataCadastroCota() {\n\t\tDateTimeDB clone = null;\n\t\tif(this.dataCadastroCota != null){\n\t\t\tclone = new DateTimeDB(this.dataCadastroCota.getTime());\n\t\t}\n\t\treturn clone;\n\t}",
"private void saveData() {\n try {\n String query;\n query = \"INSERT INTO limit_hd (kode_limit, grup, produk, masa_limit, jumlah_limit, status, pesan_gagal, tgl_mulai_event, tgl_akhir_event, date_create, date_update) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n Connection conn = (Connection) DatabaseConnection.getConnection(dbName2);\n PreparedStatement pst = conn.prepareStatement(query);\n getMaxKodeLimit();\n maxKodeLimit += 1;\n grupColumn = cmbGrup.getSelectedItem().toString();\n produkColumn = cmbProduk.getSelectedItem().toString();\n masaLimitColumn = cmbTransactionPeriod.getSelectedItem().toString();\n jumlahLimitColumn = Integer.parseInt(txtTransactionLimit.getText());\n errorMessageColumn = txaErrorMessage.getText();\n startDate = dtpStartDateEvent.getText();\n endDate = dtpEndDateEvent.getText();\n isStatusColumn = true;\n\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"dd-MMM-yyyy\");\n\n Date sqlDate1 = (Date) dateFormatter.parse(startDate);\n Date sqlDate2 = (Date) dateFormatter.parse(endDate);\n\n java.sql.Date startEventDate = new java.sql.Date(sqlDate1.getTime());\n java.sql.Date endEventDate = new java.sql.Date(sqlDate2.getTime());\n\n pst.setInt(1, maxKodeLimit);\n pst.setString(2, grupColumn);\n pst.setString(3, produkColumn);\n pst.setString(4, masaLimitColumn);\n pst.setInt(5, jumlahLimitColumn);\n pst.setBoolean(6, isStatusColumn);\n pst.setString(7, errorMessageColumn);\n pst.setDate(8, startEventDate);\n pst.setDate(9, endEventDate);\n pst.setDate(10, java.sql.Date.valueOf(java.time.LocalDate.now()));\n pst.setDate(11, java.sql.Date.valueOf(java.time.LocalDate.now()));\n pst.executeUpdate();\n showLimitHeader();\n defaultSetVariable();\n JOptionPane.showMessageDialog(null, \"Data telah berhasil di simpan\");\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n } catch (Exception ex) {\n Logger.getLogger(LimitAddOn.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n\tpublic void inativar(EntidadeDominio entidade) {\n\t\tPreparedStatement pst=null;\n\t\tLivro livro = (Livro)entidade;\t\t\n\t\ttry {\n\t\t\topenConnection();\n\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\n\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\tpst.setString(1, \"INATIVADO\");\n\t\t\tpst.setInt(2, livro.getId());\n\t\t\tpst.executeUpdate();\t\t\t\n\t\t\tconnection.commit();\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpst.close();\n\t\t\t\tconnection.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\t//SEGUNDA PARTE\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\tsql.append(\"INSERT INTO justificativainativar (id_livro , justificativa, id_Inativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\n\t}",
"private void datos() {\n int row;\n row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n vista.txtNombre.setText(String.valueOf(vista.tblClientes.getValueAt(row, 1)));\n vista.txtApellido.setText(String.valueOf(vista.tblClientes.getValueAt(row, 2)));\n vista.txtDireccion.setText(String.valueOf(vista.tblClientes.getValueAt(row, 3)));\n vista.txtCorreo.setText(String.valueOf(vista.tblClientes.getValueAt(row, 4)));\n vista.txtClave.setText(String.valueOf(vista.tblClientes.getValueAt(row, 5)));\n }",
"private void insertData() \n {\n for (int i = 0; i < 3; i++) {\n TarjetaPrepagoEntity entity = factory.manufacturePojo(TarjetaPrepagoEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n for(int i = 0; i < 3; i++)\n {\n PagoEntity pagos = factory.manufacturePojo(PagoEntity.class);\n em.persist(pagos);\n pagosData.add(pagos);\n\n }\n \n data.get(2).setSaldo(0.0);\n data.get(2).setPuntos(0.0);\n \n double valor = (Math.random()+1) *100;\n data.get(0).setSaldo(valor);\n data.get(0).setPuntos(valor); \n data.get(1).setSaldo(valor);\n data.get(1).setPuntos(valor);\n \n }",
"@Override\n public Venda Buscar(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n\n// transaction.commit();\n return v;\n }",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ServicioEntity entity = factory.manufacturePojo(ServicioEntity.class);\n em.persist(entity);\n dataServicio.add(entity);\n }\n for (int i = 0; i < 3; i++) {\n QuejaEntity entity = factory.manufacturePojo(QuejaEntity.class);\n if (i == 0) {\n entity.setServicio(dataServicio.get(0));\n }\n em.persist(entity);\n data.add(entity);\n }\n }",
"@Override\n\tpublic void ativar(EntidadeDominio entidade) throws SQLException {\n\t\t\t\tPreparedStatement pst=null;\n\t\t\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\t\ttry {\n\t\t\t\t\topenConnection();\n\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\t\t\tsql.append(\"UPDATE livro SET livStatus=?\");\n\t\t\t\t\tsql.append(\"WHERE idlivro=?\");\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\tpst.setString(1, \"ATIVADO\");\n\t\t\t\t\tpst.setInt(2, livro.getId());\n\t\t\t\t\tpst.executeUpdate();\t\t\t\n\t\t\t\t\tconnection.commit();\t\n\t\t\t\t\t\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t}finally{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SEGUNDA PARTE\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\topenConnection();\n\t\t\t\t\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\t\t//FALTA COLOCAR EDITORA\t\t\n\t\t\t\t\t\t\tStringBuilder sql = new StringBuilder();\n\t\t\t\t\t\t\tSystem.out.println(livro.getId());\n\t\t\t\t\t\t\tSystem.out.println(livro.getJustificativa());\n\t\t\t\t\t\t\tSystem.out.println(livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tsql.append(\"INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)\");\t\t\n\t\t\t\t\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\t\t\t\t\tpst.setInt(1, livro.getId());\n\t\t\t\t\t\t\tpst.setString(2,livro.getJustificativa());\n\t\t\t\t\t\t\tpst.setInt(3,livro.getIdCatJustificativa());\n\t\t\t\t\t\t\tpst.executeUpdate();\n\t\t\t\t\t\t\tconnection.commit();\t\t\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconnection.rollback();\n\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\te.printStackTrace();\t\t\t\n\t\t\t\t\t\t}finally{\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tpst.close();\n\t\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t}",
"void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }",
"public CalMetasDTO leerRegistro() {\n/* */ try {\n/* 56 */ CalMetasDTO reg = new CalMetasDTO();\n/* 57 */ reg.setCodigoCiclo(this.rs.getInt(\"codigo_ciclo\"));\n/* 58 */ reg.setCodigoPlan(this.rs.getInt(\"codigo_plan\"));\n/* 59 */ reg.setCodigoMeta(this.rs.getInt(\"codigo_meta\"));\n/* 60 */ reg.setCodigoObjetivo(this.rs.getInt(\"codigo_objetivo\"));\n/* 61 */ reg.setDescripcion(this.rs.getString(\"descripcion\"));\n/* 62 */ reg.setJustificacion(this.rs.getString(\"justificacion\"));\n/* 63 */ reg.setValorMeta(this.rs.getDouble(\"valor_meta\"));\n/* 64 */ reg.setTipoMedicion(this.rs.getString(\"tipo_medicion\"));\n/* 65 */ reg.setFuenteDato(this.rs.getString(\"fuente_dato\"));\n/* 66 */ reg.setAplicaEn(this.rs.getString(\"aplica_en\"));\n/* 67 */ reg.setUnidadMedida(this.rs.getString(\"unidad_medida\"));\n/* 68 */ reg.setValorMinimo(this.rs.getDouble(\"valor_minimo\"));\n/* 69 */ reg.setValorMaximo(this.rs.getDouble(\"valor_maximo\"));\n/* 70 */ reg.setMes01(this.rs.getString(\"mes01\"));\n/* 71 */ reg.setMes02(this.rs.getString(\"mes02\"));\n/* 72 */ reg.setMes03(this.rs.getString(\"mes03\"));\n/* 73 */ reg.setMes04(this.rs.getString(\"mes04\"));\n/* 74 */ reg.setMes05(this.rs.getString(\"mes05\"));\n/* 75 */ reg.setMes06(this.rs.getString(\"mes06\"));\n/* 76 */ reg.setMes07(this.rs.getString(\"mes07\"));\n/* 77 */ reg.setMes08(this.rs.getString(\"mes08\"));\n/* 78 */ reg.setMes09(this.rs.getString(\"mes09\"));\n/* 79 */ reg.setMes10(this.rs.getString(\"mes10\"));\n/* 80 */ reg.setMes11(this.rs.getString(\"mes11\"));\n/* 81 */ reg.setMes12(this.rs.getString(\"mes12\"));\n/* 82 */ reg.setEstado(this.rs.getString(\"estado\"));\n/* 83 */ reg.setTipoGrafica(this.rs.getString(\"tipo_grafica\"));\n/* 84 */ reg.setFechaInsercion(this.rs.getString(\"fecha_insercion\"));\n/* 85 */ reg.setUsuarioInsercion(this.rs.getString(\"usuario_insercion\"));\n/* 86 */ reg.setFechaModificacion(this.rs.getString(\"fecha_modificacion\"));\n/* 87 */ reg.setUsuarioModificacion(this.rs.getString(\"usuario_modificacion\"));\n/* 88 */ reg.setNombreTipoMedicion(this.rs.getString(\"nombreTipoMedicion\"));\n/* 89 */ reg.setNombreEstado(this.rs.getString(\"nombreEstado\"));\n/* 90 */ reg.setNombreUnidadMedida(this.rs.getString(\"nombre_unidad_medida\"));\n/* */ \n/* */ try {\n/* 93 */ reg.setNumeroAcciones(this.rs.getInt(\"acciones\"));\n/* */ }\n/* 95 */ catch (Exception e) {}\n/* */ \n/* */ \n/* */ \n/* 99 */ return reg;\n/* */ }\n/* 101 */ catch (Exception e) {\n/* 102 */ e.printStackTrace();\n/* 103 */ Utilidades.writeError(\"CalPlanMetasFactory:leerRegistro \", e);\n/* */ \n/* 105 */ return null;\n/* */ } \n/* */ }",
"public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}",
"public DatoGeneralMinimo getEntityDatoGeneralMinimoGenerico(Connexion connexion,QueryWhereSelectParameters queryWhereSelectParameters,ArrayList<Classe> classes) throws SQLException,Exception { //Empresa\r\n\t\tDatoGeneralMinimo datoGeneralMinimo= new DatoGeneralMinimo();\r\n\t\t\r\n\t\tEmpresa entity = new Empresa();\r\n\t\t\t\t\r\n try {\t\t\t\r\n\t\t\tString sQuery=\"\";\r\n \t String sQuerySelect=\"\";\r\n\t\t\t\r\n\t\t\tStatement statement = connexion.getConnection().createStatement();\t\t\t\r\n\t\t\t\r\n\t\t\tif(!queryWhereSelectParameters.getSelectQuery().equals(\"\")) {\r\n\t\t\t\tsQuerySelect=queryWhereSelectParameters.getSelectQuery();\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tif(!this.isForForeingKeyData) {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVE;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsQuerySelect=EmpresaDataAccess.QUERYSELECTNATIVEFORFOREINGKEY;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n \t sQuery=DataAccessHelper.buildSqlGeneralGetEntitiesJDBC(entity,EmpresaDataAccess.TABLENAME+\".\",queryWhereSelectParameters,sQuerySelect);\r\n\t\t\t\r\n\t\t\tif(Constantes2.ISDEVELOPING_SQL) {\r\n \tFunciones2.mostrarMensajeDeveloping(sQuery);\r\n }\r\n\t\t\t\r\n \t \tResultSet resultSet = statement.executeQuery(sQuery);//Seguridad.Empresa.isActive=1\r\n \t \r\n\t\t\t//ResultSetMetaData metadata = resultSet.getMetaData();\r\n \t \t\r\n \t \t//int iTotalCountColumn = metadata.getColumnCount();\r\n\t\t\t\t\r\n\t\t\t//if(queryWhereSelectParameters.getIsGetGeneralObjects()) {\r\n\t\t\t\tif(resultSet.next()) {\t\t\t\t\r\n\t\t\t\t\tfor(Classe classe:classes) {\r\n\t\t\t\t\t\tDataAccessHelperBase.setFieldDynamic(datoGeneralMinimo,classe,resultSet);\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\tint iIndexColumn = 1;\r\n\t\t\t\t \r\n\t\t\t\t\twhile(iIndexColumn <= iTotalCountColumn) {\r\n\t\t\t\t\t\t//arrayListObject.add(resultSet.getObject(iIndexColumn++));\r\n\t\t\t\t }\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t*/\r\n\t\t\t\t} else {\r\n\t\t\t\t\tentity =null;\r\n\t\t\t\t}\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tif(entity!=null) {\r\n\t\t\t\t//this.setIsNewIsChangedFalseEmpresa(entity);\r\n\t\t\t}\r\n\t\t\t\r\n \t statement.close(); \r\n\t\t\r\n\t\t} \r\n\t\tcatch(Exception e) {\r\n\t\t\tthrow e;\r\n \t}\r\n\t\t\r\n \t//return entity;\t\r\n\t\t\r\n\t\treturn datoGeneralMinimo;\r\n }",
"public void getSetVersionRowDatoGeneralEmpleadoWithConnection()throws Exception {\n\t\tif(datogeneralempleado.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((datogeneralempleado.getIsDeleted() || (datogeneralempleado.getIsChanged()&&!datogeneralempleado.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=datogeneralempleadoDataAccess.getSetVersionRowDatoGeneralEmpleado(connexion,datogeneralempleado.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!datogeneralempleado.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tdatogeneralempleado.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tdatogeneralempleado.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }",
"public void datosIniciales() {\n try {\n nombre.setCellValueFactory(new PropertyValueFactory<>(\"nombre\"));\n subTipo.setCellValueFactory(new PropertyValueFactory<>(\"subTipo\"));\n tipo.setCellValueFactory(new PropertyValueFactory<>(\"tipo\"));\n editar.setCellValueFactory(new PropertyValueFactory<>(\"imagenEditar\"));\n listaSubTipoDAO = subTipoDAO.hacerConsulta();\n listaSubTipo = FXCollections.observableArrayList(listaSubTipoDAO);\n valoresSubtipo = new ListSpinnerValueFactory(listaSubTipo);\n spinnerSubtipo.setValueFactory(valoresSubtipo);\n\n puntuacion = new SpinnerValueFactory.IntegerSpinnerValueFactory(1, 5, 1, 1);\n\n editar.getStyleClass().add(\"cursorMano\");\n refrescarDatos();\n\n } catch (SQLException ex) {\n alarmaFalloSQL();\n }\n }",
"public Asistencia(Investigador inv ) throws SQLException{\r\n this.inv = inv;\r\n Calendar now = Calendar.getInstance(); //trae el calendario\r\n horaEntrada = new Timestamp(now.getTime().getTime());\r\n horaSalida = null;\r\n this.ps = null;\r\n doEntrada(); //setea la id\r\n\r\n }",
"@Override\r\n public boolean ActualizarDatosCliente() {\r\n try {\r\n puente.executeUpdate(\"UPDATE `cliente` SET `Nombre` = '\"+Nombre+\"', `Apellido` = '\"+Apellido+\"', `Telefono` = '\"+Telefono+\"', `Fecha_Nacimiento` = '\"+Fecha_Nacimiento+\"', `Email` = '\"+Email+\"', `Direccion` = '\"+Direccion+\"', `Ciudad` = '\"+Ciudad+\"' WHERE `cliente`.`Cedula` = '\"+Cedula+\"';\");\r\n listo = true;\r\n } catch (Exception e) {\r\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n return listo;\r\n }",
"private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }",
"public void introducirPagosALojamientoHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];// pago de alojamiento en rango fchas\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);\n objeto[3] = resultado.getDate(4);// pago de alojamiento en rango fchas\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();// pago de alojamiento en rango fchas\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void insereCliente(Cliente cliente){\n cliente.setClieCadDt(new Date());\r\n \r\n //nova conexão\r\n Connection connection = new ConnectionFactory().getConnection();\r\n \r\n //consulta\r\n String query = \"INSERT INTO cliente\"\r\n + \"(clie_debito,\"\r\n + \"clie_debito_ant,\"\r\n + \"clie_cpf,\"\r\n + \"clie_rg,\"\r\n + \"clie_cnh,\"\r\n + \"clie_nasc_dt,\"\r\n + \"clie_cad_dt,\"\r\n + \"clie_nm,\"\r\n + \"clie_end_ds,\"\r\n + \"clie_cid_ds,\"\r\n + \"clie_uf,\"\r\n + \"clie_telefone_ds,\"\r\n + \"clie_telefone_ddd,\"\r\n + \"clie_telefone_ddi)\"\r\n \r\n + \"VALUES(\"\r\n + \"?,\" //clie_debito\r\n + \"?,\" //clie_debito_ant\r\n + \"?,\" //clie_cpf\r\n + \"?,\" //clie_rg\r\n + \"?,\" //clie_cnh\r\n + \"?,\" //clie_nasc_dt\r\n + \"?,\" //clie_cad_dt\r\n + \"?,\" //clie_nm\r\n + \"?,\" //clie_end_ds\r\n + \"?,\" //clie_cid_ds\r\n + \"?,\" //clie_uf\r\n + \"?,\" //clie_telefone_ds\r\n + \"?,\" //clie_telefone_ddd\r\n + \"?)\";//clie_telefone_ddi\r\n \r\n try{\r\n PreparedStatement stmt = connection.prepareStatement(query);\r\n //débito atual do cliente\r\n stmt.setFloat(1, cliente.getClieDebito());\r\n //débito anterior do cliente\r\n stmt.setFloat(2, cliente.getClieDebitoAnt());\r\n //CPF\r\n stmt.setString(3, cliente.getClieCPF());\r\n //RG\r\n stmt.setString(4, cliente.getClieRG());\r\n //CNH\r\n stmt.setString(5, cliente.getClieCNH());\r\n \r\n //Data de nascimento\r\n stmt.setString(6, this.converteDataSimples(cliente.getClieNascDt()));\r\n //Data de cadastro no sistema\r\n stmt.setString(7, this.converteDataSimples(cliente.getClieCadDt()));\r\n \r\n //Nome do cliente\r\n stmt.setString(8, cliente.getClieNm());\r\n \r\n //Endereço do cliente(logradouro e número)\r\n stmt.setString(9, cliente.getClieEndDs());\r\n //Cidade do cliente\r\n stmt.setString(10, cliente.getClieCidDs());\r\n //UF do cliente\r\n stmt.setString(11, cliente.getClieUf());\r\n //Telefone do cliente\r\n stmt.setString(12, cliente.getClieTelefoneDs());\r\n //DDD do telefone\r\n stmt.setString(13, cliente.getClieTelefoneDDD());\r\n //DDI\r\n stmt.setString(14, cliente.getClieTelefoneDDI());\r\n \r\n stmt.execute(); //executa transação\r\n stmt.close(); //fecha conexção com o banco de dados\r\n \r\n }catch(SQLException u){\r\n throw new RuntimeException(u);\r\n }\r\n }",
"public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }",
"public DataTable getDtCuentaContable()\r\n/* 309: */ {\r\n/* 310:375 */ return this.dtCuentaContable;\r\n/* 311: */ }",
"private void llenarEntidadConLosDatosDeLosControles() {\n clienteActual.setNombre(txtNombre.getText());\n clienteActual.setApellido(txtApellido.getText());\n clienteActual.setDui(txtDui.getText());\n //clienteActual.setNumero(txtNumero.getText());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n }",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }",
"int getIdRondaCancion(Cancion cancion,Date fecha) throws ExceptionDao;",
"private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }",
"public Cliente buscarCliente(int codigo) {\n Cliente cliente =new Cliente();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, \"\n + \"idioma, categoria FROM clientes where codigo=? \";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n ps.setInt(1, codigo);\n\t\tSavepoint sp1 = con.setSavepoint(\"SAVE_POINT_ONE\");\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n cliente.setCodigo(rs.getInt(\"codigo\"));\n cliente.setNit(rs.getString(\"nit\"));\n cliente.setEmail(rs.getString(\"email\"));\n cliente.setPais(rs.getString(\"pais\"));\n cliente.setFechaRegistro(rs.getDate(\"fecharegistro\"));\n cliente.setRazonSocial(rs.getString(\"razonsocial\"));\n cliente.setIdioma(rs.getString(\"idioma\"));\n cliente.setCategoria(rs.getString(\"categoria\")); \n\t\t} \n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n return cliente;\n\t}",
"@Override\n\tpublic int insertarEntrada(AlmacenDTO obj) {\n\t\tint rs=-1;\n\t\tConnection con=null;\n\t\tPreparedStatement pst=null;\n\t\ttry {\n\t\t\tcon=new MySqlDbConexion().getConexion();\n\t\t\tString sql=\"insert into MATERIAL_ENTRADA values (null,?,?,?)\";\n\t\t\tpst=con.prepareStatement(sql);\n\t\t\t\n\t\t\tpst.setInt(1,obj.getCodigo_producto());\n\t\t\tpst.setInt(2,obj.getCantidad_entrada());\n\t\t\tpst.setDate(3,obj.getFecha_entrada());\n\t\t\t\n\t\t\trs=pst.executeUpdate();\n\t\t \n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error en la Sentencia\"+e.getMessage());\n\t\t\t\n\t\t}\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif(pst!=null) pst.close();\n\t\t\t\tif(con!=null) con.close();\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\tSystem.out.println(\"Error al cerrar\");\n\t\t\t}\n\t\t}\n\t\treturn rs;\n\t}",
"public void getSetVersionRowValorPorUnidadWithConnection()throws Exception {\n\t\tif(valorporunidad.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((valorporunidad.getIsDeleted() || (valorporunidad.getIsChanged()&&!valorporunidad.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=valorporunidadDataAccess.getSetVersionRowValorPorUnidad(connexion,valorporunidad.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!valorporunidad.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tvalorporunidad.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tvalorporunidad.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void buscaxcodigo() {\r\n try {\r\n modelo.setCodigobarras(vista.jTbcodigobarras.getText());//C.P.M mandamos el codigo de barras ingresado\r\n rs = modelo.Buscarxcodigobarras();//C.P.M mandamos a consultar ese codigo de barras\r\n DefaultTableModel buscar = new DefaultTableModel() {//C.P.M instanciamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.jTbuscar.setModel(buscar);//C.P.M le mandamos el modelo a la tabla\r\n modelo.estructuraProductos(buscar);//C.P.M obtenemos la estructura de la tabla \"Encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos las columnas de la consulta\r\n\r\n while (rs.next()) {//C.P.M recorremos el resultado\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un vector con el tamano de las columnas de el resultado\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M recorremos el arreglo\r\n fila[i] = rs.getObject(i + 1);//C.P.M y vamos insertando el resultado\r\n }\r\n buscar.addRow(fila);//C.P.M le mandamos el arreglo como renglon nuevo\r\n }\r\n\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al buscar por codigo de barras\");\r\n }\r\n }",
"public void addDicas(){\n\t\tMetaDica metaDicaOac = new MetaDica(oac, \"user1\", \"Não falte as aulas, toda aula tem ponto extra!\");\n\t\tmetaDicaOac.setConcordancias(5);\n\t\tdao.persist(metaDicaOac);\n\n\t\tdicaExerciciosOac = new DicaConselho(\"Os exercicios extras valem muitos pontos, nao deixe de fazer\");\n\t\tdicaExerciciosOac.setTema(temaOacExercicios);\n\t\ttemaOacExercicios.setDisciplina(oac);\n\t\tdicaExerciciosOac.setUser(\"user5\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaExerciciosOac.addUsuarioQueVotou(\"user2\");\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 20;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\n\t\t//adiciona pontos a dica\n\t\tfor (int i = 0; i < 5;i++){\n\t\t\tdicaExerciciosOac.incrementaConcordancias();\n\t\t}\n\t\tfor (int i = 0; i < 25;i++){\n\t\t\tdicaExerciciosOac.incrementaDiscordancias();\n\t\t}\n\t\tdao.persist(dicaExerciciosOac);\n\n\t\tdicaRevisaoIcOac = new DicaAssunto(\"Antes das aulas faça uma boa revisao de IC\");\n\t\ttemaOacRevisaoIC.setDisciplina(oac);\n\t\tdicaRevisaoIcOac.setTema(temaOacRevisaoIC);\n\t\tdicaRevisaoIcOac.setUser(\"user4\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user5\");\n\t\tdicaRevisaoIcOac.addUsuarioQueVotou(\"user1\");\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\t\tdicaRevisaoIcOac.incrementaConcordancias();\n\n\t\t//cria meta dica em si\n\t\tMetaDica metaDicaSi1 = new MetaDica(si1, \"user2\", \"Seja autodidata! Procure por cursos online\");\n\t\tdao.persist(metaDicaSi1);\n\n\t\tdicaLabSi = new DicaConselho(\"Faça todo os labs, não deixe acumular\");\n\t\ttemaMinitestesSi.setDisciplina(si1);\n\t\tdicaLabSi.setTema(temaMinitestesSi);\n\t\tdicaLabSi.setUser(\"user1\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user2\");\n\t\tdicaLabSi.addUsuarioQueVotou(\"user3\");\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdicaLabSi.incrementaConcordancias();\n\t\tdao.persist(dicaLabSi);\n\n\t\tdicaPlaySi = new DicaConselho(\"Comece a configurar o Play no primeiro dia de aula, pois dá muuuito trabalho\");\n\t\ttemaPlaySi.setDisciplina(si1);\n\t\tdicaPlaySi.setTema(temaPlaySi);\n\t\tdicaPlaySi.setUser(\"user2\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user5\");\n\t\tdicaPlaySi.addUsuarioQueVotou(\"user4\");\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdicaPlaySi.incrementaConcordancias();\n\t\tdao.persist(dicaPlaySi);\n\n\t\tdicaMaterialSi = new DicaMaterial(\"http://www.wthreex.com/rup/process/workflow/ana_desi/co_swarch.htm\");\n\t\ttemaMaterialSi.setDisciplina(si1);\n\t\tdicaMaterialSi.setTema(temaMaterialSi);\n\t\tdicaMaterialSi.setUser(\"user2\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user5\");\n\t\tdicaMaterialSi.addUsuarioQueVotou(\"user4\");\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdicaMaterialSi.incrementaConcordancias();\n\t\tdao.persist(dicaMaterialSi);\n\n\n\t\t//cria meta dica logica\n\t\tMetaDica metaDicaLogica = new MetaDica(logica, \"user3\", \"Copie para o seu caderno tudo que o professor copiar no quadro, TUDO!\");\n\t\tdao.persist(metaDicaLogica);\n\n\t\tdicaListasLogica = new DicaConselho(\"Faça todas as listas possíveis\");\n\t\ttemaListasLogica.setDisciplina(logica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setTema(temaListasLogica);\n\t\tdicaListasLogica.setUser(\"user6\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user3\");\n\t\tdicaListasLogica.addUsuarioQueVotou(\"user5\");\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdicaListasLogica.incrementaConcordancias();\n\t\tdao.persist(dicaListasLogica);\n\n\t\tdicaProjetoLogica = new DicaAssunto(\"Peça ajuda ao monitor responsável por seu grupo, começe o projeto assim que for lançado!\");\n\t\ttemaProjetoLogica.setDisciplina(logica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setTema(temaProjetoLogica);\n\t\tdicaProjetoLogica.setUser(\"user4\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user1\");\n\t\tdicaProjetoLogica.addUsuarioQueVotou(\"user2\");\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdicaProjetoLogica.incrementaConcordancias();\n\t\tdao.persist(dicaProjetoLogica);\n\n\t\tdao.flush();\n\n\t}",
"@Override\r\n public ViviendaEntity toEntity() {\r\n ViviendaEntity viviendaEntity = super.toEntity();\r\n if (contratos != null) {\r\n List<ContratoEntity> contratosEntity = new ArrayList<>();\r\n for (ContratoDTO dtoContrato : contratos) {\r\n contratosEntity.add(dtoContrato.toEntity());\r\n }\r\n viviendaEntity.setContratos(contratosEntity);\r\n }\r\n\r\n if (cuartos != null) {\r\n List<CuartoEntity> cuartoEntities = new ArrayList<>();\r\n for (CuartoDTO dto : cuartos) {\r\n cuartoEntities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCuartos(cuartoEntities);\r\n }\r\n\r\n if (sitiosDeInteres != null) {\r\n List<SitioInteresEntity> entities = new ArrayList<>();\r\n for (SitioInteresDTO dto : sitiosDeInteres) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setSitiosDeInteres(entities);\r\n }\r\n\r\n if (calificaciones != null) {\r\n List<CalificacionEntity> entities = new ArrayList<>();\r\n for (CalificacionDTO dto : calificaciones) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCalificaciones(entities);\r\n }\r\n\r\n if (serviciosOfrecidos != null) {\r\n viviendaEntity.setServiciosIncluidos(serviciosOfrecidos);\r\n }\r\n\r\n if (serviciosAdicionales != null) {\r\n List<ServicioAdicionalEntity> entities = new ArrayList<>();\r\n for (ServicioAdicionalDTO dto : serviciosAdicionales) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setServiciosAdicionales(entities);\r\n }\r\n\r\n return viviendaEntity;\r\n }",
"public int save() {\n\t\tint result = 0;\n\n\t\ttry {\n\t\t\tmanager = Connection.connectToMysql();\n\n\t\t\tif (this.id > 0) {\n\t\t\t\t// UPDATE\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"UPDATE Cancion SET nombre = ?, duracion = ?, id_disco = ? WHERE id = ?\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.setParameter(4, this.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t} else {\n\t\t\t\t// INSERT\n\t\t\t\tmanager.getTransaction().begin();\n\t\t\t\tresult=manager.createNativeQuery(\"INSERT INTO Cancion (nombre,duracion,id_disco) VALUES (?,?,?)\")\n\t\t\t\t\t\t.setParameter(1, this.nombre)\n\t\t\t\t\t\t.setParameter(2, this.duracion)\n\t\t\t\t\t\t.setParameter(3, this.disco_contenedor.id)\n\t\t\t\t\t\t.executeUpdate();\n\t\t\t\tmanager.getTransaction().commit();\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\n\t\treturn result;\n\t}",
"private void populaDiasTreinoCat()\n {\n DiasTreinoCat dias1 = new DiasTreinoCat(\"1 vez por semana\", 1);\n diasTreinoCatDAO.insert(dias1);\n DiasTreinoCat dias2 = new DiasTreinoCat(\"2 vez por semana\", 2);\n diasTreinoCatDAO.insert(dias2);\n DiasTreinoCat dias3 = new DiasTreinoCat(\"3 vez por semana\", 3);\n diasTreinoCatDAO.insert(dias3);\n DiasTreinoCat dias4 = new DiasTreinoCat(\"4 vez por semana\", 4);\n diasTreinoCatDAO.insert(dias4);\n DiasTreinoCat dias5 = new DiasTreinoCat(\"5 vez por semana\", 5);\n diasTreinoCatDAO.insert(dias5);\n DiasTreinoCat dias6 = new DiasTreinoCat(\"6 vez por semana\", 6);\n diasTreinoCatDAO.insert(dias6);\n DiasTreinoCat dias7 = new DiasTreinoCat(\"7 vez por semana\", 7);\n diasTreinoCatDAO.insert(dias7);\n\n }",
"public static Estudiante buscarEstudiante(String Nro_de_ID) {\r\n //meter este método a la base de datos\r\n Estudiante est = new Estudiante();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante where Nro_de_ID ='\" + Nro_de_ID + \"'\");\r\n\r\n while (necesario.next()) {\r\n\r\n String ced = necesario.getString(\"Nro_de_ID\");\r\n String nomb = necesario.getString(\"Nombres\");\r\n String ape = necesario.getString(\"Apellidos\");\r\n String lab = necesario.getString(\"Laboratorio\");\r\n String carr = necesario.getString(\"Carrera\");\r\n String mod = necesario.getString(\"Modulo\");\r\n String mta = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String HI = necesario.getString(\"Hora_Ingreso\");\r\n String HS = necesario.getString(\"Hora_Salida\");\r\n\r\n est.setNro_de_ID(ced);\r\n est.setNombres(nomb);\r\n est.setApellidos(ape);\r\n est.setLaboratorio(lab);\r\n est.setCarrera(carr);\r\n est.setModulo(mod);\r\n est.setMateria(mta);\r\n est.setFecha(fecha);\r\n est.setHora_Ingreso(HI);\r\n est.setHora_Salida(HS);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n return est;\r\n }",
"Tablero consultarTablero();",
"public void setar_campos()\n {\n int setar = tblCliNome.getSelectedRow();\n txtCliId.setText(tblCliNome.getModel().getValueAt(setar, 0).toString());\n txtCliNome.setText(tblCliNome.getModel().getValueAt(setar, 1).toString());\n txtCliRua.setText(tblCliNome.getModel().getValueAt(setar, 2).toString());\n txtCliNumero.setText(tblCliNome.getModel().getValueAt(setar, 3).toString());\n txtCliComplemento.setText(tblCliNome.getModel().getValueAt(setar, 4).toString());\n txtCliBairro.setText(tblCliNome.getModel().getValueAt(setar, 5).toString());\n txtCliCidade.setText(tblCliNome.getModel().getValueAt(setar, 6).toString());\n txtCliUf.setText(tblCliNome.getModel().getValueAt(setar, 7).toString());\n txtCliFixo.setText(tblCliNome.getModel().getValueAt(setar, 8).toString());\n txtCliCel.setText(tblCliNome.getModel().getValueAt(setar, 9).toString());\n txtCliMail.setText(tblCliNome.getModel().getValueAt(setar, 10).toString());\n txtCliCep.setText(tblCliNome.getModel().getValueAt(setar, 11).toString());\n \n // A LINHA ABAIXO DESABILITA O BOTÃO ADICIONAR PARA QUE O CADASTRO NÃO SEJA DUPLICADO\n btnAdicionar.setEnabled(true);\n \n }",
"@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}",
"@PostMapping(\"/demande\")\n public Demande addDemande(@RequestBody Demande demande)\n {\n try\n {\n \n /* ajout traitement spécial :\n * setDateCreate setCreatedBy\n * */\n demande.setDateOp(LocalDateTime.now());\n demande.setUtil(\"admin\");\n demande.setOp(\"A\"); // D,E\n demande= demandeRepository.save(demande);\n }\n catch(Exception e)\n {\n \n }\n return demande;\n }",
"public void getSetVersionRowClienteArchivoWithConnection()throws Exception {\n\t\tif(clientearchivo.getIsChangedAuxiliar() && Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t \t//TEMPORAL\r\n\t\t\t//if((clientearchivo.getIsDeleted() || (clientearchivo.getIsChanged()&&!clientearchivo.getIsNew()))&& Constantes.ISSETVERSIONROWUPDATE) {\r\n\t\t\tTimestamp timestamp=null;\r\n\t\t\t\r\n\t\t\ttry {\t\r\n\t\t\t\tconnexion=connexion.getNewConnexion(this.connexionType,this.parameterDbType,this.entityManagerFactory);connexion.begin();\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\ttimestamp=clientearchivoDataAccess.getSetVersionRowClienteArchivo(connexion,clientearchivo.getId());\r\n\t\t\t\t\r\n\t\t\t\tif(!clientearchivo.getVersionRow().equals(timestamp)) {\t\r\n\t\t\t\t\tclientearchivo.setVersionRow(timestamp);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tconnexion.commit();\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tclientearchivo.setIsChangedAuxiliar(false);\r\n\t\t\t\t\r\n\t\t\t} catch(Exception e) {\r\n\t\t\t\tconnexion.rollback();\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tthrow e;\r\n\t\t\t\t\r\n\t \t} finally {\r\n\t\t\t\tconnexion.close();\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void llenadoDeTablas() {\n /**\n *\n * creaccion de la tabla de de titulos \n */\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Bitacora\");\n modelo.addColumn(\"Usuario\");\n modelo.addColumn(\"Fecha\");\n modelo.addColumn(\"Hora\");\n modelo.addColumn(\"Ip\");\n modelo.addColumn(\"host\");\n \n modelo.addColumn(\"Accion\");\n modelo.addColumn(\"Codigo Aplicacion\");\n modelo.addColumn(\"Modulo\");\n /**\n *\n * instaciamiento de las las clases Bitacora y BiracoraDAO\n * intaciamiento de la clases con el llenado de tablas\n */\n BitacoraDao BicDAO = new BitacoraDao();\n List<Bitacora> usuario = BicDAO.select();\n JtProductos1.setModel(modelo);\n String[] dato = new String[9];\n for (int i = 0; i < usuario.size(); i++) {\n dato[0] = usuario.get(i).getId_Bitacora();\n dato[1] = usuario.get(i).getId_Usuario();\n dato[2] = usuario.get(i).getFecha();\n dato[3] = usuario.get(i).getHora();\n dato[4] = usuario.get(i).getHost();\n dato[5] = usuario.get(i).getIp();\n dato[6] = usuario.get(i).getAccion();\n dato[7] = usuario.get(i).getCodigoAplicacion();\n dato[8] = usuario.get(i).getModulo();\n \n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }}",
"private void inseredados() {\n // Insert Funcionários\n\n FuncionarioDAO daoF = new FuncionarioDAO();\n Funcionario func1 = new Funcionario();\n func1.setCpf(\"08654683970\");\n func1.setDataNasc(new Date(\"27/04/1992\"));\n func1.setEstadoCivil(\"Solteiro\");\n func1.setFuncao(\"Garcom\");\n func1.setNome(\"Eduardo Kempf\");\n func1.setRg(\"10.538.191-3\");\n func1.setSalario(1000);\n daoF.persisteObjeto(func1);\n\n Funcionario func2 = new Funcionario();\n func2.setCpf(\"08731628974\");\n func2.setDataNasc(new Date(\"21/08/1992\"));\n func2.setEstadoCivil(\"Solteira\");\n func2.setFuncao(\"Caixa\");\n func2.setNome(\"Juliana Iora\");\n func2.setRg(\"10.550.749-6\");\n func2.setSalario(1200);\n daoF.persisteObjeto(func2);\n\n Funcionario func3 = new Funcionario();\n func3.setCpf(\"08731628974\");\n func3.setDataNasc(new Date(\"03/05/1989\"));\n func3.setEstadoCivil(\"Solteiro\");\n func3.setFuncao(\"Gerente\");\n func3.setNome(\"joão da Silva\");\n func3.setRg(\"05.480.749-2\");\n func3.setSalario(3000);\n daoF.persisteObjeto(func3);\n\n Funcionario func4 = new Funcionario();\n func4.setCpf(\"01048437990\");\n func4.setDataNasc(new Date(\"13/04/1988\"));\n func4.setEstadoCivil(\"Solteiro\");\n func4.setFuncao(\"Garçon\");\n func4.setNome(\"Luiz Fernandodos Santos\");\n func4.setRg(\"9.777.688-1\");\n func4.setSalario(1000);\n daoF.persisteObjeto(func4);\n\n TransactionManager.beginTransaction();\n Funcionario func5 = new Funcionario();\n func5.setCpf(\"01048437990\");\n func5.setDataNasc(new Date(\"13/04/1978\"));\n func5.setEstadoCivil(\"Casada\");\n func5.setFuncao(\"Cozinheira\");\n func5.setNome(\"Sofia Gomes\");\n func5.setRg(\"3.757.688-8\");\n func5.setSalario(1500);\n daoF.persisteObjeto(func5);\n\n // Insert Bebidas\n BebidaDAO daoB = new BebidaDAO();\n Bebida bebi1 = new Bebida();\n bebi1.setNome(\"Coca Cola\");\n bebi1.setPreco(3.25);\n bebi1.setQtde(1000);\n bebi1.setTipo(\"Refrigerante\");\n bebi1.setDataValidade(new Date(\"27/04/2014\"));\n daoB.persisteObjeto(bebi1);\n\n Bebida bebi2 = new Bebida();\n bebi2.setNome(\"Cerveja\");\n bebi2.setPreco(4.80);\n bebi2.setQtde(1000);\n bebi2.setTipo(\"Alcoolica\");\n bebi2.setDataValidade(new Date(\"27/11/2013\"));\n daoB.persisteObjeto(bebi2);\n\n Bebida bebi3 = new Bebida();\n bebi3.setNome(\"Guaraná Antatica\");\n bebi3.setPreco(3.25);\n bebi3.setQtde(800);\n bebi3.setTipo(\"Refrigerante\");\n bebi3.setDataValidade(new Date(\"27/02/2014\"));\n daoB.persisteObjeto(bebi3);\n\n Bebida bebi4 = new Bebida();\n bebi4.setNome(\"Água com gás\");\n bebi4.setPreco(2.75);\n bebi4.setQtde(500);\n bebi4.setTipo(\"Refrigerante\");\n bebi4.setDataValidade(new Date(\"27/08/2013\"));\n daoB.persisteObjeto(bebi4);\n\n Bebida bebi5 = new Bebida();\n bebi5.setNome(\"Whisky\");\n bebi5.setPreco(3.25);\n bebi5.setQtde(1000);\n bebi5.setTipo(\"Alcoolica\");\n bebi5.setDataValidade(new Date(\"03/05/2016\"));\n daoB.persisteObjeto(bebi5);\n\n // Insert Comidas\n ComidaDAO daoC = new ComidaDAO();\n Comida comi1 = new Comida();\n comi1.setNome(\"Batata\");\n comi1.setQuantidade(30);\n comi1.setTipo(\"Kilograma\");\n comi1.setDataValidade(new Date(\"27/04/2013\"));\n daoC.persisteObjeto(comi1);\n\n Comida comi2 = new Comida();\n comi2.setNome(\"Frango\");\n comi2.setQuantidade(15);\n comi2.setTipo(\"Kilograma\");\n comi2.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi2);\n\n Comida comi3 = new Comida();\n comi3.setNome(\"Mussarela\");\n comi3.setQuantidade(15000);\n comi3.setTipo(\"Grama\");\n comi3.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi3);\n\n Comida comi4 = new Comida();\n comi4.setNome(\"Presunto\");\n comi4.setQuantidade(10000);\n comi4.setTipo(\"Grama\");\n comi4.setDataValidade(new Date(\"18/04/2013\"));\n daoC.persisteObjeto(comi4);\n\n Comida comi5 = new Comida();\n comi5.setNome(\"Bife\");\n comi5.setQuantidade(25);\n comi5.setTipo(\"Kilograma\");\n comi5.setDataValidade(new Date(\"22/04/2013\"));\n daoC.persisteObjeto(comi5);\n\n\n // Insert Mesas\n MesaDAO daoM = new MesaDAO();\n Mesa mes1 = new Mesa();\n mes1.setCapacidade(4);\n mes1.setStatus(true);\n daoM.persisteObjeto(mes1);\n\n Mesa mes2 = new Mesa();\n mes2.setCapacidade(4);\n mes2.setStatus(true);\n daoM.persisteObjeto(mes2);\n\n Mesa mes3 = new Mesa();\n mes3.setCapacidade(6);\n mes3.setStatus(true);\n daoM.persisteObjeto(mes3);\n\n Mesa mes4 = new Mesa();\n mes4.setCapacidade(6);\n mes4.setStatus(true);\n daoM.persisteObjeto(mes4);\n\n Mesa mes5 = new Mesa();\n mes5.setCapacidade(8);\n mes5.setStatus(true);\n daoM.persisteObjeto(mes5);\n\n // Insert Pratos\n PratoDAO daoPr = new PratoDAO();\n Prato prat1 = new Prato();\n List<Comida> comI = new ArrayList<Comida>();\n comI.add(comi1);\n prat1.setNome(\"Porção de Batata\");\n prat1.setIngredientes(comI);\n prat1.setQuantidadePorcoes(3);\n prat1.setPreco(13.00);\n daoPr.persisteObjeto(prat1);\n\n Prato prat2 = new Prato();\n List<Comida> comII = new ArrayList<Comida>();\n comII.add(comi2);\n prat2.setNome(\"Porção de Frango\");\n prat2.setIngredientes(comII);\n prat2.setQuantidadePorcoes(5);\n prat2.setPreco(16.00);\n daoPr.persisteObjeto(prat2);\n\n Prato prat3 = new Prato();\n List<Comida> comIII = new ArrayList<Comida>();\n comIII.add(comi1);\n comIII.add(comi3);\n comIII.add(comi4);\n prat3.setNome(\"Batata Recheada\");\n prat3.setIngredientes(comIII);\n prat3.setQuantidadePorcoes(3);\n prat3.setPreco(13.00);\n daoPr.persisteObjeto(prat3);\n\n Prato prat4 = new Prato();\n List<Comida> comIV = new ArrayList<Comida>();\n comIV.add(comi2);\n comIV.add(comi3);\n comIV.add(comi4);\n prat4.setNome(\"Lanche\");\n prat4.setIngredientes(comIV);\n prat4.setQuantidadePorcoes(3);\n prat4.setPreco(13.00);\n daoPr.persisteObjeto(prat4);\n\n Prato prat5 = new Prato();\n prat5.setNome(\"Porção especial\");\n List<Comida> comV = new ArrayList<Comida>();\n comV.add(comi1);\n comV.add(comi3);\n comV.add(comi4);\n prat5.setIngredientes(comV);\n prat5.setQuantidadePorcoes(3);\n prat5.setPreco(13.00);\n daoPr.persisteObjeto(prat5);\n\n // Insert Pedidos Bebidas\n PedidoBebidaDAO daoPB = new PedidoBebidaDAO();\n PedidoBebida pb1 = new PedidoBebida();\n pb1.setPago(false);\n List<Bebida> bebI = new ArrayList<Bebida>();\n bebI.add(bebi1);\n bebI.add(bebi2);\n pb1.setBebidas(bebI);\n pb1.setIdFuncionario(func5);\n pb1.setIdMesa(mes5);\n daoPB.persisteObjeto(pb1);\n\n PedidoBebida pb2 = new PedidoBebida();\n pb2.setPago(false);\n List<Bebida> bebII = new ArrayList<Bebida>();\n bebII.add(bebi1);\n bebII.add(bebi4);\n pb2.setBebidas(bebII);\n pb2.setIdFuncionario(func4);\n pb2.setIdMesa(mes4);\n daoPB.persisteObjeto(pb2);\n\n TransactionManager.beginTransaction();\n PedidoBebida pb3 = new PedidoBebida();\n pb3.setPago(false);\n List<Bebida> bebIII = new ArrayList<Bebida>();\n bebIII.add(bebi2);\n bebIII.add(bebi3);\n pb3.setBebidas(bebIII);\n pb3.setIdFuncionario(func2);\n pb3.setIdMesa(mes2);\n daoPB.persisteObjeto(pb3);\n\n PedidoBebida pb4 = new PedidoBebida();\n pb4.setPago(false);\n List<Bebida> bebIV = new ArrayList<Bebida>();\n bebIV.add(bebi2);\n bebIV.add(bebi5);\n pb4.setBebidas(bebIV);\n pb4.setIdFuncionario(func3);\n pb4.setIdMesa(mes3);\n daoPB.persisteObjeto(pb4);\n\n PedidoBebida pb5 = new PedidoBebida();\n pb5.setPago(false);\n List<Bebida> bebV = new ArrayList<Bebida>();\n bebV.add(bebi1);\n bebV.add(bebi2);\n bebV.add(bebi3);\n pb5.setBebidas(bebV);\n pb5.setIdFuncionario(func1);\n pb5.setIdMesa(mes5);\n daoPB.persisteObjeto(pb5);\n\n // Insert Pedidos Pratos\n PedidoPratoDAO daoPP = new PedidoPratoDAO();\n PedidoPrato pp1 = new PedidoPrato();\n pp1.setPago(false);\n List<Prato> praI = new ArrayList<Prato>();\n praI.add(prat1);\n praI.add(prat2);\n praI.add(prat3);\n pp1.setPratos(praI);\n pp1.setIdFuncionario(func5);\n pp1.setIdMesa(mes5);\n daoPP.persisteObjeto(pp1);\n\n PedidoPrato pp2 = new PedidoPrato();\n pp2.setPago(false);\n List<Prato> praII = new ArrayList<Prato>();\n praII.add(prat1);\n praII.add(prat3);\n pp2.setPratos(praII);\n pp2.setIdFuncionario(func4);\n pp2.setIdMesa(mes4);\n daoPP.persisteObjeto(pp2);\n\n PedidoPrato pp3 = new PedidoPrato();\n pp3.setPago(false);\n List<Prato> praIII = new ArrayList<Prato>();\n praIII.add(prat1);\n praIII.add(prat2);\n pp3.setPratos(praIII);\n pp3.setIdFuncionario(func2);\n pp3.setIdMesa(mes2);\n daoPP.persisteObjeto(pp3);\n\n PedidoPrato pp4 = new PedidoPrato();\n pp4.setPago(false);\n List<Prato> praIV = new ArrayList<Prato>();\n praIV.add(prat1);\n praIV.add(prat3);\n pp4.setPratos(praIV);\n pp4.setIdFuncionario(func3);\n pp4.setIdMesa(mes3);\n daoPP.persisteObjeto(pp4);\n\n PedidoPrato pp5 = new PedidoPrato();\n pp5.setPago(false);\n List<Prato> praV = new ArrayList<Prato>();\n praV.add(prat1);\n praV.add(prat2);\n praV.add(prat3);\n praV.add(prat4);\n pp5.setPratos(praV);\n pp5.setIdFuncionario(func1);\n pp5.setIdMesa(mes5);\n daoPP.persisteObjeto(pp5);\n\n }",
"public CalMetasDTO cargarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta) {\n/* */ try {\n/* 416 */ String s = \"select m.*,\";\n/* 417 */ s = s + \"tm.descripcion as nombreTipoMedicion,\";\n/* 418 */ s = s + \"est.descripcion as nombreEstado,\";\n/* 419 */ s = s + \"Um.Descripcion as nombre_unidad_medida\";\n/* 420 */ s = s + \" from cal_plan_metas m,sis_multivalores tm,sis_multivalores est,Sis_Multivalores Um\";\n/* 421 */ s = s + \" where \";\n/* 422 */ s = s + \" m.tipo_medicion =tm.valor\";\n/* 423 */ s = s + \" and tm.tabla='CAL_TIPO_MEDICION'\";\n/* 424 */ s = s + \" and m.estado =est.valor\";\n/* 425 */ s = s + \" and est.tabla='CAL_ESTADO_META'\";\n/* 426 */ s = s + \" and m.Unidad_Medida = Um.Valor\";\n/* 427 */ s = s + \" and Um.Tabla = 'CAL_UNIDAD_MEDIDA_META'\";\n/* 428 */ s = s + \" and m.codigo_ciclo=\" + codigoCiclo;\n/* 429 */ s = s + \" and m.codigo_plan=\" + codigoPlan;\n/* 430 */ s = s + \" and m.codigo_meta=\" + codigoMeta;\n/* 431 */ boolean rtaDB = this.dat.parseSql(s);\n/* 432 */ if (!rtaDB) {\n/* 433 */ return null;\n/* */ }\n/* */ \n/* 436 */ this.rs = this.dat.getResultSet();\n/* 437 */ if (this.rs.next()) {\n/* 438 */ return leerRegistro();\n/* */ }\n/* */ }\n/* 441 */ catch (Exception e) {\n/* 442 */ e.printStackTrace();\n/* 443 */ Utilidades.writeError(\"CalPlanMetasFactory:cargarCalMetas \", e);\n/* */ } \n/* 445 */ return null;\n/* */ }",
"QuartoConsumo[] busca(Object dadoBusca, String coluna) throws SQLException;",
"private void cargaInfoEmpleado(){\r\n Connection conn = null;\r\n Conexion conex = null;\r\n try{\r\n if(!Config.estaCargada){\r\n Config.cargaConfig();\r\n }\r\n conex = new Conexion();\r\n conex.creaConexion(Config.host, Config.user, Config.pass, Config.port, Config.name, Config.driv, Config.surl);\r\n conn = conex.getConexion();\r\n if(conn != null){\r\n ArrayList<Object> paramsIn = new ArrayList();\r\n paramsIn.add(txtLogin);\r\n QryRespDTO resp = new Consulta().ejecutaSelectSP(conn, IQryUsuarios.NOM_FN_OBTIENE_INFO_USUARIOWEB, paramsIn);\r\n System.out.println(\"resp: \" + resp.getRes() + \"-\" + resp.getMsg());\r\n if(resp.getRes() == 1){\r\n ArrayList<ColumnaDTO> listaColumnas = resp.getColumnas();\r\n for(HashMap<String, CampoDTO> fila : resp.getDatosTabla()){\r\n usuario = new UsuarioDTO();\r\n \r\n for(ColumnaDTO col: listaColumnas){\r\n switch(col.getIdTipo()){\r\n case java.sql.Types.INTEGER:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Integer.parseInt(fila.get(col.getEtiqueta()).getValor().toString().replaceAll(\",\", \"\").replaceAll(\"$\", \"\").replaceAll(\" \", \"\")));\r\n break;\r\n \r\n case java.sql.Types.DOUBLE:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Double.parseDouble(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.FLOAT:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.DECIMAL:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n case java.sql.Types.VARCHAR:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n \r\n case java.sql.Types.NUMERIC:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"0\":Float.parseFloat(fila.get(col.getEtiqueta()).getValor().toString()));\r\n break;\r\n \r\n default:\r\n usuario.getClass().getField(col.getEtiqueta()).set(usuario\r\n , fila.get(col.getEtiqueta()).getValor()==null?\"\":fila.get(col.getEtiqueta()).getValor().toString());\r\n break;\r\n } \r\n }\r\n }\r\n sesionMap.put(\"UsuarioDTO\", usuario);\r\n }else{\r\n context.getExternalContext().getApplicationMap().clear();\r\n context.getExternalContext().redirect(\"index.xhtml\");\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Excepcion en la cargaInfoEmpleado: \" + ex);\r\n }finally{\r\n try{\r\n conn.close();\r\n }catch(Exception ex){\r\n \r\n }\r\n }\r\n }",
"@Transactional\n public void llenarTabla(ResultSet rs){\n if (rs==null) {\n System.out.println(\"el rs vino vacio\");\n }\n try {\n while (rs.next()) {\n //para cada fila de la consulta creo un pedido\n PedidoMaterial pedido = new PedidoMaterial();\n System.out.println(\"empezamos\");\n pedido.setId(rs.getInt(1));\n pedido.setNumeroPedido(rs.getInt(2));\n pedido.setNotaDeVenta(rs.getInt(3));\n pedido.setDescripProyecto(rs.getString(4));\n pedido.setCliente(rs.getString(5));\n pedido.setCantidadPedida(rs.getLong(6));\n pedido.setCantidadModificada(rs.getLong(7));\n Calendar fecha = Calendar.getInstance();\n fecha.setTime(rs.getDate(8));\n pedido.setUltimaActualizacionDespiece(fecha);\n pedido.setArticulo(rs.getString(9));\n pedido.setAriCod(rs.getString(10));\n pedido.setArea(rs.getString(11));\n pedido.setUnidadOrg(rs.getInt(12));\n pedido.setTarea(rs.getString(13));\n pedido.setCantidadAPD(rs.getLong(14));\n if (rs.getDate(15) != null) {\n fecha.setTime(rs.getDate(15));\n pedido.setFechaAsignacion(fecha); \n }\n pedido.setCantidadFinalP(rs.getLong(16));\n pedido.setCantidadRealU(rs.getLong(17));\n pedido.setTareaCod(rs.getInt(18));\n fecha.setTime(rs.getDate(19));\n pedido.setFechaUti(fecha);\n fecha.setTime(rs.getDate(20));\n pedido.setFechaFinUtili(fecha);\n \n guardarPedido(pedido);\n \n \n }\n } catch (SQLException ex) {\n \n System.out.println(ex.toString());\n }\n }",
"@Override\r\n public BoletoLocal onGerarBoleto(Contrato contrato, ConfiguracoesBoleto config) {\r\n int diaVencimento = contrato.getDiaVencimento();\r\n Calendar dataHj = Calendar.getInstance();\r\n\r\n //SE O DIA DO VENCIMENTO DO BOLETO FOR MENOR OU IGUAL\r\n // A DATA DE HJ GERA NORMAL, SE NÃO ELE GERA PRO PROXIMO MES\r\n if (dataHj.get(Calendar.DAY_OF_MONTH) <= diaVencimento) {\r\n\r\n } else {\r\n dataHj.add(Calendar.MONTH, 1);\r\n }\r\n\r\n dataHj.set(Calendar.DAY_OF_MONTH, diaVencimento);\r\n Calendar dataMaxima = Calendar.getInstance();\r\n dataMaxima.add(Calendar.DAY_OF_MONTH, 20);\r\n\r\n //SE A DATA FOR MAIOS QUE O MÁXIMO CONFIGURADO NÃO GERA NADA.\r\n if (dataHj.after(dataMaxima)) {\r\n System.out.println(\"data depois de 20 dias\");\r\n return null;\r\n }\r\n\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O CEDENTE.\r\n */\r\n Cedente cedente = new Cedente(config.getBanco().getNomeBeneficiado(), config.getDocBeneficiado());\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O SACADO.\r\n */\r\n Sacado sacado = new Sacado(contrato.getLocatario().getNome(), contrato.getLocatario().getDocumento());\r\n\r\n // Informando o endereço do sacado.\r\n org.jrimum.domkee.comum.pessoa.endereco.Endereco enderecoSac = new org.jrimum.domkee.comum.pessoa.endereco.Endereco();\r\n enderecoSac.setUF(UnidadeFederativa.valueOfSigla(contrato.getLocatario().getEndereco().getCodUf()));\r\n enderecoSac.setLocalidade(contrato.getLocatario().getEndereco().getCidade());\r\n enderecoSac.setCep(new CEP(contrato.getLocatario().getEndereco().getDesCep()));\r\n enderecoSac.setBairro(contrato.getLocatario().getEndereco().getDesBairro());\r\n enderecoSac.setLogradouro(contrato.getLocatario().getEndereco().getDesLogradouro());\r\n enderecoSac.setNumero(contrato.getLocatario().getEndereco().getDesNumero());\r\n sacado.addEndereco(enderecoSac);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O TÍTULO.\r\n */\r\n // Informando dados sobre a conta bancária do título.\r\n ContaBancaria contaBancaria = null;\r\n if (config.getBanco().getBanco() == BancosEnum.ITAU) {\r\n contaBancaria = new ContaBancaria(BancosSuportados.BANCO_ITAU.create());\r\n }\r\n\r\n if (contaBancaria == null) {\r\n System.out.println(\"Conta bancária não cadastrada\");\r\n return null;\r\n }\r\n\r\n contaBancaria.setNumeroDaConta(new NumeroDaConta(Integer.parseInt(config.getBanco().getContaNumero()), config.getBanco().getContaDigito()));\r\n contaBancaria.setCarteira(new Carteira(Integer.parseInt(config.getCarteira())));\r\n contaBancaria.setAgencia(new Agencia(Integer.parseInt(config.getBanco().getAgenciaNumero()), config.getBanco().getAgenciaDigito()));\r\n\r\n Titulo titulo = new Titulo(contaBancaria, sacado, cedente);\r\n titulo.setNumeroDoDocumento(config.getNumeroDocumento());\r\n titulo.setNossoNumero(config.getNossoNumero());\r\n titulo.setDigitoDoNossoNumero(config.getNossoNumeroDigito());\r\n titulo.setValor(contrato.getValor());\r\n titulo.setDataDoDocumento(new Date());\r\n\r\n titulo.setDataDoVencimento(dataHj.getTime());\r\n titulo.setTipoDeDocumento(TipoDeTitulo.DM_DUPLICATA_MERCANTIL);\r\n titulo.setAceite(Aceite.A);\r\n//\t\ttitulo.setDesconto(BigDecimal.ZERO);\r\n//\t\ttitulo.setDeducao(BigDecimal.ZERO);\r\n//\t\ttitulo.setMora(BigDecimal.ZERO);\r\n//\t\ttitulo.setAcrecimo(BigDecimal.ZERO);\r\n//\t\ttitulo.setValorCobrado(BigDecimal.ZERO);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O BOLETO.\r\n */\r\n Boleto boletoBank = new Boleto(titulo);\r\n\r\n boletoBank.setLocalPagamento(config.getLocalPagamento());\r\n boletoBank.setInstrucaoAoSacado(config.getInstrucaoSacado());\r\n boletoBank.setInstrucao1(config.getInstrucao1());\r\n boletoBank.setInstrucao2(config.getInstrucao2());\r\n boletoBank.setInstrucao3(config.getInstrucao3());\r\n boletoBank.setInstrucao4(config.getInstrucao4());\r\n boletoBank.setInstrucao5(config.getInstrucao5());\r\n boletoBank.setInstrucao6(config.getInstrucao6());\r\n boletoBank.setInstrucao7(config.getInstrucao7());\r\n boletoBank.setInstrucao8(config.getInstrucao8());\r\n\r\n /*\r\n\t\t * GERANDO O BOLETO BANCÁRIO.\r\n */\r\n // Instanciando um objeto \"BoletoViewer\", classe responsável pela\r\n // geração do boleto bancário.\r\n BoletoViewer boletoViewer = new BoletoViewer(boletoBank);\r\n\r\n // Alterado para pegar o path do sistema automático , gerando dentro\r\n // do projeto.\r\n // Gerando o arquivo. No caso o arquivo mencionado será salvo na mesma\r\n // pasta do projeto. Outros exemplos:\r\n // WINDOWS: boletoViewer.getAsPDF(\"C:/Temp/MeuBoleto.pdf\");\r\n // LINUX: boletoViewer.getAsPDF(\"/home/temp/MeuBoleto.pdf\");\r\n String pasta = \"/boletos\";\r\n\r\n String caminhoCompletoPasta = FacesUtil.getExternalContext().getRealPath(pasta) + \"/\";\r\n BoletoLocal boletoLocal = new BoletoLocal();\r\n contrato.getBoletos().add(boletoLocal);\r\n boletoLocal.setContrato(contrato);\r\n\r\n String nomeArquivoPDF = contrato.getLocatario().getNome().replace(\" \", \"_\") + boletoLocal.getMes() + boletoLocal.getAno() + \".pdf\";\r\n\r\n System.out.println(caminhoCompletoPasta + nomeArquivoPDF);\r\n File arquivoPdf = boletoViewer.getPdfAsFile(caminhoCompletoPasta + nomeArquivoPDF);\r\n\r\n boletoLocal.setPath(pasta + nomeArquivoPDF);\r\n\r\n super.save(boletoLocal);\r\n\r\n return boletoLocal;\r\n }",
"ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);",
"public ArrayList<AnuncioDTO> ObtenerAnuncios(){\n ArrayList<AnuncioDTO> ret=new ArrayList<AnuncioDTO>();\n\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"getAll.Anuncio\"));\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n int id=rs.getInt(1);\n TipoAnuncio tipoAnuncio=TipoAnuncio.valueOf(rs.getString(2));\n String titulo = rs.getString(3);\n String cuerpo = rs.getString(4);\n Date fechaPublicacion = new Date(rs.getDate(5).getTime());\n Date fechaFin=null;\n if(tipoAnuncio.equals(TipoAnuncio.Flash)){\n fechaFin= new Date(rs.getDate(6).getTime());\n }\n String emailPropietario = rs.getString(7);\n EstadoAnuncio estadoAnuncio = EstadoAnuncio.valueOf(rs.getString(8));\n \n ArrayList<String>temas=null;\n if(tipoAnuncio.equals(TipoAnuncio.Tematico)){\n temas=new ArrayList<String>();\n ArrayList<String>temasId = null;\n temasId=new ArrayList<String>(Arrays.asList(rs.getString(9).split(\",\")));\n InteresesDAO interesesDAO = new InteresesDAO(sqlPropertiesPath);\n Hashtable<Integer,String> intereses = interesesDAO.DevolverIntereses();\n for(String interes : temasId){\n temas.add(intereses.get(Integer.parseInt(interes)));\n }\n\n }\n ArrayList<String>destinatarios = ObtenerDestinatariosAnuncio(id);\n AnuncioDTO anuncioDTO=new AnuncioDTO(id, tipoAnuncio, titulo, cuerpo, fechaPublicacion, fechaFin, emailPropietario, estadoAnuncio, temas,destinatarios);\n\n ret.add(anuncioDTO);\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n return ret;\n }",
"public RespuestaBD modificarRegistro(int codigoFlujo, int secuencia, int servicioInicio, int accion, int codigoEstado, int servicioDestino, String nombreProcedimiento, String correoDestino, String enviar, String mismoProveedor, String mismomismoCliente, String estado, int caracteristica, int caracteristicaValor, int caracteristicaCorreo, String metodoSeleccionProveedor, String indCorreoCliente, String indHermana, String indHermanaCerrada, String indfuncionario, String usuarioModificacion) {\n/* 437 */ RespuestaBD rta = new RespuestaBD();\n/* */ \n/* */ try {\n/* 440 */ String s = \"update wkf_detalle set servicio_inicio=\" + servicioInicio + \",\" + \" accion=\" + accion + \",\" + \" codigo_estado=\" + codigoEstado + \",\" + \" servicio_destino=\" + ((servicioDestino == 0) ? \"null\" : Integer.valueOf(servicioDestino)) + \",\" + \" nombre_procedimiento='\" + nombreProcedimiento + \"',\" + \" correo_destino='\" + correoDestino + \"',\" + \" enviar_solicitud='\" + enviar + \"',\" + \" ind_mismo_proveedor='\" + mismoProveedor + \"',\" + \" ind_mismo_cliente='\" + mismomismoCliente + \"',\" + \" estado='\" + estado + \"',\" + \" caracteristica=\" + ((caracteristica == 0) ? \"null\" : (\"\" + caracteristica)) + \",\" + \" valor_caracteristica=\" + ((caracteristicaValor == 0) ? \"null\" : (\"\" + caracteristicaValor)) + \",\" + \" caracteristica_correo=\" + ((caracteristicaCorreo == 0) ? \"null\" : (\"\" + caracteristicaCorreo)) + \",\" + \" metodo_seleccion_proveedor=\" + ((metodoSeleccionProveedor.length() == 0) ? \"null\" : (\"'\" + metodoSeleccionProveedor + \"'\")) + \",\" + \" ind_correo_clientes=\" + ((indCorreoCliente.length() == 0) ? \"null\" : (\"'\" + indCorreoCliente + \"'\")) + \",\" + \" enviar_hermana=\" + ((indHermana.length() == 0) ? \"null\" : (\"'\" + indHermana + \"'\")) + \",\" + \" enviar_si_hermana_cerrada=\" + ((indHermanaCerrada.length() == 0) ? \"null\" : (\"'\" + indHermanaCerrada + \"'\")) + \",\" + \" ind_cliente_inicial=\" + ((indfuncionario.length() == 0) ? \"null\" : (\"'\" + indfuncionario + \"'\")) + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \"\" + \" where\" + \" codigo_flujo=\" + codigoFlujo + \" and secuencia=\" + secuencia + \"\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 465 */ rta = this.dat.executeUpdate2(s);\n/* */ }\n/* 467 */ catch (Exception e) {\n/* 468 */ e.printStackTrace();\n/* 469 */ Utilidades.writeError(\"FlujoDetalleDAO:modificarRegistro \", e);\n/* 470 */ rta.setMensaje(e.getMessage());\n/* */ } \n/* 472 */ return rta;\n/* */ }",
"@Transactional\n DataRistorante insert(DataRistorante risto);",
"private EmpresaPorAutorizar getEntity(EmpresaPorAutorizarVO vo){\n\t\tEmpresaPorAutorizar entity = new EmpresaPorAutorizar();\n\t\tentity.setAceptacionTerminos(vo.getAceptacionTerminos());\n\t\tif(null!=vo.getApellido1()){\n\t\t\tentity.setApellido1(vo.getApellido1().toUpperCase());\n\t\t}\n\t\tif(null!=vo.getApellido2()){\n\t\t\tentity.setApellido2(vo.getApellido2().toUpperCase());\n\t\t}\t\t\t\n\t\tentity.setConfidencial(vo.getConfidencial());\n\t\tentity.setContactoEmpresa(vo.getContactoEmpresa());\n\t\tentity.setCorreoElectronico(vo.getCorreoElectronico());\n\t\tentity.setDescripcion(vo.getDescripcion());\n\t\tentity.setEstatus(vo.getEstatus());\n\t\tentity.setFechaActa(vo.getFechaActa());\n\t\tentity.setFechaAlta(vo.getFechaAlta());\n\t\tentity.setFechaNacimiento(vo.getFechaNacimiento());\n\t\tentity.setFechaUltimaActualizacion(vo.getFechaUltimaActualizacion());\n\t\tentity.setIdActividadEconomica(vo.getIdActividadEconomica());\n\t\tentity.setIdEmpresa(vo.getIdEmpresa());\n\t\tentity.setIdMedio(vo.getIdMedio());\t\t\n\t\tentity.setIdPortalEmpleo(vo.getIdPortalEmpleo());\t\t\t\t\n\t\tentity.setIdTipoEmpresa(vo.getIdTipoEmpresa());\n\t\tentity.setIdTipoPersona(vo.getIdTipoPersona());\n\t\tentity.setNombreComercial(vo.getNombreComercial());\n\t\tif(null!=vo.getNombre()){\n\t\t\tentity.setNombre(vo.getNombre().toUpperCase());\n\t\t}\n\t\tentity.setNumeroEmpleados(vo.getNumeroEmpleados());\n\t\tentity.setPaginaWeb(vo.getPaginaWeb());\n\t\tif(null!=vo.getRazonSocial()){\n\t\t\tentity.setRazonSocial(vo.getRazonSocial().toUpperCase());\n\t\t}\n\t\tentity.setRfc(vo.getRfc());\t\t\n\t\tentity.setAseguraDatos(vo.getAseguraDatos());\t\n\t\treturn entity;\n\t}",
"public void modificar() {\n try {\n if(!fecha.equals(null)){\n Dr_siseg_usuarioBean usuario = new Dr_siseg_usuarioBean();\n FacesContext facesContext = FacesContext.getCurrentInstance();\n usuario = (Dr_siseg_usuarioBean) facesContext.getExternalContext().getSessionMap().get(\"usuario\");\n \n calendar.setTime((Date) this.fecha);\n this.Selected.setApel_fecha_sesion(calendar.getTime());\n\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n apelacionesDao.IME_APELACIONES(2, Selected); \n\n BitacoraSolicitudDao bitacoraSolicitudDao = new BitacoraSolicitudDao();//INSERTA EL MOVIMIENTO EN LA BITACORA\n BitacoraSolicitudBean bitacoraSolicitudBean = new BitacoraSolicitudBean();\n bitacoraSolicitudBean.setBit_sol_id(this.Selected.getApel_sol_numero());\n bitacoraSolicitudBean.setUsuarioBean(usuario);\n bitacoraSolicitudBean.setBit_tipo_movimiento(\"1\");\n bitacoraSolicitudBean.setBit_detalle(\"Fue modificada la apelacion\");\n bitacoraSolicitudDao.dmlDr_regt_bitacora_solicitud(bitacoraSolicitudBean);\n\n this.Listar();\n this.Selected = new ApelacionesBean();\n addMessage(\"Guadado Exitosamente\", 1);\n }else\n {\n addMessage(\"Es requerida la fecha\",1 );\n }\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n addMessage(\"Se produjo un error al insertar el registro, contacte al administrador del sistema\", 1);\n }\n }",
"public void localizarDados(int idOrcamento){\n OrcamentoCursoController orcamentoCursoController = new OrcamentoCursoController();\n this.orcamentocurso = orcamentoCursoController.consultar(idOrcamento);\n if (orcamentocurso!=null){\n ClienteController clienteController = new ClienteController();\n cliente = clienteController.consultar(orcamentocurso.getCliente());\n if (cliente!=null){\n parajTextField.setText(cliente.getEmail());\n }\n }\n }",
"public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public void modificarEstadoCuota2(CuotaObject cuota) throws SQLException, ParseException \r\n {\r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"UPDATE FINANCIADO_PAGOS SET ESTADO=?,FECHA=? where IDRUBRO=?\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setString(1, cuota.getEstado());\r\n \r\n \r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n Date date1 = formatter.parse(cuota.getFecha());\r\n java.sql.Date datetmp = new java.sql.Date(date1.getTime());\r\n \r\n prepStmt.setDate(2, datetmp);\r\n \r\n \r\n prepStmt.setString(3, cuota.getIdrubro());\r\n \r\n prepStmt.executeUpdate();\r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n }",
"public int saveHeadControl(int idTramite, int empresa_id, int almacen_id, String serie, int folio, String serieBoleto, int folioBoleto, \r\n\t\t\t int cliente_id, String identificacion,String cveIdentificacion,int numitems, String fecha, String hora, int usuario_id, String timecreate ,double tiempoMinimo ,String obs ) {\r\n\t\tString sql = \"UPDATE `cabcontrol` SET `EMPRESA_ID`='\"+empresa_id+\"',`ALMACEN_ID`='\"+almacen_id+\"',`SERIE`='\"+serie+\"',`FOLIO`='\"+folio+\"',\"\r\n\t\t\t\t+ \"`SERIEBOLETO`='\"+serieBoleto+\"',`FOLIOBOLETO`='\"+folioBoleto+\"',`CLIENTE_ID`='\"+cliente_id+\"',`CLIENTECOD`='\"+identificacion+\"', `IDENTIFICACION`='\"+cveIdentificacion+\"',`NUMITEMS`='\"+numitems+\"',\"\r\n\t\t\t + \"`FECHAIN`='\"+fecha+\"',`HORAIN`='\"+hora+\"',`USUARIO_IDIN`='\"+usuario_id+\"',`TIMECREATE`='\"+timecreate+\"', TIEMPOTOTALOUT='\"+tiempoMinimo+\"' ,`OBSERVACION`='\"+obs+\"' WHERE `IDTRAMITE` ='\"+idTramite+\"' \";\r\n\t\treturn template.update(sql);\r\n\t}",
"@Override\n public boolean insertar(ModelCliente cliente) {\n strSql = \"INSERT INTO CLIENTE (ID_CLIENTE, NOMBRE, APELLIDO, NIT, TELEFONO, DIRECCION,ID_EMPRESA) \"\n + \"VALUES ( (SELECT ISNULL(MAX(ID_CLIENTE),0) + 1 FROM CLIENTE), \" + \n \"'\" + cliente.getNombre() + \"', \" + \n \"'\" + cliente.getApellido()+ \"', \" + \n \"'\" + cliente.getNit() + \"', \" +\n \"'\" + cliente.getTelefono()+ \"', \" +\n \"'\" + cliente.getDireccion()+ \"',\" +\n \"\" + cliente.getIdEmpresa()+ \"\" + \n \")\";\n \n try {\n //se abre una conexión hacia la BD\n conexion.open();\n //Se ejecuta la instrucción y retorna si la ejecución fue satisfactoria\n respuesta = conexion.executeSql(strSql);\n //Se cierra la conexión hacia la BD\n conexion.close();\n \n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n return false;\n } catch(Exception ex){\n Logger.getLogger(DaoCliente.class.getName()).log(Level.SEVERE, null, ex); \n }\n return respuesta;\n }",
"public void setar_campos() {\n int setar = tblEmpresas.getSelectedRow();\n txtEmpId.setText(tblEmpresas.getModel().getValueAt(setar, 0).toString());\n txtEmpNome.setText(tblEmpresas.getModel().getValueAt(setar, 1).toString());\n txtEmpCNPJ.setText(tblEmpresas.getModel().getValueAt(setar, 2).toString());\n txtEmpEnd.setText(tblEmpresas.getModel().getValueAt(setar, 3).toString());\n txtEmpTel.setText(tblEmpresas.getModel().getValueAt(setar, 4).toString());\n txtEmpEmail.setText(tblEmpresas.getModel().getValueAt(setar, 5).toString());\n\n // a linha abaixo desabilita o botao add\n btnAdicionar.setEnabled(false);\n }",
"private void salvar() {\n setaCidadeBean();\n //Instanciamos o DAO\n CidadeDAO dao = new CidadeDAO();\n //verifica qual será a operação de peristência a ser realizada\n if (operacao == 1) {\n dao.inserir(cidadeBean);\n }\n if (operacao == 2) {\n dao.alterar(cidadeBean);\n }\n habilitaBotoesParaEdicao(false);\n reiniciaTela();\n }",
"private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }",
"@Override\n\tpublic void atualizar() {\n\t\t\n\t\t \n\t\t String idstring = id.getText();\n\t\t UUID idlong = UUID.fromString(idstring);\n\t\t \n\t\t PedidoCompra PedidoCompra = new PedidoCompra();\n\t\t\tPedidoCompra.setId(idlong);\n\t\t\tPedidoCompra.setAtivo(true);\n//\t\t\tPedidoCompra.setNome(nome.getText());\n\t\t\tPedidoCompra.setStatus(StatusPedido.valueOf(status.getSelectionModel().getSelectedItem().name()));\n//\t\t\tPedidoCompra.setSaldoinicial(saldoinicial.getText());\n\t\t\tPedidoCompra.setData(new Date());\n\t\t\tPedidoCompra.setIspago(false);\n\t\t\tPedidoCompra.setData_criacao(new Date());\n//\t\t\tPedidoCompra.setFornecedor(fornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setFornecedor(cbfornecedores.getSelectionModel().getSelectedItem());\n\t\t\tPedidoCompra.setTotal(PedidoCompra.CalcularTotal(PedidoCompra.getItems()));\n\t\t\tPedidoCompra.setTotalpago(PedidoCompra.CalculaTotalPago(PedidoCompra.getFormas()));\n\t\t\t\n\t\t\t\n\t\t\tgetservice().edit(PedidoCompra);\n\t\t\tupdateAlert(PedidoCompra);\n\t\t\tclearFields();\n\t\t\tdesligarLuz();\n\t\t\tloadEntityDetails();\n\t\t\tatualizar.setDisable(true);\n\t\t\tsalvar.setDisable(false);\n\t\t\t\n\t\t \n\t\t \n\t\tsuper.atualizar();\n\t}",
"public String InsertarAnuncioGeneral(AnuncioGeneralDTO anuncio){\n int status=0;\n String message=\"Funciona bien\";\n try{\n Connection conect = getConection();\n Properties sqlProp = new Properties();\n InputStream is = new FileInputStream(sqlPropertiesPath);\n sqlProp.load(is);\n PreparedStatement ps = conect.prepareStatement(sqlProp.getProperty(\"insertar.AnuncioGeneral\"));\n \n ps.setString(1, anuncio.getTipoAnuncio().toString());\n ps.setString(2,anuncio.getTitulo());\n ps.setString(3,anuncio.getCuerpo());\n \n java.sql.Date fechaPublicacion=new java.sql.Date(anuncio.getFechaPublicacion().getTime());\n // DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss dd/MM/yyyy\");\n // String fecha = dateFormat.format(anuncio.getFechaPublicacion());\n // java.sql.Date fechaPublicacion=new java.sql.Date(dateFormat.parse(fecha).getTime());\n ps.setDate(4, fechaPublicacion);\n message=\"Cargo bien la fecha\";\n ps.setString(5,anuncio.getPropietario().getEmail());\n ps.setString(6,anuncio.getEstadoAnuncio().toString());\n status=ps.executeUpdate();\n\n \n int idAnuncio=GetMaxID();\n for(Contacto c : anuncio.getDestinatarios()){\n PreparedStatement psDestinatario=conect.prepareStatement(sqlProp.getProperty(\"insertar.Destinatario\"));\n psDestinatario.setInt(1, idAnuncio);\n psDestinatario.setString(2, c.getEmail());\n psDestinatario.executeUpdate();\n }\n message=\"funciona bien\";\n }catch(Exception e){\n e.toString();\n }\n\n return message;\n }",
"public void reporteHabitacionMasPopular(TablaModelo modelo){\n ArrayList<ControlVeces> control = new ArrayList<>();\n ControlVeces controlador;\n try {// pago de alojamiento en rango fchas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio, RESERVACION.Id_Habitacion FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Check_In=1;\");\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// pago de alojamiento en rango fchas\n String nombre = Integer.toString(resultado.getInt(6));\n int casilla = numeroObjeto(control,nombre);\n if(casilla>=0){// maneja el resultado// pago de alojamiento en rango fchas\n control.get(casilla).setVeces(control.get(casilla).getVeces()+1);\n }else{// maneja el resultado\n controlador = new ControlVeces(nombre);// pago de alojamiento en rango fchas\n control.add(controlador);\n }\n } // maneja el resultado \n ordenamiento(control);\n int numero = control.size()-1;// el de hasta arriba es el que mas elementos tiene \n String idHabitacionMasPopular = control.get(numero).getNombre();\n this.habitacionPopular= idHabitacionMasPopular;\n introducirDatosHabitacionMasPopular(modelo, idHabitacionMasPopular);\n } catch (SQLException ex) {\n ex.printStackTrace();\n } catch(Exception e){\n \n }\n }",
"private void addOrUpdate() {\n try {\n Stokdigudang s = new Stokdigudang();\n if (!tableStok.getSelectionModel().isSelectionEmpty()) {\n s.setIDBarang(listStok.get(row).getIDBarang());\n }\n s.setNamaBarang(tfNama.getText());\n s.setHarga(new Integer(tfHarga.getText()));\n s.setStok((int) spJumlah.getValue());\n s.setBrand(tfBrand.getText());\n s.setIDKategori((Kategorimotor) cbKategori.getSelectedItem());\n s.setIDSupplier((Supplier) cbSupplier.getSelectedItem());\n s.setTanggalDidapat(dateChooser.getDate());\n\n daoStok.addOrUpdateStok(s);\n JOptionPane.showMessageDialog(this, \"Data berhasil disimpan!\");\n showAllDataStok();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"Data gagal disimpan!\");\n }\n }",
"public void insert(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n //Abrindo o mapeamento dos dados para o insert\n ContentValues dados = new ContentValues();\n\n dados.put(\"id_participa_campanha\",doacao.getId_participa_campanha());\n dados.put(\"id_recurso\",doacao.getId_recurso());\n dados.put(\"data\",doacao.getData());\n dados.put(\"quantidade\",doacao.getQuantidade());\n\n\n sqLiteDatabase.insert(\"doacao\",null, dados);\n\n }",
"@Override\n\tpublic Object fromServer(Object obj, String posId) {\n\t\tDataModel dm = new DataModel();\n\t\tcrjpa400.Sincronizacion serverValue = (crjpa400.Sincronizacion) obj;\n\t\tcrjpa.Sincronizacion posValue = new crjpa.Sincronizacion();\n\t\tposValue.setCantidad(serverValue.getCantidad());\n\t\tposValue.setEscarga(String.valueOf(serverValue.getEscarga()));\n\t\tposValue.setEsdescarga(String.valueOf(serverValue.getEsdescarga()));\n\t\tposValue.setEspera(serverValue.getEspera());\n\t\tposValue.setId(serverValue.getId());\n\n\t\tdm.setId(serverValue.getId().toString());\n\n\t\tposValue.setIdGrupo(serverValue.getIdGrupo());\n\t\tposValue.setNombre(serverValue.getNombre());\n\n\t\tSincronizacionJpaController syncJpaController = new SincronizacionJpaController(\n\t\t\t\tGlobal.getEntityManagerFactory());\n\n\t\tSincronizacion sincronizacion = syncJpaController.findSincronizacion(serverValue.getId());\n\n\t\tif (sincronizacion != null) {\n\t\t\tposValue.setUltimasincronizacion(sincronizacion.getUltimasincronizacion());\n\t\t} else {\n\t\t\tposValue.setUltimasincronizacion(new BigDecimal(FECHA_1970));\n\t\t}\n\n\t\tposValue.setPrioridad(serverValue.getPrioridad());\n\t\tposValue.setTipo(String.valueOf(serverValue.getTipo()));\n\n\t\tposValue.setJpqlQuery(serverValue.getJpqlQuery());\n\n\t\tposValue.setEstasincronizado(\"S\");\n\n\t\tdm.setEntity(posValue);\n\t\tdm.setSyncDate(serverValue.getUltimasincronizacion());\n\t\tdm.setTableName(crjpa.Sincronizacion.class.getName()\n\t\t\t\t.substring(crjpa.Sincronizacion.class.getName().lastIndexOf(\".\") + 1));\n\n\t\t// EMF.close();\n\n\t\treturn dm;\n\t}",
"private void insertData() \n {\n for(int i = 0; i < 2; i++){\n RazaEntity razaEntity = factory.manufacturePojo(RazaEntity.class);\n em.persist(razaEntity);\n razaData.add(razaEntity);\n }\n for (int i = 0; i < 3; i++) {\n EspecieEntity especieEntity = factory.manufacturePojo(EspecieEntity.class);\n if(i == 0)\n {\n especieEntity.setRazas(razaData);\n }\n em.persist(especieEntity);\n especieData.add(especieEntity);\n }\n }",
"public void inserir(Comentario c);",
"public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void introducirPagosALojamientoClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente){\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);// pago de alojamiento en rango fchas\n try {\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT ALOJAMIENTO.Id,ALOJAMIENTO.Id_Reservacion,RESERVACION.Fecha_Entrada, RESERVACION.Fecha_Salida,RESERVACION.Precio FROM RESERVACION JOIN ALOJAMIENTO WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND RESERVACION.Fecha_Entrada>=? AND RESERVACION.Fecha_Entrada<=? AND RESERVACION.Dpi_Cliente=? AND RESERVACION.Check_In=1;\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);// pago de alojamiento en rango fchas\n declaracion.setString(3, dpiCliente);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {\n Object objeto[] = new Object[6];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getDate(3);// pago de alojamiento en rango fchas\n objeto[3] = resultado.getDate(4);\n objeto[4] = resultado.getInt(5);\n String fechaInicialProbar=objeto[2].toString();\n String fechaFinalProbar=objeto[3].toString();// pago de alojamiento en rango fchas\n String precioProbar = objeto[4].toString();\n int total=habitacion.hacerTotalAlojamiento(fechaInicialProbar, fechaFinalProbar, precioProbar);\n objeto[5]= total;\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }",
"public DataTable getDtMotivoLlamadoAtencion()\r\n/* 134: */ {\r\n/* 135:140 */ return this.dtMotivoLlamadoAtencion;\r\n/* 136: */ }",
"public Conserto buscarCodigo(int codigo) throws SQLException{\r\n Conserto conserto = null;\r\n conecta = FabricaConexao.conexaoBanco();\r\n sql = \"select * from conserto join carro on carchassi = concarchassi join modelo on oficodigo = conoficodigo where concodigo = ? \";\r\n pstm = conecta.prepareStatement(sql);\r\n pstm.setInt(1, codigo);\r\n rs = pstm.executeQuery();\r\n \r\n if(rs.next()){\r\n conserto = new Conserto();\r\n conserto.setCodigo(rs.getInt(\"concodigo\"));\r\n conserto.setDataEntrada(rs.getDate(\"condataentrada\"));\r\n conserto.setDataSaida(rs.getDate(\"condatasaida\"));\r\n \r\n //instanciando o carro\r\n Carro carro = new Carro();\r\n carro.setChassi(rs.getString(\"carchassi\"));\r\n carro.setPlaca(rs.getString(\"carplaca\"));\r\n carro.setAno(rs.getInt(\"carano\"));\r\n carro.setCor(rs.getString(\"carcor\"));\r\n carro.setStatus(rs.getInt(\"carstatus\"));\r\n conserto.setCarro(carro);\r\n \r\n //instanciando a oficina\r\n Oficina oficina = new Oficina();\r\n oficina.setCodigo(rs.getInt(\"oficodigo\"));\r\n oficina.setNome(rs.getString(\"ofinome\"));\r\n conserto.setOficina(oficina);\r\n }\r\n FabricaConexao.fecharConexao();\r\n \r\n return conserto;\r\n }",
"private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}",
"public void insert() {\n SiswaModel m = new SiswaModel();\n m.setNisn(view.getTxtNis().getText());\n m.setNik(view.getTxtNik().getText());\n m.setNamaSiswa(view.getTxtNama().getText());\n m.setTempatLahir(view.getTxtTempatLahir().getText());\n \n //save date format\n String date = view.getDatePickerLahir().getText();\n DateFormat df = new SimpleDateFormat(\"MM/dd/yyyy\"); \n Date d = null;\n try {\n d = df.parse(date);\n } catch (ParseException ex) {\n System.out.println(\"Error : \"+ex.getMessage());\n }\n m.setTanggalLahir(d);\n \n //Save Jenis kelamin\n if(view.getRadioLaki().isSelected()){\n m.setJenisKelamin(JenisKelaminEnum.Pria);\n }else{\n m.setJenisKelamin(JenisKelaminEnum.Wanita);\n }\n \n m.setAsalSekolah(view.getTxtAsalSekolah().getText());\n m.setHobby(view.getTxtHoby().getText());\n m.setCita(view.getTxtCita2().getText());\n m.setJumlahSaudara(Integer.valueOf(view.getTxtNis().getText()));\n m.setAyah(view.getTxtNamaAyah().getText());\n m.setAlamat(view.getTxtAlamat().getText());\n \n if(view.getRadioLkkAda().isSelected()){\n m.setLkk(LkkEnum.ada);\n }else{\n m.setLkk(LkkEnum.tidak_ada);\n }\n \n //save agama\n m.setAgama(view.getComboAgama().getSelectedItem().toString());\n \n dao.save(m);\n clean();\n }",
"@SuppressWarnings(\"unchecked\")\n public void consultarCoactivosXLS() throws CirculemosNegocioException {\n\n // consulta la tabla temporal de los 6000 coactivos\n StringBuilder sql = new StringBuilder();\n\n sql.append(\"select [TIPO DOC], [NUMERO DE IDENTIFICACIÓN], [valor multas], [titulo valor], proceso \");\n sql.append(\"from coactivos_xls \");\n sql.append(\"where id_tramite is null and numero_axis is null AND archivo is not null \");\n sql.append(\"AND [titulo valor] IN ('2186721','2187250','2187580','2186845')\");\n\n Query query = em.createNativeQuery(sql.toString());\n\n List<Object[]> listaResultados = Utilidades.safeList(query.getResultList());\n\n Date fechaCoactivo = UtilFecha.buildCalendar().getTime();\n CoactivoDTO coactivoDTOs;\n TipoIdentificacionPersonaDTO tipoIdentificacion;\n List<ObligacionCoactivoDTO> obligacionesCoactivoDTO;\n PersonaDTO personaDTO;\n ProcesoDTO proceso;\n // persiste los resultados en coactivoDTO\n for (Object[] coactivo : listaResultados) {\n coactivoDTOs = new CoactivoDTO();\n // persiste el tipo de indetificacion en TipoIdentificacionPersonaDTO\n personaDTO = new PersonaDTO();\n proceso = new ProcesoDTO();\n tipoIdentificacion = new TipoIdentificacionPersonaDTO();\n obligacionesCoactivoDTO = new ArrayList<>();\n\n tipoIdentificacion.setCodigo((String) coactivo[0]);\n personaDTO.setTipoIdentificacion(tipoIdentificacion);\n coactivoDTOs.setPersona(personaDTO);\n coactivoDTOs.getPersona().setNumeroIdentificacion((String) coactivo[1]);\n\n proceso.setFechaInicio(fechaCoactivo);\n coactivoDTOs.setProceso(proceso);\n coactivoDTOs.setValorTotalObligaciones(BigDecimal\n .valueOf(Double.valueOf(coactivo[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n coactivoDTOs.setValorTotalCostasProcesales(\n coactivoDTOs.getValorTotalObligaciones().multiply(BigDecimal.valueOf(0.05)));\n coactivoDTOs.getProceso().setObservacion(\"COACTIVO\");\n String[] numeroFactura = coactivo[3].toString().split(\",\");\n // separa los numeros de factura cuando viene mas de uno.\n for (String nFactura : numeroFactura) {\n // consulta por numero de factura el el saldo a capital por cada factura\n sql = new StringBuilder();\n sql.append(\"select nombre, saldo_capital, saldo_interes \");\n sql.append(\"from cartera_coactivos_xls \");\n sql.append(\"where nombre = :nFactura\");\n\n Query quer = em.createNativeQuery(sql.toString());\n\n quer.setParameter(\"nFactura\", nFactura);\n\n List<Object[]> result = Utilidades.safeList(quer.getResultList());\n // persiste las obligaciones consultadas y las inserta en ObligacionCoactivoDTO\n ObligacionCoactivoDTO obligaciones;\n for (Object[] obligacion : result) {\n obligaciones = new ObligacionCoactivoDTO();\n obligaciones.setNumeroObligacion((String) obligacion[0]);\n obligaciones.setValorObligacion(BigDecimal.valueOf(\n Double.valueOf(obligacion[1].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n obligaciones.setValorInteresMoratorios(BigDecimal.valueOf(\n Double.valueOf(obligacion[2].toString().replaceAll(\"\\\\.\", \"\").replaceAll(\",\", \".\"))));\n // Adiciona las obligaciones a una lista\n obligacionesCoactivoDTO.add(obligaciones);\n }\n\n }\n coactivoDTOs.setObligacionCoactivos(obligacionesCoactivoDTO);\n try {\n iLCoactivo.registrarCoactivoAxis(coactivoDTOs, coactivo[4].toString());\n } catch (Exception e) {\n logger.error(\"Error al registrar coactivo 6000 :\", e);\n }\n }\n }",
"public int getDtVenda() {\n return dtVenda;\n }"
] | [
"0.61933416",
"0.61257917",
"0.5960649",
"0.585691",
"0.58518267",
"0.58493686",
"0.584924",
"0.5823514",
"0.57948625",
"0.5788548",
"0.5771921",
"0.5753758",
"0.5750462",
"0.5732382",
"0.57272667",
"0.57260996",
"0.57259136",
"0.57200813",
"0.57041323",
"0.5692525",
"0.56893605",
"0.56728053",
"0.565484",
"0.564919",
"0.5638985",
"0.56300676",
"0.56276196",
"0.56109816",
"0.56093156",
"0.56090283",
"0.56049514",
"0.56003493",
"0.5596679",
"0.5595792",
"0.55787325",
"0.556195",
"0.5559833",
"0.55483216",
"0.5544747",
"0.55320877",
"0.55255127",
"0.5522342",
"0.5517254",
"0.55166346",
"0.5515641",
"0.5515106",
"0.55147445",
"0.55064976",
"0.5499774",
"0.5491162",
"0.54859483",
"0.54858106",
"0.5479662",
"0.5475917",
"0.5473272",
"0.5469398",
"0.54607856",
"0.54575074",
"0.54548615",
"0.5452785",
"0.54494226",
"0.5445938",
"0.54443365",
"0.5442372",
"0.54412085",
"0.5439677",
"0.54383165",
"0.5437428",
"0.5437209",
"0.54330695",
"0.5427606",
"0.5426734",
"0.54246414",
"0.5423456",
"0.54229176",
"0.5422624",
"0.5422053",
"0.54167175",
"0.5413292",
"0.54092747",
"0.54088444",
"0.54055315",
"0.54010904",
"0.5400761",
"0.53960025",
"0.53949964",
"0.53864187",
"0.53823555",
"0.53812444",
"0.5373921",
"0.53723645",
"0.5370023",
"0.53683335",
"0.5367115",
"0.53658825",
"0.53652364",
"0.53651786",
"0.5364357",
"0.5363948",
"0.53639245"
] | 0.61109495 | 2 |
Retorna a data Calendar em formato Date do SQL | public Date getDataNascimentoToSQL() {
return new Date(dataNascimento.getTimeInMillis());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ReactorResult<java.util.Calendar> getAllDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), DATE, java.util.Calendar.class);\r\n\t}",
"@Override\n public Date getDate(Calendar cal) throws SQLException {\n if (isNull()) return null;\n return getDatatypeCoder().decodeDate(getDate(), cal);\n }",
"Calendar toCalendar();",
"Calendar toCalendar();",
"Calendar getCalendar();",
"public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }",
"public String retornaData(){\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\tDate date = new Date();\n\t\tcalendar.setTime(date);\n\t\treturn df.format(calendar.getTime());\n\t}",
"CalendarDate selectByPrimaryKey(String calendardate);",
"public static String genSQL_To_Date(Calendar cal) {\r\n StringBuffer sbTemp = new StringBuffer();\r\n SimpleDateFormat formatter =\r\n new SimpleDateFormat(NCMS.DATE_FORMAT_FULL);\r\n if (cal != null) {\r\n sbTemp.append(\"TO_DATE('\")\r\n .append(formatter.format(cal.getTime())).append(\"','\")\r\n .append(NCMS.SQL_DATE_FORMAT_FULL).append(\"')\");\r\n return sbTemp.toString();\r\n }\r\n else {\r\n return \"null\";\r\n }\r\n }",
"private java.sql.Date obtenerFechaEnSQL(JXDatePicker fecha) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(fecha.getDate());\n int year = cal.get(Calendar.YEAR) - 1900; //PORQUE PUTAS\n int month = cal.get(Calendar.MONTH);\n int day = cal.get(Calendar.DAY_OF_MONTH);\n java.sql.Date sqlDate;\n\n sqlDate = new java.sql.Date(year, month, day);\n return sqlDate;\n }",
"public static ReactorResult<java.util.Calendar> getAllDate_as(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_as(model, instanceResource, DATE, java.util.Calendar.class);\r\n\t}",
"public Calendar calendario(Date date) {\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.setTime(date);\r\n return calendar;\r\n }",
"public Calendar toDate() {\n Calendar cal = Calendar.getInstance();\n if (year != null) {\n cal.set(Calendar.YEAR, year);\n }\n if (month != null) {\n cal.set(Calendar.MONTH, TimeConstants.getMonthIndex(month));\n }\n if (day != null) {\n cal.set(Calendar.DAY_OF_MONTH, day);\n }\n return cal;\n }",
"public static Calendar dateToCalendar(Date fecha, String formato)\n throws Exception {\n if (nullToBlank(fecha).equals(\"\")) {\n return null;\n }\n SimpleDateFormat df = new SimpleDateFormat(formato);\n String text = df.format(fecha);\n return stringToCalendar(text, formato);\n }",
"public StockDate GetCalendar()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public Calendar getDate(){\n return date;\n }",
"private String getDateString(Calendar cal) {\n Calendar current = Calendar.getInstance();\n String date = \"\";\n if (cal.get(Calendar.DAY_OF_YEAR) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_today) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 1) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 2) == current.get(Calendar.DAY_OF_YEAR)\n && getResources().getConfiguration().locale.equals(new Locale(\"vn\"))) {\n date = getResources().getString(R.string.content_before_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else {\n date = String.format(\"%02d-%02d-%02d %02d:%02d\", mCal.get(Calendar.DAY_OF_MONTH), mCal.get(Calendar.MONTH) + 1, mCal.get(Calendar.YEAR), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }\n\n return date;\n }",
"public String getDateString(Calendar c){\n\n //get all time data\n String mYear = Integer.toString(c.get(Calendar.YEAR));\n int mMonth = c.get(Calendar.MONTH);\n String mDay = Integer.toString(c.get(Calendar.DAY_OF_MONTH));\n String mMinute = Integer.toString(c.get(Calendar.MINUTE));\n String mHour = Integer.toString(c.get(Calendar.HOUR));\n String mSecond= Integer.toString(c.get(Calendar.SECOND));\n\n //create string for Month in words and get it based off the int\n String mMonthWord= null;\n switch(mMonth){\n case 0:\n mMonthWord= \"Jan\";\n break;\n case 1:\n mMonthWord= \"Feb\";\n break;\n case 2:\n mMonthWord= \"March\";\n break;\n case 3:\n mMonthWord= \"April\";\n break;\n case 4:\n mMonthWord= \"May\";\n break;\n case 5:\n mMonthWord= \"June\";\n break;\n case 6:\n mMonthWord= \"July\";\n break;\n case 7:\n mMonthWord= \"August\";\n break;\n case 8:\n mMonthWord= \"Sept\";\n break;\n case 9:\n mMonthWord= \"Oct\";\n break;\n case 10:\n mMonthWord= \"Nov\";\n break;\n case 11:\n mMonthWord= \"Dec\";\n }\n\n //return the DateTime String for Display\n return mHour+\":\"+mMinute+\":\"+mSecond+\" \"+mMonthWord+ \" \"+mDay+\" \"+mYear;\n\n }",
"public static Calendar dateToCalendar(Date date){ \r\n Calendar cal = Calendar.getInstance();\r\n cal.setTime(date);\r\n return cal;\r\n }",
"public Calendar getFechaMatriculacion() {\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.set(Integer.parseInt(cbox_ano.getSelectedItem().toString()), cbox_mes.getSelectedIndex(),\r\n\t\t\t\tInteger.parseInt(cbox_dia.getSelectedItem().toString()));\r\n\t\treturn c;\r\n\t}",
"private String getFechaLab(int intCodEmp, int intCodLoc){\n String strFecha=\"\"; \n java.sql.Connection conLoc;\n try{\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n java.sql.Statement stmLoc = conLoc.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.* \";\n strSql+=\" FROM tbm_calCiu as a1 \";\n strSql+=\" INNER JOIN tbm_loc as a2 ON (a1.co_ciu=a2.co_ciu) \";\n strSql+=\" WHERE a2.co_emp=\"+intCodEmp+\" and co_loc=\"+intCodLoc+\" AND CASE WHEN EXTRACT(MONTH from CURRENT_DATE)=12 THEN \";\n strSql+=\" (EXTRACT(YEAR from CURRENT_DATE)+1)=EXTRACT(YEAR from a1.fe_Dia) AND /*MES ENERO JM*/1=EXTRACT(MONTH from a1.fe_Dia) ELSE \";\n strSql+=\" EXTRACT(YEAR from CURRENT_DATE)=EXTRACT(YEAR from a1.fe_Dia) AND (EXTRACT(MONTH from CURRENT_DATE)+1)=EXTRACT(MONTH from a1.fe_Dia) END AND a1.tx_tipDia='L' \";\n strSql+=\" ORDER BY a1.fe_dia ASC\t\";\n strSql+=\" LIMIT 1\";\n \tjava.sql.ResultSet rstLoc = stmLoc.executeQuery(strSql);\n if(rstLoc.next()){\n //System.out.println(\"fecha \" + rstLoc.getString(\"fe_dia\"));\n strFecha=objUti.formatearFecha(rstLoc.getString(\"fe_dia\"), \"yyyy-MM-dd\",\"dd/MM/yyyy\" );\n //System.out.println(\"strFecha \" + strFecha);\n }\n rstLoc.close();\n rstLoc=null;\n stmLoc.close();\n stmLoc=null;\n }\n conLoc.close();\n conLoc=null;\n }\n catch (java.sql.SQLException e){\n objUti.mostrarMsgErr_F1(this, e);\n }\n catch (Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n }\n return strFecha;\n }",
"public Calendar toCalendar(){\r\n\t\tSimpleDateFormat[] formats = new SimpleDateFormat[] {\r\n\t\t\t\tYYYY_MM_DD_FORMATTER, YYYY_MMT_DD_T_HH_MM_FORMATTER,\r\n\t\t\t\tYYYY_MMT_DD_T_HH_MM_SS_FORMATTER };\r\n\t\tfor (SimpleDateFormat format : formats) {\r\n\t\t\ttry {\r\n\t\t\t\tDate date = format.parse(this.timeString);\r\n\t\t\t\tCalendar calendar = Calendar.getInstance();\r\n\t\t\t\tcalendar.setTime(date);\r\n\t\t\t\treturn calendar;\r\n\t\t\t} catch (ParseException e) {\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public java.sql.Date getDate(String columnName, Calendar cal) throws SQLException\n {\n return m_rs.getDate(columnName, cal);\n }",
"public String cal(Calendar calendar) {\r\n String calendari;\r\n calendari = calendar.get(Calendar.DAY_OF_MONTH) + \"-\" + calendar.get(Calendar.MONTH) + \"-\" + calendar.get(Calendar.YEAR);\r\n return calendari;\r\n }",
"public Calendario getCalendar(){\r\n\t\treturn calendar;\r\n\t}",
"public Date getDate(String columnName, Calendar calendar) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"getDate(\" + StringUtils.quoteJavaString(columnName) + \", calendar)\");\n }\n Date x = get(columnName).getDate();\n return DateTimeUtils.convertDateToCalendar(x, calendar);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public Calendar getDate() {\r\n return (Calendar) selectedDate;\r\n }",
"java.lang.String getStartDateYYYYMMDD();",
"private Date calendarToDate(Calendar calendar) {\n return (Date) calendar.getTime();\n }",
"java.lang.String getToDate();",
"public java.sql.Date getDate(int columnIndex, Calendar cal) throws SQLException\n {\n return m_rs.getDate(columnIndex, cal);\n }",
"private Calendar convertDateToCalendar(Date date) {\n Calendar calendar = GregorianCalendar.getInstance();\n calendar.setTime(date);\n return calendar;\n }",
"public Date getDate(int columnIndex, Calendar calendar) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"getDate(\" + columnIndex + \", calendar)\");\n }\n Date x = get(columnIndex).getDate();\n return DateTimeUtils.convertDateToCalendar(x, calendar);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public CalendarioFecha obtenerPorEvento(Evento evento) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.createCriteria(CalendarioFecha.class).add(Restrictions.eq(\"evento\", evento))\n\t\t \t\t.add(Restrictions.eq(\"activo\", true)).uniqueResult(); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}",
"public String dar_fecha(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n return dateFormat.format(date).toString();\n\n }",
"@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}",
"private String getDate(Calendar c) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\t\n\t\tsb.append(EventHelper.getMonth(c));\n\t\tsb.append(\" \");\n\t\tsb.append(EventHelper.getDate(c));\n\t\t\n\t\treturn sb.toString();\n\t\t\n\t}",
"public static String getDateString(Calendar cal) {\n\t\tString month = Integer.toString(cal.get(Calendar.MONTH)+1);\n\t\tString day = Integer.toString(cal.get(Calendar.DAY_OF_MONTH));\n\t\tString year = Integer.toString(cal.get(Calendar.YEAR));\n\t\treturn month + \"/\" + day + \"/\" + year;\n\t}",
"public CalendarioFecha obtenerPorEvento(int id) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.get(CalendarioFecha.class, id); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}",
"public abstract java.lang.String getFecha_inicio();",
"public CalendarioFecha obtenerPorEvento(Reservacion reservacion) throws Exception { \n\t \n\t\t CalendarioFecha datos = new CalendarioFecha(); \n\t\t Session em = sesionPostgres.getSessionFactory().openSession(); \t\n\t try { \t\n\t\t datos = (CalendarioFecha) em.createCriteria(CalendarioFecha.class).add(Restrictions.eq(\"reservacion\", reservacion))\n\t\t \t\t.add(Restrictions.eq(\"activo\", true)).uniqueResult(); \n\t } catch (Exception e) { \n\t \n\t throw new Exception(e.getMessage(),e.getCause());\n\t } finally { \n\t em.close(); \n\t } \n\t \n\t return datos; \n\t}",
"public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }",
"public String obtenerFechaSistema() {\n Calendar fecha = new GregorianCalendar();\r\n//Obtenemos el valor del año, mes, día,\r\n//hora, minuto y segundo del sistema\r\n//usando el método get y el parámetro correspondiente\r\n int anio = fecha.get(Calendar.YEAR);\r\n int mes = fecha.get(Calendar.MONTH)+1;\r\n int dia = fecha.get(Calendar.DAY_OF_MONTH);\r\n// int hora = fecha.get(Calendar.HOUR_OF_DAY);\r\n// int minuto = fecha.get(Calendar.MINUTE);\r\n// int segundo = fecha.get(Calendar.SECOND);\r\n// String ff = \"\" + dia + \"/\" + (mes + 1) + \"/\" + anio;\r\n String ff;\r\n// = System.out.println(\"Fecha Actual: \"\r\n// + dia + \"/\" + (mes + 1) + \"/\" + año);\r\n// System.out.printf(\"Hora Actual: %02d:%02d:%02d %n\",\r\n// hora, minuto, segundo);\r\n// ff = hora + \":\" + minuto + \":\" + segundo + \".0\";\r\n ff = anio + \"-\" + mes + \"-\" + dia;\r\n return ff;\r\n }",
"public void initCalendarFirst() {\n getCurrentDate();\n mCalendar.setOnDateChangedListener(new OnDateSelectedListener() {\n @Override\n public void onDateSelected(@NonNull MaterialCalendarView widget, @NonNull CalendarDay select, boolean selected) {\n mSelectedDate = select.toString();\n String string[] = mSelectedDate.split(\"\\\\{|\\\\}\");\n String s = string[1]; //2017-8-14\n String string1[] = s.split(\"-\");\n int tempMonth = Integer.parseInt(string1[1]);\n String month = Integer.toString(tempMonth + 1);\n mDate1 = string1[0] + \"-\" + month + \"-\" + string1[2];\n }\n });\n }",
"public String getDataMain(){\n\n calendar = Calendar.getInstance();\n thisYear = calendar.get(Calendar.YEAR);\n Log.d(TAG, \"# thisYear : \" + thisYear);\n\n thisMonth = calendar.get(Calendar.MONTH);\n Log.d(TAG, \"@ thisMonth : \" + thisMonth);\n\n thisDay = calendar.get(Calendar.DAY_OF_MONTH);\n Log.d(TAG, \"$ thisDay : \" + thisDay);\n\n mese = monthIntToString(thisMonth);\n\n /*\n switch (thisMonth){\n case 0:\n mese = \"Gennaio\";\n break;\n case 1:\n mese = \"Febbraio\";\n break;\n case 2:\n mese = \"Marzo\";\n break;\n case 3:\n mese = \"Aprile\";\n break;\n case 4:\n mese = \"Maggio\";\n break;\n case 5:\n mese = \"Giugno\";\n break;\n case 6:\n mese = \"Luglio\";\n break;\n case 7:\n mese = \"Agosto\";\n break;\n case 8:\n mese = \"Settembre\";\n break;\n case 9:\n mese = \"Ottobre\";\n break;\n case 10:\n mese = \"Novembre\";\n break;\n case 11:\n mese = \"Dicembre\";\n break;\n }\n */\n return mese;\n }",
"public static Calendar getCalender(String val, String format) {\n Calendar calendar = Calendar.getInstance();\n\n SimpleDateFormat dateFormat = getSimpleDateFormat(format);\n\n try {\n\n Date date = dateFormat.parse(val);\n if (date != null) {\n long millis = date.getTime();\n calendar.setTimeInMillis(millis);\n }\n } catch (Exception e) {\n\n Log.e(\"getCalender\", \"ex1\"+\"===\"+val+\"===\"+format+\"===\"+ e);\n e.printStackTrace();\n }\n\n return calendar;\n }",
"private String formatCalendar(Calendar c)\r\n\t{\n\t\t\tDate tasktime = c.getTime(); \r\n\t\t\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"MMMMM d yyyy\"); \r\n\t \r\n\t\treturn df.format(tasktime); \r\n\t}",
"public String getFechaSistema() {\n Date date = new Date();\n DateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n //Aplicamos el formato al objeto Date y el resultado se\n //lo pasamos a la variable String\n fechaSistema = formato.format(date);\n \n return fechaSistema;\n }",
"public String formatCalDate(Calendar cal) {\n if (cal != null) return SDF_TYPE_1.format(cal.getTime());\n return \"\";\n }",
"public String getFechatxt(Date d){\n \n try {\n String formato = selectorfecha.getDateFormatString();\n //Formato\n \n SimpleDateFormat sdf = new SimpleDateFormat(formato);\n String txtfechap = sdf.format(d);\n return txtfechap;\n } catch (NullPointerException ex) {\n JOptionPane.showMessageDialog(this, \"Al menos selecciona una fecha válida!\", \"Error!\", JOptionPane.INFORMATION_MESSAGE);\n return null;\n\n }\n\n\n \n }",
"public Calendar getDate() {\n\treturn date;\n }",
"public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\n }",
"public Calendar getDate()\n {\n return date;\n }",
"public static String formatarData(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t\t\tif (dataCalendar.get(Calendar.DAY_OF_MONTH) > 9) {\r\n\t\t\t\tdataBD.append(dataCalendar.get(Calendar.DAY_OF_MONTH) + \"/\");\r\n\t\t\t} else {\r\n\t\t\t\tdataBD.append(\"0\" + dataCalendar.get(Calendar.DAY_OF_MONTH) + \"/\");\r\n\t\t\t}\r\n\r\n\t\t\tif ((dataCalendar.get(Calendar.MONTH) + 1) > 9) {\r\n\t\t\t\tdataBD.append(dataCalendar.get(Calendar.MONTH) + 1 + \"/\");\r\n\t\t\t} else {\r\n\t\t\t\tdataBD.append(\"0\" + (dataCalendar.get(Calendar.MONTH) + 1) + \"/\");\r\n\t\t\t}\r\n\r\n\t\t\tdataBD.append(dataCalendar.get(Calendar.YEAR));\r\n\t\t\tretorno = dataBD.toString();\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"public static String getDate(String formato, java.util.Date fecha)\n {\n try\n {\n DateFormat formatter = null;\n formatter=new SimpleDateFormat(formato); \n Calendar c1 = Calendar.getInstance();\n c1.setTime(fecha);\n String dato=formatter.format(c1.getTime());\n return dato;\n }\n catch(Exception e)\n {\n System.out.println(\"Error getdate:\" + e);\n return null;\n }\n }",
"public java.util.Calendar getFechaSolicitud(){\n return localFechaSolicitud;\n }",
"public String getFecha() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }",
"public Calendar getCalendar() {\n return cal;\n }",
"private void createCalendar() {\n myCALENDAR = Calendar.getInstance();\r\n DAY = myCALENDAR.get(Calendar.DAY_OF_MONTH);\r\n MONTH = myCALENDAR.get(Calendar.MONTH) + 1;\r\n YEAR = myCALENDAR.get(Calendar.YEAR);\r\n HOUR = myCALENDAR.get(Calendar.HOUR_OF_DAY);\r\n MINUTE = myCALENDAR.get(Calendar.MINUTE);\r\n SECOND = myCALENDAR.get(Calendar.SECOND);\r\n }",
"public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }",
"public static String CalendarToString(Calendar fecha, String formato)\n throws Exception {\n if (nullToBlank(fecha).equals(\"\")) {\n return \"\";\n }\n SimpleDateFormat df = new SimpleDateFormat(formato);\n return df.format(fecha.getTime());\n }",
"java.lang.String getFoundingDate();",
"public DefaultScheduleEvent getEventosCalendario(DateTime data, Servico servico) throws NullPointerException {\n\t\tList<ServicoJanelaAtendimento> servicoJanelaAtendimentos = new ArrayList<>();\n\t\tList<SolicitacaoServico> solicitacaoServicos = new ArrayList<>();\n\t\t\n\t\t\n\t\t\n\t\tgetServicoJanelaAtendimentoDAO().beginTransaction();\n\t\tservicoJanelaAtendimentos = getServicoJanelaAtendimentoDAO().getServicoJanelaPorDataJanela(data.toDate(), servico);\n\t\tgetServicoJanelaAtendimentoDAO().closeTransaction();\n\t\t\n\t\tDefaultScheduleEvent defaultScheduleEvent= new DefaultScheduleEvent();\n\t\tdefaultScheduleEvent.setAllDay(true);\n\t\tdefaultScheduleEvent.setData(data.toDate());\n\t\tdefaultScheduleEvent.setStartDate(data.toDate());\n\t\tdefaultScheduleEvent.setEndDate(data.plusHours(20).toDate());\n\t\t\n\t\t\n\t\tif(!servicoJanelaAtendimentos.isEmpty()) {\n\t\t\t\n\t\t\t\n\t\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\t\tsolicitacaoServicos = getSolicitacaoServicoDAO().getSolicitacoesPorDataeServico(data.toDate(), servico);\n\t\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\t\n\t\t\tint janelaServico = 0;\n\t\t\tint janelaSolicitacao = 0;\n\t\t\t\tfor(ServicoJanelaAtendimento servicoJanelaAtendimento: servicoJanelaAtendimentos) {\n\t\t\t\t\tjanelaServico = janelaServico + servicoJanelaAtendimento.getCapacidadePeriodo();\n\t\t\t\t}\n\t\t\t\tjanelaSolicitacao = solicitacaoServicos.size();\n\t\t\tint disponivel = janelaServico-janelaSolicitacao;\n\t\t\tif(disponivel > 0) {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"DisponÃvel\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"green\");\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tdefaultScheduleEvent.setTitle(\"Encaixe\");\n\t\t\t\tdefaultScheduleEvent.setStyleClass(\"red\");\n\t\t\t\t\n\t\t\t}\n\t\t}else {\n\t\tdefaultScheduleEvent.setTitle(\"Não DisponÃvel\");\n\t\tdefaultScheduleEvent.setStyleClass(\"no-color\");\n\t\t}\n\t\t\n\t\treturn defaultScheduleEvent;\n\t}",
"private LocalDate get_DATE(int column) {\n // DATE column is always 10 chars long\n String dateString = dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n 10, charset_[column - 1]).toString();\n return LocalDate.parse(dateString, DRDAConstants.DB2_DATE_FORMAT);\n// return DateTime.dateBytesToDate(dataBuffer_,\n// columnDataPosition_[column - 1],\n// cal,\n// charset_[column - 1]);\n }",
"java.lang.String getDate();",
"private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }",
"public String getDateFormated(Calendar objCalendar, String sDateFormat) throws Exception {\n SimpleDateFormat formatter = null;\n String sDate = \"\";\n String sDefaultDateFormat = \"yyyy:MM:dd HH:mm:ss\";\n try {\n if (sDateFormat == null) {\n sDateFormat = \"\";\n }\n sDateFormat = sDateFormat.trim();\n if (!sDateFormat.trim().equalsIgnoreCase(\"\")) {\n sDefaultDateFormat = sDateFormat;\n }\n\n formatter = new SimpleDateFormat(sDefaultDateFormat);\n sDate = formatter.format(objCalendar.getTime());\n sDate.trim();\n return sDate;\n } catch (Exception exp) {\n println(\"getCurrentDateTime : \" + exp.toString());\n throw exp;\n }\n }",
"public Vector<Event> getEventsInDay(Date par){\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n Vector<Event> result = new Vector<Event>();\n try {\n //obtain the database connection by calling getConn()\n con = getConn();\n \n SimpleDateFormat format1 = new SimpleDateFormat(\"dd-MM-YY\");\n \n //build the sql statement\n String sql = \"select * from event where to_date('\" + format1.format(par) + \"','DD-MM-YY') \";\n sql+= \"between to_date(start_time,'DD-MM-YY') and to_date(end_time,'DD-MM-YY')\";\n \n \n //System.out.println(sql);\n //create the PreparedStatement from the Connection object by calling prepareCall\n //method, passing it the sql that is constructed using the supplied parameters\n st = con.prepareCall(sql);\n \n \n //Calls executeQuery and the resulting data is returned in the resultset\n rs = st.executeQuery();\n \n //loop through the result set and save the data in the datamodel objects\n while (rs.next()){\n \n Event e = new Event(rs.getLong(\"id\"),rs.getString(\"id\") + \",\" + rs.getString(\"name\"),rs.getDate(\"start_time\"),rs.getDate(\"end_time\"));\n ;\n result.add(e);\n \n }\n \n }\n catch (SQLException e){\n e.printStackTrace();\n }\n //close the resultset,preparedstatement and connection to relase resources \n if (rs != null){\n try{\n rs.close();\n rs = null;\n }\n catch (SQLException e){\n \n }\n }\n if (st != null){\n try{\n st.close();\n st = null;\n }\n catch (SQLException e){\n \n }\n }\n \n \n \n if (con != null){\n try{\n con.close();\n con = null;\n }\n catch (SQLException e){\n \n }\n }\n return result;\n \n \n }",
"private String formatarData(Date data)\n {\n String sDate;\n String sDia = \"\";\n String sMes = \"\";\n\n GregorianCalendar calendar = new GregorianCalendar();\n calendar.setTime(data);\n int dia = calendar.get(GregorianCalendar.DAY_OF_MONTH);\n if (dia > 0) {\n if (dia < 10) {\n sDia = \"0\";\n }\n }\n sDia += dia;\n\n int mes = calendar.get(GregorianCalendar.MONTH);\n mes = mes + 1;\n if (mes > 0) {\n if (mes < 10) {\n sMes = \"0\";\n }\n }\n sMes += mes;\n\n int ano = calendar.get(GregorianCalendar.YEAR);\n\n int hora = calendar.get(GregorianCalendar.HOUR);\n // 0 = dia\n // 1 = noite\n int amPm = calendar.get(GregorianCalendar.AM_PM);\n\n if(amPm == 1)\n {\n if(hora>0 && hora < 13)\n {\n if(hora > 11)\n hora = 0;\n else\n hora += 12;\n }\n }\n\n String sHora = \" \";\n if(hora<=9)\n {\n sHora += \"0\";\n }\n String sMin=\":\";\n int min = calendar.get(GregorianCalendar.MINUTE);\n if(min <10)\n sMin += \"0\";\n sMin += String.valueOf(min);\n sHora += String.valueOf(hora) + sMin + \":00\";\n sDate = String.valueOf(ano) + \"-\" + sMes + \"-\" + sDia + sHora;\n return sDate;\n\n }",
"public Date getSelectDate();",
"public final DBResult getDateCodes(Calendar day) throws SQLException {\n PreparedStatement statement = connection.prepareStatement(\"SELECT DISTINCT SERVICE_ID \" + \"FROM \"\n + config.getDaymarkerTable() + \" WHERE \" + getWeekDay(day) + \" ='1'\"\n + \" AND START_DATE<=? AND END_DATE>=? ORDER BY SERVICE_ID\");\n Date date = new Date(day.getTimeInMillis());\n statement.setDate(1, date);\n statement.setDate(2, date);\n return new DBResult(statement, statement.executeQuery());\n }",
"public static Calendar dateToCalendar(Date date) {\r\n Calendar cal = Calendar.getInstance();\r\n cal.clear();\r\n cal.setTimeInMillis(date.getTime());\r\n return cal;\r\n }",
"protected String readCalendarData(DavCalendarResource resource)\n throws DavException {\n StringBuffer buffer = new StringBuffer();\n if (outputFilter != null)\n outputFilter.filter(resource.getCalendar(), buffer);\n else\n buffer.append(resource.getCalendar().toString());\n return buffer.toString();\n }",
"public java.sql.ResultSet consultaporfecha(String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"select phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo from pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes where phm.fechas='\"+fecha+\"' and phm.codMedico_fk=pmd.codigo and pmd.codEspe_fk=pes.codigo and phm.fechas >= CURDATE() ORDER BY phm.fechas,phm.horas\");\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultaporfecha \"+ex);\r\n }\t\r\n return rs;\r\n }",
"public final synchronized Date getDate(int parameterIndex, Calendar cal) \n throws SQLException\n {\n return getCallableStatement().getDate(parameterIndex, cal);\n }",
"public java.sql.Date toSQLDate() {\r\n String isoStr = this.toSQLString();\r\n return java.sql.Date.valueOf(isoStr);\r\n //return new GregorianCalendar(this.year, this.month, this.day).getTime();\r\n }",
"java.lang.String getFromDate();",
"private void getIntialCalender() {\n\n\t\ttry {\n\n\t\t\tc = Calendar.getInstance();\n\t\t\tString[] fields = Global_variable.str_booking_date.split(\"[-]\");\n\n\t\t\tString str_year = fields[0];\n\t\t\tString str_month = fields[1];\n\t\t\tString str_day = fields[2];\n\n\t\t\tSystem.out.println(\"!!!!\" + fields[0]);\n\t\t\tSystem.out.println(\"!!!!\" + fields[1]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields[2]);\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tyear = Integer.parseInt(str_year);\n\t\t\t} else {\n\t\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\t}\n\n\t\t\tif (str_month.length() != 0) {\n\t\t\t\tmonth = Integer.parseInt(str_month) - 1;\n\t\t\t} else {\n\t\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (str_year.length() != 0) {\n\t\t\t\tday = Integer.parseInt(str_day);\n\t\t\t} else {\n\t\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t}\n\n\t\t\tString[] fields1 = Global_variable.str_booking_time.split(\"[:]\");\n\n\t\t\tString str_hour = fields1[0];\n\t\t\tString str_minutes = fields1[1];\n\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[0]);\n\t\t\tSystem.out.println(\"!!!!!\" + fields1[1]);\n\n\t\t\tif (str_hour.length() != 0) {\n\t\t\t\thour = Integer.parseInt(str_hour);\n\t\t\t} else {\n\t\t\t\thour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t}\n\n\t\t\tif (str_minutes.length() != 0) {\n\t\t\t\tminutes = Integer.parseInt(str_minutes);\n\t\t\t} else {\n\t\t\t\tminutes = c.get(Calendar.MINUTE);\n\t\t\t}\n\n\t\t\tcurrDate = new java.sql.Date(System.currentTimeMillis());\n\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\tCalendar c1 = Calendar.getInstance();\n\t\t\tc1.setTime(new Date()); // Now use today date.\n\t\t\tc1.add(Calendar.DATE, 30); // Adding 30 days\n\t\t\toutput = sdf.format(c1.getTime());\n\t\t\tSystem.out.println(\"!!!!!!!!!!!!!!!\" + output);\n\n\t\t} catch (NullPointerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public Date getDataConsegna() {\n\t\t\treturn dataConsegna;\n\t\t}",
"public static String formatarDataAAAAMMDD(Date data) {\r\n\t\tString retorno = \"\";\r\n\t\tif (data != null) { // 1\r\n\t\t\tCalendar dataCalendar = new GregorianCalendar();\r\n\t\t\tStringBuffer dataBD = new StringBuffer();\r\n\r\n\t\t\tdataCalendar.setTime(data);\r\n\r\n\t\t\tdataBD.append(dataCalendar.get(Calendar.YEAR));\r\n\r\n\t\t\tif ((dataCalendar.get(Calendar.MONTH) + 1) > 9) {\r\n\t\t\t\tdataBD.append(dataCalendar.get(Calendar.MONTH) + 1);\r\n\t\t\t} else {\r\n\t\t\t\tdataBD.append(\"0\" + (dataCalendar.get(Calendar.MONTH) + 1));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (dataCalendar.get(Calendar.DAY_OF_MONTH) > 9) {\r\n\t\t\t\tdataBD.append(dataCalendar.get(Calendar.DAY_OF_MONTH));\r\n\t\t\t} else {\r\n\t\t\t\tdataBD.append(\"0\" + dataCalendar.get(Calendar.DAY_OF_MONTH));\r\n\t\t\t}\r\n\r\n\t\t\tretorno = dataBD.toString();\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}",
"private String tilStandardDatostreng(Calendar c)\n {\n return c.get(Calendar.DATE) + \"/\" + (c.get(Calendar.MONTH) + 1) + \"/\" + c.get(Calendar.YEAR);\n }",
"public Date getDataDeCadastro() {\n\t\treturn this.dataDeCadastro;\n\t}",
"public static GregorianCalendar stringToCalendar(String fecha,\n String formato){\n GregorianCalendar gc = new GregorianCalendar();\n try {\n fecha = nullToBlank(fecha);\n SimpleDateFormat df = new SimpleDateFormat(formato);\n gc.setTime(df.parse(fecha));\n } catch (Exception e) {\n e.printStackTrace();\n }\n return gc;\n }",
"public GregorianCalendar getSelectedDate(){\n int day = Integer.parseInt(this.date_day.getSelectedItem().toString());\n int month = Integer.parseInt(this.date_month.getSelectedItem().toString());\n int year = Integer.parseInt(this.date_year.getSelectedItem().toString());\n\n GregorianCalendar date = new GregorianCalendar();\n date.setTimeInMillis(0);\n \n date.set(Calendar.DAY_OF_MONTH, day);\n date.set(Calendar.MONTH, month -1);\n date.set(Calendar.YEAR, year);\n\n return date;\n }",
"public List getCalendarios(Map criteria);",
"Date getFechaNacimiento();",
"public Calendar getCalendar() {\n return _calendar;\n }",
"String getDate();",
"String getDate();",
"DateFormat getSourceDateFormat();",
"public Dia[] getCalendari() {\n\t\treturn cal;\n\t}",
"private XMLGregorianCalendar getDate(Value segment, Repository repository)\n {\n RepositoryConnection con = null;\n try\n {\n con = getRepositoryConnection(repository);\n \n String adaptorQuery = \"SELECT ?dateValue WHERE { <\" + segment + \"> <http://toif/contains> ?date . \"\n + \"?date <http://toif/date> ?dateValue . }\";\n \n TupleQuery adaptorTupleQuery = con.prepareTupleQuery(QueryLanguage.SPARQL, adaptorQuery);\n \n TupleQueryResult queryResult = adaptorTupleQuery.evaluate();\n \n while (queryResult.hasNext())\n {\n BindingSet adaptorSet = queryResult.next();\n Value dateValue = adaptorSet.getValue(\"dateValue\");\n \n try\n {\n GregorianCalendar gregorianCalendar = new GregorianCalendar();\n \n DateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n \n Date date = formatter.parse(dateValue.stringValue());\n gregorianCalendar.setTime(date);\n \n XMLGregorianCalendar xmlGrogerianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar);\n \n xmlGrogerianCalendar.setTimezone(DatatypeConstants.FIELD_UNDEFINED);\n xmlGrogerianCalendar.setTime(DatatypeConstants.FIELD_UNDEFINED, DatatypeConstants.FIELD_UNDEFINED,\n DatatypeConstants.FIELD_UNDEFINED);\n \n return xmlGrogerianCalendar;\n }\n catch (DatatypeConfigurationException e)\n {\n e.printStackTrace();\n }\n catch (ParseException e)\n {\n e.printStackTrace();\n }\n \n }\n \n queryResult.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n catch (MalformedQueryException e)\n {\n e.printStackTrace();\n }\n catch (QueryEvaluationException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n con.close();\n }\n catch (RepositoryException e)\n {\n e.printStackTrace();\n }\n }\n \n return null;\n \n }",
"Date getForDate();",
"public Calendar toCalendar() {\n\t\treturn (Calendar) _cal.clone();\n\t}",
"public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }",
"public static Calendar getCalendar(Date date) {\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tif (date != null) {\r\n\t\t\tcal.setTime(date);\r\n\t\t} else {\r\n\t\t\tcal.setTime(new Date());\r\n\t\t}\r\n\t\treturn cal;\r\n\t}",
"public static String getCalendarAndThrow(Document document, String name)\n throws IllegalArgumentException, RepositoryException {\n String result;\n ValueImpl v = getValueAndThrow(document, name);\n if (v == null) {\n result = null;\n } else if (v instanceof DateValue) {\n result = ((DateValue) v).toRfc822();\n } else {\n result = v.toFeedXml();\n }\n return result;\n }",
"public abstract java.lang.String getFecha_termino();",
"public Calendar getArchivalDate();",
"Date getDataIns();"
] | [
"0.6714428",
"0.67029774",
"0.6670337",
"0.6670337",
"0.66548204",
"0.66012377",
"0.65784264",
"0.6477912",
"0.64655775",
"0.63580143",
"0.6303826",
"0.63009757",
"0.62133497",
"0.6195131",
"0.619075",
"0.60840654",
"0.6069714",
"0.6059676",
"0.60546714",
"0.604036",
"0.6020085",
"0.60190684",
"0.60137427",
"0.6011446",
"0.60046816",
"0.5985815",
"0.59775996",
"0.59692585",
"0.5959575",
"0.59504426",
"0.5940215",
"0.59214747",
"0.5906571",
"0.59014994",
"0.5899158",
"0.5898952",
"0.5893497",
"0.5890905",
"0.5828258",
"0.5824181",
"0.5823069",
"0.58177835",
"0.5777143",
"0.57733446",
"0.5765258",
"0.57634974",
"0.57618886",
"0.57556665",
"0.5745801",
"0.57366127",
"0.5736473",
"0.5729192",
"0.5728808",
"0.57281065",
"0.5720006",
"0.56956714",
"0.56949806",
"0.56891894",
"0.5674064",
"0.5672152",
"0.56663054",
"0.5639652",
"0.5636886",
"0.56313133",
"0.5625892",
"0.56108814",
"0.56010616",
"0.5600585",
"0.55832773",
"0.55763996",
"0.5571016",
"0.5567832",
"0.5564479",
"0.5562105",
"0.55515784",
"0.55512327",
"0.55452895",
"0.55443895",
"0.55373275",
"0.55340344",
"0.5531761",
"0.55236727",
"0.55236393",
"0.55231345",
"0.5518406",
"0.5516058",
"0.5514954",
"0.55149364",
"0.55149364",
"0.55073005",
"0.55067486",
"0.54986036",
"0.54978406",
"0.5494767",
"0.54927146",
"0.548691",
"0.5484776",
"0.54805076",
"0.5473325",
"0.54712397"
] | 0.56432295 | 61 |
Returns all settings available in the system. | List<SettingDTO> getSettings(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Settings> getAllSettings() {\n return this.settingsRepository.findAll();\n }",
"public List<Setting> getSettings() {\n // Usuario logeado\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n\n // Entidad del usuario\n User user = userRepository.findByUsername((username)).orElseThrow();\n\n return settingRepository.findByUserId(user.getId());\n }",
"public String getSettings();",
"@Override\n\tpublic List<Setting> queryall() {\n\t\treturn SettingMapper.queryall();\n\t}",
"@Override\n\tpublic List<Setting> findsetting() {\n\t\treturn SettingMapper.findsetting();\n\t}",
"protected String readSettings() {\n String output = \"\";\n for (String setting: settings.keySet()) {\n String value = settings.get(setting);\n output += setting + \":\" + value + \"\\n\";\n }\n return output;\n }",
"public static @NotNull Settings getSettings ()\n {\n Application application = ApplicationManager.getApplication ();\n SettingsPlugin settingsPlugin = application.getComponent (SettingsPlugin.class);\n return settingsPlugin.getSettings ();\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"public Settings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"Settings getSettings();",
"public FetchModusSettings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"com.google.apps.alertcenter.v1beta1.Settings getSettings();",
"public Map<String, ?> getAll() {\r\n SharedPreferences sharedPreferences = ctx.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE);\r\n return sharedPreferences.getAll();\r\n }",
"@Override\n\tpublic Collection<RioSetting<?>> getSupportedSettings() {\n\t\treturn Collections.emptyList();\n\t}",
"Collection<RawSettingValue> getRawSettings();",
"protected Map<String, String> getSettings() {\n\n return (Map<String, String>) getExtraData().get(ProcessListener.EXTRA_DATA_SETTINGS);\n }",
"public SharedPreferences GetSettings() {\n return mSettings;\n }",
"public synchronized static Settings getSettings() {\n \tif (settings==null) {\n \t\tHashMap<String, String> def = new HashMap<>();\n \t\tdef.put(Settings.Keys.align.toString(), \"center_inner\");\n \t\tsettings = new Settings(\"/DotifyStudio/prefs_v\"+PREFS_VERSION, def);\n \t}\n \treturn settings;\n }",
"@Transactional(readOnly = true)\n public List<ConfigSystem> findAll() {\n log.debug(\"Request to get all ConfigSystems\");\n return configSystemRepository.findAll();\n }",
"public List<SettingsSectionDescription> fabricSettings() {\n return this.fabricSettings;\n }",
"public ConfigurationSection getSettings() {\n\t\treturn plugin.getFileManager().getGroupSettings(name);\n\t}",
"public static system_settings get(nitro_service client) throws Exception\r\n\t{\r\n\t\tsystem_settings resource = new system_settings();\r\n\t\tresource.validate(\"get\");\r\n\t\treturn ((system_settings[]) resource.get_resources(client))[0];\r\n\t}",
"public List<Configuration> getAll();",
"public static String[] getAll(String key) throws UnknownID, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn new String[] {val};\n\t\t}\n\t\tif (fileSettingsXmlList.isEmpty()) {\n\t\t\tlog.warn(\"The list of loaded webdanica settings is empty. It probably means that you forgot to set the property '\"\n\t\t\t\t\t+ SETTINGS_FILE_PROPERTY + \"' to a valid settingsfile\");\n\t\t}\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tList<String> result = settingsXml.getList(key);\n\t\t\t\tif (result.size() == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\t\tlog.debug(\"Value found in loaded data: {}\", StringUtils.conjoin(\",\", result));\n\t\t\t\t}\n\t\t\t\treturn result.toArray(new String[result.size()]);\n\t\t\t}\n\t\t}\n\n\t\t// Key not in file based settings, try settings from classpath\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tList<String> result = settingsXml.getList(key);\n\t\t\t\tif (result.size() == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\t\tlog.debug(\"Value found in classpath data: {}\", StringUtils.conjoin(\",\", result));\n\t\t\t\t}\n\t\t\t\treturn result.toArray(new String[result.size()]);\n\t\t\t}\n\t\t}\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}",
"public FileConfiguration getSettings() {\r\n\t\treturn settings.getConfig();\r\n\t}",
"public Properties storeSettings() {\r\n return mSettings.storeSettings();\r\n }",
"public static ArrayList<ConfigurationItem> getAllConfigurationItems() {\n\t\tString path = CONFIGURATION;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<ConfigurationItem> items = getConfigItems(response);\n\t\treturn items;\n\t}",
"public PresenceSettings getPresenceSettings() throws IOException, ApiException {\n return getPresenceSettings(createGetPresenceSettingsRequest());\n }",
"private void getSettings(){\n SharedPreferences sp = getSharedPreferences(\"PACERUNNER_SETTINGS\", Activity.MODE_PRIVATE);\n AMOUNT_OF_SECONDS_WHEN_TRIGGERING_NOTIFICATION = sp.getInt(\"NOTIFICATION_SENSITIVITY\", -15);\n REQUIRED_METERS_BEFORE_SHOWING_AVGPACE = sp.getInt(\"NOTIFICATION_METERS_BEFORE_START\", 500);\n }",
"public static system_settings[] get_filtered(nitro_service service, String filter) throws Exception\r\n\t{\r\n\t\tsystem_settings obj = new system_settings();\r\n\t\toptions option = new options();\r\n\t\toption.set_filter(filter);\r\n\t\tsystem_settings[] response = (system_settings[]) obj.getfiltered(service, option);\r\n\t\treturn response;\r\n\t}",
"public ReactorResult<java.lang.String> getAllEncodingSettings_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ENCODINGSETTINGS, java.lang.String.class);\r\n\t}",
"public UserSettings getUserSettings() {\n\t\treturn userSettings;\n\t}",
"public void printSettingsContents() {\n String fileName = \"collect.settings\";\n try {\n ClassLoader classLoader = getClass().getClassLoader();\n FileInputStream fin = new FileInputStream(\n classLoader.getResource(fileName).getFile());\n ObjectInputStream ois = new ObjectInputStream(fin);\n Map<?, ?> user_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : user_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"user.\" + key.toString() + \"=\" + v.toString());\n }\n Map<?, ?> admin_entries = (Map<?, ?>) ois.readObject();\n for (Map.Entry<?, ?> entry : admin_entries.entrySet()) {\n Object v = entry.getValue();\n Object key = entry.getKey();\n System.out.println(\"admin.\" + key.toString() + \"=\" + v.toString());\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public Map<String, Object> getSettings() {\n HashMap<String, Object> settings = new HashMap<>();\n\n // the selected input column\n settings.put(PIASettings.CONFIG_INPUT_COLUMN.getKey(), inputColumnBox.getSelectedColumn());\n // error when no decoys are found\n settings.put(PIASettings.ERROR_ON_NO_DECOYS.getKey(), checkErrorOnNoDecoys.isSelected());\n // create PSM sets\n settings.put(PIASettings.CREATE_PSMSETS.getKey(), checkCreatePSMSets.isSelected());\n // consider modifications\n settings.put(PIASettings.CONSIDER_MODIFICATIONS.getKey(), checkConsiderModifications.isSelected());\n // export level and format\n settings.put(PIASettings.EXPORT_FILTER.getKey(), checkExportFilter.isSelected() && checkExportFilter.isEnabled());\n settings.put(PIASettings.EXPORT_LEVEL.getKey(), comboExportLevel.getSelectedItem().toString());\n settings.put(PIASettings.EXPORT_FORMAT.getKey(), comboExportFormat.getSelectedItem() != null ?\n comboExportFormat.getSelectedItem().toString() : null);\n settings.put(PIASettings.EXPORT_FILEBASENAME.getKey(), fieldExportFileBasename.getText().trim());\n\n // PSM file ID\n settings.put(PIASettings.PSM_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPSMAnalysisFileID.getText()));\n\n // calculate FDR scores for all files\n settings.put(PIASettings.CALCULATE_ALL_FDR.getKey(), checkCalculateAllFDR.isSelected());\n // calculate combined FDR score\n settings.put(PIASettings.CALCULATE_COMBINED_FDR_SCORE.getKey(), checkCalculateCombinedFDRScore.isSelected());\n\n // decoy strategy for all files\n settings.put(PIASettings.ALL_DECOY_STRATEGY.getKey(), allDecoyStrategy.getSelection().getActionCommand());\n // decoy pattern for all files\n settings.put(PIASettings.ALL_DECOY_PATTERN.getKey(), fieldAllDecoyPattern.getText());\n\n // used identifications (for FDR) for all files\n settings.put(PIASettings.ALL_USED_IDENTIFICATIONS.getKey(), Integer.parseInt(allUsedTopIdentifications.getSelection().getActionCommand()));\n\n // the preferred scores for FDR calculation\n DefaultListModel<String> scoreListModel = (DefaultListModel<String>)selectedPreferredFDRScoresList.getModel();\n String[] preferredScoreShorts = new String[scoreListModel.getSize()];\n for (int i=0; i < scoreListModel.getSize(); i++) {\n preferredScoreShorts[i] = scoreListModel.get(i);\n }\n settings.put(PIASettings.FDR_PREFERRED_SCORES.getKey(), preferredScoreShorts);\n\n // the PSM level filters\n List<AbstractFilter> filtersList = filtersPSMLevel.getAppliedFilters();\n String[] filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PSM_FILTERS.getKey(), filtersArr);\n\n\n // infere peptides\n settings.put(PIASettings.PEPTIDE_INFER_PEPTIDES.getKey(), checkInferPeptides.isSelected());\n\n // peptide file ID\n settings.put(PIASettings.PEPTIDE_ANALYSIS_FILE_ID.getKey(), Integer.parseInt(fieldPeptideAnalysisFileID.getText()));\n\n // the peptide level filters\n filtersList = filtersPeptideLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PEPTIDE_FILTERS.getKey(), filtersArr);\n\n\n // infere proteins\n settings.put(PIASettings.PROTEIN_INFER_PROTEINS.getKey(), checkInferProteins.isSelected());\n\n // protein inference method\n settings.put(PIASettings.PROTEIN_INFERENCE_METHOD.getKey(), radioGrpInferenceMethod.getSelection().getActionCommand());\n\n // the protein inference filters\n filtersList = filtersProteinInference.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_INFERENCE_FILTERS.getKey(), filtersArr);\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_METHOD.getKey(), radioGrpProteinScoring.getSelection().getActionCommand());\n\n // scoring method used by protein inference\n settings.put(PIASettings.PROTEIN_SCORING_SCORE.getKey(), comboAvailableBaseScores.getSelectedItem());\n\n // the PSMs used for protein scoring\n settings.put(PIASettings.PROTEIN_SCORING_USED_PSMS.getKey(), radioGrpPSMsForScoring.getSelection().getActionCommand());\n\n // the protein level filters\n filtersList = filtersProteinLevel.getAppliedFilters();\n filtersArr = new String[filtersList.size()];\n for (int i=0; i < filtersList.size(); i++) {\n filtersArr[i] = ObjectSerializer.serializeFilter(filtersList.get(i));\n }\n settings.put(PIASettings.PROTEIN_FILTERS.getKey(), filtersArr);\n\n return settings;\n }",
"public char[] getRingSettings() {\r\n\t\treturn rotors.getRingSettings();\r\n\t}",
"@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}",
"public Collection<Configuration> findAll() {\n\t\treturn this.configurationRepository.findAll();\n\t}",
"private List<LdapSettingModel> getLdapSettingForView() {\n List<LdapSettingModel> settingModelList = new ArrayList<>();\n List<LdapSetting> ldapSettings =\n centralConfigService.getMutableDescriptor().getSecurity().getLdapSettings();\n ldapSettings.forEach(ldapSetting -> settingModelList.add(new LdapSettingModel(ldapSetting, true)));\n return settingModelList;\n }",
"public Vector getConfigurations() {\n return getConfigurations(DEFAULT_DB_CONFIG_TABLE);\n }",
"public static system_settings[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception\r\n\t{\r\n\t\tsystem_settings obj = new system_settings();\r\n\t\toptions option = new options();\r\n\t\toption.set_filter(filter);\r\n\t\tsystem_settings[] response = (system_settings[]) obj.getfiltered(service, option);\r\n\t\treturn response;\r\n\t}",
"private double[] getSettings() {\n\t\t\n\t\tdouble[] params;\n\t\tString inLine, fileName = \"settings.txt\";\n\t\tString[] tokens;\n\t\t\n\t\tint numParams = 8;\n\t\tparams = new double[numParams];\n\t\t\n\t\t// Perform the read in a catch block in case of exceptions\n\t\ttry {\n\t\t\n\t\t\t// Create a new buffered reader\n\t\t\tFile inFile = new File(fileName);\n\t\t\tFileInputStream fis = new FileInputStream(inFile);\n\t\t\tInputStreamReader isr = new InputStreamReader(fis, \"UTF8\");\n\t\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\t\n\t\t\t// Loop over the lines, reading the parameters into the array\n\t\t\tfor(int i = 0; i < numParams; i++) {\n\t\t\t\tinLine = br.readLine();\n\t\t\t\ttokens = inLine.split(\"=\");\n\t\t\t\tparams[i] = Double.parseDouble(tokens[1].replaceAll(\" \", \"\"));\n\t\t\t}\n\t\t\t\n\t\t\t// Close the reader\n\t\t\tbr.close();\n\t\t}\n\n\t\t// Catch errors\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error reading from settings file.\");\n\t\t\tSystem.exit(0);\n\t\t}\t\n\t\treturn params;\n\t}",
"public static void LoadSettingsIntoArray() {\r\n\t\t// Node gameSettings = document.getElementById(\"GameSettings\");\r\n\t\tNodeList settingsNodeList = document.getElementsByTagName(\"Setting\");\r\n\r\n\t\tfor (int i = 0; i < settingsNodeList.getLength(); i++) {\r\n\t\t\tNode node = settingsNodeList.item(i);\r\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\tElement eElement = (Element) node;\r\n\t\t\t\tsettings.add(eElement);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static Collection<String> getPreferences(){\n\t\treturn preferences;\n\t}",
"@RequestMapping(value = \"/list\")\n public ThemeSetting listThemeSetting() throws Exception {\n return themeSettingService.findByThemeAndIsActive(true);\n }",
"void getSettings(ControlsSettings settings);",
"@GetMapping(\"/api/gamesessions/settings\")\n public GameSessionSettings getDefaultSessionSettings() {\n GameSessionSettings settings = gameSessionSettingsDao.findDefaultSettings();\n return settings;\n }",
"private void getSettingsList(HttpServletRequest request) throws Exception {\n WebTable.setOrder(sessionContext,\"managerSettings.ord\",request.getParameter(\"ord\"),1);\n\n\t\t// Create web table instance \n WebTable webTable = new WebTable( 2,\n\t\t\t \"Manager Settings\", \"managerSettings.do?ord=%%\",\n\t\t\t new String[] {\"Setting\", \"Value\"},\n\t\t\t new String[] {\"left\", \"left\"},\n\t\t\t null );\n \n for (Settings s: SettingsDAO.getInstance().findAll(Order.asc(\"key\"))) {\n \tString onClick = \"onClick=\\\"document.location='managerSettings.do?op=Edit&id=\" + s.getUniqueId() + \"';\\\"\";\n \tString value = sessionContext.getUser().getProperty(s.getKey(), s.getDefaultValue());\n \twebTable.addLine(onClick, new String[] {s.getDescription(), value}, new String[] {s.getDescription(), value});\n }\n\n\t request.setAttribute(\"table\", webTable.printTable(WebTable.getOrder(sessionContext,\"managerSettings.ord\")));\n }",
"public Setting getAssetSettings() throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/Settings\";\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.build().toString();\n\n \n String response = this.DATA(url, strBody, params, \"GET\");\n TypeReference<Setting> typeRef = new TypeReference<Setting>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }",
"public static Settings get() {\n return INSTANCE;\n }",
"@Override\n\tpublic List<PruneSetting> getAllPruneSetting() throws Exception {\n\t\treturn null;\n\t}",
"public GameSettings getGameSettings() {\r\n return this.gameSettings;\r\n }",
"public static long count(nitro_service service) throws Exception\r\n\t{\r\n\t\tsystem_settings obj = new system_settings();\r\n\t\toptions option = new options();\r\n\t\toption.set_count(true);\r\n\t\tsystem_settings[] response = (system_settings[])obj.get_resources(service, option);\r\n\t\tif (response != null && response.length > 0)\r\n\t\t\treturn response[0].__count;\r\n\t\treturn 0;\r\n\t}",
"List<UmsIntegrationConsumeSetting> selectAll();",
"public static List<File> getSettingsFiles() {\n\t\tString[] pathList = System.getProperty(SETTINGS_FILE_PROPERTY, DEFAULT_SETTINGS_FILEPATH).split(\n\t\t\t\tFile.pathSeparator);\n\t\tList<File> result = new ArrayList<File>();\n\t\tfor (String path : pathList) {\n\t\t\tif (path.trim().length() != 0) {\n\t\t\t\tFile settingsFile = new File(path);\n\t\t\t\tif (settingsFile.isFile()) {\n\t\t\t\t\tresult.add(settingsFile);\n\t\t\t\t} else {\n\t\t\t\t\tlog.debug(\"Ignoring non-existing file {}\", settingsFile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public java.util.List<ReplicaSettingsDescription> getReplicaSettings() {\n return replicaSettings;\n }",
"public Pokemon.ContactSettingsProto getSettings() {\n return settings_;\n }",
"public synchronized Iterator<String> getAllOptions() {\n\t\tSet<String> names = optionTable.keySet();\n\t\tIterator<String> itr = names.iterator();\n\t\treturn itr;\n\t}",
"public EncryptionSettingsCollection getEncryptionSettingsCollection() {\n return this.encryptionSettingsCollection;\n }",
"public String settings() throws Exception {\n\n \t\tString apiUrl = \"api/settings.json\";\n \t\t\n \t\tString url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t} else {\n\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t}\n\n\t\treturn response; \n \t}",
"public String getFxSettings() {\r\n return \"{}\";\r\n }",
"private SettingsManager() {\r\n\t\tthis.loadSettings();\r\n\t}",
"public String[] getTrainingSettings();",
"public Settings() {\r\n\t\tthis.settings = new HashMap<String, Object>();\r\n\t\tloadDefaults();\r\n\t}",
"@Override\n public List<Param<?>> params() {\n return this.settings;\n }",
"public String getSystemProperties() {\n return systemProperties;\n }",
"public LocalSettings() {\n // Check if a previous settings file exists\n if (settingsFile.exists()) {\n \n // Read the data from the file\n StringBuilder contentBuilder = new StringBuilder();\n try (BufferedReader br = new BufferedReader(new FileReader(settingsFile))){\n \n // Go through all lines\n String line;\n while ((line = br.readLine()) != null){\n addSetting(line);\n }\n } catch (IOException e){\n e.printStackTrace();\n }\n }\n }",
"boolean getValidSettings();",
"public PagedCallSettings<ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse>\n listDatabasesSettings() {\n return listDatabasesSettings;\n }",
"public List<StatisticsConfig> getConfigurations() {\n return configurations;\n }",
"com.google.apps.alertcenter.v1beta1.SettingsOrBuilder getSettingsOrBuilder();",
"public CommonExportProperties runSettings() {\n return this.runSettings;\n }",
"public Pokemon.ContactSettingsProto getSettings() {\n if (settingsBuilder_ == null) {\n return settings_;\n } else {\n return settingsBuilder_.getMessage();\n }\n }",
"public String[] getSettingsToDisplay(String database, IDataAccessObject dataAccessObject) throws TotalADSDBMSException;",
"public List<GlobalStateDataControl> getGlobalStates( ) {\r\n\r\n return globalStatesDataControlList;\r\n }",
"private static HashMap<String, String> settings() {\n HashMap<String, String> settings = new HashMap<String, String>();\n settings.put(\"db.default.url\", \"jdbc:mysql://api.template-java.com:3306/play_test\");\n settings.put(\"db.default.username\", \"root\");\n settings.put(\"db.default.password\", \"\");\n settings.put(\"db.default.jndiName\", \"DefaultDS\");\n settings.put(\"jpa.default\", \"mySqlPersistenceUnit\");\n return(settings);\n }",
"public static Properties getProperties() {\r\n return getProperties(false);\r\n }",
"public ArrayList<Configuration> getConfigurations(){\n return configurations;\n }",
"public List<MicrosoftGraphSettingValue> values() {\n return this.values;\n }",
"public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() {\n return getDatabaseSettings;\n }",
"public int[] getSavedConfigurations() {\r\n return savedConfigurations;\r\n }",
"Collection<String> readConfigs();",
"public UserSettings getUserSettings(String username);",
"private void loadSettings() {\n \tLog.i(\"T4Y-Settings\", \"Load mobile settings\");\n \tmobileSettings = mainApplication.getMobileSettings();\n \t\n \t//update display\n autoSynchronizationCheckBox.setChecked(mobileSettings.isAllowAutoSynchronization());\n autoScanCheckBox.setChecked(mobileSettings.isAllowAutoScan());\n autoSMSNotificationCheckBox.setChecked(mobileSettings.isAllowAutoSMSNotification());\n }",
"public Map<String, String> settings(Procontext pc) {\n\t\treturn (HashMap<String, String>)pc.appproperties().propsWithPrefix(\"progsets.proc.\" + this.getName() + \".settings.\", true).clone();\n\t}",
"List<PropertyKeySetting> getPropertyKeySettings();",
"public static synchronized Collection<String> values() {\n\t\treturn ClassRegistry.dictionary.values();\n\t}",
"public LineChartSeriesSettings getSettings() {\n return this.settings;\n }",
"@Override\r\n\tpublic Settings getSettings(String personId) {\n\t\treturn null;\r\n\t}",
"public List<ProgressConfigurationType> getAllConfigurations();",
"private void readSharedPreferences() {\n SharedPreferences sharedPref = getActivity().getSharedPreferences(SETTINGS_FILE_KEY, MODE_PRIVATE);\n currentDeviceAddress = sharedPref.getString(SETTINGS_CURRENT_DEVICE_ADDRESS, \"\");\n currentDeviceName = sharedPref.getString(SETTINGS_CURRENT_DEVICE_NAME, \"\");\n currentFilenamePrefix = sharedPref.getString(SETTINGS_CURRENT_FILENAME_PREFIX, \"\");\n currentSubjectName = sharedPref.getString(SETTINGS_SUBJECT_NAME, \"\");\n currentShoes = sharedPref.getString(SETTINGS_SHOES, \"\");\n currentTerrain = sharedPref.getString(SETTINGS_TERRAIN, \"\");\n }",
"private void getPreferences() {\n Account rootAccount = book.getRootAccount();\n displayedSecuritiesList = rootAccount.getPreference(\"StockGlance_displayedSecurities\", \"\");\n allowMissingPrices = rootAccount.getPreferenceBoolean(\"StockGlance_DisplayMissingPrices\", false);\n timelySnapshotInterval = rootAccount.getPreferenceInt(\"StockGlance_TimelyWindow\", 7);\n }",
"public possibleSettings setting (){\n\t\treturn setting;\n\t}",
"public static ArrayList extractSettings(int index) {\r\n\t\tArrayList al = new ArrayList ();\r\n\t\tString temp = \"\";\r\n\t\t\r\n\t\t//Extract the settings from the Main ini file.\r\n\t\tfor (int i = index + 1; i < Main.ini.size(); i++) {\r\n\t\t\ttemp = (String) Main.ini.get(i);\r\n\t\t\tif (!temp.equals(\"\")) {\r\n\t\t\t\tal.add(temp);\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn al;\r\n\t}",
"@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}",
"public MovSettings getMovSettings() {\n return this.movSettings;\n }",
"public CommandlineJava.SysProperties getSysProperties() {\r\n return getCommandLine().getSystemProperties();\r\n }",
"public java.lang.String getTypeSettings() {\n return typeSettings;\n }",
"public static Iterator getKeys() {\n\t\tConfigManager cg = getConfigManager(null);\n\t\tIterator returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getKeys();\n\t\t}\n\t\treturn returnValue;\n\t}",
"private String getSystemProperties() {\n\t\tStringWriter swriter = new StringWriter();\n\t\tPrintWriter writer = new PrintWriter(swriter);\n\t\twriter.println(\"<html>\");\n\t\twriter.println(\"<head><title>Java Properties</title></head>\");\n\t\twriter.println(\"<body>\");\n\t\twriter.println(\"<pre>\");\n\t\tProperties properties = System.getProperties();\n\t\tproperties.list(writer);\n\t\twriter.println(\"</pre>\");\n\t\twriter.println(\"</body>\");\n\t\twriter.println(\"</html>\");\n\t\twriter.flush();\n\t\treturn swriter.toString();\n\t}"
] | [
"0.84187585",
"0.78670686",
"0.74053913",
"0.72824675",
"0.7174831",
"0.71022403",
"0.70971537",
"0.6992131",
"0.6992131",
"0.69488984",
"0.69435084",
"0.6898849",
"0.6876836",
"0.6769885",
"0.66513366",
"0.6617839",
"0.65180945",
"0.6509995",
"0.6507619",
"0.6494949",
"0.64884835",
"0.6406252",
"0.6394673",
"0.63888144",
"0.638822",
"0.6375539",
"0.6355159",
"0.6318619",
"0.630951",
"0.6294618",
"0.627075",
"0.62381226",
"0.6174716",
"0.6146351",
"0.6138933",
"0.6111989",
"0.6101218",
"0.6090797",
"0.6075779",
"0.6068566",
"0.602583",
"0.6012207",
"0.60038906",
"0.5996516",
"0.5990565",
"0.5974111",
"0.59709007",
"0.5969484",
"0.5951075",
"0.5939923",
"0.59364295",
"0.59117097",
"0.5872712",
"0.5850897",
"0.58331347",
"0.58246636",
"0.5803382",
"0.577959",
"0.5776634",
"0.57577646",
"0.57546246",
"0.5743025",
"0.5724687",
"0.57203937",
"0.57011694",
"0.56852084",
"0.5658809",
"0.5644434",
"0.5638862",
"0.56362337",
"0.5634245",
"0.5612812",
"0.5612532",
"0.56041634",
"0.5585874",
"0.55694395",
"0.55551755",
"0.5554973",
"0.5553361",
"0.5548932",
"0.55474067",
"0.5546916",
"0.5538459",
"0.5534028",
"0.5529125",
"0.5523903",
"0.5522961",
"0.55158794",
"0.551377",
"0.55118865",
"0.5510842",
"0.55084527",
"0.5499501",
"0.54981816",
"0.5492365",
"0.5491534",
"0.5491419",
"0.5482419",
"0.5472145",
"0.5469673"
] | 0.66078204 | 16 |
Returns the specified setting. | Optional<SettingDTO> getSetting(String settingKey); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public <T> T getSetting(Setting setting) {\n return getValue(setting.toString());\n }",
"<S> S getSetting(Setting<S> setting);",
"String getSettingByKey(String key);",
"public possibleSettings setting (){\n\t\treturn setting;\n\t}",
"<S> S getSetting(Setting<S> setting, S defaultValue);",
"Settings getSettings();",
"public String getSettings();",
"String getSettingByKey(String key, String defaultValue);",
"private String get(String key)\n {\n return settings.getProperty(key);\n }",
"public com.vmware.converter.AlarmSetting getSetting() {\r\n return setting;\r\n }",
"String get(String key) {\n return settings.get(key);\n }",
"public Object get(String key) {\r\n\t\treturn settings.get(key);\r\n\t}",
"String getSettingByKey(HawkularUser user, String key, String defaultValue);",
"String getSettingByKey(HawkularUser user, String key);",
"public String getSetting(String key) throws SQLException {\n\t\treturn db.selectItem(\"value\", \"settings\", \"`key`='\"+key+\"'\");\n\t}",
"@Override\n\tpublic Setting queryone() {\n\t\treturn SettingMapper.queryone();\n\t}",
"private int getInt(setting setting) {\n return setting.getValueAsInt();\n }",
"public String settingType() {\n return this.innerProperties() == null ? null : this.innerProperties().settingType();\n }",
"public static Object getSetting(String param, Object defVal, Context context){\n\t\t\t\t\n\t\tObject returnValue = null;\n\t\ttry{\t\t\n\t\tif (defVal instanceof String)\n\t\t\treturnValue = pref().getString(param,(String) defVal);\n\t\telse\n\t\tif (defVal instanceof Integer)\n\t\t\treturnValue = pref().getInt(param,(Integer) defVal);\n\t\telse\n\t\tif (defVal instanceof Boolean)\n\t\t\treturnValue = pref().getBoolean(param,(Boolean) defVal);\n\t\telse\n\t\t\tif (defVal instanceof Long)\n\t\t\t\treturnValue = pref().getLong(param,(Long) defVal);\n\t\telse\n\t\t\tif (defVal instanceof Float)\n\t\t\t\treturnValue = pref().getFloat(param,(Float) defVal);\n\t\telse\n\t\t\treturnValue = defVal;\n\t\t}catch(Exception e){\n\t\t\treturnValue = defVal;\n\t\t\t}\t\t\t\n\t\t\n\t\treturn returnValue;\n\t}",
"@Override\n\tpublic List<Setting> findsetting() {\n\t\treturn SettingMapper.findsetting();\n\t}",
"public FetchModusSettings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"public Settings getSettings()\r\n\t{\r\n\t\treturn settings;\r\n\t}",
"com.google.apps.alertcenter.v1beta1.Settings getSettings();",
"public String getSettings(String settingsKey) {\n\t\tString settingsValue = \"\";\n\t\ttry {\n\t\t\tCursor settings = localDB.query(true, TABLE_SETTINGS, null,\n\t\t\t\t\tKEY_SETTINGS_ID + \" = ?\", new String[] { settingsKey },\n\t\t\t\t\tnull, null, null, null);\n\t\t\tif ((settings.getCount() == 0) || !settings.moveToFirst()) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\tsettingsValue = settings.getString(SETTINGS_VALUE_COLUMN);\n\t\t} catch (SQLiteException ex) {\n\t\t\tLog.d(TAG, ex.getMessage());\n\t\t}\n\t\tLog.v(TAG, \"setting: \" + settingsValue);\n\t\treturn settingsValue;\n\t}",
"public String settingName() {\n return this.innerProperties() == null ? null : this.innerProperties().settingName();\n }",
"Object getPreference(String prefKey, Object defaultValue);",
"public String readSetting(pluginType plType, String pluginID, \n String settingName) {\n if (plType == null) return null;\n \n String prop = \"\";\n \n if (plType == pluginType.device) {\n if (pluginID == null || pluginID.equals(\"\")) return null;\n // search for device\n for (int i = 0; i < devices.length; i++)\n if (settings.getProperty(\"device\"+i,\"\").equals(pluginID)) {\n prop = \"device\"+i;\n break;\n }\n } else prop = plType.toString();\n \n if (prop.equals(\"\")) return null;\n if (settingName != null && !settingName.equals(\"\")) \n prop += \".\" + settingName;\n \n return settings.getProperty(prop);\n }",
"UserSettings getByUser();",
"public static Settings get() {\n return INSTANCE;\n }",
"public synchronized static Settings getSettings() {\n \tif (settings==null) {\n \t\tHashMap<String, String> def = new HashMap<>();\n \t\tdef.put(Settings.Keys.align.toString(), \"center_inner\");\n \t\tsettings = new Settings(\"/DotifyStudio/prefs_v\"+PREFS_VERSION, def);\n \t}\n \treturn settings;\n }",
"public Setting getAssetSettings() throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/Settings\";\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.build().toString();\n\n \n String response = this.DATA(url, strBody, params, \"GET\");\n TypeReference<Setting> typeRef = new TypeReference<Setting>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }",
"public static @NotNull Settings getSettings ()\n {\n Application application = ApplicationManager.getApplication ();\n SettingsPlugin settingsPlugin = application.getComponent (SettingsPlugin.class);\n return settingsPlugin.getSettings ();\n }",
"@Override\n\tpublic Setting findSettingById(String id) {\n\t\treturn SettingMapper.findSettingById(id);\n\t}",
"void getSettings(ControlsSettings settings);",
"com.google.ads.googleads.v6.resources.CampaignExtensionSetting getCampaignExtensionSetting();",
"public static String getSetting(Context context, String key) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n return sp.getString(key, null);\n\n }",
"public static Element getGameSetting(String settingAttName) {\r\n\t\tElement settingElement = null;\r\n\t\tfor (Element sett : settings) {\r\n\t\t\tif (sett.getAttribute(settingAttName).equals(settingAttName)) {\r\n\t\t\t\tsettingElement = sett;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn settingElement;\r\n\t}",
"public String getAPISetting(){\n if(!apiSetting.equals(\"true\")){\n apiSetting = \"false\";\n }\n return apiSetting;\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n MonitoringSettingResourceInner get(String resourceGroupName, String serviceName);",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"GuiSettings getGuiSettings();",
"@Test\n public void testGetSetting() {\n System.out.println(\"getSetting\");\n Setting s = Setting.factory();\n Setting s1 = Setting.factory();\n Setting s2 = Setting.factory();\n Setting s3 = Setting.getSetting(\"test1\");\n\n String key = s.getName();\n Setting expResult = s;\n Setting result = Setting.getSetting(key);\n assertEquals(expResult, result);\n assertEquals(s.getStype(), Setting.SETTING_TYPE.UND);\n assertEquals(\"undefined\", s.getValue());\n assertFalse(s1.equals(s));\n\n }",
"public String getStringSetting(String name) {\n\t\treturn strings.get(name);\n\t}",
"public SettingType getType() {\n return this.type;\n }",
"static String getStatusOfSetting(int setting) {\n return SettingDetail.settingDetails.get(setting).getCurrentState();\n }",
"@Override\r\n\tpublic Settings getSettings(String personId) {\n\t\treturn null;\r\n\t}",
"public static Map<String , String> getSettings(XMPPConnection con, String workgroup, String setting) {\n\n try {\n PrivateDataManager personalPDM = PrivateDataManager.getInstanceFor(con);\n\n String namespace = \"workgroup:\" + workgroup + \":settings:\" + setting;\n String elementName = \"workgroup_settings\";\n\n PrivateDataManager.addPrivateDataProvider(elementName, namespace, new SettingsDataProvider());\n SettingsPrivateData data = (SettingsPrivateData) personalPDM.getPrivateData(elementName, namespace);\n Map<String , String> map = data.getMap();\n return map;\n }\n catch (XMPPException | NoResponseException | NotConnectedException | InterruptedException e) {\n WebLog.logError(\"Could not load private data:\", e);\n }\n return null;\n }",
"static int getCurrentSettingTab() {\n return currentSettingTab;\n }",
"public SharedPreferences GetSettings() {\n return mSettings;\n }",
"public SettingConfigStore get() {\n return (SettingConfigStore) c.a(this.f15852a.i(), \"Cannot return null from a non-@Nullable @Provides method\");\n }",
"@PublicApi\npublic interface Setting<T>\n{\n /**\n * The full (unique) name, identifying a specific setting.\n *\n * @return the name.\n */\n String name();\n\n /**\n * The default value of this setting\n *\n * @return the typed default value.\n */\n T defaultValue();\n\n /**\n * A dynamic setting have its value changed in a config at any time\n *\n * @return true if the setting is dynamic, false otherwise\n */\n boolean dynamic();\n\n /**\n * An internal setting should not be accessed nor altered by any user\n * Internal settings may be changed or removed between versions without notice\n *\n * @return true if the setting is internal, false otherwise\n */\n boolean internal();\n\n /**\n * A textual representation describing the usage if this setting\n *\n * @return the description of this setting\n */\n String description();\n}",
"@Override\n\tpublic Setting queryById(int id) {\n\t\treturn settingDao.queryById(id);\n\t}",
"public UserSettings getUserSettings(String username);",
"UserSettings getById(UUID id);",
"public SettingType type() {\n return this.type;\n }",
"private String getProperty(String property) {\n String ret = sdkProperties.getProperty(property);\n if (null == ret) {\n logger.warn(String.format(\"No configuration value found for '%s'\", property));\n }\n return ret;\n }",
"public String get(String key, String def)\n {\n return settings.getProperty(key, def);\n }",
"@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }",
"public SelenideElement getSettingsItem(String name) {\n ElementsCollection items = this.getSettingsItems().shouldBe(sizeGreaterThan(0));\n log.info(\"searching for {} in {} items\", name, items.size());\n for (SelenideElement item : items) {\n String title = item.$(Element.SETTINGS_TITLE).shouldBe(visible).getText();\n if (name.equals(title)) {\n return item;\n }\n }\n throw new IllegalArgumentException(String.format(\"item%s not found\", name));\n }",
"public Pokemon.ContactSettingsProto getSettings() {\n if (settingsBuilder_ == null) {\n return settings_;\n } else {\n return settingsBuilder_.getMessage();\n }\n }",
"public java.lang.String getBcdSettingOption() {\n return bcdSettingOption;\n }",
"public abstract String getFirstTimeSettingID();",
"public ConfigurationSection getSettings() {\n\t\treturn plugin.getFileManager().getGroupSettings(name);\n\t}",
"public List<Setting> getSettings() {\n // Usuario logeado\n String username = SecurityContextHolder.getContext().getAuthentication().getName();\n\n // Entidad del usuario\n User user = userRepository.findByUsername((username)).orElseThrow();\n\n return settingRepository.findByUserId(user.getId());\n }",
"public GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(), (int) primaryStage.getX(),\n (int) primaryStage.getY());\n }",
"public static File getSettingsfile() {\n return settingsfile;\n }",
"public static String getCountrySetting() {\r\n\t\treturn countrySetting;\r\n\t}",
"public FileConfiguration getSettings() {\r\n\t\treturn settings.getConfig();\r\n\t}",
"int wkhtmltoimage_get_global_setting(PointerByReference settings, Pointer name, Pointer value, int vs);",
"public String getConfig();",
"public Long getSettingsId() {\n\t\treturn settingsId;\n\t}",
"int wkhtmltoimage_get_global_setting(PointerByReference settings, String name, ByteBuffer value, int vs);",
"ClassInfo getPreference(int index) {\n\t\treturn this.preferences[index];\n\t}",
"@Override\r\n\tpublic String getProperty(String key) {\r\n\t\t\r\n\t\treturn Settings.getProperty(key);\r\n\t\t\r\n\t}",
"boolean hasSetting(Setting<?> setting);",
"public String getPref(String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t String value = settings.getString(key, \"\");\n\t return value;\n\t}",
"public static SettingsModel getInstance() {\n return SETTINGS_MODEL;\n }",
"TrackerUserMobileSetting getTrackerUserMobileSetting(final Integer id);",
"com.google.ads.googleads.v6.resources.CustomerExtensionSetting getCustomerExtensionSetting();",
"UmsIntegrationConsumeSetting selectByPrimaryKey(Long id);",
"protected final String getSettingAsText(String inSettingId, String inDefault) {\r\n\r\n\t\tValidate.isTrue(configuration != null, \"Configuration not yet initialized!\");\r\n\t\tValidate.isTrue(StringUtils.isNotBlank(inSettingId), \"aSettingId ist required!\");\r\n\t\tif (inDefault == null) {\r\n\t\t\tValidate.isTrue(configuration.containsKey(inSettingId.toUpperCase()),\r\n\t\t\t\t\t\"Setting [\" + inSettingId + \"] does not exist!\");\r\n\t\t} // if\r\n\r\n\t\tString outSetting = configuration.get(inSettingId);\r\n\t\tif (outSetting == null) {\r\n\t\t\treturn inDefault;\r\n\t\t} // if\r\n\r\n\t\treturn outSetting;\r\n\t}",
"public Pokemon.ContactSettingsProto getSettings() {\n return settings_;\n }",
"String getOption();",
"public String getPreference(Preference preference) {\n String value = this.preferences.get(preference.getName());\n return (value != null) ? value : preference.getDefaultValue();\n }",
"public static String get(String group, String property) {\n\t\tConfigManager cg = getConfigManager(group);\n\t\tString returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getString(property);\n\t\t}\n\t\treturn returnValue;\n\t}",
"public static String get(String key) throws UnknownID, IOFailure, ArgumentNotValid {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\tString val = System.getProperty(key);\n\t\tif (val != null) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Key not in System.properties try loaded data instead\n\t\tsynchronized (fileSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : fileSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n/*\n\t\t// Key not in file based settings, try classpath settings instead\n\t\tsynchronized (defaultClasspathSettingsXmlList) {\n\t\t\tfor (SimpleXml settingsXml : defaultClasspathSettingsXmlList) {\n\t\t\t\tif (settingsXml.hasKey(key)) {\n\t\t\t\t\treturn settingsXml.getString(key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n */\n\t\tthrow new UnknownID(\"No match for key '\" + key + \"' in settings\");\n\t}",
"public int getSettingsMode() {\n SQLiteDatabase database = getReadableDatabase();\n SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();\n\n String[] sqlSelect = {\"Mode\"};\n String sqlTable =\"Setting\";\n\n //queryBuilder.setTables(SETTINGS_TABLE_NAME);\n queryBuilder.setTables(sqlTable);\n Cursor cursor = queryBuilder.query(database, sqlSelect, null, null, null, null, null);\n cursor.moveToFirst();\n\n return cursor.getInt(cursor.getColumnIndex(\"Mode\"));\n }",
"public String getComplianceReportingServiceConfigurationSettingReference() {\n return complianceReportingServiceConfigurationSettingReference;\n }",
"public String getPreference(String key) {\n return prefs.get(key, null);\n }",
"AdminPreference getAdminPreference(AuthenticationToken admin);",
"private void getSettings(){\n SharedPreferences sp = getSharedPreferences(\"PACERUNNER_SETTINGS\", Activity.MODE_PRIVATE);\n AMOUNT_OF_SECONDS_WHEN_TRIGGERING_NOTIFICATION = sp.getInt(\"NOTIFICATION_SENSITIVITY\", -15);\n REQUIRED_METERS_BEFORE_SHOWING_AVGPACE = sp.getInt(\"NOTIFICATION_METERS_BEFORE_START\", 500);\n }",
"public abstract String getConfig();",
"GuiSettings getCurrentGuiSetting() {\n return new GuiSettings(primaryStage.getWidth(), primaryStage.getHeight(),\n (int) primaryStage.getX(), (int) primaryStage.getY());\n }",
"public GameSettings getGameSettings() {\r\n return this.gameSettings;\r\n }",
"Integer getSetting(WarnLevel warnLevel,\n\t\t\tReferenceAttitude referenceAttitude, MinMax minMax) {\n\t\treturn getSetting(sharedPref, warnLevel, referenceAttitude, minMax);\n\t}"
] | [
"0.7854044",
"0.7728731",
"0.7614338",
"0.7559805",
"0.7303801",
"0.6990285",
"0.68177104",
"0.6759077",
"0.67425793",
"0.67010146",
"0.66238666",
"0.6621254",
"0.6523011",
"0.6521911",
"0.64652944",
"0.64279574",
"0.63915306",
"0.6287814",
"0.6262445",
"0.6253618",
"0.6249479",
"0.62481743",
"0.6241619",
"0.6230648",
"0.6210422",
"0.6197595",
"0.6193764",
"0.61905",
"0.6186317",
"0.61820644",
"0.61445254",
"0.61236346",
"0.6094725",
"0.60936284",
"0.6055917",
"0.5995093",
"0.5986416",
"0.5972919",
"0.59620017",
"0.5955724",
"0.5955724",
"0.5955724",
"0.5955724",
"0.5955724",
"0.5955724",
"0.5955724",
"0.5954017",
"0.5909659",
"0.5893407",
"0.589144",
"0.58774596",
"0.5866039",
"0.58535177",
"0.5843693",
"0.5841011",
"0.5840411",
"0.58249444",
"0.5814264",
"0.580263",
"0.5777552",
"0.57671946",
"0.5765514",
"0.57424206",
"0.5734088",
"0.57239115",
"0.57074946",
"0.570161",
"0.5693656",
"0.5685771",
"0.5684942",
"0.56760395",
"0.5666227",
"0.5662912",
"0.56540984",
"0.56454694",
"0.563047",
"0.5616354",
"0.5606409",
"0.55773664",
"0.5576107",
"0.55757",
"0.557449",
"0.55669576",
"0.55650747",
"0.5556097",
"0.5541952",
"0.553785",
"0.55343646",
"0.5504318",
"0.55032754",
"0.5502361",
"0.54953593",
"0.5491495",
"0.5483199",
"0.5467422",
"0.54587364",
"0.54569614",
"0.54559547",
"0.54491186",
"0.5429384"
] | 0.68430465 | 6 |
This method is responsible for finding the specified file. If FILE_REPO is defined then file will be searched in FILE_REPO and if it is not defined then file will be searched in class path. | public static File[] findFiles(String fileName) {
List<File> fileList_ = new ArrayList<File>();
if(fileRepoPath_ != null)
listFiles(new File(fileRepoPath_),fileName, fileList_);
if(fileList_.size()==0) {
try {
Enumeration<URL> en_ = FileFinder.class.getClassLoader().getResources(fileName);
while(en_.hasMoreElements()) {
fileList_.add(new File(en_.nextElement().getFile().replaceAll("%20"," ")));
}
}
catch(IOException e) { }
}
return (File[])fileList_.toArray(new File[fileList_.size()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public FileInfo findFile(String pkgPath) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n return fileLookup.get(pkgPath);\n }",
"private static File findConfigFile(String fileName, File specificFile, boolean giveConfigDirPrecedence) {\n File f = new File(configDirectory, fileName);\n\n if (giveConfigDirPrecedence) {\n if (configDirectory != null && f.exists()) {\n return f;\n }\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n } else {\n if (specificFile != null && specificFile.exists()) {\n return specificFile;\n }\n if (configDirectory != null && f.exists()) {\n return f;\n }\n }\n\n return null;\n }",
"private FileInputStream loadFile(String file)\n\t{\n\t\tlogger.info(\"Fetching File : \"+System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file);\n\t\ttry \n\t\t{\n\t\t\treturn(new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\main\\\\resources\\\\\"+file));\n\t\t} catch (FileNotFoundException e) {\t\t\t\t\n\t\t\tAssert.assertTrue(file+\" file is missing\", false);\n\t\t\treturn null;\n\t\t}\n\t}",
"public interface FileLocator {\n\n /**\n * Returns the file corresponding to the filename (or path) or\n * <code>null</code> if locator can't find the file.\n *\n * @param filename name of the file\n * @return the file corresponding to the filename (or path) or\n * <code>null</code> if locator can't find the file\n */\n @CheckForNull\n FileObject find(@NonNull String filename);\n\n }",
"public File getRepo() {\n return _repo;\n }",
"@NotNull\n public File repositoryFileFromVirtualFile(VirtualFile file)\n {\n String pathRelativeToRepository = file.getPath().substring(this.root().getPath().length());\n\n return new File(pathRelativeToRepository, file.getName());\n }",
"public static RepoInfo repoInfo(String fileName, Project project) {\n String fileRel = \"\";\n String remoteURL = \"\";\n String branch = \"\";\n try{\n // Determine repository root directory.\n String fileDir = fileName.substring(0, fileName.lastIndexOf(\"/\"));\n String repoRoot = gitRootDir(fileDir);\n\n // Determine file path, relative to repository root.\n fileRel = fileName.substring(repoRoot.length()+1);\n remoteURL = configuredGitRemoteURL(repoRoot);\n branch = SourcegraphUtil.setDefaultBranch(project)!=null ? SourcegraphUtil.setDefaultBranch(project) : gitBranch(repoRoot);\n\n // If on a branch that does not exist on the remote and no defaultBranch is configured\n // use \"master\" instead.\n // This allows users to check out a branch that does not exist in origin remote by setting defaultBranch\n if (!isRemoteBranch(branch, repoRoot) && SourcegraphUtil.setDefaultBranch(project)==null) {\n branch = \"master\";\n }\n\n // replace remoteURL if config option is not null\n String r = SourcegraphUtil.setRemoteUrlReplacements(project);\n if(r!=null) {\n String[] replacements = r.trim().split(\"\\\\s*,\\\\s*\");\n // Check if the entered values are pairs\n for (int i = 0; i < replacements.length && replacements.length % 2 == 0; i += 2) {\n remoteURL = remoteURL.replace(replacements[i], replacements[i+1]);\n }\n }\n } catch (Exception err) {\n Logger.getInstance(SourcegraphUtil.class).info(err);\n err.printStackTrace();\n }\n return new RepoInfo(fileRel, remoteURL, branch);\n }",
"public static File searchPaths(Iterable<? extends File> paths, String relFile) {\n for (File path : paths) {\n File f = new File(path, relFile);\n if (f.exists()) {\n return path;\n }\n }\n return null;\n }",
"@CheckForNull\n FileObject find(@NonNull String filename);",
"public static FileObject findFile (FileObject f, String ext)\n\t{\n\t\tif (f != null)\n\t\t{\n\t\t\tString name = f.getName();\n\t\t\tint index = name.indexOf('$');\n\n\t\t\tif (index > 0)\n\t\t\t\tname = name.substring(0, index);\n\n\t\t\treturn f.getParent().getFileObject(name, ext);\n\t\t}\n\n\t\treturn null;\n\t}",
"public void testFindFilesForLocation() {\n \t\t//should not find the workspace root\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tIFile[] result = root.findFilesForLocation(root.getLocation());\n \t\tassertEquals(\"1.0\", 0, result.length);\n\t\t\n\t\tIProject project = root.getProject(\"p1\");\n\t\tIFile existing = project.getFile(\"file1\");\n\t\tensureExistsInWorkspace(existing, true);\n\t\t\n\t\t//existing file\n\t\tresult = root.findFilesForLocation(existing.getLocation());\n\t\tassertResources(\"2.0\", existing, result);\n\t\t\n\t\t//non-existing file\n\t\tIFile nonExisting = project.getFile(\"nonExisting\");\n\t\tresult = root.findFilesForLocation(nonExisting.getLocation());\n\t\tassertResources(\"2.1\", nonExisting, result);\n \n \t\t// TODO add more tests\n \t}",
"@Override\n public InputStream findResource(String filename)\n {\n InputStream resource = null;\n try\n {\n Path scriptRootPath = Files.createDirectories(getScriptRootPath(side));\n Path scriptPath = scriptRootPath.resolve(filename).toAbsolutePath();\n resource = Files.newInputStream(scriptPath, StandardOpenOption.READ);\n } catch (IOException e)\n {\n resource = super.findResource(filename);\n }\n return resource;\n }",
"private String locateFile(String fileName) {\n\t\tString file = null;\n\t\tURL fileURL = ClassLoader.getSystemResource(fileName);\n\t\tif (fileURL != null) {\n\t\t\tfile = fileURL.getFile();\n\t\t} else\n\t\t\tSystem.err.println(\"Unable to locate file \" + fileName);\n\t\treturn file;\n\t}",
"protected FileObject findFile(List<String> loadPaths, String moduleName) {\n\t\tif(moduleName.startsWith(\"./\")) {\n\t\t\tmoduleName = moduleName.substring(2);\n\t\t}\n\t\tString fileName = normalizeName(moduleName);\n\t\tFileObject file = null;\n\t\tfor (String loadPath : loadPaths) {\n\t\t\t// require('foo');\n\t\t\tfor (String startPath : this.startPaths) {\n\t\t\t\ttry {\n\t\t\t\t\tString newName = startPath+loadPath+fileName;\n\t\t\t\t\tfile = fetchFile(newName);\n\t\t\t\t\tif(file != null){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t//System.out.println(\"Error getting file \"+moduleName+\": \"+ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn file;\n\t}",
"CharStream findFile(String name) throws IOException,\n IncludeFileNotFound {\n // Look in the directory containing the source file ...\n String dir = \".\"; // default value used e.g. when reading from stdin\n File src = getSource();\n if (src != null && src.getParent() != null) {\n dir = src.getParent();\n }\n String full = dir + \"/\" + name;\n File f = new File(full);\n if (f.exists()) {\n LOG.debug(\"Using local file \" + full);\n return CharStreams.fromFileName(full);\n }\n\n // ... and fall back to the standard library path if not found.\n final URL url = ClassLoader.getSystemResource(\"include/\" + name);\n if (url != null) {\n LOG.debug(\"Using library \" + url);\n // Use fromReader(Reader, String) to catch the file name --- fromStream(InputStream) does not.\n return CharStreams.fromReader(new InputStreamReader(url.openStream()), url.getFile());\n }\n\n throw new IncludeFileNotFound(name, this, getInputStream()); // TODO: check this\n }",
"String getRepositoryPath();",
"public static Path findNonClassPathFile( final String name, final Configuration conf) throws IOException {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath []files = DistributedCache.getLocalCacheFiles(conf);\r\n\t\tif (files==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tString altName = makeRelativeName(name, conf);\r\n\t\tfor( Path file : files) {\r\n\t\t\tif (name.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t\tif (altName!=null&&altName.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static void findFile() throws IOException {\n File newFile = new File(\"test.txt\");\n FileInputStream stream = new FileInputStream(newFile);\n }",
"@Override\n\tpublic List<FileConfig> findFile(String fileName) {\n\t\treturn this.fileConfigDao.findFile(fileName);\n\t}",
"@Override\n \tprotected File deriveLocalFileCodeBase(Class<?> baseClass)\n \t{\n \t\t// setup codeBase\n \t\tif (baseClass == null)\n \t\t\tbaseClass = this.getClass();\n \n \t\tPackage basePackage = baseClass.getPackage();\n \t\tString packageName = basePackage.getName();\n \t\tString packageNameAsPath = packageName.replace('.', Files.sep);\n \n \t\tString pathName = System.getProperty(\"user.dir\") + Files.sep;\n \t\tFile path = new File(pathName);\n \t\tString pathString = path.getAbsolutePath();\n \n \t\t// println(\"looking for \" + packageNameAsPath +\" in \" + pathString);\n \n \t\tint packageIndex = pathString.lastIndexOf(packageNameAsPath);\n \t\tif (packageIndex != -1)\n \t\t{\n \t\t\tpathString = pathString.substring(0, packageIndex);\n \t\t\tpath = new File(pathString + Files.sep);\n \t\t}\n \n \t\tcodeBase = new ParsedURL(path);\n \t\tprintln(\"codeBase=\" + codeBase);\n \t\treturn path;\n \t}",
"@NotNull\n protected VirtualFile searchForVirtualFileInProject(String filename) {\n Collection<VirtualFile> files = FilenameIndex.getVirtualFilesByName(myProject, filename, GlobalSearchScope.allScope(myProject));\n assertEquals(String.format(\"%s not found.\", filename), 1, files.size());\n return files.iterator().next();\n }",
"private static File openFile(String file) {\r\n \tFile currFile;\r\n\r\n \tfor (String directory : dir) {\r\n \t\tcurrFile = new File(directory.concat(file));\r\n \t\tif (currFile.exists() && !currFile.isDirectory()) {\r\n \t\t\treturn currFile;\r\n \t\t}\r\n \t}\r\n \treturn null;\r\n }",
"private File findConfigurationFile(String fileName) throws UnsupportedEncodingException {\r\n\r\n String directory = getConfigurationDirectory();\r\n if (directory == null) {\r\n return null;\r\n }\r\n\r\n String path = directory + fileName;\r\n\r\n File configFile = new File(path);\r\n if (configFile.exists() && configFile.isFile()) {\r\n return configFile;\r\n }\r\n\r\n return null;\r\n }",
"@Nullable\n public ObjectId findFile(String fileName) throws IOException {\n if (revision == null) {\n return null;\n }\n\n try (TreeWalk tw = TreeWalk.forPath(reader, fileName, revision.getTree())) {\n if (tw != null) {\n return tw.getObjectId(0);\n }\n }\n return null;\n }",
"public File searchForFile(String searchFilename) {\r\n File[] files = new File(APP_INSTANCE.getAppDirectory()).listFiles((dir1, examineName) -> examineName.equals(searchFilename));\r\n return Arrays.stream(files).findFirst().orElse(null);\r\n }",
"private static File getFileFromConfigDirectory(String file) {\n File f = new File(configDirectory, file);\n if (configDirectory != null && f.exists()) {\n return f;\n }\n return null;\n }",
"public static void searchFile() \n\t{\n\t\t//Variable Declaration\n\t\tString fileName;\n\t\tScanner obj = new Scanner(System.in);\n\n\t\t//Read file name from user\n\t\tSystem.out.println(\"Enter file name to searched:\");\n\t\tfileName= obj.nextLine();\n\t\t\n\t\t//Searching the file\n\t\tboolean isFound = FileManager.searchFile(folderpath, fileName);\n\t\t\n\t\tif(isFound)\n\t\t\tSystem.out.println(\"File is present\");\n\t\telse\n\t\t\tSystem.out.println(\"File not present.\");\n\n\t}",
"public void load() throws FileNotFoundException {\n loadConfig();\n initRepos();\n }",
"protected ArrayList<Path> find(Path file) {\n\t\tPath name = file.getFileName();\n\t\tif (name != null && matcher.matches(name)) {\n\t\t\tresults.add(file);\n\t\t}\n\t\treturn null;\n\t}",
"static void find(final File current,\n final Histogram class_use,\n final Histogram method_use) {\n if (current.isDirectory()) {\n for (File child:current.listFiles()){\n find(child, class_use, method_use);\n }\n } else if (current.isFile()) {\n String name = current.toString();\n if ( name.endsWith(\".zip\")\n || name.endsWith(\".jar\")\n || name.endsWith(\".rar\") // weird use of rar for zip, but ... used in case study.\n || name.endsWith(\".war\")\n ) {\n processZip(current, class_use, method_use);\n } else if (name.endsWith(\".class\")) {\n processClass(current, class_use, method_use);\n }\n } else {\n TextIo.error(\"While processing file `\" + current + \"` an error occurred.\");\n }\n }",
"private String getRepositoryPath() {\n if (repoPath != null) {\n return repoPath;\n }\n\n final String pathProp = System.getProperty(SYSTEM_PATH_PROPERTY);\n\n if (pathProp == null || pathProp.isEmpty()) {\n repoPath = getWorkingDirectory();\n } else if (pathProp.charAt(0) == '.') {\n // relative path\n repoPath = getWorkingDirectory() + System.getProperty(\"file.separator\") + pathProp;\n } else {\n repoPath = RepoUtils.stripFileProtocol(pathProp);\n }\n\n log.info(\"Using repository path: \" + repoPath);\n return repoPath;\n }",
"private static void searchFile(File fileDir) throws Exception {\n String fileName = getFileNameInput();\n File targetFile = new File(fileDir.toString() + \"\\\\\" + fileName);\n boolean fileExists = targetFile.exists();\n if (fileExists) {\n System.out.println(\"File is found on current directory.\");\n } else {\n throw new FileNotFoundException(\"No such file on current directory.\");\n }\n }",
"private InputSource filesystemLookup(ResourceLocation matchingEntry) {\n\n String uri = matchingEntry.getLocation();\n // the following line seems to be necessary on Windows under JDK 1.2\n uri = uri.replace(File.separatorChar, '/');\n URL baseURL;\n\n //\n // The ResourceLocation may specify a relative path for its\n // location attribute. This is resolved using the appropriate\n // base.\n //\n if (matchingEntry.getBase() != null) {\n baseURL = matchingEntry.getBase();\n } else {\n try {\n baseURL = FILE_UTILS.getFileURL(getProject().getBaseDir());\n } catch (MalformedURLException ex) {\n throw new BuildException(\"Project basedir cannot be converted to a URL\");\n }\n }\n\n URL url = null;\n try {\n url = new URL(baseURL, uri);\n } catch (MalformedURLException ex) {\n // this processing is useful under Windows when the location of the DTD\n // has been given as an absolute path\n // see Bugzilla Report 23913\n File testFile = new File(uri);\n if (testFile.exists() && testFile.canRead()) {\n log(\"uri : '\"\n + uri + \"' matches a readable file\", Project.MSG_DEBUG);\n try {\n url = FILE_UTILS.getFileURL(testFile);\n } catch (MalformedURLException ex1) {\n throw new BuildException(\n \"could not find an URL for :\" + testFile.getAbsolutePath());\n }\n } else {\n log(\"uri : '\"\n + uri + \"' does not match a readable file\", Project.MSG_DEBUG);\n\n }\n }\n\n InputSource source = null;\n if (url != null && \"file\".equals(url.getProtocol())) {\n String fileName = FILE_UTILS.fromURI(url.toString());\n if (fileName != null) {\n log(\"fileName \" + fileName, Project.MSG_DEBUG);\n File resFile = new File(fileName);\n if (resFile.exists() && resFile.canRead()) {\n try {\n source = new InputSource(Files.newInputStream(resFile.toPath()));\n String sysid = JAXPUtils.getSystemId(resFile);\n source.setSystemId(sysid);\n log(\"catalog entry matched a readable file: '\"\n + sysid + \"'\", Project.MSG_DEBUG);\n } catch (IOException ex) {\n // ignore\n }\n }\n }\n }\n return source;\n }",
"public static Path findClassPathFile( final String name, final Configuration conf) {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath []files = DistributedCache.getFileClassPaths(conf);\r\n\t\tif (files==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor( Path file : files) {\r\n\t\t\tif (name.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private String retrieveWorkSpaceFileLoc(String fileName) {\n ArrayList<String> regResourceProjects = loadRegistryResourceProjects();\n boolean fileExists = false;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n String folder = workspace.getRoot().getLocation().toFile().getPath().toString();\n String resourceFilePath = null;\n for (String regResourceProject : regResourceProjects) {\n resourceFilePath = folder + File.separator + regResourceProject + File.separator +\n fileName;\n File resourceFile = new File(resourceFilePath);\n if (resourceFile.exists()) {\n fileExists = true;\n break;\n }\n }\n if (!fileExists) {\n displayUserError(RESGISTRY_RESOURCE_RETRIVING_ERROR, NO_SUCH_RESOURCE_EXISTS);\n }\n return resourceFilePath;\n }",
"public FilePath resolve(FilePath relPath) {\n return resolve(relPath.toString());\n }",
"private static RubyFile findRubyScript(RubyProject rubyProject, String rubyScriptName) {\r\n \t\tfor (RubyProjectElement rubyElement : rubyProject.getRubyElementsInternal()) {\r\n \t\t\tif (rubyElement.getFileExtension().equals(\"urf\")) {\r\n \t\t\t\tif (rubyElement.getName().equals(rubyScriptName)) {\r\n \t\t\t\t\treturn (RubyFile)rubyElement;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"private static Path getFilePath(Path testSuitePath, Path testCasePath, Path relativeFilePath) {\n Path filePath = testCasePath.resolve(relativeFilePath);\n if (Files.exists(filePath)) {\n return filePath;\n } else {\n // If not try to get from the test suite directory\n filePath = testSuitePath.resolve(relativeFilePath);\n }\n\n return Files.exists(filePath) ? filePath : null;\n }",
"public FileLocation findFile(int k) {\n RemoteMapper rm = findMapper(k);\n FileLocation fl = null;\n try {\n return rm.lookup(k);\n } catch (RemoteException ex) {\n System.err.println(\"Mapper.findFile remote Exception\");\n }\n\n return fl;\n }",
"java.lang.String getFileLoc();",
"@NotNull\n protected VirtualFile firstMatchingVirtualFileInProject(String filename) {\n Collection<VirtualFile> files = FilenameIndex.getVirtualFilesByName(myProject, filename, GlobalSearchScope.allScope(myProject));\n assertTrue(String.format(\"Filename %s not found in project\", filename), files.size() > 0);\n return files.iterator().next();\n }",
"String getRepositoryPath(String name);",
"public abstract String getFileLocation();",
"private File getFile(String fileName) {\n\t\tClassLoader classLoader = getClass().getClassLoader();\n\t\tFile file = new File(classLoader.getResource(fileName).getFile());\n\t\treturn file;\n\t}",
"private static File getFile(String pathFile) {\n\t\tif(!pathFile.isEmpty()){\n\t\t\treturn new File(pathFile);\n\t\t}\n\t\treturn null;\n\t}",
"public String resolvePath();",
"public boolean searchFile(FileObject file)\n throws IllegalArgumentException;",
"public static Path findItemInCache( final String name, final Configuration conf) throws IOException {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath result = null;\r\n\t\tresult = findClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@NotNull\n protected Document getDocumentFileInProject(String filename) {\n VirtualFile sourceFile = searchForVirtualFileInProject(filename);\n Document doc = FileDocumentManager.getInstance().getDocument(sourceFile);\n assertNotNull(String.format(\"%s not found.\", filename), doc);\n return doc;\n }",
"@Nullable\n public DocumentFile findFile(@NonNull Context context, @NonNull DocumentFile parent, @NonNull String fileName) {\n List<DocumentFile> result = listDocumentFiles(context, parent, createNameFilterEquals(fileName), false, true, true);\n if (!result.isEmpty()) return result.get(0);\n else return null;\n }",
"public static File loadFilePath() {\n Preferences prefs = Preferences.userNodeForPackage(Main.class);\n String filePath = prefs.get(\"filePath\", null);\n if (filePath != null) {\n return new File(filePath);\n } else {\n return null;\n }\n }",
"private VirtualFile getFile(Module module, String schemaFilePath) {\n for (VirtualFile contentRoot : OrderEnumerator.orderEntries(module).recursively().productionOnly().sources().getRoots()) {\n VirtualFile schemaFile = contentRoot.findFileByRelativePath(schemaFilePath);\n if (schemaFile != null) {\n return schemaFile;\n }\n }\n return null;\n }",
"private static void processRepository(File repo) {\n System.out.println(\"Processing repository: \" + repo);\n for (File fileOrDir : repo.listFiles()) {\n if (fileOrDir.isDirectory()) {\n processModule(fileOrDir);\n }\n }\n }",
"public String find()\n\t{\n\t\tFile f = new File(ampath);\n\t\tString fdir = f.getParent();\n\t\tFile fs = new File (fdir);\n\t\tString cplpath = null;\n\t\tboolean found = false;\n\t\t\n\t\tFile [] files = fs.listFiles();\n\t\t\n\t\tfor (int i=0; i<files.length; i++) {\n\t\t\tif(files[i].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\tfound = true;\n\t\t\t\tcplpath = files[i].getPath();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//Searching in Subfolder for CPL-File\n\t\t\tif (files[i].isDirectory()) {\n\t\t\t\tFile f2 = new File(files[i].getPath());\n\t\t\t\tFile [] files2 = f2.listFiles();\n\t\t\t\tfor(int j=0; j<files2.length; j++) {\n\t\t\t\t\tif(files2[j].getName().equalsIgnoreCase(cplfilename)){\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tcplpath = files2[i].getPath();\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//Returns CPL-File as String\n\t\tif (found == false) {\n\t\t\tSystem.out.println(\"CPL-File not found\");\n\t\t\treturn \"CPL-File not found\";\n\t\t}\n\t\telse {\n\t\t\treturn cplpath;\n\t\t}\n\t\t\n\t}",
"public static Optional<File> dataFile(final String fileName)\n {\n final File file = new File(getDataDirectory(), fileName);\n\n Log.infoWhenDev(\"Looking up file in hierarchy: {0} ...\", file.toString());\n final Optional<File> result = file.exists() ? Optional.of(file) : Optional.empty();\n Log.infoWhenDev(\"...{0} was {1}\", file.toString(), result.isPresent() ? \"found.\" : \"not found!\");\n\n return result;\n }",
"private static URL buildURL(String repositoryFileName) throws MalformedURLException {\n URL url = ClassHelper.getResource(repositoryFileName);\n\n // don't be too strict: if resource is not on the classpath, try ordinary file lookup\n if (url == null) {\n try {\n url = new File(repositoryFileName).toURL();\n }\n catch (MalformedURLException ignore) {\n }\n }\n\n if (url != null) {\n LOG.info(\"OJB Descriptor Repository: \" + url);\n } else {\n throw new MalformedURLException(\"did not find resource \" + repositoryFileName);\n }\n return url;\n }",
"public static VirtualFile getIncludedFile(Project project, VirtualFile referencing, String name) {\n File file = new File(name);\n if (file.isAbsolute()) {\n return tryExtensions(file);\n }\n\n if (referencing != null) { // if referencing virtual file is known\n if (referencing.getParent() != null) {\n String path = referencing.getParent().getPath();\n VirtualFile res = tryExtensions(new File(path, name));\n if (res != null) {\n return res;\n }\n }\n\n Module module = com.intellij.openapi.module.ModuleUtil.findModuleForFile(referencing, project);\n\n// return module != null ? trySearchPath(name, GlobalSearchScope.moduleWithDependenciesScope(module)) : null;\n return module != null ? trySearchPath(name, GlobalSearchScope.projectScope(project)) : null;\n } else { // often lexer can't determine which virtual file is referencing the include\n return trySearchPath(name, GlobalSearchScope.projectScope(project));\n }\n }",
"public static void main(String[] args) throws IOException {\n\n\n findFile();\n return;\n }",
"File findConfigFile(String path) {\n\t\tClassLoader cl = PropertiesUtil.class.getClassLoader();\n\t\tURL url = cl.getResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = ClassLoader.getSystemResource(path);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tFile file = new File(path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tString newPath = \"conf\" + (path.startsWith(File.separator) ? \"\" : \"/\")\n\t\t\t\t+ path;\n\t\turl = ClassLoader.getSystemResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\turl = cl.getResource(newPath);\n\t\tif (url != null) {\n\t\t\treturn new File(url.getFile());\n\t\t}\n\n\t\tnewPath = \"conf\"\n\t\t\t\t+ (path.startsWith(File.separator) ? \"\" : File.separator)\n\t\t\t\t+ path;\n\t\tfile = new File(newPath);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\tnewPath = System.getenv(\"CATALINA_HOME\");\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getenv(\"CATALINA_BASE\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\tnewPath = System.getProperty(\"catalina.home\");\n\t\t}\n\n\t\tif (newPath == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfile = new File(newPath + File.separator + \"conf\" + File.separator\n\t\t\t\t+ path);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\r\n protected FileObject findPrimaryFile(FileObject fo) {\r\n String fileExt = fo.getExt();\r\n\r\n // Ensure all the mandatory files that comprise a shapefile are avialable...\r\n for (String mandatoryExt : MANDATORY_EXTENSIONS) {\r\n FileObject brother = FileUtil.findBrother(fo, mandatoryExt);\r\n if (brother == null) {\r\n return null;\r\n }\r\n }\r\n // ... and then return the primary file object\r\n if (PRIMARY_EXTENSION.equalsIgnoreCase(fileExt)) {\r\n return fo;\r\n }\r\n else {\r\n return FileUtil.findBrother(fo, PRIMARY_EXTENSION);\r\n }\r\n }",
"public interface FileRepository {\n /**\n * Create a file and write the object in the given format (json or xml)\n * @param data The data that will be written to the file\n * @param fileName The name of the file without any path or extension\n * @param fileFormat The file format enum (json or xml)\n * @return The file's absolute path\n */\n String saveToFile(Object data, String fileName, FileFormat fileFormat) throws IOException;\n\n /**\n * Retrieve a file from its absolute path\n * @param absolutePath The file's location (absolute path returned by the saveToFile method)\n * @return The actual file\n */\n File retrieveFile(String absolutePath);\n}",
"@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }",
"private FileSystem resolve(String fileName)\n {\n return fileSystems.stream().filter(fs->fs.fsName.equals(fileName)).findAny().get();\n }",
"FileReference getFile(String fileName);",
"private static File findPropertyFile(String startPath) {\n var defaultConfig = new File(startPath);\n var list = defaultConfig\n .listFiles((dir, name) -> name\n .endsWith(GENERAL_PROPERTIES));\n\n if (nonNull(list) && list.length > 0) {\n return list[0];\n } else if (nonNull(list)) {\n var inner = defaultConfig.listFiles();\n File result = null;\n for (File element : inner) {\n if (element.isDirectory()) {\n result = findPropertyFile(element.getPath());\n }\n if (nonNull(result)) {\n return result;\n }\n }\n }\n return null;\n }",
"public IAstSourceFile findIncludeFile(ISourceFile file);",
"public void testFindFile() throws TimeoutException, ExecutionException {\r\n AnActionEvent e = createAnActionEvent(\"file2.java\");\r\n Project project = e.getProject();\r\n String expected = \"[PsiJavaFile:file2.java]\";\r\n assertEquals(TraverseProjectPsi.findFile(project).size(), 1);\r\n assertEquals(TraverseProjectPsi.findFile(project).toString(), expected);\r\n }",
"private File getFile(String filename) throws Exception {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t} else if (!file.isAbsolute()) {\n\t\t\tfinal Resource r = context.getThisInstance().eResource();\n\t\t\tfinal Path p = new Path(r.getURI().segment(1) + File.separator + filename);\n\t\t\tfinal IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(p);\n\t\t\tif (f.exists()) {\n\t\t\t\treturn f.getRawLocation().makeAbsolute().toFile();\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Filename \" + filename + \" not found\");\n\n\t}",
"public interface FileService extends PublicService {\n\n /**\n * Retrieves reference to a file by fileName\n */\n FileReference getFile(String fileName);\n \n /**\n * Creates a reference for a new file.\n * Use FileReference.getOutputStream() to set content for the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileName\n * @param toolId - optional parameter\n * @return\n */\n FileReference createFile(String fileName, String toolId);\n \n /**\n * Deletes the file.\n * Requires user to be a member of a contributer or full roles.\n * @param fileReferece\n */\n void deleteFile(FileReference fileReferece);\n \n /**\n * Returns a url to the file\n * Property WebSecurityUtil.DBMASTER_URL (dbmaster.url) is used as a prefix\n */\n URL toURL(FileReference fileReferece);\n}",
"@Override\r\n\tpublic File findByfileID(Long fileID) {\n\t\tOptional<File> optionalFile = fileRepository.findByFileID(fileID);\r\n\t\t\r\n\t\tif(optionalFile.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\treturn optionalFile.get();\r\n\t}",
"@Test\n void findSourceJar() {\n Class<?> klass = org.apache.commons.io.FileUtils.class;\n var codeSource = klass.getProtectionDomain().getCodeSource();\n if (codeSource != null) {\n System.out.println(codeSource.getLocation());\n }\n }",
"public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPath();\r\n \t\t\tresult = new File(filePath);\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tthrow new RuntimeException(\"Can't resolve files on remote host machines\");\r\n \t\t}\r\n \t\t\r\n \t\treturn result;\r\n \t}",
"@objid (\"d1a8268b-dff5-4398-936a-ef1cb1e69102\")\n public static File getBundleFile(final String relPath) throws IOException {\n try {\n URL url = FileLocator.find(Audit.context.getBundle(), new Path(relPath), null);\n URL fileUrl = FileLocator.toFileURL(url);\n return new File(URIUtil.toURI(fileUrl));\n } catch (IOException | URISyntaxException | RuntimeException e) {\n throw new IOException(\"'\" + relPath + \"' not found in plugin.\", e);\n }\n }",
"private Document getDocumentInClassPath()throws Exception{\r\n\t\t\r\n\t\tDocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();\r\n\t\tDocumentBuilder builder = builderFactory.newDocumentBuilder();\r\n\t\t\r\n\t\tDocument doc = builder.parse(ServiceLoader.class.getResourceAsStream(\"/\"+FILE_NAME));\r\n\t\t\r\n\t\treturn doc;\r\n\t}",
"public Repository (FileSystem def) {\n this.system = def;\n java.net.URL.setURLStreamHandlerFactory(\n new org.openide.execution.NbfsStreamHandlerFactory());\n init ();\n }",
"public static File applyPath(Iterable<? extends File> paths, String relFile) {\n File path = searchPaths(paths, relFile);\n if (path != null) {\n return new File(path, relFile);\n }\n return null;\n }",
"public static File getFile(String fileName){\n \tString basedir = System.getProperty(\"user.dir\");\n \tString dir = basedir+\"/src/test/resources/\" + fileName;\n \treturn new File(dir);\n }",
"public File fileRelativeToSource(File f) {\n if (f.isAbsolute()) {\n return f;\n } else {\n return new File(_basedir, f.getPath());\n }\n }",
"@Nullable\n public File getSourceFile() {\n if (mSourceFile == null && !mSearchedForSource) {\n mSearchedForSource = true;\n\n String source = mClassNode.sourceFile;\n if (source == null) {\n source = file.getName();\n if (source.endsWith(DOT_CLASS)) {\n source = source.substring(0, source.length() - DOT_CLASS.length()) + DOT_JAVA;\n }\n int index = source.indexOf('$');\n if (index != -1) {\n source = source.substring(0, index) + DOT_JAVA;\n }\n }\n if (source != null) {\n if (mJarFile != null) {\n String relative = file.getParent() + File.separator + source;\n List<File> sources = getProject().getJavaSourceFolders();\n for (File dir : sources) {\n File sourceFile = new File(dir, relative);\n if (sourceFile.exists()) {\n mSourceFile = sourceFile;\n break;\n }\n }\n } else {\n // Determine package\n String topPath = mBinDir.getPath();\n String parentPath = file.getParentFile().getPath();\n if (parentPath.startsWith(topPath)) {\n String relative = parentPath.substring(topPath.length() + 1);\n List<File> sources = getProject().getJavaSourceFolders();\n for (File dir : sources) {\n File sourceFile = new File(dir, relative + File.separator + source);\n if (sourceFile.exists()) {\n mSourceFile = sourceFile;\n break;\n }\n }\n }\n }\n }\n }\n\n return mSourceFile;\n }",
"private File findConfigurationFile(String languageId, String fileName) throws UnsupportedEncodingException {\r\n\r\n String configFileName = \"\"; //$NON-NLS-1$\r\n if (languageId != null) {\r\n configFileName = fileName + \"_\" + languageId; //$NON-NLS-1$\r\n }\r\n\r\n File configFile = findConfigurationFile(configFileName + \".properties\"); //$NON-NLS-1$\r\n if (configFile == null) {\r\n configFile = findConfigurationFile(fileName + \".properties\"); //$NON-NLS-1$\r\n }\r\n\r\n return configFile;\r\n }",
"SourceFilePath getFilePath();",
"@Override\n public GEMFile getFile(String filename, String directory) {\n Object o = gemFileDb.get(Paths.get(directory, filename).toString());\n if (o instanceof GEMFile) {\n return (GEMFile) o;\n }\n return null;\n }",
"public synchronized static GitDir get(WebFile aFile)\n{\n GitDir gdir = (GitDir)aFile.getProp(GitDir.class.getName());\n if(gdir==null) aFile.setProp(GitDir.class.getName(), gdir=new GitDir(aFile));\n return gdir;\n}",
"NobaseValue findRequiresValue(NobaseFile forfile,String nm)\n{\n NobaseFile result = forfile.getProject().findRequiresFile(forfile,nm);\n if (result == null) return null;\n NobaseValue nv = export_map.get(result);\n if (nv == null) {\n for_project.buildIfNeeded(result);\n nv = export_map.get(result);\n }\n return nv;\n}",
"public void testGetFileForLocation() {\n \t\tIWorkspaceRoot root = getWorkspace().getRoot();\n \t\tassertTrue(\"1.0\", root.getFileForLocation(root.getLocation()) == null);\n \t}",
"public OwlimRepositoryFactory() {\n\t\t\tthis(IWBFileUtil.getFileInDataFolder(Config.getConfig()\n\t\t\t\t\t\t\t.getRepositoryName()).getAbsolutePath()); \n\t\t}",
"public FileInputStream getFileInputStream(){\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"\\\\src\\\\test\\\\java\\\\data\\\\userData.xlsx\");\n\t\tString filePath=System.getProperty(\"user.dir\")+\"/src/test/java/data/userData.xlsx\";\n\t\t//String filePath=System.getProperty((\"user.dir\")+\"src/test/java/data/userData.xlsx\");\n\t\tFile srcFile=new File(filePath);\n\t\ttry {\n\t\t\tfis=new FileInputStream(srcFile);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Test Data file not found.terminating process!! :Check file path of test data file\");\n\t\t}\n\n\t\treturn fis;\n\t}",
"public Path getRepositoryBaseDir();",
"@Override\n public GEMFile getFileByAbsolutePath(String absolutePath) {\n return (GEMFile) gemFileDb.get(absolutePath);\n }",
"private File getFile(String fileName) {\n String path = \"\";\n if (fileName.equals(PREV_DIRECTORY)) {\n if (getCurrentDir().lastIndexOf(\"/\") >= 0) {\n path = getCurrentDir().substring(0, getCurrentDir().lastIndexOf(\"/\"));\n if (fileName.length() > PREV_DIRECTORY.length()) {\n path += fileName.substring(2, fileName.length());\n }\n }\n else {\n path += fileName.substring(2, fileName.length());\n }\n }\n else if (fileName.equals(CURRENT_DIRECTORY)) {\n path = getCurrentDir();\n }\n else {\n path = getCurrentDir()+\"/\"+fileName;\n }\n\n // Datei laden\n return getFile(path, getCredentials());\n }",
"public void myMethod() throws FileNotFoundException {\n\t\ttry {\n\t\tsoccer = new FileInputStream(\"soccer.txt\");\n\t\t} catch (FileNotFoundException f) {//checked exception handled here\n//\t\t\tf.printStackTrace();\n\t\tSystem.out.println(\"file not found\");//throw fnfe; //this needs to be handled or declared\n\t\t}\n\t\t}",
"public IProgramElement findNodeForSourceFile(IProgramElement node, String sourcefilePath) {\n\t\t// 1. why is <root> a sourcefile node?\n\t\t// 2. should isSourceFile() return true for a FILE that is a .class file...?\n\t\tif ((node.getKind().isSourceFile() && !node.getName().equals(\"<root>\")) || node.getKind().isFile()) {\n\t\t\tISourceLocation nodeLoc = node.getSourceLocation();\n\t\t\tif (nodeLoc != null && asm.getCanonicalFilePath(nodeLoc.getSourceFile()).equals(sourcefilePath)) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t\treturn null; // no need to search children of a source file node\n\t\t} else {\n\t\t\t// check the children\n\t\t\tfor (IProgramElement child : node.getChildren()) {\n\t\t\t\tIProgramElement foundit = findNodeForSourceFile(child, sourcefilePath);\n\t\t\t\tif (foundit != null) {\n\t\t\t\t\treturn foundit;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}",
"protected abstract void processProjectFile(Path path);",
"public Path getRemoteRepositoryBaseDir();",
"public FilePath resolve(String relPath) {\n if (path.isEmpty()) {\n return FilePath.of(relPath);\n }\n return FilePath.of(path + \"/\" + relPath);\n }",
"public interface IOCRService {\n\n\n String identifyByLocal(File file);\n\n String identifyByRemote(File file);\n}",
"public String ReadFile_FromClassPath(String sFileName) {\n String stemp = null;\n\n try {\n InputStream is = getClass().getClassLoader().getResourceAsStream(sFileName);\n stemp = getStringFromInputStream(is);\n\n } catch (Exception e) {\n stemp = null;\n throw new Exception(\"ReadFile_FromClassPath : \" + e.toString());\n } finally {\n return stemp;\n }\n }",
"public GitFile getFile(String aPath)\n {\n if(aPath.equals(\"/\")) return this;\n String paths[] = aPath.split(\"/\"); GitFile file = this;\n for(int i=0; i<paths.length && file!=null; i++) { String name = paths[i]; if(name.length()==0) continue;\n GitFile files[] = file.getFiles(); file = null;\n for(GitFile f : files)\n if(name.equals(f.getName())) {\n file = f; break; }\n }\n return file;\n }",
"private File getFile(final String relativePathToFile, final String versionSubDirectory) {\n\n final URL urlToFile = TestBase.class.getResource(TEST_DATA_DIR + versionSubDirectory + relativePathToFile);\n File destFile = new File(WORKING_DIR + versionSubDirectory + relativePathToFile);\n\n try {\n FileUtils.copyURLToFile(urlToFile, destFile);\n } catch (IOException e) {\n System.out.println(\"File specified in URL cannot be found\"+ e.getMessage());\n }\n\n return destFile;\n }",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }"
] | [
"0.6437782",
"0.6268205",
"0.5798959",
"0.57425624",
"0.5696093",
"0.56534284",
"0.55527997",
"0.55357116",
"0.5459458",
"0.5434605",
"0.54299814",
"0.54217863",
"0.5353801",
"0.53441316",
"0.5276593",
"0.52744126",
"0.52689874",
"0.5261179",
"0.525227",
"0.5249818",
"0.5248966",
"0.5236107",
"0.5233844",
"0.5221008",
"0.5220105",
"0.52109903",
"0.52002215",
"0.5193402",
"0.51880336",
"0.518742",
"0.5162665",
"0.5147606",
"0.51290435",
"0.51213115",
"0.51195306",
"0.5090745",
"0.5050942",
"0.5050731",
"0.5049506",
"0.50368315",
"0.5027523",
"0.5025435",
"0.5025238",
"0.50136775",
"0.49991155",
"0.49825045",
"0.49816954",
"0.49782708",
"0.4957496",
"0.49444404",
"0.4940743",
"0.4938856",
"0.4937886",
"0.4934088",
"0.4932702",
"0.49308336",
"0.49003878",
"0.4897547",
"0.4887241",
"0.48738503",
"0.48533255",
"0.48529282",
"0.4849041",
"0.48431173",
"0.48428783",
"0.48248875",
"0.48247787",
"0.48214373",
"0.48150885",
"0.48103213",
"0.48094866",
"0.48035717",
"0.4800119",
"0.47955167",
"0.479316",
"0.47927457",
"0.4783547",
"0.4783347",
"0.47790298",
"0.47781143",
"0.47729486",
"0.47700068",
"0.47661418",
"0.4763231",
"0.47603688",
"0.47582155",
"0.47567973",
"0.4749391",
"0.47415364",
"0.47393823",
"0.4736622",
"0.47343534",
"0.4731832",
"0.47283426",
"0.47272927",
"0.47241986",
"0.4723189",
"0.47214535",
"0.47125503",
"0.47122267"
] | 0.5184875 | 30 |
This function recursively scans the folders and lists the files | private static void listFiles(File rootFile, String filename, List<File> fileList) {
File[] files_ = rootFile.listFiles();
if(files_ != null) {
for(File file : files_) {
if(file.isFile() && file.getName().equalsIgnoreCase(filename))
fileList.add(file);
else
listFiles(file, filename, fileList);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void listOfFiles(File dirPath){\n\t\tFile filesList[] = dirPath.listFiles();\r\n \r\n\t\t// For loop on each item in array \r\n for(File file : filesList) {\r\n if(file.isFile()) {\r\n System.out.println(file.getName());\r\n } else {\r\n \t // Run the method on each nested folder\r\n \t listOfFiles(file);\r\n }\r\n }\r\n }",
"private static List<File> listChildFiles(File dir) throws IOException {\n\t\t List<File> allFiles = new ArrayList<File>();\n\t\t \n\t\t File[] childFiles = dir.listFiles();\n\t\t for (File file : childFiles) {\n\t\t if (file.isFile()) {\n\t\t allFiles.add(file);\n\t\t } else {\n\t\t List<File> files = listChildFiles(file);\n\t\t allFiles.addAll(files);\n\t\t }\n\t\t }\n\t\t return allFiles;\n\t\t }",
"public static void getAllFiles()\n\t{\n\t\t//Getting the File Name\n\n\t\tList<String> fileNames = FileManager.getAllFiles(folderpath);\n\t\n\t\tfor(String f:fileNames)\n\t\tSystem.out.println(f);\n\t\n\t}",
"private List<File> getFileList(File root){\n\t List<File> returnable = new ArrayList<File>();\n\t if(root.exists()){\n\t\t for(File currentSubFile : root.listFiles()){\n\t\t\t if(currentSubFile.isDirectory()){\n\t\t\t\t returnable.addAll(getFileList(currentSubFile));\n\t\t\t } else {\n\t\t\t\t returnable.add(currentSubFile);\n\t\t\t }\n\t\t }\n\t }\n\t return returnable;\n }",
"private ArrayList<String> listFilesForFolder(File folder, TaskListener listener) {\n \tArrayList<String> lista = new ArrayList<String>();\n \tif(folder.exists()){\n\t \tFile[] listOfFiles = folder.listFiles();\n\t\t\t if(listOfFiles != null){\t\n\t\t\t\tfor (File file : listOfFiles) {\n\t\t\t\t\t if (file.isDirectory()) {\t\n\t\t\t\t \tlista.add(file.getName());\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t }\n\t\t}\n\t\treturn lista;\n\t}",
"public ScanResult getFilesRecursively() {\n\n final ScanResult scanResult = new ScanResult();\n try {\n Files.walkFileTree(this.basePath, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n if (!attrs.isDirectory() && PICTURE_MATCHER.accept(file.toFile())) {\n scanResult.addEntry(convert(file));\n System.out.println(file.toFile());\n }\n return FileVisitResult.CONTINUE;\n }\n });\n } catch (IOException e) {\n // intentional fallthrough\n }\n\n return new ScanResult();\n }",
"@Override\n public void printAllSubFilesAndFolders(String folderPath) {\n Path file = new File(folderPath).toPath();\n // boolean exists = Files.exists(file); // Check if the file exists\n boolean isDirectory = Files.isDirectory(file); // Check if it's a directory\n boolean isFile = Files.isRegularFile(file); // Check if it's a regular file\n if (isDirectory) {\n System.out.println(\"cd \"+file+\" %d\");\n System.out.println( System.getProperty(file.toString()));\n } else if (isFile) {\n System.out.println(\"dir\");\n }\n }",
"private List<DMTFile> listFilesRecursive(String path) {\n\t\tList<DMTFile> list = new ArrayList<DMTFile>();\n\t\tDMTFile file = getFile(path); //Get the real file\n\t\t\n\t\tif (null != file ){ //It checks if the file exists\n\t\t\tif (! file.isDirectory()){\n\t\t\t\tlist.add(file);\n\t\t\t} else {\n\t\t\t\tDMTFile[] files = listFilesWithoutConsoleMessage(file.getPath());\n\t\t\t\tfor (int x = 0; x < files.length; x++) {\n\t\t\t\t\tDMTFile childFile = files[x];\t\t \n\t\t\t\t\tif (childFile.isDirectory()){\n\t\t\t\t\t\tlist.addAll(listFilesRecursive(childFile.getPath()));\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlist.add(childFile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}",
"private void listAllClasses(List<Path> foundFiles, Path root) {\r\n if (root.toFile().isFile()) {\r\n foundFiles.add(root);\r\n } else {\r\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(root, filter)) {\r\n for (Path path : stream) {\r\n if (Files.isDirectory(path)) {\r\n listAllClasses(foundFiles, path);\r\n } else {\r\n foundFiles.add(path);\r\n }\r\n }\r\n } catch (AccessDeniedException e) {\r\n logger.error(\"Access denied to directory {}\", root, e);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading directory {}\", root, e);\r\n }\r\n }\r\n }",
"public static void goThroughFilesForFolder(final File folder) throws Exception {\r\n\r\n\t\t/*\r\n\t\t * char[] filePath;\r\n\t\t// *Files.walk(Paths.get(\"E:/Studying/eclipse/workspace/Thesis/PMIDs\")).\r\n\t\t * Files.walk(Paths.get(\"E:/Studying/Box Sync/workspace/Thesis/PMIDs\")).\r\n\t\t * forEach(filePath -> { if (Files.isRegularFile(filePath)) {\r\n\t\t * System.out.println(filePath); } }\r\n\t\t */\r\n\t\t// /*\r\n\t\tfor (final File fileEntry : folder.listFiles()) {\r\n\t\t\tif (fileEntry.isDirectory()) {\r\n\t\t\t\tgoThroughFilesForFolder(fileEntry);\r\n\t\t\t} else {\r\n\t\t\t\tprocessFile(fileEntry);\r\n\t\t\t\t// System.out.println(fileEntry.getName());\r\n\t\t\t}\r\n\t\t}\r\n\t\t// */\r\n\t}",
"AntiIterator<FsPath> listFilesAndDirectories(FsPath dir);",
"List<File> list(String directory) throws FindException;",
"static void viewFiles()\r\n\t {\n\t\t File directoryPath = new File(\"D:\\\\java_project\");\r\n\t File filesList[] = directoryPath.listFiles();\r\n System.out.println(\"List of files and directories in the specified directory:\");\r\n\t for(File file : filesList) \r\n\t {\r\n\t System.out.println(\"File name: \"+file.getName());\r\n\t System.out.println(\"File path: \"+file.getAbsolutePath());\r\n\t System.out.println(\"Size :\"+file.getTotalSpace());\r\n\t System.out.println(\"last time file is modified :\"+new Date(file.lastModified()));\r\n System.out.println(\" \");\r\n\t }\r\n }",
"public static void printListFilesRecursive(String startDir) {\n File dir = new File(startDir);\n File[] files = dir.listFiles();\n\n if (files != null && files.length > 0) {\n for (File file : files) {\n //Check if the file is a directory\n if (file.isDirectory()) {\n System.out.println(\"-- \" + file.getName());\n printListFilesRecursive(file.getAbsolutePath());\n } else {\n System.out.println(file.getName());\n }\n }\n }\n }",
"void getFilesInfoInFolder(String pathToFolder) {\n File[] listOfFiles = getFilesInFolder(pathToFolder);\n for (int i = 0; i < listOfFiles.length; i++) {\n if (listOfFiles[i].isFile()) {\n System.out.println(\"File \" + listOfFiles[i].getName());\n continue;\n }\n\n if (listOfFiles[i].isDirectory()) {\n System.out.println(\"Directory \" + listOfFiles[i].getName());\n }\n }\n }",
"static Stream<File> allFilesIn(File folder) \r\n\t{\r\n\t\tFile[] children = folder.listFiles();\r\n\t\tStream<File> descendants = Arrays.stream(children).filter(File::isDirectory).flatMap(Program::allFilesIn);\r\n\t\treturn Stream.concat(descendants, Arrays.stream(children).filter(File::isFile));\r\n\t}",
"private void readFiles(final File folder, final List<File> fileList) {\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tif (fileEntry.isDirectory()) {\n\t\t\t\treadFiles(fileEntry, fileList);\n\t\t\t} else {\n\t\t\t\tfileList.add(fileEntry);\n\t\t\t}\n\t\t}\n\t}",
"private static void showFiles(File[] files) {\n\t\t for (File file : files) {\r\n\t\t if (file.isDirectory()) {\r\n\t\t // System.out.println(\"Directory: \" + file.getName());\r\n\t\t showFiles(file.listFiles()); // Calls same method again.\r\n\t\t } else {\r\n\t\t // System.out.println(\"File: \" + file.getName());\r\n\t\t }\r\n\t\t }\r\n\t\t\r\n\t}",
"public List<String> listFilesForFolder(File folder) {\n\t\tList<String> fileList= new ArrayList<String>();\n\t for (final File fileEntry : folder.listFiles()) {\n\t if (fileEntry.isDirectory()) {\n\t listFilesForFolder(fileEntry);\n\t } else {\n\t \tfileList.add(fileEntry.getName());\n\t }\n\t }\n\t return fileList;\n\t}",
"public void listFilesAndFolders(String directoryName) throws IOException{\n File directory = new File(directoryName);\n System.out.println(\"List of Files and folders in: \" + directory.getCanonicalPath());\n //get all the files from a directory\n File[] fList = directory.listFiles();\n for (File file : fList){\n System.out.println(file.getName());\n }\n }",
"public void loadFilesInFolder(File rootFile) {\r\n\t\tDefaultListModel<File> model = new DefaultListModel<>();\r\n\t\tfor (File nextFile : rootFile.listFiles()) {\r\n\t\t\tmodel.addElement(nextFile);\r\n\t\t}\r\n\t\tlist.setModel(model);\r\n\t}",
"public void listFilesAndFilesSubDirectories(String directoryName) throws IOException{\n File directory = new File(directoryName);\n //get all the files from a directory\n System.out.println(\"List of Files and file subdirectories in: \" + directory.getCanonicalPath());\n File[] fList = directory.listFiles();\n for (File file : fList){\n if (file.isFile()){\n System.out.println(file.getAbsolutePath());\n } else if (file.isDirectory()){\n listFilesAndFilesSubDirectories(file.getAbsolutePath());\n }\n }\n }",
"private void processFolders(List<File> folderList, java.io.File parentFolder) {\n // process each folder to see if it needs to be updated;\n for (File f : folderList) {\n String folderName = f.getTitle();\n java.io.File localFolder = new java.io.File(parentFolder, folderName);\n Log.e(\"folder\",localFolder.getAbsolutePath());\n if (!localFolder.exists())\n localFolder.mkdirs();\n getFolderContents(f, localFolder);\n }\n }",
"private static ArrayList<File> getFilesFromSubfolders(String directoryName, ArrayList<File> files) {\n\n File directory = new File(directoryName);\n\n // get all the files from a directory\n File[] fList = directory.listFiles();\n for (File file : fList) {\n if (file.isFile() && file.getName().endsWith(\".json\")) {\n files.add(file);\n } else if (file.isDirectory()) {\n getFilesFromSubfolders(file.getAbsolutePath(), files);\n }\n }\n return files;\n }",
"private void getAllFiles(File dir, List<File> fileList) throws IOException {\r\n File[] files = dir.listFiles();\r\n if(files != null){\r\n for (File file : files) {\r\n // Do not add the directories that we need to skip\r\n if(!isDirectoryToSkip(file.getName())){\r\n fileList.add(file);\r\n if (file.isDirectory()) {\r\n getAllFiles(file, fileList);\r\n }\r\n }\r\n }\r\n }\r\n }",
"public void displayDirectoryList() {\r\n //-----------------------------------\r\n String appDirecotry = APP_INSTANCE.getAppDirectory();\r\n\r\n //-----------------------------------\r\n\r\n System.out.println(\"/// FILE LIST OF DIRECTORY: \"+appDirecotry);\r\n System.out.println(\"/// ------------------ START OF DIRECTORY FILES LIST -------------------\");\r\n\r\n //-----------------------------------\r\n getCurrentDirectoryFiles(appDirecotry).forEach(listItemFile-> {\r\n intProperty = (intProperty +1 );\r\n System.out.println(\"/// [\"+intProperty+\"] \"+listItemFile.getName());\r\n });\r\n\r\n //-----------------------------------\r\n System.out.println(\"/// ------------------- END OF DIRECTORY FILES LIST --------------------\");\r\n }",
"public void listFiles(String path) {\r\n String files;\r\n File folder = new File(path);\r\n File[] listOfFiles = folder.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n\r\n if (listOfFiles[i].isFile()) {\r\n files = listOfFiles[i].getName();\r\n if (files.endsWith(\".png\") || files.endsWith(\".PNG\")\r\n || files.endsWith(\".gif\") || files.endsWith(\".GIF\")) {\r\n //System.out.println(files);\r\n pathList.add(path+\"\\\\\");\r\n fileList.add(files);\r\n }\r\n }\r\n \r\n else {\r\n listFiles(path+\"\\\\\"+listOfFiles[i].getName());\r\n }\r\n }\r\n }",
"protected abstract String[] getFolderList() throws IOException;",
"public List listFiles(String path);",
"private static void iteratorFilePath(File file){\n while(file.isDirectory()){\n for(File f : file.listFiles()){\n System.out.println(f.getPath());\n iteratorFilePath(f);\n }\n break;\n }\n }",
"private void recurseOverFolder(final File folder) {\n File[] files = folder.listFiles();\n if (files == null) {\n return;\n }\n\n // Check each path and recurse if it's a folder, handle if it's a file\n for (final File fileEntry : files) {\n if (fileEntry.isDirectory()) {\n recurseOverFolder(fileEntry);\n } else {\n handleFile(fileEntry);\n }\n }\n }",
"@Override\r\n\tpublic String[] listFolders() throws FileSystemUtilException {\r\n\t\t// getting all the files and folders in the given file path\r\n\t\tString[] files = listFiles();\r\n\t\tList foldersList = new ArrayList();\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\t// all the folder are ends with '/'\r\n\t\t\tif (files[i].endsWith(\"/\") && isValidString(files[i])) {\r\n\t\t\t\tfoldersList.add(files[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] folders = new String[foldersList.size()];\r\n\t\t// getting only folders from returned array of files and folders\r\n\t\tfor (int i = 0; i < foldersList.size(); i++) {\r\n\t\t\tfolders[i] = foldersList.get(i).toString();\r\n\t\t}\r\n\t\treturn folders;\r\n\r\n\t}",
"private static void listar(Path a){\n File dir = new File(a.toString());\n if(dir.isDirectory()){\n String[] dirContents = dir.list();\n for(int i =0; i < dirContents.length; i++){\n System.out.println(dirContents[i]);\n }\n }\n }",
"private void FindFiles(Path findPath)\n {\n\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(findPath))\n {\n\n for (Path thisPath : stream)\n {\n File file = new File(thisPath.toString());\n\n if (file.isDirectory())\n {\n dirCount++;\n\n if (HasMatch(thisPath.toString(), lineIncludePattern, lineExcludePattern))\n {\n dirLineMatchCount++;\n\n System.out.println(thisPath.toAbsolutePath().toString() + \",directory,none\");\n }\n\n if (HasMatch(thisPath.toString(), dirIncludePattern, dirExcludePattern))\n {\n dirMatchCount++;\n folderLevel++;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n indentBuffer = \"\";\n\n //System.out.println(indentBuffer + thisPath.toString() + \" ...\");\n FindFiles(thisPath.toAbsolutePath());\n\n folderLevel--;\n //indentBuffer = String.join(\"\", Collections.nCopies(folderLevel * 3, \" \"));\n }\n }\n else\n {\n fileCount++;\n\n if (HasMatch(thisPath.getParent().toString(), lineIncludePattern, lineExcludePattern))\n {\n fileLineMatchCount++;\n\n System.out.println(thisPath.getParent().toString() + \",\" + thisPath.getFileName() + \",none\");\n }\n\n if (HasMatch(thisPath.toString(), fileIncludePattern, fileExcludePattern))\n {\n fileMatchCount++;\n\n File refFile;\n if (doReplace)\n {\n refFile = new File(thisPath.toString() + \"_bak\");\n file.renameTo(refFile);\n\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(refFile.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n else\n {\n //System.out.println(indentBuffer + thisPath.toString());\n Scan(file.toPath().toAbsolutePath().toString(),thisPath.toAbsolutePath().toString());\n }\n\n }\n }\n }\n }\n catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", findPath);\n e.printStackTrace();\n }\n\n }",
"public void listFilesForFolder(final File folder) {\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tif (fileEntry.isDirectory()) {\n\t\t\t\tlistFilesForFolder(fileEntry);\n\t\t\t} else if (!fileEntry.getName().startsWith(\".\")) {\n\t\t\t\tRunConfigDataNode temp = new RunConfigDataNode(null);\n\t\t\t\ttemp.setName(fileEntry.getName());\n\t\t\t\ttemp.setSerializeDestination(serializePath);\n\t\t\t\tString name = fileEntry.getName();\n\t\t\t\tif (!name.equals(\"entries\")) {\n\t\t\t\t\tRunConfigDataNode config = temp.deserialize();\n\t\t\t\t\tif (!config.isMarkedForDelete()) {\n\t\t\t\t\t\tsavedConfigs.put(name, config);\n\t\t\t\t\t\tnewConfigsNum++;\n\t\t\t\t\t}\n\t\t\t\t\t// if the config is marked for delete, delete it.\n\t\t\t\t\telse {\n\t\t\t\t\t\tfileEntry.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private File[] getResourceFolderFiles(String folder) {\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n\t\tURL url = loader.getResource(folder);\n\t\tString path = url.getPath();\n\n\t\treturn new File(path).listFiles();\n\n\t}",
"private static void findAllFilesRecurse(File root, ArrayList<File> files, boolean recurse) {\n\t\tFile[] rootContents = root.listFiles();\n\t\tif (rootContents == null) {\n\t\t\tfiles.add(root);\n\t\t} else {\n\t\t\tfor (File f : rootContents) {\n\t\t\t\t// if it is a file or do not go deeper\n\t\t\t\tif (f.isFile() || !recurse) {\n\t\t\t\t\tfiles.add(f);\n\t\t\t\t} else if (recurse) { // directory\n\t\t\t\t\tfindAllFilesRecurse(f, files, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public ArrayList<String> traverseFiles(File inputDir, ArrayList<String> Documents2 )\n\t{\n\t\tif (inputDir.isDirectory()) {\n\t\t\t//System.out.println(\"Checking for directory...\");\n\t String[] children = inputDir.list();\n\t for (int i = 0; children != null && i < children.length; i++) {\n\t traverseFiles(new File(inputDir, children[i]), Documents2);\n\t }\n\t }\n\t if (inputDir.isFile()) \n\t \t{ Documents2.add(inputDir.getAbsolutePath());}//change it if needed\n\t \n\t return Documents2;\n\t // System.out.println(Documents.size());\n\t}",
"public void listFolders(String directoryName) throws IOException{\n File directory = new File(directoryName);\n //get all the files from a directory\n System.out.println(\"List of Folders in: \" + directory.getCanonicalPath());\n\n File[] fList = directory.listFiles();\n for (File file : fList){\n if (file.isDirectory()){\n System.out.println(file.getName());\n }\n }\n }",
"File[] getFilesInFolder(String path) {\n return new File(path).listFiles();\n }",
"public void recursiveList(String path) {\n Directory tDir = Directory.getDir(path);\n if (tDir == null) {\n str += \"Error: the input path \" + path + \" does not exist!\\n\";\n } else if (tDir.getSubContent().isEmpty()) {\n str += tDir.getName() + \"\\n\";\n } else {\n str += tDir.getName() + \":\";\n indentation += \"\\t\";\n for (int i = 0; i < tDir.getSubContent().size(); i++) {\n str += indentation;\n recursiveList(tDir.getSubContent().get(i).getAbsolutePath());\n }\n indentation = indentation.substring(0, indentation.length() - 1);\n }\n }",
"void listingFiles(String remoteFolder);",
"private void searchDFS(File[] files, ArrayList<String> list) {\n\n\t\tfor (File file : files) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tif (file.getAbsolutePath().endsWith(GIT)) {\n\t\t\t\t\tgitDir = file.getAbsolutePath();\n\t\t\t\t}\n\t\t\t\tsearchDFS(file.listFiles(), list);\n\t\t\t} else {\n\t\t\t\tif (file.getName().endsWith(EXTENSION)) {\n\t\t\t\t\tlist.add(file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static List<File> goFolder(File file) {\n File[] files = file.listFiles();\n for (File f : files) {\n if (!f.isDirectory()) {\n if (isCondition(f)) {\n fileList.add(f);\n }\n } else {\n goFolder(f);\n }\n }\n return fileList;\n }",
"private void loadFolderPressed() {\n\n\t\t// open a jfile chooser and then go through the directory chosen\n\t\t// then load all the video and audio files in that directory\n\n\t\tFile chosenDirectory =null;\n\n\t\t// choose a directory only\n\t\tJFileChooser chooser = new JFileChooser();\n\t\tchooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\tchooser.setDialogTitle(\"Choose Directory\");\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tint response = chooser.showOpenDialog(Library.this);\n\t\tif (response == JFileChooser.APPROVE_OPTION) {\n\t\t\t// Chose the directory to save to\n\t\t\tchosenDirectory = chooser.getSelectedFile().getAbsoluteFile();\n\t\t}\n\t\tif(chosenDirectory != null){\n\t\t\t// go through the chosen directory and get all the files\n\t\t\tl.clear();\n\t\t\tFile[] directoryListing = chosenDirectory.listFiles();\n\t\t\tif (directoryListing != null) {\n\n\t\t\t\t// check if that file chosen currently is a media file. If it is then\n\t\t\t\t// add it to the list\n\t\t\t\tInvalidCheck ic = new InvalidCheck();\n\n\t\t\t\tfor(File f : directoryListing){\n\t\t\t\t\tboolean isValid = ic.invalidCheck(f.getAbsolutePath());\n\n\t\t\t\t\tif(isValid){\n\t\t\t\t\t\tlistFolder.add(f);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(File f2 : listFolder){\n\t\t\t\t\tSystem.out.println(f2.getName());\n\t\t\t\t}\n\n\t\t\t\t// get the paths and sizes of the media files.\n\t\t\t\tfor(File f : listFolder){\n\t\t\t\t\t// only put the file in if it is not size 0 so that any bad files are avoided.\n\t\t\t\t\tif(f.length() != 0){\n\t\t\t\t\t\tl.addElement(f.getName());\n\t\t\t\t\t\tpaths.put(f.getName(),f.getAbsoluteFile());\n\t\t\t\t\t\tsizes.put(f.getName(), f.length());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}",
"private List<Path> listSourceFiles(Path dir) throws IOException {\n\t\tList<Path> result = new ArrayList<>();\n\t\ttry (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, \"*.json\")) {\n\t\t\tfor (Path entry: stream) {\n\t\t\t\tresult.add(entry);\n\t\t\t}\n\t\t} catch (DirectoryIteratorException ex) {\n\t\t\t// I/O error encounted during the iteration, the cause is an IOException\n\t\t\tthrow ex.getCause();\n\t\t}\n\t\treturn result;\n\t}",
"List<Path> getFiles();",
"private static void listarDirectorio2(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t\t//System.out.println(\"\");\n\t\t\t\t//listarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// explora nuevos directorios\n\t\t\tif (ficheros[i].isDirectory()) {\t\t\t\t\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t\tlistarDirectorio2(ficheros[i].getPath());\n\t\t\t}\n\t\t}\n\t}",
"public static ArrayList<String> listFilesInFolder(String pFolderPath, boolean pIncludeSubfolders,\n String pExtension) {\n ArrayList<String> list = new ArrayList<String>();\n\n /*\n * depth = 0 -> only the specified file/folder is returned. To get all\n * files inside a folder, depth must be set to 1.\n */\n int depth = 1;\n if (pIncludeSubfolders) {\n depth = Integer.MAX_VALUE;\n }\n\n String matcherString = \"glob:**\";\n if (!ObjectUtils.isObjectEmpty(pExtension)) {\n matcherString += \".\" + pExtension;\n }\n PathMatcher matcher = FileSystems.getDefault().getPathMatcher(matcherString);\n\n try (Stream<Path> paths = Files.walk(Paths.get(pFolderPath), depth)) {\n // paths.filter(Files::isRegularFile).filter(path ->\n // matcher.matches(path))\n // .forEach(path ->\n // System.out.println(path.normalize().toString()));\n paths.filter(Files::isRegularFile).filter(path -> matcher.matches(path))\n .forEach(path -> list.add(path.normalize().toString()));\n } catch (IOException e) {\n LogUtils.logError(DirectoryUtils.class, \"IOException while listing files in folder [\" + pFolderPath + \"]\",\n e);\n }\n\n return list;\n }",
"private void getFiles(File[] files) {\n\t\titems = new ArrayList<String>();\n\t\titems.add(\"Back To Previous Directory\");\n\t\t// add every file to the list\n\t\tfor (File file : files) {\n\t\t\tif (file.getPath().equals(\"/root\"))\n\t\t\t\tcontinue;\n\t\t\titems.add(file.getPath());\n\t\t}\n\t\tArrayAdapter<String> fileList = new ArrayAdapter<String>(this,\n\t\t\t\tR.layout.rowfolder, items);\n\t\tsetListAdapter(fileList);\n\t}",
"public void getFiles()\n\t{\n\t\tif(fileList.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"There is no file or file not found\");\n\t\t}\n\t\tfor(int i = 0; i < fileList.size(); i++)\n\t\t{\n\t\t\tSystem.out.println(\"File is at: \" + fileList.get(i));\n\t\t}\n\t}",
"private ArrayList<char[]> subdirectoriesToFiles(ArrayList<char[]> currentList, ArrayList<char[]> fullFileList) throws IOException {\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\telse if (file.isDirectory()){\n\t\t\t\t$.log(file.toString());\n\t\t\t\tsubdirectoriesToFiles(file.getAbsolutePath(), fullFileList);\n\t\t\t}\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}",
"public void getImagesFromFolder() {\n File file = new File(Environment.getExternalStorageDirectory().toString() + \"/saveclick\");\n if (file.isDirectory()) {\n fileList = file.listFiles();\n for (int i = 0; i < fileList.length; i++) {\n files.add(fileList[i].getAbsolutePath());\n Log.i(\"listVideos\", \"file\" + fileList[0]);\n }\n }\n }",
"private static Collection<File> listFiles(File directory, FilenameFilter filter, boolean recurse) {\n\t\tVector<File> files = new Vector<File>();\n\t\tFile[] entries = directory.listFiles();\n\n\t\tfor (File entry : entries) {\n\t\t\tif (filter == null || filter.accept(directory, entry.getName()))\n\t\t\t\tfiles.add(entry);\n\t\t\tif (recurse && entry.isDirectory())\n\t\t\t\tfiles.addAll(listFiles(entry, filter, recurse));\n\t\t}\n\t\treturn files;\n\t}",
"static void walkTheDir(){ \n\t try (Stream<Path> paths = Files.walk(Paths.get(\"/ownfiles/tullverketCert/source\"))) {\n\t \t paths\n\t \t .filter(Files::isRegularFile)\n\t \t //.forEach(System.out::println);\n\t \t .forEach( e ->{\n\t \t \t\tSystem.out.println(e);\n\t \t \t\tSystem.out.println(e.getParent());\n\t \t \t\t\n\t \t \t});\n\t \t \n \t}catch (Exception e) { \n\t System.out.println(\"Exception: \" + e); \n\t } \n\t }",
"private static void getFiles(String root, Vector files) {\n Location f = new Location(root);\n String[] subs = f.list();\n if (subs == null) subs = new String[0];\n Arrays.sort(subs);\n \n // make sure that if a config file exists, it is first on the list\n for (int i=0; i<subs.length; i++) {\n if (subs[i].endsWith(\".bioformats\") && i != 0) {\n String tmp = subs[0];\n subs[0] = subs[i];\n subs[i] = tmp;\n break;\n }\n }\n \n if (subs == null) {\n LogTools.println(\"Invalid directory: \" + root);\n return;\n }\n \n ImageReader ir = new ImageReader();\n Vector similarFiles = new Vector();\n \n for (int i=0; i<subs.length; i++) {\n LogTools.println(\"Checking file \" + subs[i]);\n subs[i] = new Location(root, subs[i]).getAbsolutePath();\n if (isBadFile(subs[i]) || similarFiles.contains(subs[i])) {\n LogTools.println(subs[i] + \" is a bad file\");\n String[] matching = new FilePattern(subs[i]).getFiles();\n for (int j=0; j<matching.length; j++) {\n similarFiles.add(new Location(root, matching[j]).getAbsolutePath());\n }\n continue;\n }\n Location file = new Location(subs[i]);\n \n if (file.isDirectory()) getFiles(subs[i], files);\n else if (file.getName().equals(\".bioformats\")) {\n // special config file for the test suite\n configFiles.add(file.getAbsolutePath());\n }\n else {\n if (ir.isThisType(subs[i])) {\n LogTools.println(\"Adding \" + subs[i]);\n files.add(file.getAbsolutePath());\n }\n else LogTools.println(subs[i] + \" has invalid type\");\n }\n file = null;\n }\n }",
"@Override\r\n public List<Folder> getAllFolder() {\n return folderRepository.findAll();\r\n }",
"public static void showListOfDirectory(String filePath) {\n File f1 = new File(filePath);\n if (f1.isDirectory()) {\n System.out.println(\"Directory: \" + filePath);\n String[] arr = f1.list();\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 abstract List<LocalFile> getAllFiles();",
"private void getDriveContents() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n // get only the folders in the root directory of drive account\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }\n });\n t.start();\n }",
"private File[] getFilesInDirectory() {\n\t\t//Show Directory Dialog\n\t\tDirectoryChooser dc = new DirectoryChooser();\n\t\tdc.setTitle(\"Select Menu File Directory\");\n\t\tString folderPath = dc.showDialog(menuItemImport.getParentPopup().getScene().getWindow()).toString();\n\t\t\n\t\t//Update Folder location text\n\t\ttxtFolderLocation.setText(\"Import Folder: \" + folderPath);\n\t\t//Now return a list of all the files in the directory\n\t\tFile targetFolder = new File(folderPath);\n\t\t\n\t\treturn targetFolder.listFiles(); //TODO: This returns the names of ALL files in a dir, including subfolders\n\t}",
"@Test\n public void listFilesTest() throws ApiException {\n Integer devid = null;\n String path = null;\n List<FileOnDevice> response = api.listFiles(devid, path);\n\n // TODO: test validations\n }",
"private void listDirectories (Directory currentDirectory) {\n currentDirectory.printSubDirectories(\"DIRS : \");\n }",
"public List<DocumentFile> listFolders(@NonNull Context context, @NonNull DocumentFile parent) {\n return listDocumentFiles(context, parent, null, true, false, false);\n }",
"private void searchNextFolder() {\n File nextFolder = foldersToSearch.get(0);\n File[] files = nextFolder.listFiles();\n for (int i = 0; i < files.length; i++) {\n if (this.isCancelled()) { break; }\n File nextFile = files[i];\n String nextLower = nextFile.getName().toLowerCase();\n if (nextFile.isHidden()) {\n // Skip hidden files and folders\n } else if (nextFile.isDirectory()) {\n if (nextLower.contains(\"archive\")\n || nextLower.contains(\"backup\")\n || nextLower.equals(\"deploy\")\n || nextLower.equals(\"dist\")\n || nextLower.equals(\"icons\")\n || nextLower.equals(\"jars\")\n || nextFile.getName().equalsIgnoreCase(\"Library\")\n || nextFile.getName().equalsIgnoreCase(\"Music\")\n || nextFile.getName().equalsIgnoreCase(\"Pictures\")\n || nextFile.getName().equalsIgnoreCase(\"PSPub Omni Pack\")\n || nextFile.getName().endsWith(\".app\")) {\n // Let's not search certain folders\n } else {\n foldersToSearch.add(nextFile);\n }\n } else if (nextFile.getName().equals(NoteIO.README_FILE_NAME)) {\n String line = \"\";\n boolean notenikLineFound = false;\n try {\n FileReader fileReader = new FileReader(nextFile);\n BufferedReader reader = new BufferedReader(fileReader);\n line = reader.readLine();\n while (line != null && (! notenikLineFound)) {\n int j = line.indexOf(NoteIO.README_LINE_1);\n notenikLineFound = (j >= 0);\n line = reader.readLine();\n }\n } catch(IOException e) {\n // Ignore\n }\n if (notenikLineFound) {\n FileSpec collectionSpec = master.getFileSpec(nextFolder);\n if (collectionSpec == null) {\n collectionsToAdd.add(nextFolder);\n }\n } // end if notenik line found within README file\n } // end if we found a README file\n } // end for each file in directory\n foldersToSearch.remove(0);\n }",
"@Override\n protected List<String> compute() {\n List<String> fileNames = new ArrayList<>();\n\n // FolderProcessor tasks to store the sub-tasks that are going to process the sub-folders stored inside folder.\n List<FolderProcessor> subTasks = new ArrayList<>();\n\n // Get the content of the folder.\n File file = new File(path);\n File content[] = file.listFiles();\n\n //For each element in the folder, if there is a subfolder, create a new FolderProcessor object\n //and execute it asynchronously using the fork() method.\n for (int i = 0; i < content.length; i++) {\n if (content[i].isDirectory()) {\n FolderProcessor task = new FolderProcessor(content[i].getAbsolutePath(), extension);\n task.fork();\n subTasks.add(task);\n } else {\n //Otherwise, compare the extension of the file with the extension you are looking for using the checkFile() method\n //and, if they are equal, store the full path of the file in the list of strings declared earlier.\n\n if (checkFile(content[i].getName())) {\n fileNames.add(content[i].getAbsolutePath());\n }\n }\n }\n\n //If the list of the FolderProcessor sub-tasks has more than 50 elements,\n //write a message to the console to indicate this circumstance.\n if (subTasks.size() > 50) {\n System.out.printf(\"%s: %d tasks ran.\\n\", file.getAbsolutePath(), subTasks.size());\n }\n\n // Add the results from the sub-tasks.\n addResultsFrommSubTasks(fileNames, subTasks);\n\n return fileNames;\n }",
"public static List<File> listFilesRecurse(File dir, FilenameFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}",
"public static void traverseDirListing(String dir, List<CWLFileBase> listing, boolean nochecksum) {\r\n File file = new File(dir);\r\n File[] subFiles = file.listFiles();\r\n if (subFiles != null && subFiles.length != 0) {\r\n for (File subFile : subFiles) {\r\n if (subFile.isDirectory()) {\r\n CWLDirectory cwlDir = toCWLDirectory(Paths.get(subFile.getAbsolutePath()));\r\n if (cwlDir != null) {\r\n listing.add(cwlDir);\r\n traverseDirListing(subFile.getAbsolutePath(), cwlDir.getListing(), nochecksum);\r\n }\r\n } else {\r\n CWLFile cwlFile = toCWLFile(Paths.get(subFile.getAbsolutePath()), nochecksum);\r\n listing.add(cwlFile);\r\n }\r\n }\r\n }\r\n }",
"private static void listarDirectorio(String directorio) {\n\t\tFile f = new File(directorio);\n\t\tFile[] ficheros = f.listFiles();\n\t\tSystem.out.printf(\"CURRENT DIRECTORY: %s%n\", directorio);\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es fichero\n\t\t\tif (ficheros[i].isFile()) {\n\t\t\t\tSystem.out.printf(\"-- FILE %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < ficheros.length; i++) {\n\t\t\t// es directorio\n\t\t\tif (ficheros[i].isDirectory()) {\n\t\t\t\tSystem.out.printf(\"-- DIR %s%n\", \n\t\t\t\t\t\tficheros[i].getName());\n\t\t\t}\n\t\t}\n\t}",
"public void process() throws Exception {\n\tFile curDir = new File(pathToInputFolder);\n\tFile[] filesList = curDir.listFiles();\n\tlist=list(filesList);\n\t\n\tif(list.length==0) System.out.println(\"No file in the specified directory\");\n\n\t}",
"private void iterateOverDefinitionDirectories() {\n\tfor (short repoIndex = Constants.gshMaxRepoDepth; repoIndex > Constants.gshZero; repoIndex--) {\n\t if (repoIndex == Constants.gshMaxRepoDepth) {\n\t\tif (mbJrestRepositoryRead == false) {\n\t\t mfDefinitionFile = new File(msPathToJrestRepo);\n\n\t\t mLogger.debug(String.format(Exceptions.gsJrestCurrentScanningFolder,\n\t\t\t msPathToJrestRepo));\n\n\t\t /*\n\t\t * loadDefinitions to be executed here only in the case of mbJrestRepositoryRead\n\t\t * being false and (repoIndex == Constants.gshMaxRepoDepth).\n\t\t */\n\t\t loadDefinitions(repoIndex);\n\t\t}// if (mbJrestRepositoryRead == false)\n\t } else {\n\t\tmLogger.debug(String.format(Exceptions.gsJrestCurrentScanningFolder,\n\t\t\tmsPathToDefinitionFiles));\n\n\t\tmfDefinitionFile = new File(msPathToDefinitionFiles);\n\n\t\tloadDefinitions(repoIndex);\n\t }// if (mbJrestRepositoryRead == false)\n\t}// for (short repoIndex = Constants.gshMaxRepoDepth; ... )\n }",
"public abstract List<String> getDirs( );",
"public static void viewDirectory(String inputDirectory) {\n File directory = new File(inputDirectory);\n //check if it is a directory \n if (directory.isDirectory()) {\n //check if the directory has children \n if (directory.listFiles().length == 0) {\n System.out.println(\"Sorry, directory is empty!\");\n } //separate files and print [Folder] or [File]\n else {\n String listFiles[] = directory.list();\n System.out.println(\"Following are files in the directory \" + inputDirectory + \" :\\n \");\n for (String listFile : listFiles) {\n File allFiles = new File(listFile);\n System.out.println(\"-> \" + allFiles);\n }\n }\n } else {\n System.out.println(\"Invalid directory or path\");\n }\n }",
"public List<DatasetBean> getAllFiles(List<DatasetBean> found, DatasetBean root) {\n List<DatasetBean> current = root.getChildren();\n\n if (current == null) {\n found.add(root);\n } else if (current.size() == 0) {\n found.add(root);\n\n } else {\n for (int i = 0; i < current.size(); i++) {\n getAllFiles(found, current.get(i));\n }\n }\n return found;\n }",
"List<String> getDirectories(String path, String searchPattern) throws IOException;",
"public static List<File> listFilesRecurse(File dir, FileFilter filter) {\n\t\treturn listFileRecurse(new ArrayList<File>(), dir, filter);\n\t}",
"public void listFiles(String directoryName) throws IOException{\n File directory = new File(directoryName);\n //get all the files from a directory\n System.out.println(\"List of Files in: \" + directory.getCanonicalPath());\n File[] fList = directory.listFiles();\n for (File file : fList){\n if (file.isFile()){\n System.out.println(file.getName());\n }\n }\n }",
"private void processFolder(File folder) {\n \t\tFile[] subFolders = folder.listFiles(new FileFilter() {\n \t\t\t@Override\n \t\t\tpublic boolean accept(File pathname) {\n \t\t\t\treturn pathname.isDirectory();\n \t\t\t}\n \t\t});\n \t\tfor (File subFolder : subFolders){\n \t\t\tprocessFolder(subFolder); \n \t\t}\n \t\tPattern nameRegex = Pattern.compile(\"([\\\\d-]+)\\\\.(pdf|epub)\", Pattern.CANON_EQ | Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);\n \t\tFile[] files = folder.listFiles();\n \t\tfor (File file : files) {\n \t\t\tlogger.info(\"Processing file \" + file.getName());\n \t\t\tprocessLog.addNote(\"Processing file \" + file.getName());\n \t\t\tif (file.isDirectory()) {\n \t\t\t\t//TODO: Determine how to deal with nested folders?\n \t\t\t\t//processFolder(file);\n \t\t\t} else {\n \t\t\t\t// File check to see if it is of a known type\n \t\t\t\tMatcher nameMatcher = nameRegex.matcher(file.getName());\n \t\t\t\tif (nameMatcher.matches()) {\n \t\t\t\t\tImportResult importResult = new ImportResult();\n \t\t\t\t\tString isbn = nameMatcher.group(1);\n \t\t\t\t\tString fileType = nameMatcher.group(2).toLowerCase();\n \t\t\t\t\timportResult.setBaseFilename(isbn);\n \t\t\t\t\tisbn = isbn.replaceAll(\"-\", \"\");\n \t\t\t\t\timportResult.setISBN(isbn);\n \t\t\t\t\timportResult.setCoverImported(\"\");\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Get the record for the isbn\n \t\t\t\t\t\tgetRelatedRecords.setString(1, \"%\" + isbn + \"%\");\n \t\t\t\t\t\tResultSet existingRecords = getRelatedRecords.executeQuery();\n \t\t\t\t\t\tif (!existingRecords.next()){\n \t\t\t\t\t\t\t//No record found \n \t\t\t\t\t\t\tlogger.info(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\tprocessLog.addNote(\"Could not find record for ISBN \" + isbn);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tlogger.info(\"Found at least one record for \" + isbn);\n \t\t\t\t\t\t\tif (existingRecords.last()){\n \t\t\t\t\t\t\t\tif (existingRecords.getRow() >= 2){\n \t\t\t\t\t\t\t\t\tlogger.info(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Multiple records were found for ISBN \" + isbn);\n \t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t//We have an existing record\n \t\t\t\t\t\t\t\t\texistingRecords.first();\n \t\t\t\t\t\t\t\t\tString recordId = existingRecords.getString(\"id\");\n \t\t\t\t\t\t\t\t\tString accessType = existingRecords.getString(\"accessType\");\n \t\t\t\t\t\t\t\t\tString source = existingRecords.getString(\"source\");\n \t\t\t\t\t\t\t\t\tlogger.info(\" Attaching file to \" + recordId + \" accessType = \" + accessType + \" source=\" + source);\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t// Copy the file to the library if it does not exist already\n \t\t\t\t\t\t\t\t\tFile resultsFile = new File(libraryDirectory + source + \"_\" + file.getName());\n \t\t\t\t\t\t\t\t\tif (resultsFile.exists()) {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Skipping file because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"File has already been copied to library\");\n \t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because it already exists in the library\");\n \t\t\t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t\t\tlogger.info(\"Importing file \" + file.getName());\n \t\t\t\t\t\t\t\t\t\t//Check to see if the file has already been added to the library.\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(1, file.getName());\n \t\t\t\t\t\t\t\t\t\tdoesItemExist.setString(2, recordId);\n \t\t\t\t\t\t\t\t\t\tResultSet existingItems = doesItemExist.executeQuery();\n \t\t\t\t\t\t\t\t\t\tif (existingItems.next()){\n \t\t\t\t\t\t\t\t\t\t\t//The item already exists\n \t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"skipped\" ,\"The file has already been aded as an eContent Item\");\n \t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(\"Skipping file \" + file.getName() + \" because has already been attached to this record\");\n \t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\ttry {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" copying the file to library source=\" + file + \" dest=\" + resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t//Copy the pdf file to the library\n \t\t\t\t\t\t\t\t\t\t\t\tUtil.copyFile(file, resultsFile);\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t//Add file to acs server\n \t\t\t\t\t\t\t\t\t\t\t\tboolean addedToAcs = true;\n \t\t\t\t\t\t\t\t\t\t\t\tif (accessType.equals(\"acs\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\"Adding file to the ACS server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\taddedToAcs = addFileToAcsServer(fileType, resultsFile, importResult);\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (addedToAcs){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//filename, acsId, recordId, item_type, addedBy, date_added, date_updated\n \t\t\t\t\t\t\t\t\t\t\t\t\tlong curTimeSec = new Date().getTime() / 1000;\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(1, resultsFile.getName());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(2, importResult.getAcsId());\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(3, recordId);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setString(4, fileType);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(5, -1);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(6, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\taddEContentItem.setLong(7, curTimeSec);\n \t\t\t\t\t\t\t\t\t\t\t\t\tint rowsInserted = addEContentItem.executeUpdate();\n \t\t\t\t\t\t\t\t\t\t\t\t\tif (rowsInserted == 1){\n \t\t\t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"success\", \"\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" file could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the database\");\n \t\t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t}else{\n \t\t\t\t\t\t\t\t\t\t\t\t\tlogger.info(\" the file could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.addNote(file.getName() + \" could not be added to the acs server\");\n \t\t\t\t\t\t\t\t\t\t\t\t\tprocessLog.incErrors();\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t\tif (importResult.getSatus(fileType).equals(\"failed\")){\n \t\t\t\t\t\t\t\t\t\t\t\t\t//If we weren't able to add the file correctly, remove it so it will be processed next time. \n \t\t\t\t\t\t\t\t\t\t\t\t\tresultsFile.delete();\n \t\t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t\t\t} catch (IOException e) {\n \t\t\t\t\t\t\t\t\t\t\t\tlogger.error(\"Error copying file to record\", e);\n \t\t\t\t\t\t\t\t\t\t\t\timportResult.setStatus(fileType, \"failed\", \"Error copying file \" + e.toString());\n \t\t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error finding related records\", e);\n \t\t\t\t\t\timportResult.setStatus(\"pdf\", \"failed\", \"SQL error processing file \" + e.toString());\n \t\t\t\t\t}\n \t\t\t\t\timportResults.add(importResult);\n \t\t\t\t\t//Update that another file has been processed.\n \t\t\t\t\tprocessLog.incUpdated();\n \t\t\t\t\ttry {\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(1, processLog.getNumUpdates());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(2, processLog.getNumErrors());\n \t\t\t\t\t\tupdateRecordsProcessed.setLong(3, logEntryId);\n \t\t\t\t\t\tupdateRecordsProcessed.executeUpdate();\n \t\t\t\t\t} catch (SQLException e) {\n \t\t\t\t\t\tlogger.error(\"Error updating number of records processed.\", e);\n \t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tprocessLog.addNote(\" Skipping because the name is not an ISBN\");\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t\n \t}",
"private void get_file_List() {\n\tString file_name=null;\r\n\tfor (int i = 0; i < listOfFiles.length; i++) \r\n\t {\r\n\t \r\n\t if (listOfFiles[i].isFile()) \r\n\t {\r\n\t\t file_name = listOfFiles[i].getName();\r\n\t if (file_name.endsWith(\".xml\") || file_name.endsWith(\".XML\"))\r\n\t {\r\n\t file_list.add(file_name) ;\r\n\t }\r\n\t }\r\n\t }\r\n\t\r\n}",
"private void listFiles(JSONArray parameter) {\n String response = \"Files and Directorys to list: \";\n if (parameter.size() == 1) {\n File file = new File((String) parameter.get(0));\n for (String s : file.list()) {\n response = response + \"\\n\" + s;\n }\n clientResponse(response);\n } else {\n failedClientResponse(\"Wrong Parameters! -400\");\n }\n }",
"public ArrayList<String> getDirFiles(String filePath){\n ArrayList<String> results = new ArrayList<String>();\n File[] files = new File(filePath).listFiles();\n\n for (File file : files){\n if (file.isFile()) {\n results.add(file.getName());\n }\n }\n return results;\n }",
"public static void main(String[] args) {\n String startDir = \"E:/DEKSTOP/Projets/photosortTest\";\n\n //We list what is in this folder :\n\n System.out.println(\"\\n\\n\\nListing of files recursively : \\n\");\n\n printListFilesRecursive(startDir);\n\n //Then we create 2 directories\n createDirectory(startDir, \"css_files\");\n createDirectory(startDir, \"js_files\");\n\n //Then we select all the js file and move it to /js_file, same for css files\n List<String> list_js = new ArrayList<>();\n List<String> list_css = new ArrayList<>();\n\n listFilesRecursiveByExtension(startDir,\"js\",list_js);\n listFilesRecursiveByExtension(startDir,\"css\",list_css);\n\n for (String item_js : list_js){\n copyFile(item_js,startDir+\"/js_files\",new File(item_js).getName());\n }\n\n\n for (String item_css : list_css){\n copyFile(item_css,startDir+\"/css_files\",new File(item_css).getName());\n }\n System.out.println(\"Listing of file dummy : \\n\");\n //array in which we will store the names of files and directories\n\n printDummyListFiles(startDir);\n\n\n\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n\n System.out.println(\"\\n\\n\\nListing of JS files recursively : \\n\");\n\n printListFilesRecursiveByExtension(startDir, \"map\");\n }",
"private void browseUsersFolders(Path path) {\n try (DirectoryStream<Path> streamUserDir = Files.newDirectoryStream(path)) {\n for (Path userDir : streamUserDir) {\n // recursive deletion if userDir not modified anymore\n if (checkDeletion(userDir)) {\n logger.log(Level.INFO, \"Deletion started for: \"\n + userDir.getFileName());\n FilesHelper.deleteFolder(userDir);\n }\n\n // if modified and exists, then check inside\n if (Files.exists(userDir)) {\n browseApplicationsFolders(userDir);\n }\n }\n } catch (Exception ex) {\n logger.log(Level.ERROR, \"Cannot get directory list\", ex);\n }\n }",
"List<String> getDirectories(String path) throws IOException;",
"private static String files()\n\t{\n\t\tString path = dirpath + \"\\\\Server\\\\\";\n\t\tFile folder = new File(path);\n\t\tFile[] listOfFiles = folder.listFiles();\n\t\tString msg1 = \"\";\n\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\n\t\t{\n\t\t\tif (listOfFiles[i].isFile())\n\t\t\t{\n\t\t\t\tmsg1 = msg1 + \"&\" + listOfFiles[i].getName();\n\t\t\t}\n\t\t}\n\t\tmsg1 = msg1 + \"#\" + path + \"\\\\\";\n\t\treturn msg1;\n\t}",
"public static ArrayList<File> getListXMLFiles(File parentDir) {\n ArrayList<File> inFiles = new ArrayList<File>();\n File[] files = parentDir.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n inFiles.addAll(getListXMLFiles(file));\n } else {\n if(file.getName().endsWith(\".xml\")){\n inFiles.add(file);\n }\n }\n }\n return inFiles;\n }",
"public File[] getFiles(File folder) {\n\t\treturn folder.listFiles();\n\t}",
"private ArrayList<char[]> subdirectoriesToFiles(String inputDir, ArrayList<char[]> fullFileList) throws IOException {\n\t\tArrayList<char[]> currentList =\n\t\t\t\tnew ArrayList<char[]>(Arrays.asList(new File(inputDir).listFiles()));\n\t\t\n\t\tfor (File file: currentList) {\n\t\t\tif (isJavaFile(file)) \n\t\t\t\tfullFileList.add(file);\n\t\t\t\n\t\t\telse if (file.isDirectory())\n\t\t\t\tsubdirectoriesToFiles(file.getPath(), fullFileList);\n\t\t\t\n\t\t\telse if (isJarFile(file))\n\t\t\t\tsubdirectoriesToFiles(jarToFile(file), fullFileList);\n\t\t}\n\t\treturn fullFileList;\n\t}",
"public List<File> listCacheDirs() {\n List<File> cacheDirs = new ArrayList<File>();\n File file = new File(parent);\n if(file.exists()) {\n File[] files = file.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n // TODO Auto-generated method stub\n return pathname.isDirectory() && \n pathname.getName().startsWith(CacheDirectory.cacheDirNamePrefix(identity));\n }\n \n });\n cacheDirs = Arrays.asList(files);\n }\n return cacheDirs;\n }",
"@Override\n public String getFileList() {\n StringBuilder string = null;\n //if (parentFile.isDirectory()) {\n File parentFile = currentDir;\n string = new StringBuilder();\n for (File childFile : parentFile.listFiles()) {\n try {\n //TODO: Verify that Paths.get() is retrieving a valid path relative to the project's location.\n Path file = Paths.get(childFile.getPath());\n\n BasicFileAttributes attr = Files.readAttributes(file, BasicFileAttributes.class);\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"M\");\n String month = dateFormat.format(attr.creationTime().toMillis());\n dateFormat.applyPattern(\"d\");\n String dayOfMonth = dateFormat.format(attr.creationTime().toMillis());\n dateFormat.applyPattern(\"y\");\n String year = dateFormat.format(attr.creationTime().toMillis());\n\n char fileType = childFile.isDirectory() ? 'd' : '-'; //'-' represents a file.\n string.append(String.format(\"%srw-r--r--\", fileType)); //Linux style permissions\n string.append(\"\\t\");\n string.append(\"1\"); //?\n string.append(\" \");\n string.append(\"0\"); //?\n string.append(\"\\t\");\n string.append(\"0\"); //?\n string.append(\"\\t\");\n string.append(childFile.length()); //Length\n string.append(\" \");\n string.append(month); //Month\n string.append(\" \");\n string.append(dayOfMonth); //Day\n string.append(\" \");\n string.append(\" \");\n string.append(year); //Year\n string.append(\" \");\n string.append(childFile.getName());\n string.append(System.getProperty(\"line.separator\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n //}\n\n String format = \"%S\\t%d %d\\t%d\\t%d %S %d %d %S\";\n //return \"-rw-r--r-- 1 0 0 1073741824000 Feb 19 2016 1000GB.zip\";\n if (!string.equals(null)) {\n return string.toString();\n } else {\n return \"Error when creating file list.\";\n }\n }",
"protected List <WebFile> getSourceDirChildFiles()\n{\n // Iterate over source dir and add child packages and files\n List children = new ArrayList();\n for(WebFile child : getFile().getFiles()) {\n if(child.isDir() && child.getType().length()==0)\n addPackageDirFiles(child, children);\n else children.add(child);\n }\n \n return children;\n}",
"public static List<String> getFilesFromDirectory(){\n File wordTextFolder = new File(FOLDER_OF_TEXT_FILES.toString());\n File[] filesInsideFolder = wordTextFolder.listFiles();\n List<String> paths = new ArrayList<>();\n String name;\n\n for (File txtFile : filesInsideFolder){\n paths.add( txtFile.getPath() );\n name = txtFile.getName();\n name = name.substring(0, name.lastIndexOf('.'));\n\n if(name.length() > Table.maxFileNameLength){\n Table.setMaxFileNameLength(name.length());\n }\n }\n return paths;\n }",
"private static List<String> loadDocuments(String path) throws Exception {\n\t\tFile folder = new File(path);\n\t\tArrayList<String> documents = new ArrayList<String>();\n\t\tfor (final File fileEntry : folder.listFiles()) {\n\t\t\tSystem.out.println(fileEntry.getName());\n\t\t\tif (fileEntry.isFile() && !fileEntry.isHidden()) {\n\t\t\t\tString content = getTextFromHtml(fileEntry);\n\t\t\t\tdocuments.add(content);\n\t\t\t}\n\t\t}\n\t\treturn documents;\n\t}",
"public static ArrayList<String> listFilesInFolder(String pFolderPath) {\n return listFilesInFolder(pFolderPath, false, null);\n }",
"public List<File> getFiles(String dir)\r\n\t{\r\n\t\tList<File> result = null;\r\n\t\tFile folder = new File(dir);\r\n\t\tif (folder.exists() && folder.isDirectory())\r\n\t\t{\r\n\t\t\tFile[] listOfFiles = folder.listFiles(); \r\n\t\t\t \r\n\t\t\tresult = new ArrayList<File>();\r\n\t\t\tfor (File file : listOfFiles)\r\n\t\t\t{\r\n\t\t\t\tif (file.isFile())\r\n\t\t\t\t\tresult.add(file);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"check to make sure that \" + dir + \" exists and you have permission to read its contents\");\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}",
"@Override\n public ObservableList<File> call() {\n this.updateTitle(\"Collections Finder Task\");\n collectionsToAdd = FXCollections.<File>observableArrayList();\n foldersToSearch = new ArrayList<>();\n foldersToSearch.add(startingFolder);\n while (foldersToSearch.size() > 0) {\n if (this.isCancelled()) { break; }\n searchNextFolder();\n }\n return collectionsToAdd;\n }",
"private void getDirectoryContents() {\n\t File directory = Utilities.prepareDirectory(\"Filtering\");\n\t if(directory.exists()) {\n\t FilenameFilter filter = new FilenameFilter() {\n\t public boolean accept(File dir, String filename) {\n\t return filename.contains(\".pcm\") || filename.contains(\".wav\");\n\t }\n\t };\n\t fileList = directory.list(filter);\n\t }\n\t else {\n\t fileList = new String[0];\n\t }\n\t}",
"public void getAllDocuments(List < ExtendedDocument > docs) throws JSONException\n\t{\n\t\tdocs.addAll(getDocuments());\n\n\t\t//go through this directory's sub-directories \n\t\tfor(ExtendedDirectory subDir : getSubdirectories())\n\t\t{\n\t\t\t//recurse\n\t\t\tsubDir.getAllDocuments(docs);\n\t\t}\n\t}",
"public static List<Path> getPackageFiles(\n Path directory, boolean recursive, Map<String, Documentation> pkgDocs)\n throws IOException, ShadowException {\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(directory)) {\n List<Path> files = new ArrayList<>();\n\n for (Path filePath : stream) {\n // Capture all source files\n if (filePath.toString().endsWith(SRC_EXTENSION)) files.add(filePath);\n // Capture any package-info files\n else if (filePath.getFileName().toString().equals(PKG_INFO_FILE))\n processPackageInfo(filePath, pkgDocs);\n // Recurse into subdirectories if desired\n else if (recursive && Files.isDirectory(filePath))\n files.addAll(getPackageFiles(filePath, true, pkgDocs));\n }\n return files;\n }\n }"
] | [
"0.74100554",
"0.71029925",
"0.7040395",
"0.70088243",
"0.69825083",
"0.69313705",
"0.68860143",
"0.68250585",
"0.6810361",
"0.676608",
"0.67640924",
"0.6744588",
"0.67430234",
"0.67177004",
"0.6715627",
"0.66943806",
"0.6677567",
"0.6665871",
"0.6654461",
"0.66393775",
"0.6610578",
"0.6604559",
"0.6589325",
"0.65633565",
"0.65349865",
"0.6486965",
"0.6485976",
"0.6484341",
"0.6469785",
"0.64487517",
"0.64404684",
"0.6426839",
"0.64267796",
"0.6420357",
"0.63478464",
"0.63434464",
"0.63273054",
"0.6327276",
"0.6327056",
"0.6316629",
"0.63004947",
"0.6274149",
"0.62700385",
"0.6263202",
"0.6256626",
"0.62491995",
"0.6216685",
"0.61871547",
"0.6176841",
"0.61765593",
"0.6171564",
"0.6168237",
"0.6165575",
"0.6158328",
"0.6154669",
"0.61542565",
"0.61513615",
"0.6128549",
"0.6120108",
"0.61193264",
"0.611282",
"0.6108265",
"0.60978615",
"0.6091712",
"0.60879",
"0.60869277",
"0.60506123",
"0.6028163",
"0.6022499",
"0.60099435",
"0.6007877",
"0.5996186",
"0.599575",
"0.5988816",
"0.5981635",
"0.5973983",
"0.5972402",
"0.5970586",
"0.5960819",
"0.59599704",
"0.5959939",
"0.5959926",
"0.5954562",
"0.59524834",
"0.5952169",
"0.593893",
"0.59262085",
"0.59193486",
"0.59128004",
"0.59104687",
"0.5902038",
"0.5899596",
"0.58835566",
"0.5880155",
"0.5869933",
"0.58639884",
"0.5851998",
"0.58457327",
"0.58449304",
"0.58395237"
] | 0.64326894 | 31 |
We can't make this an abstract class because the PlayerCardsFragment needs to extend Fragment | public interface CardsDisplay {
public void attachListeners();
public void attachListeners(List<Card> playableCards);
public void detachListeners();
public void cancelCardSelection();
void removeSelectedCard();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AddToCardFragment() {\n }",
"public abstract Fragment getFragment();",
"public static ArticleCardsFragment newInstance() {\n return new ArticleCardsFragment();\n }",
"public PlayerCharacterListFragment()\n {\n\n }",
"public CarModifyFragment() {\n }",
"@Override\r\n\t\t\tpublic Fragment getItem(int arg0) {\n\t\t\t\tswitch (arg0) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\treturn new VideoInforFragment();\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\treturn new VideoReplayFragment();\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t}",
"public UpcommingChannelCardFragment() {\n }",
"@Override\n public Fragment getItem(int position)\n {\n \t\n \tBundle args = new Bundle();\n\n \tswitch (position) \n \t{\n\t\t\t\tcase PLAYER_TAB:\t\t\t\t\n\t\t // Return a PlayersFragment\n\t\t Fragment players = new PlayersFragment();\n\t\t players.setArguments(args);\n\t\t return players;\n\t\t\t\tcase GAME_TAB:\n\t\t // Return a GamesFragment\n\t\t Fragment games = new GamesFragment();\n\t\t games.setArguments(args);\n\t\t return games;\n\t\t\t\tcase PLAYER_STATS_TAB:\n\t\t\t\t\t// Return a PlayerStatistics Fragment\n\t\t\t\t\tFragment stats = new PlayerStatistics();\n\t\t\t\t\tstats.setArguments(args);\n\t\t return stats;\n\t\t\t\tcase GAME_STATS_TAB:\n\t\t\t\t\t// Return a GameStatistics Fragment\n\t\t\t\t\tFragment game_stats = new GameStatistics();\n\t\t\t\t\tgame_stats.setArguments(args);\n\t\t return game_stats;\n\t\t\t\tdefault:\n\t\t // Return a PlayersFragment\n\t\t Fragment fragment = new PlayersFragment();\n\t\t fragment.setArguments(args);\n\t\t return fragment;\n\t\t \n \t}\n }",
"public VideoFragment() {\n }",
"protected abstract Fragment createFragment();",
"public RecipeVideoFragment() {\n }",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"public RickAndMortyFragment() {\n }",
"public interface BaseCardView extends BaseView {\n /**\n * Get title of card.\n * \n * @return title.\n */\n TextView getTitleView();\n\n /**\n * Get sub-title of card.\n * \n * @return sub-title.\n */\n TextView getSubTitleView();\n\n /**\n * Get icon of card.\n * \n * @return icon.\n */\n AsyncImageView getIconView();\n\n /**\n * Get iconTips of card.\n *\n * @return icon.\n */\n TextView getIconTipsView();\n\n /**\n * Get banner of card.\n * \n * @return banner.\n */\n AsyncImageView getBannerView();\n\n /**\n * Get description of card.\n * \n * @return description.\n */\n TextView getDescriptionView();\n\n /**\n * Get tag of card.\n * \n * @return tag.\n */\n TextView getTagView();\n\n /**\n * Get badge of card.\n * \n * @return badge.\n */\n ImageView getBadgeView();\n\n /**\n * Get sub-action button of card.\n *\n * @return sub-action button.\n */\n SubActionButton getSubActionButtonView();\n\n}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_home, container, false);\n\n TextView nameTextView = view.findViewById(R.id.nameTV);\n\n SessionManager session = new SessionManager(getContext());\n HashMap<String,String> userDetails = session.getUserDetailFromSession();\n String name = userDetails.get(SessionManager.KEY_LASTNAME);\n nameTextView.setText(name);\n\n livingroomCardView = (CardView) view.findViewById(R.id.livingroomCard);\n livingroomCardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n LivingroomFragment nextFrag= new LivingroomFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_container, nextFrag)\n .addToBackStack(null)\n .commit();\n }\n });\n\n bedroomCardView = (CardView) view.findViewById(R.id.bedroomCard);\n bedroomCardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n BedroomFragment nextFrag= new BedroomFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_container, nextFrag)\n .addToBackStack(null)\n .commit();\n }\n });\n\n bathroomCardView = (CardView) view.findViewById(R.id.bathroomCard);\n bathroomCardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n BathroomFragment nextFrag= new BathroomFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_container, nextFrag)\n .addToBackStack(null)\n .commit();\n }\n });\n\n kitchenCardView = (CardView) view.findViewById(R.id.kitchenCard);\n kitchenCardView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n KitchenFragment nextFrag= new KitchenFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_container, nextFrag)\n .addToBackStack(null)\n .commit();\n }\n });\n return view;\n }",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public abstract int getFragmentView();",
"public PlaylistFragment() {\n }",
"public interface PlayVideoFragmentContract {\n\n interface View extends BaseView,SpringView.OnFreshListener {\n void showShareDialog();\n void showCommentDialog();\n void showSaySthDialog();\n void loadCommentData(List<CommentBean> list);\n void isFollowed();\n int getFollowId();\n String getVideoId();\n ImageView getThumbIv();\n TextView getCommentTv();\n TextView getThumbTv();\n boolean getIsLiked();\n void setIsLiked(String isLike);\n Dialog getReplyDialog();\n int getVideoType();\n void setLikeCount(int add);\n }\n\n interface Presenter{\n\n void onBackClick();\n\n void onMoreClick();\n\n void onHeadClick();\n\n void onFollowClick();\n\n void onMusicClick();\n\n void onSaySthClick();\n\n void onCommentClick();\n\n void onThumbUpClick();\n\n void onShareClick();\n\n void loadCommentData(String videoId,String page);\n\n void addComment(String videoId,String memberId,String commentId,String content,String at);\n\n }\n}",
"@Override\n public Fragment getItem(int position) {\n Intent intent = getIntent();\n mPlayerString = intent.getStringExtra(\"playerString\");\n\n // Store in bundle\n Bundle bundle = new Bundle();\n bundle.putString(\"playerString\", mPlayerString);\n\n switch (position) {\n case 0:\n PlayerScoresFragment playerfrag = new PlayerScoresFragment();\n\n // Send bundle to player scores fragment\n playerfrag.setArguments(bundle);\n return playerfrag;\n case 1:\n HighscoresFragment highscorefrag = new HighscoresFragment();\n // Send bundle to player scores fragment\n highscorefrag.setArguments(bundle);\n return highscorefrag;\n }\n\n return null;\n }",
"@Override // com.zhihu.android.profile.newprofile.p1859ui.card.ProfileBaseCard\n /* renamed from: a */\n public void mo106382a(View view) {\n }",
"public PlayingCard(){\n\t\tsuper();\n\t}",
"private Fragment getLessonFragment() {\n\t\treturn MediaPlayerFragmentFactory.getMediaPlayerFragment(lesson);\n\t}",
"public MyGoodsFragment() {\n }",
"public interface VideoContractView extends BaseContractView {\n\n void onLoadData(List<Card> news);\n\n void onShareClick(Card newsInfo);\n\n void onMoreFuncClick(Card newsInfo);\n\n void hideNextVideo();\n\n void nextVideo(View view);\n\n void clickView(View view);\n}",
"protected abstract Fragment getFragmentByPosition(int position);",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface mCard {\n\nint getCardType();\nvoid onBindView(CardView cardView);\n\n}",
"protected abstract FragmentComponent setupComponent();",
"public interface IBaseFragmentView {\n}",
"public interface DealFragmentView {\n void displayDealData(List<MusicModel> dealList);\n}",
"public abstract @NonNull\n Fragment getItem(int position);",
"public FindItemFragment() {\n }",
"public FragmentTeam() {\n // Required empty public constructor\n }",
"public interface OnFragmentInteractionListener {\n public void onPlayerSizeChanged(PlayerSize newSize, PlayerSize oldSize);\n }",
"@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}",
"public VehicleFragment() {\r\n }",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"@Override\n public void onFragmentAttached() {\n }",
"@Override\n\tpublic void playCard() {\n\t\t\n\t}",
"public interface Example6ParentFragmentView extends BaseView {\n\n void showSomething(String something);\n}",
"public interface GuideSignInAndSignUpView extends BaseView {\n void setViewPager();\n void playVideo();\n}",
"public ForecastFragment() {\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View rootview= inflater.inflate(R.layout.fragment_board, container, false);\n mViewPager = (ViewPager) rootview.findViewById(R.id.viewPager);\n\n\n\n\n mCardAdapter = new CardPagerAdapter();\n mCardAdapter.addCardItem(new CardItem(R.string.title_1, R.string.text_1));\n mCardAdapter.addCardItem(new CardItem(R.string.title_2, R.string.text_1));\n mCardAdapter.addCardItem(new CardItem(R.string.title_3, R.string.text_1));\n\n\n\n mViewPager.setAdapter(mCardAdapter);\n\n mViewPager.setOffscreenPageLimit(3);\n\n return rootview;}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_a, container, false);\n\n if (MatchList.getInstance().matchList.size() == 0) {\n inflatedImage = (ImageView) view.findViewById(R.id.match_list_stub_imported_image);\n inflatedImage.setVisibility(View.VISIBLE);\n Picasso.with(getActivity()).load(R.drawable.add).fit().centerInside().into(inflatedImage);\n }\n\n RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.cardList);\n\n // use this setting to improve performance if you know that changes\n // in content do not change the layout size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n\n // use a linear layout manager\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(layoutManager);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());\n String matchpageStyle = prefs.getString(\"prefs_style_matchpage\", \"small_card\");\n\n // specify an adapter\n switch (matchpageStyle){\n case \"big_card\":\n MyMatchAdapterBigCard bigCardAdapter = new MyMatchAdapterBigCard(getActivity(), MatchList.getInstance().matchList);\n\n bigCardAdapter.SetOnItemClickListener(new MyMatchAdapterBigCard.OnItemClickListener() {\n @Override\n public void onItemClick(View view, final int position) {\n final Dialog mDialog = new Dialog(getActivity());\n mDialog.title(\"Do you wish to delete this match?\")\n .positiveAction(\"DELETE\")\n .negativeAction(\"CANCEL\")\n .cancelable(true)\n .show();\n\n mDialog.positiveActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeMatch(position);\n mDialog.dismiss();\n }\n });\n\n mDialog.negativeActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialog.dismiss();\n }\n });\n }\n });\n\n recyclerView.setAdapter(bigCardAdapter);\n mAdapter = bigCardAdapter;\n break;\n case \"small_card\":\n MyMatchAdapter classicAdapter = new MyMatchAdapter(getActivity(), MatchList.getInstance().matchList);\n\n classicAdapter.SetOnItemClickListener(new MyMatchAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(View view, final int position) {\n final Dialog mDialog = new Dialog(getActivity());\n mDialog.title(\"Do you wish to delete this match?\")\n .positiveAction(\"DELETE\")\n .negativeAction(\"CANCEL\")\n .cancelable(true)\n .show();\n\n mDialog.positiveActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeMatch(position);\n mDialog.dismiss();\n }\n });\n\n mDialog.negativeActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialog.dismiss();\n }\n });\n }\n });\n\n recyclerView.setAdapter(classicAdapter);\n mAdapter = classicAdapter;\n break;\n case \"list\":\n MyMatchAdapterList listAdapter = new MyMatchAdapterList(getActivity(), MatchList.getInstance().matchList);\n\n listAdapter.SetOnItemClickListener(new MyMatchAdapterList.OnItemClickListener() {\n @Override\n public void onItemClick(View view, final int position) {\n final Dialog mDialog = new Dialog(getActivity());\n mDialog.title(\"Do you wish to delete this match?\")\n .positiveAction(\"DELETE\")\n .negativeAction(\"CANCEL\")\n .cancelable(true)\n .show();\n\n mDialog.positiveActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeMatch(position);\n mDialog.dismiss();\n }\n });\n\n mDialog.negativeActionClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mDialog.dismiss();\n }\n });\n }\n });\n\n recyclerView.setAdapter(listAdapter);\n mAdapter = listAdapter;\n break;\n default:\n MyMatchAdapter defaultAdapter = new MyMatchAdapter(getActivity(), MatchList.getInstance().matchList);\n recyclerView.setAdapter(defaultAdapter);\n mAdapter = defaultAdapter;\n break;\n }\n\n FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab);\n fab.attachToRecyclerView(recyclerView);\n\n Animation fabGrow = AnimationUtils.loadAnimation(getActivity(), R.anim.anim_fab);\n fab.startAnimation(fabGrow);\n\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent myIntent = new Intent(getActivity(), NewMatchActivity.class);\n startActivityForResult(myIntent, 1);\n }\n });\n\n return view;\n }",
"@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment fragment = (Fragment) super.instantiateItem(container, position);\n registeredFragments.put(position, fragment);\n return fragment;\n }",
"@Override\r\n\tpublic void onFragmentStart() {\n\t}",
"@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment createdFragment = (Fragment) super.instantiateItem(container, position);\n // save the appropriate reference depending on position\n switch (position) {\n case 0:\n mFragmentGraph = (Color_FragmentGraph) createdFragment;\n break;\n// case 1:\n// mFragmentPie = (Horti_FragmentPie) createdFragment;\n// break;\n }\n return createdFragment;\n }",
"@Override\r\n\tpublic void playSoldierCard() {\n\t\t\r\n\t}",
"public abstract Fragment getSensorFragment();",
"@Override\n public Fragment getItem(int position) {\n Fragment fragment = new Fragment();\n switch (position)\n {\n case 0:\n fragment = carCheckBasicInfoFragment;\n break;\n case 1:\n fragment = carCheckFrameFragment;\n break;\n case 2:\n fragment = carCheckIntegratedFragment;\n break;\n }\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n ToursFragment toursFragment = new ToursFragment();\n return toursFragment;\n case 1:\n MapFragment mapFragment = new MapFragment();\n return mapFragment;\n case 2:\n LandmarkCardsFragment cardsFragment = new LandmarkCardsFragment();\n return cardsFragment;\n default:\n return null;\n }\n }",
"@Override\n public Fragment getFragment() {\n// uuid = (UUID)getIntent().getSerializableExtra(UUID);\n// return GoalDetailViewFragment.newInstance(uuid);\n return null;\n }",
"public ReviewActivityFragment() {\n }",
"public ExploreFragment() {\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View V = inflater.inflate(R.layout.fragment_player, container, false);\n\n return V;\n }",
"public interface CardMovingMvpView extends MvpView {\n void showCardList(CardList cardList);\n}",
"public NewShopFragment() {\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}",
"public ProfileFragment(){}",
"public FragmentMy() {\n }",
"public void placePlayerFragment(Player player) {\n mToolBar.setTitle(player.getPerson().getName());\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.fragment_container,\n PlayerNationalityFragment.newFragment(player))\n //Allow users to backup through the fragments\n .addToBackStack(player.getPerson().getName())\n .commit();\n\n }",
"public interface IOrderMagnageActivityView {\n\n /**\n * 初始化商品管理分类\n */\n void initOrderManage(List<Fragment> fragmentList);\n}",
"public PeopleFragment() {\n // Required empty public constructor\n }",
"public CuartoFragment() {\n }",
"public AccountOptionalFragment()\n {\n super();\n }",
"public FavoriteFragment() {\n }",
"public interface MainView {\n void initTab();\n void setCommendSel(Fragment fragment);\n void setTellSel(Fragment fragment);\n void setNearSel(Fragment fragment);\n void setMeSel(Fragment fragment);\n void setViewPagerCurrent(int position);\n void setViewPagerAdapter(List<Fragment> fragments);\n void setViewPagerScrollListener();\n}",
"@SuppressLint(\"Assert\")\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_player_details, container, false);\n\n try {\n ((RamiMain) getActivity()).changeToolbarBackground(R.color.white);\n ((RamiMain) getActivity()).setLightStatusBar(view, getActivity());\n ((RamiMain) getActivity()).drawerIcon(R.drawable.ic_menu_dark);\n } catch (Exception e) {\n e.printStackTrace();\n ((FromNotification) getActivity()).changeToolbarBackground(R.color.white);\n ((FromNotification) getActivity()).setLightStatusBar(view, getActivity());\n ((FromNotification) getActivity()).drawerIcon(R.drawable.ic_menu_dark);\n }\n\n tabLayout = view.findViewById(R.id.tabs);\n viewPager = view.findViewById(R.id.viewpager);\n playerImage = view.findViewById(R.id.playerimage);\n teamImage1 = view.findViewById(R.id.teamimage1);\n teamImage2 = view.findViewById(R.id.teamimage2);\n playerNumber = view.findViewById(R.id.playernumber);\n playerName = view.findViewById(R.id.playername);\n playerAge = view.findViewById(R.id.playerage);\n playerCenter = view.findViewById(R.id.playercenter);\n indicatorView = view.findViewById(R.id.avi);\n noInternet = view.findViewById(R.id.nointernet);\n emptyData = view.findViewById(R.id.emptydata);\n error = view.findViewById(R.id.error);\n constraintLayout = view.findViewById(R.id.constraintlayout);\n\n apiInterface = APIClient.getClient().create(APIInterface.class);\n appSharedPreferences = new AppSharedPreferences(Objects.requireNonNull(getContext()));\n\n MobileAdsInterface.bannerAds(getContext(), getString(R.string.fragment_player_details_banner), view);\n\n constraintLayout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n\n loadPlayerDetails();\n\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n assert false;\n Objects.requireNonNull(view).setFocusableInTouchMode(true);\n Objects.requireNonNull(view).requestFocus();\n\n Objects.requireNonNull(view).setOnKeyListener(new View.OnKeyListener() {\n @Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {\n String back = appSharedPreferences.readString(Constants.backFragmentCurrent);\n if (back.equalsIgnoreCase(Constants.scorersF)){\n FragmentTransaction fragmentTransaction = null;\n Objects.requireNonNull(getActivity()).getSupportFragmentManager().popBackStack(null,\n FragmentManager.POP_BACK_STACK_INCLUSIVE);//Clear from back stack\n fragmentTransaction = getActivity().getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.nav_host_fragment, new MainFragment());\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }else {\n Log.d(Constants.Log, \"if( keyCode == KeyEvent.KEYCODE_BACK )\");\n try {\n ((RamiMain) getActivity()).menuBackIcon(R.menu.toolbar_search, R.string.app_name, \"\", 1);\n ((RamiMain) getActivity()).badgeandCheckedDrawer();\n ((RamiMain) getActivity()).changeToolbarBackground(R.drawable.back_toolbar);\n ((RamiMain) getActivity()).drawerIcon(R.drawable.ic_menu);\n } catch (Exception e) {\n e.printStackTrace();\n ((FromNotification) getActivity()).menuBackIcon(R.menu.toolbar_search, R.string.app_name, \"\", 1);\n ((FromNotification) getActivity()).badgeandCheckedDrawer();\n ((FromNotification) getActivity()).changeToolbarBackground(R.drawable.back_toolbar);\n ((FromNotification) getActivity()).drawerIcon(R.drawable.ic_menu);\n }\n// getFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);//back on main\n assert getParentFragmentManager() != null;\n getParentFragmentManager().popBackStack();//back one fragment\n }\n return true;\n }\n return false;\n }\n });\n }\n return view;\n }",
"private OriginMusicListFragment m116771Q() {\n C0608j childFragmentManager = getChildFragmentManager();\n StringBuilder sb = new StringBuilder();\n sb.append(f94515y);\n sb.append(0);\n Fragment a = childFragmentManager.mo2644a(sb.toString());\n if (a instanceof OriginMusicListFragment) {\n return (OriginMusicListFragment) a;\n }\n return OriginMusicListFragment.m108624a(C21115b.m71197a().getCurUserId(), true);\n }",
"public DisplayFragment() {\n\n }",
"@Override\n public void onTabSelected(TabLayout.Tab tab) {\n Fragment fragment = null;\n switch (tab.getPosition()) {\n case 0:\n fragment = new FirstFragment();\n break;\n case 1:\n fragment = new SecondFragment();\n //flipCard();\n break;\n case 2:\n fragment = new ThirdFragment();\n break;\n }\n\n flipCard(fragment);\n //FragmentManager fm = getSupportFragmentManager();\n //FragmentTransaction ft = fm.beginTransaction();\n //ft.replace(R.id.simpleFrameLayout, fragment);\n //ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);\n //ft.commit();\n }",
"public WalletFragment(){}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_synthetic_video, container, false);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v=inflater.inflate(R.layout.fragment_video, container, false);\n\n names = getResources().getStringArray(R.array.names);\n profile_pics = getResources().obtainTypedArray(R.array.profile_pics);\n time = getResources().getStringArray(R.array.time);\n modelcardviewdetailsList = new ArrayList<>();\n for (int i = 0; i < names.length; i++) {\n Modelcardviewdetails modelcardviewdetails = new Modelcardviewdetails(names[i], time[i], profile_pics.getResourceId(i, -1));\n modelcardviewdetailsList.add(modelcardviewdetails);\n }\n\n recyclerview = (RecyclerView)v.findViewById(R.id.rcv_videos);\n LinearLayoutManager layoutManager = new LinearLayoutManager(container.getContext());\n recyclerview.setLayoutManager(layoutManager);\n AdapterCardview adapter = new AdapterCardview(modelcardviewdetailsList, getActivity());\n recyclerview.setAdapter(adapter);\n\n\n\n return v;\n }",
"public interface ISelectableFragment {\n List<String> getSelectedPaths();\n void unselectMusicItems();\n boolean isCheckingTrigger();\n void show(List<String> list);\n List<String> getPreviousList();\n void setFolderTrigger(boolean folderTrigger);\n boolean isFolderTrigger();\n List<String> getSelectedPlaylist();\n int getNumberOfPlaylist();\n void reloadForPlaylist();\n boolean isAllSongsFragment();\n\n\n}",
"@Override\n public Object instantiateItem(ViewGroup container, int position) {\n Fragment fragment = (Fragment) super.instantiateItem(container, position);\n registeredFragments.put(position, fragment);\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n switch (position) {\n case 0:\n CommonFragment tab1 = CommonFragment.newInstance(\"cube\");\n return tab1;\n case 1:\n CommonFragment tab2 = CommonFragment.newInstance(\"juggling\");\n return tab2;\n case 2:\n CommonFragment tab3 =CommonFragment.newInstance(\"grapho\");\n return tab3;\n case 3:\n CommonFragment tab4 =CommonFragment.newInstance(\"stack\");\n return tab4;\n case 4:\n CommonFragment tab5 = CommonFragment.newInstance(\"calligraphy\");\n return tab5;\n case 5:\n CommonFragment tab6=CommonFragment.newInstance(\"analysis\");\n return tab6;\n default:\n return null;\n }\n }",
"@NonNull\n public abstract Fragment getItem(int position);",
"@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }",
"@Override\n public void onTabSelected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {\n \t\n \tFragment fragment;\n \t\n \tif (tab.getPosition() == 0)\n \t\tfragment = new FragmentDraw();\n \telse if (tab.getPosition() == 1)\n \t\tfragment = new FragmentPlayback();\n \telse\n \t\tthrow new NotImplementedException();\n \t\n getFragmentManager()\n \t\t.beginTransaction()\n .replace(R.id.container, fragment)\n .commit();\n }",
"@Override\r\n\tpublic void onFragmentResume() {\n\t}",
"public interface ShowcaseFragment {\n\n /** @return If any the tag to use when this is into a backstack */\n @Nullable\n String getBackstackTag();\n\n /** @return The resourceId for the title */\n int getTitleId();\n}",
"public interface ICuponesFragmentView {\n\n public void generarLinearLayoutVertical();\n\n public CuponAdaptador crearAdaptador(List<Cupon> cupones);\n\n public void inicializarAdaptadorRV(CuponAdaptador adaptador);\n\n}",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public AudioFragment() {\n }",
"public interface ICorrelationFragmentPresenter extends BasePresenter{\n void studyVideoList(String token,int offset, int limit);\n\n}",
"public MovieGridFragment() {\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n View view = inflater.inflate(R.layout.inicio_fragment, container, false);\n\n //Obtengo la lista de Entrenadores con sus participantes\n Bundle bundle = getArguments();\n entrenadores = bundle.getParcelableArrayList(\"key_entrenadores\");\n participantes= bundle.getParcelableArrayList(\"key_participantes\");\n\n cardView1 = (CardView) view.findViewById(R.id.cardview1);\n cardView1.setOnClickListener(this);\n cardView2 = (CardView) view.findViewById(R.id.cardview2);\n cardView2.setOnClickListener(this);\n cardView3 = (CardView) view.findViewById(R.id.cardview3);\n cardView3.setOnClickListener(this);\n return view;\n }",
"@Override\n\tprotected Fragment createFragment() {\n\t\t// TODO Auto-generated method stub\n\t\t//Log.d(TAG, \"this is CrimeListActivity \", new Exception());\n\t\treturn new CrimeListFragment();\n\t\t\n\t}",
"public interface OnCardClickListener {\n void onCardClick(String currCode, String fragType);\n }",
"@Override\n public Fragment getItem(int position) {\n\n Fragment fragment = null;\n Bundle bundle = new Bundle();\n bundle.putString(\"e\", \"test\");\n switch (position) {\n case 0:\n fragment = new OriginalFragment();\n // fragment.setArguments(bundle);\n break;\n\n case 1:\n fragment = new DecodedFragment();\n fragment.setArguments(bundle);\n }\n return fragment;\n }",
"public ProfileFragment() {\n\n }",
"public MovieDetailFragment() {\n }",
"public MovieDetailFragment() {\n }",
"private final void m136464d() {\n BaseFragment baseFragment;\n if (this.f98816d && this.f98817e && getView() != null && (baseFragment = this.f98814b) != null) {\n if (baseFragment.isDetached() || baseFragment.getContext() == null) {\n VideoXOnlineLog.m139074c(VideoXOnlineLog.f101073b, C6969H.m41409d(\"G458AC31F8D3FA424C5019E5CF3ECCDD27BA5C71BB83DAE27F2549946FBF1E0D86797D413B135B973A60B825AFDF79985\"), null, 2, null);\n return;\n }\n if (baseFragment.getActivity() != null) {\n FragmentActivity activity = baseFragment.getActivity();\n if ((activity != null ? activity.getApplication() : null) != null) {\n m136459a(baseFragment);\n return;\n }\n }\n VideoXOnlineLog.m139074c(VideoXOnlineLog.f101073b, C6969H.m41409d(\"G458AC31F8D3FA424C5019E5CF3ECCDD27BA5C71BB83DAE27F2549946FBF1E0D86797D413B135B973A60B825AFDF79986\"), null, 2, null);\n }\n }",
"public MovieDetailFragment() {\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n Bundle arguments = getArguments();\n if (arguments != null) {\n mUri = arguments.getParcelable(ScorecardEditFragment.SCORECARDEDIT_URI);\n }\n\n// mScorecardListAdapter = new ScorecardListAdapter(getActivity(), null, 0);\n\n View rootView = inflater.inflate(R.layout.fragment_edit_scorecard, container, false);\n\n// mListView = (ListView) rootView.findViewById(R.id.listview_scorecard);\n\n// mListView.setAdapter(mScorecardListAdapter);\n\n mElementEditText = (TextView) rootView.findViewById(R.id.scorecard_element_text_edit);\n mSearchAreaEditText = (TextView) rootView.findViewById(R.id.scorecard_search_area_text_edit);\n mMaxTimeMEditText = (EditText) rootView.findViewById(R.id.scorecard_max_time_m_text_edit);\n mMaxTimeSEditText = (EditText) rootView.findViewById(R.id.scorecard_max_time_s_edit);\n mFinishCallEditText = (EditText) rootView.findViewById(R.id.scorecard_finish_call_text_edit);\n mFalseAlertFringeEditText = (EditText) rootView.findViewById(R.id.scorecard_false_alert_fringe_text_edit);\n mTimedOutEditText = (EditText) rootView.findViewById(R.id.scorecard_timed_out_text_edit);\n mDismissedEditText = (EditText) rootView.findViewById(R.id.scorecard_dismissed_text_edit);\n mExcusedEditText = (EditText) rootView.findViewById(R.id.scorecard_excused_text_edit);\n mAbsentEditText = (EditText) rootView.findViewById(R.id.scorecard_absent_text_edit);\n mEliminatedDuringSearchEditText = (EditText) rootView.findViewById(R.id.scorecard_elim_during_search_text_edit);\n mOtherFaultsDescEditText = (EditText) rootView.findViewById(R.id.scorecard_other_faults_desc_text_edit);\n mOtherFaultsCountEditText = (EditText) rootView.findViewById(R.id.scorecard_other_faults_count_text_edit);\n mCommentsEditText = (EditText) rootView.findViewById(R.id.scorecard_comments_text_edit);\n mTotalTimeEditText = (EditText) rootView.findViewById(R.id.scorecard_total_time_text_edit);\n mPronouncedEditText = (EditText) rootView.findViewById(R.id.scorecard_pronounced_text_edit);\n mJudgeSignatureEditText = (EditText) rootView.findViewById(R.id.scorecard_judge_signature_text_edit);\n mHidesMaxEditText = (EditText) rootView.findViewById(R.id.scorecard_hides_max_text_edit);\n mHidesFoundEditText = (EditText) rootView.findViewById(R.id.scorecard_hides_found_text_edit);\n mHidesMissedEditText = (EditText) rootView.findViewById(R.id.scorecard_hides_missed_text_edit);\n mTotalFaultsEditText = (EditText) rootView.findViewById(R.id.scorecard_total_faults_text_edit);\n mMaxPointsEditText = (EditText) rootView.findViewById(R.id.scorecard_max_points_text_edit);\n mTotalPointsEditText = (EditText) rootView.findViewById(R.id.scorecard_total_points_text_edit);\n\n String sortOrder = ScorecardEntry._ID + \" ASC\";\n String selection = ScorecardEntry._ID + \" = ?\";\n final String scorecardid = Long.valueOf(ScorecardEntry.getScorecardIdFromUri(mUri)).toString();\n String[] selectionArgs = {scorecardid};\n\n Cursor c = getContext().getContentResolver().query(ScorecardEntry.CONTENT_URI, SCORECARD_COLUMNS, selection, selectionArgs, sortOrder);\n\n if(c.moveToFirst()) {\n mElementEditText.setText(c.getString(COL_ELEMENT));\n mMaxTimeMEditText.setText(c.getString(COL_MAXTM));\n mMaxTimeSEditText.setText(c.getString(COL_MAXTS));\n mFinishCallEditText.setText(c.getString(COL_FINCALL));\n mFalseAlertFringeEditText.setText(c.getString(COL_FAF));\n mTimedOutEditText.setText(c.getString(COL_TIMEOUT));\n mDismissedEditText.setText(c.getString(COL_DISMISSED));\n mExcusedEditText.setText(c.getString(COL_EXCUSED));\n mAbsentEditText.setText(c.getString(COL_ABSENT));\n mEliminatedDuringSearchEditText.setText(c.getString(COL_EDS));\n mOtherFaultsDescEditText.setText(c.getString(COL_OFD));\n mOtherFaultsCountEditText.setText(c.getString(COL_OFC));\n mCommentsEditText.setText(c.getString(COL_COMMENTS));\n mTotalTimeEditText.setText(c.getString(COL_TOTALT));\n mPronouncedEditText.setText(c.getString(COL_PRON));\n mJudgeSignatureEditText.setText(c.getString(COL_JS));\n mSearchAreaEditText.setText(c.getString(COL_SA));\n mHidesMaxEditText.setText(c.getString(COL_HDMAX));\n mHidesFoundEditText.setText(c.getString(COL_HDFOUND));\n mHidesMissedEditText.setText(c.getString(COL_HDMISSED));\n mTotalFaultsEditText.setText(c.getString(COL_TOTALFLTS));\n mMaxPointsEditText.setText(c.getString(COL_MAXPT));\n mTotalPointsEditText.setText(c.getString(COL_TOTALPTS));\n }\n\n\n Button save_init_data_button = (Button) rootView.findViewById(R.id.scorecardInitSave);\n\n View.OnClickListener save_init_dataOnClickListener = new View.OnClickListener() {\n public void onClick(View v) {\n\n ContentValues mEditContentValues = new ContentValues();\n\n mEditContentValues.put(ScorecardEntry.COLUMN_ELEMENT, mElementEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_SEARCH_AREA, mSearchAreaEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_M, mMaxTimeMEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_S, mMaxTimeSEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_MAX, mHidesMaxEditText.getText().toString());\n\n String selection = ScorecardEntry._ID + \" = ?\";\n String[] selectionArgs = {scorecardid};\n getContext().getContentResolver().update(ScorecardEntry.CONTENT_URI, mEditContentValues, selection, selectionArgs);\n\n Intent intent = new Intent(getContext(), ScorecardEditActivity.class).setData(mUri);\n startActivity(intent);\n }\n };\n\n save_init_data_button.setOnClickListener(save_init_dataOnClickListener);\n\n\n Button compute_button = (Button) rootView.findViewById(R.id.scorecardComputeSave);\n\n View.OnClickListener computeOnClickListener = new View.OnClickListener() {\n public void onClick(View v) {\n\n ContentValues mEditContentValues = new ContentValues();\n\n mEditContentValues.put(ScorecardEntry.COLUMN_ELEMENT, mElementEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_M, mMaxTimeMEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_S, mMaxTimeSEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_FINISH_CALL, mFinishCallEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_FALSE_ALERT_FRINGE, mFalseAlertFringeEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_TIMED_OUT, mTimedOutEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_DISMISSED, mDismissedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_EXCUSED, mExcusedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_ABSENT, mAbsentEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_ELIMINATED_DURING_SEARCH, mEliminatedDuringSearchEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_OTHER_FAULTS_DESCR, mOtherFaultsDescEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_OTHER_FAULTS_COUNT, mOtherFaultsCountEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_COMMENTS, mCommentsEditText.getText().toString());\n\n mEditContentValues.put(ScorecardEntry.COLUMN_PRONOUNCED, mPronouncedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_JUDGE_SIGNATURE, mJudgeSignatureEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_SEARCH_AREA, mSearchAreaEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_MAX, mHidesMaxEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_FOUND, mHidesFoundEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_MISSED, mHidesMissedEditText.getText().toString());\n\n String selection = ScorecardEntry._ID + \" = ?\";\n String[] selectionArgs = {scorecardid};\n getContext().getContentResolver().update(ScorecardEntry.CONTENT_URI, mEditContentValues, selection, selectionArgs);\n\n String time = Utilities.getTime(getContext(), scorecardid);\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_TIME, time);\n String totalFaults = Utilities.getFaultTotal(getContext(), scorecardid);\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_FAULTS, totalFaults);\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXPOINT, mMaxPointsEditText.getText().toString());\n String totalPoints = Utilities.getPoints(getContext(), scorecardid);\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_POINTS, totalPoints);\n\n getContext().getContentResolver().update(ScorecardEntry.CONTENT_URI, mEditContentValues, selection, selectionArgs);\n\n Intent intent = new Intent(getContext(), ScorecardEditActivity.class).setData(mUri);\n startActivity(intent);\n\n }\n };\n\n compute_button.setOnClickListener(computeOnClickListener);\n\n\n Button save_final_button = (Button) rootView.findViewById(R.id.scorecardFinalSave);\n\n View.OnClickListener edit_saveOnClickListener = new View.OnClickListener() {\n public void onClick(View v) {\n\n ContentValues mEditContentValues = new ContentValues();\n\n mEditContentValues.put(ScorecardEntry.COLUMN_ELEMENT, mElementEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_M, mMaxTimeMEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXTIME_S, mMaxTimeSEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_FINISH_CALL, mFinishCallEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_FALSE_ALERT_FRINGE, mFalseAlertFringeEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_TIMED_OUT, mTimedOutEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_DISMISSED, mDismissedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_EXCUSED, mExcusedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_ABSENT, mAbsentEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_ELIMINATED_DURING_SEARCH, mEliminatedDuringSearchEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_OTHER_FAULTS_DESCR, mOtherFaultsDescEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_OTHER_FAULTS_COUNT, mOtherFaultsCountEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_COMMENTS, mCommentsEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_TIME, mTotalTimeEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_PRONOUNCED, mPronouncedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_JUDGE_SIGNATURE, mJudgeSignatureEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_SEARCH_AREA, mSearchAreaEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_MAX, mHidesMaxEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_FOUND, mHidesFoundEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_HIDES_MISSED, mHidesMissedEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_FAULTS, mTotalFaultsEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_MAXPOINT, mMaxPointsEditText.getText().toString());\n mEditContentValues.put(ScorecardEntry.COLUMN_TOTAL_POINTS, mTotalPointsEditText.getText().toString());\n\n String selection = ScorecardEntry._ID + \" = ?\";\n String[] selectionArgs = {scorecardid};\n getContext().getContentResolver().update(ScorecardEntry.CONTENT_URI, mEditContentValues, selection, selectionArgs);\n\n Intent intent = new Intent(getContext(), ScorecardViewActivity.class).setData(mUri);\n startActivity(intent);\n }\n };\n\n save_final_button.setOnClickListener(edit_saveOnClickListener);\n\n// if (savedInstanceState != null && savedInstanceState.containsKey(SELECTED_KEY)) {\n // The listview probably hasn't even been populated yet. Actually perform the\n // swapout in onLoadFinished.\n// mPosition = savedInstanceState.getInt(SELECTED_KEY);\n// }\n\n return rootView;\n }",
"@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_near_peoples, container, false);\n getActivity().setTitle(\"Share Card\");\n initUI();\n\n return view;\n }"
] | [
"0.6884922",
"0.6470797",
"0.64385366",
"0.6288282",
"0.62624013",
"0.6177268",
"0.6097672",
"0.6094315",
"0.6085935",
"0.607979",
"0.6077394",
"0.60676724",
"0.60636526",
"0.60463196",
"0.5997046",
"0.5983056",
"0.5978168",
"0.59761286",
"0.5974008",
"0.59724575",
"0.59582525",
"0.59521985",
"0.59227043",
"0.58908117",
"0.58493155",
"0.5841183",
"0.5831234",
"0.5826792",
"0.5823028",
"0.58138466",
"0.57955706",
"0.579368",
"0.57913136",
"0.57901496",
"0.5778291",
"0.57722986",
"0.5763738",
"0.5762021",
"0.57603276",
"0.57579213",
"0.57578826",
"0.5743108",
"0.57397413",
"0.5737391",
"0.5724435",
"0.5711336",
"0.57101125",
"0.571001",
"0.5705355",
"0.5704398",
"0.56923366",
"0.56911963",
"0.5687028",
"0.5684584",
"0.5684245",
"0.56725234",
"0.5669088",
"0.5666605",
"0.5665635",
"0.56635606",
"0.5662811",
"0.5662364",
"0.56616163",
"0.5657454",
"0.5657359",
"0.5651507",
"0.5650331",
"0.56496483",
"0.5645157",
"0.5635461",
"0.5631535",
"0.5624364",
"0.56227386",
"0.56205577",
"0.56178945",
"0.56123686",
"0.5604392",
"0.5590473",
"0.55889815",
"0.55875653",
"0.55745536",
"0.55724055",
"0.55715847",
"0.5570593",
"0.5569549",
"0.5568965",
"0.55679834",
"0.55658156",
"0.55574113",
"0.5557405",
"0.55517685",
"0.55276346",
"0.5521681",
"0.55203116",
"0.55193853",
"0.55193853",
"0.55167145",
"0.5514265",
"0.55067116",
"0.55064",
"0.55056596"
] | 0.0 | -1 |
/ renamed from: a | public int compare(byte[] bArr, byte[] bArr2) {
int i;
int i2;
if (bArr.length != bArr2.length) {
i2 = bArr.length;
i = bArr2.length;
} else {
for (int i3 = 0; i3 < bArr.length; i3++) {
if (bArr[i3] != bArr2[i3]) {
i2 = bArr[i3];
i = bArr2[i3];
}
}
return 0;
}
return (i2 == 1 ? 1 : 0) - (i == 1 ? 1 : 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }",
"interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }",
"public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }",
"interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }",
"public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }",
"public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }",
"private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }",
"protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }",
"public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }",
"private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}",
"public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}",
"public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }",
"public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }",
"public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }",
"public void a() {\n ((a) this.a).a();\n }",
"public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }",
"public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}",
"public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}",
"public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }",
"@Override\r\n\tpublic void a() {\n\t\t\r\n\t}",
"public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}",
"public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}",
"interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}",
"public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}",
"public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}",
"public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }",
"@Override\n\tpublic void a() {\n\t\t\n\t}",
"public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}",
"void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}",
"public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }",
"interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }",
"public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}",
"public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }",
"public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}",
"public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}",
"public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }",
"public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}",
"public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}",
"public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}",
"public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}",
"public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }",
"public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}",
"public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}",
"public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}",
"public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }",
"public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}",
"public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }",
"public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}",
"public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}",
"public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}",
"public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}",
"public void acionou(int a){\n\t\t\tb=a;\n\t\t}",
"public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}",
"public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }",
"public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}",
"public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }",
"public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }",
"public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }",
"public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }",
"public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }",
"public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }",
"public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}",
"protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }",
"public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }",
"public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }",
"public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }",
"public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }",
"public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}",
"public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}",
"public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}",
"public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }",
"public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }",
"interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }",
"public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}",
"public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }",
"private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }",
"interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}",
"public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }",
"public b[] a() {\n/* 95 */ return this.a;\n/* */ }",
"interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }"
] | [
"0.62497115",
"0.6242887",
"0.61394435",
"0.61176854",
"0.6114027",
"0.60893",
"0.6046901",
"0.6024682",
"0.60201293",
"0.5975212",
"0.59482527",
"0.59121317",
"0.5883635",
"0.587841",
"0.58703005",
"0.5868436",
"0.5864884",
"0.5857492",
"0.58306104",
"0.5827752",
"0.58272064",
"0.5794689",
"0.57890314",
"0.57838726",
"0.5775679",
"0.57694733",
"0.5769128",
"0.57526815",
"0.56907034",
"0.5677874",
"0.5670547",
"0.56666386",
"0.56592244",
"0.5658682",
"0.56574154",
"0.5654324",
"0.5644676",
"0.56399715",
"0.5638734",
"0.5630582",
"0.56183887",
"0.5615435",
"0.56069666",
"0.5605207",
"0.56005067",
"0.559501",
"0.55910283",
"0.5590222",
"0.55736613",
"0.5556682",
"0.5554544",
"0.5550076",
"0.55493855",
"0.55446684",
"0.5538079",
"0.5529058",
"0.5528109",
"0.552641",
"0.5525864",
"0.552186",
"0.5519972",
"0.5509587",
"0.5507195",
"0.54881203",
"0.5485328",
"0.54826045",
"0.5482066",
"0.5481586",
"0.5479751",
"0.54776895",
"0.54671466",
"0.5463307",
"0.54505056",
"0.54436916",
"0.5440517",
"0.5439747",
"0.5431944",
"0.5422869",
"0.54217863",
"0.5417556",
"0.5403905",
"0.5400223",
"0.53998446",
"0.5394735",
"0.5388649",
"0.5388258",
"0.5374842",
"0.5368887",
"0.53591394",
"0.5357029",
"0.5355688",
"0.535506",
"0.5355034",
"0.53494394",
"0.5341044",
"0.5326166",
"0.53236824",
"0.53199095",
"0.53177035",
"0.53112453",
"0.5298229"
] | 0.0 | -1 |
Created by eThaD on 18.02.2018. | public interface AccountStore {
boolean insertAccount(String accountId, Account account);
Account getAccount(String accountId);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\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 }",
"public final void mo51373a() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n protected void getExras() {\n }",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n public void init() {}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"Petunia() {\r\n\t\t}",
"@Override\r\n\tpublic void init() {}",
"public void mo38117a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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 sacrifier() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"private void m50366E() {\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public int getSize() {\n return 1;\n }",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public Pitonyak_09_02() {\r\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private TMCourse() {\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"public void gored() {\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}",
"private UsineJoueur() {}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
] | [
"0.5853969",
"0.5712609",
"0.5540127",
"0.5474368",
"0.54636145",
"0.54636145",
"0.54636145",
"0.54636145",
"0.54636145",
"0.54636145",
"0.5454029",
"0.5434628",
"0.5430587",
"0.54179454",
"0.54179454",
"0.5409856",
"0.5397195",
"0.5389613",
"0.53684074",
"0.535218",
"0.5348046",
"0.5341246",
"0.53276473",
"0.53202957",
"0.530406",
"0.52930546",
"0.5291593",
"0.5288618",
"0.5268789",
"0.5266675",
"0.52542824",
"0.52542824",
"0.52528244",
"0.52428347",
"0.5237782",
"0.5237782",
"0.5237782",
"0.5233156",
"0.52270895",
"0.52255225",
"0.5225157",
"0.5222436",
"0.5222224",
"0.52137834",
"0.52137834",
"0.52137834",
"0.52137834",
"0.52137834",
"0.52081865",
"0.5201863",
"0.5199896",
"0.51998544",
"0.5197278",
"0.51883507",
"0.5183481",
"0.5178347",
"0.51734775",
"0.51734775",
"0.5169861",
"0.51655805",
"0.51655805",
"0.51623476",
"0.5160214",
"0.51474535",
"0.51436865",
"0.5141772",
"0.51411366",
"0.51411366",
"0.51411366",
"0.513914",
"0.51353127",
"0.51165086",
"0.5115263",
"0.5115263",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5108743",
"0.5099637",
"0.50994825",
"0.50973976",
"0.50973976",
"0.50973976",
"0.50942624",
"0.5093886",
"0.509254",
"0.508874",
"0.5086702",
"0.5073789",
"0.5066635",
"0.5052798",
"0.5052798",
"0.5052798",
"0.504996",
"0.5044729"
] | 0.0 | -1 |
////////////////////////////////////////////////////////////////// Testing Utilities ////////////////////////////////////////////////////////////////// | public static SList<Character> make(String str) {
SList<Character> ans = new SList<Character>();
for (int i=0; i<str.length(); i++)
ans.add(str.charAt(i));
return ans;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\r\n\tpublic void testSanity() {\n\t}",
"@Test\n public void testWalkForPduTarget() throws Exception {\n//TODO: Test goes here... \n }",
"@Test\n\tpublic void testMain() {\n\t\t// TODO: test output streams for various IO methods, emulating a user's\n\t\t// input - kinda like Joel did for CSSE2310\n\t\tAssert.fail();\n\t}",
"@Test\n public void testDAM30203001() {\n testDAM30102001();\n }",
"public void testGetInsDyn() {\n }",
"@Test\n public void testGetProductInfo() throws Exception {\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"private void test() {\n\n\t}",
"@Test\n public void testPrintErrPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }",
"public void testWriteOrders() throws Exception {\n }",
"@Test\n public void testDAM30903001() {\n testDAM30802001();\n }",
"@Test\r\n public void testSerialReader() {\n Assert.assertTrue(true);\r\n }",
"@Override\n @Before\n public void setUp() throws IOException {\n }",
"@Test\n public void testDAM30402001() {\n testDAM30101001();\n }",
"@Test\n public void testUtil() {\n String random = Util.getInstance().getRandomString(15);\n\n assertEquals(15, random.length());\n }",
"@Test\n\tpublic void testVersionCheck() throws Exception{\n\t}",
"@Test\n public void testOncoKBInfo() {\n // TODO: test OncoKBInfo\n }",
"public void testGetBasedata() {\n }",
"@Test\n public void testListStorageBinInformation2() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 90L;\n String result = \"\";\n try {\n FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n } catch (Exception ex) {\n result = ex.getMessage();\n }\n assertEquals(\"Factory is not found!\", result);\n }",
"@Test\n public void testDAM30601001() {\n testDAM30102001();\n }",
"@Test\n public void testDAM30103001() {\n // settings as done for testDAM30102001 are identical\n testDAM30102001();\n }",
"@Test\n public void testPrintPosLnS() throws Exception\n {\n//TODO: Test goes here... \n }",
"@Test\n\tpublic void getWorksTest() throws Exception {\n\t}",
"@Test\n public void shouldProcessData() throws Exception {\n }",
"public void testSetBasedata() {\n }",
"public void testGetConnection() {\r\n \r\n }",
"@Test\n public void testGetFileScanner() throws Exception {\n //get file scanner cannot be accurately tested as it is dependant on user input\n System.out.println(\"getFileScanner\");\n Scanner expResult = null;\n Scanner result = BTRouterPatch.getFileScanner();\n System.out.println(\"result = \" + result);\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void check() {\n\n\t\ttry {\n\t\t\tSystem.out.println(\"Unit Test Begins\");\n\t\t\t// Generate Random Log file\n\t\t\tUnitTestLogGenerator.generateRandomLogs();\n\t\t\t// Generate Cmd String\n\t\t\tString cmd = ClientClass.generateCommand(IpAddress, \"seth\", \"v\",\n\t\t\t\t\ttrue);\n\t\t\t// Run Local Grep;\n\t\t\tlocalGrep(cmd);\n\t\t\t// Connecting to Server\n\t\t\tConnectorService connectorService = new ConnectorService();\n\t\t\tconnectorService.connect(IpAddress, cmd);\n\t\t\tInputStream FirstFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/localoutput_unitTest.txt\");\n\t\t\tInputStream SecondFileStream = new FileInputStream(\n\t\t\t\t\t\"/tmp/output_main.txt\");\n\t\t\tSystem.out.println(\"Comparing the two outputs...\");\n\t\t\tboolean result = fileComparison(FirstFileStream, SecondFileStream);\n\t\t\tAssert.assertTrue(result);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\r\n\tpublic void contents() throws Exception {\n\t}",
"@Test\n public void main() {\n // App.main(null);\n // assertEquals(\"Hello world\", outContent.toString());\n }",
"public void testGetURI() {\n }",
"public void testCheckOxyEmpty() {\n }",
"@Test\n public void testQuickCopy() {\n//TODO: Test goes here... \n }",
"@Test\n public void testGetNumberCheckedOut() {\n }",
"@Test\n\tpublic void testReadTicketOk() {\n\t}",
"@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}",
"@Test\n\tpublic void testDiffLibs() \n\t{\n\t\tString id = \"diffLib\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}",
"@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}",
"private void testProXml(){\n\t}",
"@Test\r\n public void testGetStringRepresentation() {\r\n }",
"@Test\n public void testGetNumberAvailable() {\n }",
"@Test\r\n\tpublic void testFrontTimes() {\r\n//\t\tassertEquals(\"ChoCho\", WarmUpTwo.frontTimes)\r\n\t\tfail(\"Not yet implemented\");\r\n\t\t\r\n\t}",
"@Test(timeout = 4000)\n public void test13() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.renameFile(\"tX )E\", \"tX )E\");\n fileUtil0.downloadCart(\"tX )E\");\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&BrowseNodeSearch=1;XU-2`&mode=\\\\#^uu!B1x/lh-*M,)6&type=lite&page=There is no Properties File Setting to default&offer=new&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"tX )E\");\n fileUtil0.fetchKeywordSearchFile(\"+(jC + 3`\", \"#^uu!B1x/lh-*M,)6\", \"tX )E\", \"There is no Properties File Setting to default\");\n fileUtil0.downloadKeywordSearchFile(\"tX )E\", \"tX )E\", \"+(jC + 3`\", \"#^uu!B1x/lh-*M,)6\");\n MockFile.createTempFile(\"#^uu!B1x/lh-*M,)6\", \"tX )E\", (File) null);\n fileUtil0.downloadSimilaritesFile(\"tX )E\", \"lite\", \"tX )E\");\n ArrayList<String> arrayList0 = new ArrayList<String>();\n arrayList0.iterator();\n fileUtil0.downloadAccessoriesFile(\"+(jC + 3`\", arrayList0, \"There is no Properties File Setting to default\");\n fileUtil0.renameFile(\"1;XU-2`\", \"tX )E\");\n fileUtil0.downloadBrowseNodeFile(\"+(jC + 3`\", \"R\", \"+(jC + 3`\", \"+(jC + 3`\");\n fileUtil0.downloadBlendedSearchFile(\"1;XU-2`\", \"#^uu!B1x/lh-*M,)6\");\n fileUtil0.renameFile(\"@Yly^-s.@l\", \"tX )E\");\n fileUtil0.downloadSimilaritesFile(\"@Yly^-s.@l\", \"+(jC + 3`\", \"http://xml.amazon.net/onca/xml3\");\n fileUtil0.downloadBrowseNodeFile(\"tX )E\", \"tX )E\", \"http://xml.amazon.net/onca/xml3\", \"1;XU-2`\");\n fileUtil0.downloadOneASINFile(\"#^uu!B1x/lh-*M,)6\", \"'d&Andc.-pE]$E]0\\t\", \"\", \"tX )E\", \"Jk=S(2?.}+~aac+SeU\");\n fileUtil0.downloadGenericSearchFile(\"#^uu!B1x/lh-*M,)6\", \"'d&Andc.-pE]$E]0\\t\", \"\", \"http://xml.amazon.net/onca/xml3\", \"zsWYd.xqZ4/?(dPNX\", \"R\");\n FileInputStream fileInputStream0 = fileUtil0.fetchBNFile(\"#^uu!B1x/lh-*M,)6\", \"1;XU-2`\", \"There is no Properties File Setting to default\");\n assertNull(fileInputStream0);\n }",
"@Test\n public void testLunce() throws IOException {\n }",
"@Test\n public void testGetLibraryName() {\n System.out.println(\"getLibraryName\");\n JsnParser instance = new JsnParser();\n String expResult = \"\";\n String result = instance.getLibraryName();\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\tpublic void testReadTicketFail() {\n\t}",
"@Test\r\n public void testToString() {\r\n // TODO \r\n assertTrue(true); \r\n }",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n File file0 = MockFile.createTempFile(\"ShoppingCart=get&f=xml&dev-t=\", \"\");\n file0.delete();\n boolean boolean0 = fileUtil0.isAgeGood(file0);\n assertFalse(boolean0);\n }",
"@Test\n public void testAddACopy() {\n }",
"@Test\r\n public void introspectConfiguration() {\r\n HelpConfigStreamConsumer consumer = new HelpConfigStreamConsumer();\r\n consumer.consumeLine(\"iMaker 09.24.01, 10-Jun-2009.\");\r\n consumer.consumeLine(\"Finding available configuration file(s):\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n consumer.consumeLine(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n consumer.consumeLine(\"\");\r\n \r\n // Verifying string output\r\n String[] expected = new String[4];\r\n expected[0] = \"/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[1] = \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n expected[2] = \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\";\r\n expected[3] = \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\";\r\n assertArrayEquals(expected, consumer.getConfigurations().toArray(new String[4]));\r\n\r\n // Verifying the file output\r\n File[] expectedFile = new File[4];\r\n if (new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\").isAbsolute()) {\r\n // Unix like os\r\n expectedFile[0] = new File(\"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(\"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(new File(\".\"), \"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n } else {\r\n // Windows like os\r\n expectedFile[0] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[1] = new File(new File(\".\"), \"/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n expectedFile[2] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product.mk\");\r\n expectedFile[3] = new File(\"X:/epoc32/rom/config/platform/product/image_conf_product_ui.mk\");\r\n }\r\n assertArrayEquals(expectedFile, consumer.getConfigurations(new File(\".\")).toArray(new File[4]));\r\n }",
"@Override\n public void runTest() {\n }",
"@Test\n public void testGetSizeOfCheckoutList() {\n }",
"@Test\npublic void testInitRobotGaming() throws Exception {\n try {\n RobotGamingProcess.initRobotGaming(mapFileList, strategyArrayList, gamesValue, gameRoundValue);\n } catch (ExceptionInInitializerError e) {\n //e.printStackTrace();\n }\n Assert.assertTrue(strategyArrayList.get(0).toString().equals(\"Aggressive\"));\n Assert.assertTrue(strategyArrayList.get(1).toString().equals(\"Random\"));\n}",
"@Test\n public void testGetSupportingData() {\n System.out.println(\"getSupportingData\");\n String expResult = \"JWT json header\";\n String result = instance.getSupportingData();\n assertTrue(result.startsWith(expResult));\n expResult = \"true\\r\\n\";\n assertTrue(result.endsWith(expResult));\n }",
"@Test\r\n public void testGetListingTitle() {\r\n System.out.println(\"getListingTitle\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getListingTitle();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}",
"public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }",
"@Test\n\tpublic void testSameLibDiffLocs() \n\t{\n\t\tString id = \"diffHomeLoc\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}",
"@Test\n public void testQuickMapList() {\n//TODO: Test goes here... \n }",
"@Test\n public void testGetNext() throws Exception {\n//TODO: Test goes here... \n }",
"@Test(timeout = 4000)\n public void test03() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&BlendedSearch=ShoppingCart%3Dmodify%26f%3Dxml%26dev-t%3D&type=RGC&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"\");\n FileInputStream fileInputStream0 = fileUtil0.fetchBlendedSearchFile(\"ShoppingCart=modify&f=xml&dev-t=\", \"RGC\");\n assertNull(fileInputStream0);\n }",
"@Test\n public void testCheckForProduct() throws Exception {\n }",
"private ProtomakEngineTestHelper() {\r\n\t}",
"@Test\n public void matchCorrect() {\n }",
"public void testCheck()\r\n {\n DataUtil.check(9, \"This is a test!\");\r\n }",
"@Test\n\tpublic void testMain() {\n\t}",
"private test5() {\r\n\t\r\n\t}",
"@Test\n public void testDAM31501001() {\n //\n testDAM30201001();\n }",
"@Test(timeout = 4000)\n public void test73() throws Throwable {\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, (String) null);\n ConnectionFactories connectionFactories0 = new ConnectionFactories();\n connectionFactories0.getXAConnectionFactory();\n connectionFactories0.getXAConnectionFactory();\n connectionFactories0.addConnectionFactory((ConnectionFactory) null);\n XATopicConnectionFactory[] xATopicConnectionFactoryArray0 = new XATopicConnectionFactory[0];\n connectionFactories0.setXATopicConnectionFactory(xATopicConnectionFactoryArray0);\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n connectionFactories0.getConnectionFactory();\n XAConnectionFactory[] xAConnectionFactoryArray0 = connectionFactories0.getXAConnectionFactory();\n XAConnectionFactory[] xAConnectionFactoryArray1 = connectionFactories0.getXAConnectionFactory();\n assertNotSame(xAConnectionFactoryArray1, xAConnectionFactoryArray0);\n }",
"public void testaReclamacao() {\n\t}",
"@Test(timeout = 4000)\n public void test25() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&.YBKYR[P|b=.YBKYR%5BP%7Cb&mode=.YBKYR[P|b&type=&page=\\\"90hR%xB!V_E&offer=\\\"90hR%xB!V_E&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"\\\"90hR%xB!V_E\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\".YBKYR[P|b\", \".YBKYR[P|b\", \".YBKYR[P|b\", \"\", \"\\\"90hR%xB!V_E\", \"\\\"90hR%xB!V_E\");\n assertNull(fileInputStream0);\n }",
"public void testLoadOrder() throws Exception {\n }",
"@Test\n public void test16() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1336,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test16\");\n File file0 = new File(\"\");\n file0.toString();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) \"\");\n assertEquals(true, iterator0.hasNext());\n assertNotNull(iterator0);\n }",
"@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n assertEquals(\"Dumb abstract building\", building.getDescription());\n }",
"public static void testXmlImport() {\n\n }",
"@Test(timeout = 4000)\n public void test36() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/CGGSK_9<#S%7P.SU/IN~Q__NULL.XML\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"9<#s%7P.sU/In~q\");\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&AsinSearch=CGgsK&type=&offerpage=null&offer=9<#s%7P.sU/In~q&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"\");\n FileInputStream fileInputStream0 = fileUtil0.fetchASINFile(\"CGgsK\", \"\", \"9<#s%7P.sU/In~q\", (String) null);\n assertEquals(16, fileInputStream0.available());\n }",
"@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}",
"public void testGetHost() {\n }",
"@Test(timeout = 4000)\n public void test06() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n MockFile mockFile0 = new MockFile(\"l<\", \"l<\");\n mockFile0.delete();\n fileUtil0.isAgeGood(mockFile0);\n fileUtil0.fetchASINFile(\"QS|v?htZLQ_f\\\"4\", \"cacheLife\", \"k_\", \"cacheDir\");\n fileUtil0.getBrowseNodeFile(\"cacheDir\", \"cacheDir\", \"cacheDir\");\n fileUtil0.fetchThirdPartySearchFile(\"l<\", \"l<\", \"QS|v?htZLQ_f\\\"4\", \"3rd_\");\n fileUtil0.getASINFile(\"cacheDir\", \"\", \"\", (String) null);\n fileUtil0.deleteFile(\"k_\");\n }",
"@Test\n public void testingTheTwoPlane2016Order() {\n }",
"public void testPerformance() {\n \t}",
"@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getDescription();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }",
"@Test(timeout = 4000)\n public void test18() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/S_RYNHV)!DEYJP^3IL$.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n File file0 = fileUtil0.getSimilarItems(\"RYnHv)!DEyJP^3il$\", \"\");\n assertEquals(\"/S_RYNHV)!DEYJP^3IL$.XML\", file0.toString());\n assertFalse(file0.isFile());\n assertNotNull(file0);\n }",
"public void testMain() throws Throwable {\n\r\n\t}",
"@Test \n\tpublic void get() \n\t{\n\t\tassertTrue(true);\n\t}",
"@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }",
"@Test\n\tpublic void test04() throws Throwable {\n\t}",
"@Before\n\t public void setUp() {\n\t }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n DBCatalog dBCatalog0 = new DBCatalog(\" Y*-X>Nz.q@~K^o8Z]v\");\n DBSchema dBSchema0 = new DBSchema(\"getFloat(String)\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" Y*-X>Nz.q@~K^o8Z]v\", dBSchema0);\n MockFileOutputStream mockFileOutputStream0 = new MockFileOutputStream(\"getFloat(String)\", true);\n defaultDBTable0.getIndex(\" Y*-X>Nz.q@~K^o8Z]v\");\n JMXPrincipal jMXPrincipal0 = new JMXPrincipal(\"getFloat(String)\");\n defaultDBTable0.getIndex(\"getFloat(String)\");\n defaultDBTable0.getCatalog();\n String string0 = SQLUtil.ownerDotComponent(defaultDBTable0);\n assertEquals(\"getFloat(String). Y*-X>Nz.q@~K^o8Z]v\", string0);\n }",
"@Test(timeout = 4000)\n public void test01() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.downloadBrowseNodeFile(\">RY@\\\"d8cDm4\", \"gIeuBfO{y#\", \"\", \">RY@\\\"d8cDm4\");\n fileUtil0.fetchThirdPartySearchFile(\"net.kencochrane.a4j.file.FileUtil\", \"g!n_C$F8\\\"D4 e)e\", \"b_\", \"net.kencochrane.a4j.file.FileUtil\");\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n Integer integer0 = new Integer((-977));\n arrayList0.add(integer0);\n fileUtil0.cacheDir = \"\";\n fileUtil0.fetchAccessories(\"\", arrayList0);\n fileUtil0.getBrowseNodeFile(\"\", \"\", \"\");\n fileUtil0.downloadCart(\"4[EG]r,0beUTj1 \");\n FileInputStream fileInputStream0 = fileUtil0.fetchBlendedSearchFile(\"4[EG]r,0beUTj1 \", \"\");\n assertNull(fileInputStream0);\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n stringArray0[1] = \"\";\n stringArray0[2] = \"\";\n stringArray0[3] = \"\";\n stringArray0[4] = \"Error in readFilej) : \";\n stringArray0[5] = \"\";\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"QZkj>P.|?`(ZTS\");\n FileSystemHandling.appendLineToFile(evoSuiteFile0, \"\");\n FileSystemHandling.appendStringToFile(evoSuiteFile0, \"\");\n stringArray0[7] = \"\";\n stringArray0[8] = \"\";\n StringReader stringReader0 = new StringReader(\"\");\n char[] charArray0 = new char[2];\n charArray0[0] = 'u';\n charArray0[1] = ']';\n stringReader0.read(charArray0);\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSJshop jSJshop0 = null;\n try {\n jSJshop0 = new JSJshop(\"QZkj>P.|?`(ZTS\", \"Error in readFilej) : \");\n fail(\"Expecting exception: System.SystemExitException\");\n \n } catch(System.SystemExitException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.evosuite.runtime.System\", e);\n }\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}",
"@Test\n public void test27() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1348,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test27\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n iIOMetadataNode0.getNodeValue();\n Iterator<?> iterator0 = IteratorUtils.getIterator((Object) null);\n assertEquals(false, iterator0.hasNext());\n }",
"@Test\n public void testDAM31102001() {\n testDAM31001001();\n }",
"@Test(timeout = 4000)\n public void test27() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, false);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n StringWriter stringWriter0 = new StringWriter();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\\\"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"<\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"*ge\");\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"?SZ:=fMlSuF'5A7G0L\");\n SimpleNode simpleNode0 = null;\n try {\n simpleNode0 = new SimpleNode((JavaParser) null, (-1734));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.soops.CEN4010.JMCA.JParser.SimpleNode\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test14() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n fileUtil0.fetchKeywordSearchFile(\"c(w\", \"U_w94([2tu\", \"popcornmonste2-20\", \"popcornmonste2-20\");\n fileUtil0.fetchBlendedSearchFile((String) null, \"cacheLife\");\n fileUtil0.fetchSimilarItems(\"SF*KdO/{3)AN:saQ[\", \"=E048F A6fmw7p6\");\n EvoSuiteURL evoSuiteURL0 = new EvoSuiteURL(\"http://xml.amazon.net/onca/xml3?t=popcornmonste2-20&dev-t=DSB0XDDW1GQ3S&KeywordSearch=&mode=popcornmonste2-20&type=Iz 6~/3ztsI&page=6&kX&f=xml\");\n NetworkHandling.createRemoteTextFile(evoSuiteURL0, \"pIIKg$f#s[uwS}eqYG\");\n fileUtil0.downloadBlendedSearchFile(\"SF*KdO/{3)AN:saQ[\", \"SF*KdO/{3)AN:saQ[\");\n fileUtil0.downloadKeywordSearchFile(\"\", \"popcornmonste2-20\", \"Iz 6~/3ztsI\", \"6&kX\");\n fileUtil0.fetchBNFile(\"\", (String) null, \"U_w94([2tu\");\n fileUtil0.downloadBrowseNodeFile(\"U_w94([2tu\", \"]pHI%@07}\", \"SF*KdO/{3)AN:saQ[\", \"\");\n fileUtil0.getASINFile(\"=E048F A6fmw7p6\", \"c(w\", (String) null, \"1n\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\"cacheLife\", \"pIIKg$f#s[uwS}eqYG\", \"nF+ad/p6I\", \"]pHI%@07}\", \"pIIKg$f#s[uwS}eqYG\", \"SF*KdO/{3)AN:saQ[\");\n assertNull(fileInputStream0);\n }",
"@Test\n void testPartB_Example3() {\n assertEquals(50346, Day01.getFuelNeededForMassIncludingFuelWeight(100756));\n }",
"private void testEvidenceBankFolder() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n NodeRef eviBankFolder = getEvidenceBankFolder();\n assertNotNull(eviBankFolder);\n LOG.debug(\"Got Evidence Bank Folder NodeRef: \" + eviBankFolder); \n\n }",
"public void testGetJSON() {\n\t}",
"@Test\n public void testGetOnlinePosition() {\n assert false : \"testGetOnlinePosition not implemented.\";\n }",
"@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}"
] | [
"0.65717554",
"0.6494256",
"0.643547",
"0.6369704",
"0.63345927",
"0.63329816",
"0.629733",
"0.6291117",
"0.6279751",
"0.62532425",
"0.62223893",
"0.62141037",
"0.6199976",
"0.61929744",
"0.61898935",
"0.6176992",
"0.61726826",
"0.61678743",
"0.61647063",
"0.61614084",
"0.61529064",
"0.6146913",
"0.6101626",
"0.6100246",
"0.6080274",
"0.6077369",
"0.6075984",
"0.60757995",
"0.6064702",
"0.6059677",
"0.6031809",
"0.6029696",
"0.6000893",
"0.60007834",
"0.5999166",
"0.59871656",
"0.59653825",
"0.59523636",
"0.59501827",
"0.59466034",
"0.59444416",
"0.593522",
"0.5932759",
"0.59307134",
"0.59301436",
"0.5927461",
"0.59201694",
"0.59170514",
"0.5917046",
"0.59149295",
"0.59127146",
"0.59084076",
"0.5905553",
"0.59014004",
"0.589535",
"0.5895158",
"0.5879984",
"0.58721995",
"0.5866157",
"0.5857773",
"0.58458936",
"0.5843045",
"0.5842899",
"0.5842343",
"0.5840393",
"0.58380467",
"0.5835809",
"0.58347493",
"0.5830398",
"0.58291155",
"0.58190453",
"0.58164",
"0.5807461",
"0.57881045",
"0.5783244",
"0.5782437",
"0.5779856",
"0.5779801",
"0.57782173",
"0.5777999",
"0.57746017",
"0.57743835",
"0.57691765",
"0.57691056",
"0.5768336",
"0.57614625",
"0.5756532",
"0.57488537",
"0.57468706",
"0.57449037",
"0.5743275",
"0.57404876",
"0.573966",
"0.57372147",
"0.5735489",
"0.57352304",
"0.57349634",
"0.57340884",
"0.57339776",
"0.57328296",
"0.57323575"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void validate(Component arg0, Object arg1) throws WrongValueException {
if (arg0 instanceof Timebox) {
// no need for checking ?
if (((Timebox) arg0).isDisabled())
return;
if (arg1 == null)
throw new WrongValueException(arg0, "Campo obligatorio");
else{
Calendar validaMinutos = Calendar.getInstance();
validaMinutos.setTime((Date)arg1);
int totalMinutos = ((validaMinutos.get(Calendar.HOUR_OF_DAY)*60) + validaMinutos.get(Calendar.MINUTE));
if(totalMinutos < 15)
throw new WrongValueException(arg0, "Duración mínima de recesos es de 15 minutos");
else
if(totalMinutos % 5 != 0)
throw new WrongValueException(arg0, "Tiempo no permitido, debe ser múltiplo de 5 minutos");
}
}
} | {
"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 |
looking at webapp classpath, found alreadyparsed class of same name did it come from system or duplicate in webapp? | public boolean shouldOverride(String name) {
if (context.isParentLoaderPriority()) {
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }",
"@Test\r\n public void testImportRedundancy() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.util.*\");\r\n Type t1 = typeParser.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n }",
"@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }",
"private void parseSystemClasspath() {\n\t // Look for all unique classloaders.\n\t // Keep them in an order that (hopefully) reflects the order in which class resolution occurs.\n\t ArrayList<ClassLoader> classLoaders = new ArrayList<>();\n\t HashSet<ClassLoader> classLoadersSet = new HashSet<>();\n\t classLoadersSet.add(ClassLoader.getSystemClassLoader());\n\t classLoaders.add(ClassLoader.getSystemClassLoader());\n\t if (classLoadersSet.add(Thread.currentThread().getContextClassLoader())) {\n\t classLoaders.add(Thread.currentThread().getContextClassLoader());\n\t }\n\t // Dirty method for looking for any other classloaders on the call stack\n\t try {\n\t // Generate stacktrace\n\t throw new Exception();\n\t } catch (Exception e) {\n\t StackTraceElement[] stacktrace = e.getStackTrace();\n\t for (StackTraceElement elt : stacktrace) {\n\t try {\n\t ClassLoader cl = Class.forName(elt.getClassName()).getClassLoader();\n\t if (classLoadersSet.add(cl)) {\n\t classLoaders.add(cl);\n\t }\n\t } catch (ClassNotFoundException e1) {\n\t }\n\t }\n\t }\n\n\t // Get file paths for URLs of each classloader.\n\t clearClasspath();\n\t for (ClassLoader cl : classLoaders) {\n\t if (cl != null) {\n\t for (URL url : getURLs(cl)) {\n\t \t\n\t if (\"file\".equals(url.getProtocol())) {\n\t addClasspathElement(url.getFile());\n\t }\n\t }\n\t }\n\t }\n\t}",
"public void loadClass(String name) throws InstantiationException, IllegalAccessException, ClassNotFoundException{\n\t\tSystem.out.println(\"Class object address \" + InspectClassLoader.class.hashCode());\n\t\tObject obj = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\").newInstance();\n\t\tSystem.out.println(\"Same class object: \" + (obj.getClass() == InspectClassLoader.class));\n\t\t\n\t\t// Class<?> object's class is ???\n\t\tClass<?> s = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\");\n\t\tSystem.out.println(s.getClass()); // output: java.land.Class\n\t\t\n\t\tSystem.out.println(\"class loader hashcode \" + getClass().getClassLoader().hashCode());\n\t}",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"public String getClassName(String path);",
"private void enforceTransitiveClassUsage() {\n HashSet<String> tmp = new HashSet<String>(usedAppClasses);\n for(String className : tmp) {\n enforceTransitiveClassUsage(className);\n }\n }",
"protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}",
"private static boolean isJSqlParserInClassPath() {\n\n\t\ttry {\n\t\t\tClass.forName(\"net.sf.jsqlparser.parser.JSqlParser\", false, QueryEnhancerFactory.class.getClassLoader());\n\t\t\tlog.info(\"JSqlParser is in classpath. If applicable JSqlParser will be used.\");\n\t\t\treturn true;\n\t\t}\n\t\tcatch (ClassNotFoundException ex) {\n\t\t\treturn false;\n\t\t}\n\t}",
"private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }",
"public static void loadClass(String name) {\n\n }",
"Object getClass_();",
"Object getClass_();",
"private static String getClassNameForClassFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n String filePathNoExtension = filePath.substring(1, filePath.length() - 6);\n String className = filePathNoExtension.replace('/', '.');\n return className;\n }",
"private static void Demo8() {\n\t\tClass<?> class1 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.SuperMan\");\r\n\t\t\tString nameString = class1.getClassLoader().getClass().getName();\r\n\t\t\tSystem.out.println(\"Demo8: 类加载器类名: \" + nameString);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"public String getRuntimeClass();",
"public static Class<?> lenientClassForName(String className) throws ClassNotFoundException {\n try {\n return loadClass(className);\n } catch (ClassNotFoundException ignored) {\n // try replacing the last dot with a $, in case that helps\n // example: tutorial.Tutorial.Benchmark1 becomes tutorial.Tutorial$Benchmark1\n // amusingly, the $ character means three different things in this one line alone\n String newName = className.replaceFirst(\"\\\\.([^.]+)$\", \"\\\\$$1\");\n return loadClass(newName);\n }\n }",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"private void loadJarsFromClasspath() {\n\n loadedJarsMap.clear();\n\n ClassLoader classLoader = getClass().getClassLoader();\n URL[] urls = null;\n do {\n //check if the class loader is instance of URL and cast it\n if (classLoader instanceof URLClassLoader) {\n urls = ((URLClassLoader) classLoader).getURLs();\n } else {\n // if the ClassLoader is not instance of URLClassLoader we will break the cycle and log a message\n log.info(\"ClassLoader \" + classLoader\n + \" is not instance of URLClassLoader, so it will skip it.\");\n\n // if the ClassLoader is from JBoss, it is instance of BaseClassLoader,\n // we can take the ClassPath from a public method -> listResourceCache(), from JBoss-classloader.jar\n // this ClassLoader is empty, we will get the parent\n classLoader = classLoader.getParent();\n continue;\n }\n try {\n loadJarsFromManifestFile(classLoader);\n } catch (IOException ioe) {\n log.warn(\"MANIFEST.MF is loaded, so we will not search for duplicated jars!\");\n }\n\n // add all jars from ClassPath to the map\n for (int i = 0; i < urls.length; i++) {\n addJarToMap(urls[i].getFile());\n }\n\n // get the parent classLoader\n classLoader = classLoader.getParent();\n } while (classLoader != null);\n\n if (loadedJarsMap.isEmpty()) {\n // jars are not found, so probably no URL ClassLoaders are found\n throw new RuntimeException(\"Most probrably specific server is used without URLClassLoader instances!\");\n }\n }",
"public void testMultipleConflictingDynamicImports() throws Exception {\n\n\t\tsetupImportChoices();\n\t\tConfigurableWeavingHook hook = new ConfigurableWeavingHook();\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";version=\\\"(1.0,1.5)\\\"\");\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";foo=bar\");\n\t\thook.setChangeTo(IMPORT_TEST_CLASS_NAME);\n\t\tServiceRegistration<WeavingHook> reg = null;\n\t\ttry {\n\t\t\treg = hook.register(getContext(), 0);\n\t\t\tClass<?>clazz = weavingClasses.loadClass(DYNAMIC_IMPORT_TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\",\n\t\t\t\t\tTEST_IMPORT_SYM_NAME + \"_1.1.0\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\t\t} finally {\n\t\t\tif (reg != null)\n\t\t\t\treg.unregister();\n\t\t\ttearDownImportChoices();\n\t\t}\n\t}",
"private static Class<?> loadClass(String archiveImplClassName) throws Exception \n {\n return SecurityActions.getThreadContextClassLoader().loadClass(archiveImplClassName);\n }",
"private static boolean isClassFile(WebFile aFile)\n {\n String path = aFile.getPath();\n if (!path.endsWith(\".class\"))\n return false;\n if (isIgnorePath(path))\n return false;\n return true;\n }",
"public static void checkClassloaders() {\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader()); //sun.misc.Launcher$AppClassLoader@36422510\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent()); //sun.misc.Launcher$ExtClassLoader@308f5944\n\t\tSystem.out.println(ClassLoaderDemo.class.getClassLoader().getParent().getParent()); //null\n\t}",
"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 }",
"boolean hasClassname();",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"@Test\n public void testGetClassesInPackage() throws Exception\n {\n\n WarMachine machine = TestHelpers.createWarMachine(WarNames.SERVLET);\n\n Set<String> clist1 = machine.getClassesInPackage(\"com.example.servlet\", false);\n assertEquals(\"number of classes in WEB-INF, non-recursive\", 1, clist1.size());\n assertTrue(\"searching for file in WEB-INF, non-recursive\", clist1.contains(\"com.example.servlet.SomeServlet\"));\n\n Set<String> clist2 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", false);\n assertEquals(\"number of classes in JAR, non-recursive\", 13, clist2.size());\n assertTrue(\"searching for classes in JAR, non-recursive\", clist2.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n\n Set<String> clist3 = machine.getClassesInPackage(\"net.sf.practicalxml.xpath\", true);\n assertEquals(\"number of classes in JAR, recursive\", 17, clist3.size());\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.XPathWrapper\"));\n assertTrue(\"searching for classes in JAR, recursive\", clist3.contains(\"net.sf.practicalxml.xpath.function.Constants\"));\n }",
"private Class<?> defineClass(String paramString, URL paramURL) throws IOException {\n/* 364 */ byte[] arrayOfByte = getBytes(paramURL);\n/* 365 */ CodeSource codeSource = new CodeSource(null, (Certificate[])null);\n/* 366 */ if (!paramString.equals(\"sun.reflect.misc.Trampoline\")) {\n/* 367 */ throw new IOException(\"MethodUtil: bad name \" + paramString);\n/* */ }\n/* 369 */ return defineClass(paramString, arrayOfByte, 0, arrayOfByte.length, codeSource);\n/* */ }",
"default boolean canLoadClassPath(String classPath) { return true; }",
"public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }",
"public Class findClass(String name) {\n Class c = ( Class ) cache.get( name ) ;\n\n if ( c != null ) {\n return c ;\n }\n\n // Break the name into path names\n String p = parseClassName( name ) ;\n File path = null ;\n\n // Search the current user defined class path.\n for (int i=0;i<paths.size();i++) {\n String pathName = paths.elementAt(i) + p ;\n path = new File( pathName ) ;\n if ( path.exists() && path.isFile() )\n break ;\n else\n path = null ;\n }\n\n if ( path == null )\n return null ;\n\n byte[] b = loadClassData( path);\n\n // Process this class by creating a new \"stub\". Give it\n // a different name to distinguish it from any existing\n // class of the same name.\n ByteArrayInputStream bs = new ByteArrayInputStream( b ) ;\n DataInputStream ds = new DataInputStream( bs ) ;\n ClassObject classObject = new ClassObject() ;\n try {\n classObject.read( ds ) ;\n }\n catch ( IOException e ) {\n return null ;\n }\n\n return defineClass(name, b, 0, b.length);\n }",
"@Override\n public JavaClass findClass(final String className) {\n final SoftReference<JavaClass> ref = loadedClasses.get(className);\n if (ref == null) {\n return null;\n}\n return ref.get();\n }",
"private String doDynamicImport(String name) {\n\t\t// Trim any added spaces\n\t\tname = name.trim();\n\t\ttry {\n\t\t\t//If the class name is the SymbolicNameVersion class then we want the object's\n\t\t\t//toString, otherwise the Class's toString is fine, and allows us to load interfaces\n\t\t\tif(\"org.osgi.test.cases.framework.weaving.tb2.SymbolicNameVersion\".equals(name))\n\t\t\t\treturn Class.forName(name)\n\t\t\t\t\t\t.getConstructor()\n\t\t\t\t\t\t.newInstance()\n\t\t\t\t\t\t.toString();\n\t\t\telse\n\t\t\t\treturn Class.forName(name).toString();\n\t\t} catch (Throwable t) {\n\t\t\tthrow new RuntimeException(t);\n\t\t}\n\t}",
"private static URL[] expandWildcardClasspath() {\n List<URL> ret = new ArrayList<URL>();\n int numBaseXJars = 0;\n String classpath = System.getProperty(\"java.class.path\");\n String[] classpathEntries = classpath.split(System.getProperty(\"path.separator\"));\n for( String currCP : classpathEntries ) {\n File classpathFile = new File(currCP);\n URI uri = classpathFile.toURI();\n URL currURL = null;\n try {\n currURL = uri.toURL();\n } catch (MalformedURLException e) {\n System.out.println(\"Ignoring classpath entry: \" + currCP);\n }\n if( currCP.endsWith( \"*\" ) ) {\n // This URL needs to be expanded\n try {\n File currFile = new File( URLDecoder.decode( currURL.getFile(), \"UTF-8\" ) );\n // Search the parent path for any files that end in .jar\n File[] expandedJars = currFile.getParentFile().listFiles(\n new FilenameFilter() {\n public boolean accept( File aDir, String aName ) {\n return aName.endsWith( \".jar\" );\n }\n } );\n // Add the additional jars to the new search path\n if( expandedJars != null ) {\n for( File currJar : expandedJars ) {\n ret.add( currJar.toURI().toURL() );\n if( currJar.getName().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n } else {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n System.out.println( \"WARNING: could not expand classpath at: \"+currFile.toString() );\n }\n } catch( Exception e ) {\n // could not expand due to some error, we can try to\n // proceed with out these jars\n e.printStackTrace();\n }\n }\n else {\n // Just use this unmodified\n ret.add( currURL );\n if( currURL.getFile().matches(BASEX_LIB_MATCH) ) {\n ++numBaseXJars;\n }\n }\n }\n // we've had trouble finding multiple jars of the BaseX of different versions\n // so if we find more than we will accept the one that matches the \"prefered\" version\n // which is hard coded to the version used when this workspace was created\n if( numBaseXJars > 1 ) {\n for( Iterator<URL> it = ret.iterator(); it.hasNext(); ) {\n URL currURL = it.next();\n if( currURL.getFile().matches(BASEX_LIB_MATCH) && !currURL.getFile().matches(PREFERED_BASEX_VER) ) {\n it.remove();\n --numBaseXJars;\n }\n }\n }\n if( numBaseXJars == 0 ) {\n System.out.println( \"WARNING: did not recongnize any BaseX jars in classpath. This may indicate missing jars or duplicate version mismatch.\");\n }\n return ret.toArray( new URL[ 0 ] );\n }",
"private static AndroidNClassLoader createAndroidNClassLoader(PathClassLoader original, Application application) throws Exception {\n AndroidNClassLoader androidNClassLoader = new AndroidNClassLoader(\"\", original, application);\n Field originPathList = ShareReflectUtil.findField(original, \"pathList\");\n Object originPathListObject = originPathList.get(original);\n //should reflect definingContext also\n Field originClassloader = ShareReflectUtil.findField(originPathListObject, \"definingContext\");\n originClassloader.set(originPathListObject, androidNClassLoader);\n //copy pathList\n Field pathListField = ShareReflectUtil.findField(androidNClassLoader, \"pathList\");\n //just use PathClassloader's pathList\n pathListField.set(androidNClassLoader, originPathListObject);\n\n //we must recreate dexFile due to dexCache\n List<File> additionalClassPathEntries = new ArrayList<>();\n Field dexElement = ShareReflectUtil.findField(originPathListObject, \"dexElements\");\n Object[] originDexElements = (Object[]) dexElement.get(originPathListObject);\n for (Object element : originDexElements) {\n DexFile dexFile = (DexFile) ShareReflectUtil.findField(element, \"dexFile\").get(element);\n if (dexFile == null) {\n continue;\n }\n additionalClassPathEntries.add(new File(dexFile.getName()));\n //protect for java.lang.AssertionError: Failed to close dex file in finalizer.\n oldDexFiles.add(dexFile);\n }\n Method makePathElements = ShareReflectUtil.findMethod(originPathListObject, \"makePathElements\", List.class, File.class,\n List.class);\n ArrayList<IOException> suppressedExceptions = new ArrayList<>();\n Object[] newDexElements = (Object[]) makePathElements.invoke(originPathListObject, additionalClassPathEntries, null, suppressedExceptions);\n dexElement.set(originPathListObject, newDexElements);\n\n try {\n Class.forName(CHECK_CLASSLOADER_CLASS, true, androidNClassLoader);\n } catch (Throwable thr) {\n Log.e(TAG, \"load TinkerTestAndroidNClassLoader fail, try to fixDexElementsForProtectedApp\");\n fixDexElementsForProtectedApp(application, newDexElements);\n }\n\n return androidNClassLoader;\n }",
"protected Class<?> findClass(String paramString) throws ClassNotFoundException {\n/* 343 */ if (!paramString.startsWith(\"sun.reflect.misc.\")) {\n/* 344 */ throw new ClassNotFoundException(paramString);\n/* */ }\n/* 346 */ String str = paramString.replace('.', '/').concat(\".class\");\n/* 347 */ URL uRL = getResource(str);\n/* 348 */ if (uRL != null) {\n/* */ try {\n/* 350 */ return defineClass(paramString, uRL);\n/* 351 */ } catch (IOException iOException) {\n/* 352 */ throw new ClassNotFoundException(paramString, iOException);\n/* */ } \n/* */ }\n/* 355 */ throw new ClassNotFoundException(paramString);\n/* */ }",
"private static void Demo2() {\n\t\tClass<?> class1 = null;\r\n\t\tClass<?> class2 = null;\r\n\t\ttry {\r\n\t\t\tclass1 = Class.forName(\"CH16.Person\");\r\n\t\t\tSystem.out.println(\"包名:\" + class1.getPackage().getName());\r\n\t\t\tSystem.out.println(\"类名:\" + class1.getName());\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tclass2 = Person.class;\r\n\t\tSystem.out.println(\"包名:\" + class2.getPackage().getName());\r\n\t\tSystem.out.println(\"类名:\" + class2.getName());\r\n\r\n\t}",
"void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected Class \n findClass\n (\n String cname\n ) \n throws ClassNotFoundException\n {\n byte bs[] = pContents.get(cname);\n if(bs == null) \n throw new ClassNotFoundException\n\t(\"Unable to find class (\" + cname + \")!\");\n\n return defineClass(cname, bs, 0, bs.length);\n }",
"@Override\n public ElementMatcher<ClassLoader> classLoaderMatcher() {\n return hasClassesNamed(className);\n }",
"private byte[] getClassBytes(String slashedName) {\n URL url = Thread.currentThread().getContextClassLoader().getResource(\n slashedName + \".class\");\n if (url == null) {\n logger.log(TreeLogger.DEBUG, \"Unable to find \" + slashedName\n + \" on the classPath\");\n return null;\n }\n String urlStr = url.toExternalForm();\n if (slashedName.equals(mainClass)) {\n // initialize the mainUrlBase for later use.\n mainUrlBase = urlStr.substring(0, urlStr.lastIndexOf('/'));\n } else {\n assert mainUrlBase != null;\n if (!mainUrlBase.equals(urlStr.substring(0, urlStr.lastIndexOf('/')))) {\n logger.log(TreeLogger.DEBUG, \"Found \" + slashedName + \" at \" + urlStr\n + \" The base location is different from that of \" + mainUrlBase\n + \" Not loading\");\n return null;\n }\n }\n \n // url != null, we found it on the class path.\n try {\n URLConnection conn = url.openConnection();\n return Util.readURLConnectionAsBytes(conn);\n } catch (IOException ignored) {\n logger.log(TreeLogger.DEBUG, \"Unable to load \" + urlStr\n + \", in trying to load \" + slashedName);\n // Fall through.\n }\n return null;\n }",
"private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}",
"public Class loadClass(Result result, String className) {\n\t\n try {\n WebTestsUtil webTestsUtil = WebTestsUtil.getUtil(context.getClassLoader());\n\t //webTestsUtil.appendCLWithWebInfContents();\n\t return webTestsUtil.loadClass(className);\n } catch (Throwable e) {\n\n // @see preVerify Method of Verifier.java\n try {\n ClassLoader cl = getVerifierContext().getAlternateClassLoader();\n if (cl == null) {\n throw e;\n }\n Class c = cl.loadClass(className);\n return c;\n }catch(Throwable ex) {\n /*\n result.addErrorDetails(smh.getLocalString\n (\"com.sun.enterprise.tools.verifier.tests.web.WebTest.Exception\",\n \"Error: Unexpected exception occurred [ {0} ]\",\n new Object[] {ex.toString()}));\n */\n }\n } \n return null;\n }",
"static private URLClassLoader separateClassLoader(URL[] classpath) throws Exception {\n\t\treturn new URLClassLoader(classpath, ClassLoader.getSystemClassLoader().getParent());\r\n\t}",
"ClassLoader getNewTempClassLoader() {\n return new ClassLoader(getClassLoader()) {\n };\n }",
"@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}",
"private byte[] loadUrlClass(final String name) throws ClassNotFoundException {\n\t\tfinal byte[] result;\n\t\ttry {\n\t\t\tresult = AccessController.doPrivileged(\n\t\t\t\tnew PrivilegedExceptionAction<byte[]>() {\n\t\t\t\t\t@SneakyThrows\n\t\t\t\t\tpublic byte[] run() {\n\t\t\t\t\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\t\t\t\t\tResource res = getUcp().getResource(path, false); // ucp replaced by getUcp()\n\t\t\t\t\t\tif (res != null) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\treturn toBytes(name, res); // defineClass() replaced by toBytes()\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tthrow new ClassNotFoundException(name, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, getAcc());\n\t\t} catch (java.security.PrivilegedActionException pae) {\n\t\t\tthrow (ClassNotFoundException) pae.getException();\n\t\t}\n\t\tif (result == null) {\n\t\t\tthrow new ClassNotFoundException(name);\n\t\t}\n\t\treturn result;\n\t}",
"String resolveClassPath(String classPath);",
"private String discoverDriverClassName(URLClassLoader urlClassLoader) throws IOException {\n String className = null;\n URL resource = urlClassLoader.findResource(\"META-INF/services/java.sql.Driver\");\n if (resource != null) {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new InputStreamReader(resource.openStream()));\n className = br.readLine();\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }\n return className;\n }",
"protected Class getOnlineService () throws ClassNotFoundException {\n String className = config.getString(\"CLIENT_IMPL\");\n Class serviceClass = Class.forName(className);\n return serviceClass;\n }",
"List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }",
"private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\n\t\tthis.sharedloader = createClassloader(\"shared\", commonloader);\n\t\tthis.catalinaloader = createClassloader(\"server\", commonloader);\n\t}",
"private CacheHelper loadCacheHelper(String className)\n throws Exception {\n\n // use the context class loader to load class so that any\n // user-defined classes in WEB-INF can also be loaded.\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n Class helperClass = cl.loadClass(className);\n\n CacheHelper helper = (CacheHelper) helperClass.newInstance();\n\n return helper;\n }",
"@Override\n public Dynamic addServlet(String servletName, String className) {\n return null;\n }",
"@Override\n\tpublic boolean classIsMissing() {\n\t\treturn false;\n\t}",
"@Override\n protected Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class<?> loadedClass = findLoadedClass(name);\n if (loadedClass == null) {\n try {\n if (_classLoader != null) {\n loadedClass = _classLoader.loadClass(name);\n }\n } catch (ClassNotFoundException ex) {\n // class not found in system class loader... silently skipping\n }\n\n try {\n // find the class from given jar urls as in first constructor parameter.\n if (loadedClass == null) {\n loadedClass = findClass(name);\n }\n } catch (ClassNotFoundException e) {\n // class is not found in the given urls.\n // Let's try it in parent classloader.\n // If class is still not found, then this method will throw class not found ex.\n loadedClass = super.loadClass(name, resolve);\n }\n }\n\n if (resolve) { // marked to resolve\n resolveClass(loadedClass);\n }\n return loadedClass;\n }",
"protected Class findClass(final String name)\n\t\tthrows ClassNotFoundException\n\t{\n\t\t/* Protect the namespace */\n\t\tif (name.startsWith(\"java.\") ||\n\t\t\tname.startsWith(\"org.postgresql.pljava\"))\n\t\t{\n\t\t\tthrow new ClassNotFoundException(name); \n\t\t}\n\n\t\t/* Look to see if we have already loaded the class */\n\t\tClass c = findLoadedClass(name);\n\t\tif (c != null)\n\t\t\treturn c;\n\n\t\t/* Check for the class within our jar */\n\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\tbyte[] entryImg = (byte[]) m_entries.get(path);\n\t\t\n\t\t/* If not found, raise an exception */\n\t\tif (entryImg == null)\n\t\t\tthrow new ClassNotFoundException(name);\n\n\t\t/* create a package for the class */\n\t\tdefinePackage(name);\n\n\t\t/* otherwise convert the image to a class and return it */\n\t\treturn defineClass(name, entryImg, 0, entryImg.length);\n\t}",
"private ServletUtils() { }",
"public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {\n MyClassLoader mcl = new MyClassLoader(\"myClassLoader1\");\n// // 根据全限定名加载,注意,这里调用loadClass方法\n// Class<?> clazz = mcl.loadClass(\"Student\");\n// Student student = (Student)clazz.newInstance();\n Object o = mcl.loadClass(\"Student\").newInstance();\n o.getClass().getMethod(\"shuchu\").invoke(o);\n// student.shuchu();\n// List<Integer> list = new ArrayList<>();\n// Object o = new Object();\n System.out.println(o.getClass().getClassLoader());\n// System.out.println(list.getClass().getClassLoader());\n// System.out.println(o.getClass().getClassLoader());\n byte[] allocation1, allocation2;\n allocation1 = new byte[30900 * 1024*2];\n allocation2 = new byte[900 * 1024*2];\n\n\n }",
"private String fixClassName(String strClassName) {\r\n\t\tstrClassName = strClassName.replace('\\\\', '.');\r\n\t\tstrClassName = strClassName.replace('/', '.');\r\n\t\tstrClassName = strClassName.substring(0, strClassName.length() - 6);\r\n\t\t// remove \".class\"\r\n\t\treturn strClassName;\r\n\t}",
"public static List<ClassLoader> findAllClassLoaders(final LogNode log) {\n // Need both a set and a list so we can keep them unique, but in an order that (hopefully) reflects\n // the order in which the JDK calls classloaders.\n //\n // See:\n // https://docs.oracle.com/javase/8/docs/technotes/tools/findingclasses.html\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n //\n final AdditionOrderedSet<ClassLoader> classLoadersSet = new AdditionOrderedSet<>();\n\n // Look for classloaders on the call stack\n // Find the first caller in the call stack to call a method in the FastClasspathScanner package\n ClassLoader callerLoader = null;\n if (CALLER_RESOLVER == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \" could not create \"\n + CallerResolver.class.getSimpleName() + \", current SecurityManager does not grant \"\n + \"RuntimePermission(\\\"createSecurityManager\\\")\");\n }\n } else {\n final Class<?>[] callStack = CALLER_RESOLVER.getClassContext();\n if (callStack == null) {\n if (log != null) {\n log.log(ClasspathFinder.class.getSimpleName() + \": \" + CallerResolver.class.getSimpleName()\n + \"#getClassContext() returned null\");\n }\n } else {\n final String fcsPkgPrefix = FastClasspathScanner.class.getPackage().getName() + \".\";\n int fcsIdx;\n for (fcsIdx = callStack.length - 1; fcsIdx >= 0; --fcsIdx) {\n if (callStack[fcsIdx].getName().startsWith(fcsPkgPrefix)) {\n break;\n }\n }\n if (fcsIdx < 0 || fcsIdx == callStack.length - 1) {\n // Should not happen\n throw new RuntimeException(\"Could not find caller of \" + fcsPkgPrefix + \"* in call stack\");\n }\n\n // Get the caller's current classloader\n callerLoader = callStack[fcsIdx + 1].getClassLoader();\n }\n }\n boolean useCallerLoader = callerLoader != null;\n\n // Get the context classloader\n final ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();\n boolean useContextLoader = contextLoader != null;\n\n // Get the system classloader\n final ClassLoader systemLoader = ClassLoader.getSystemClassLoader();\n boolean useSystemLoader = systemLoader != null;\n\n // Establish descendancy relationships, and ignore any classloader that is an ancestor of another.\n if (useCallerLoader && useContextLoader && isDescendantOf(callerLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useCallerLoader && isDescendantOf(contextLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useSystemLoader && useContextLoader && isDescendantOf(systemLoader, contextLoader)) {\n useContextLoader = false;\n }\n if (useContextLoader && useSystemLoader && isDescendantOf(contextLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (useSystemLoader && useCallerLoader && isDescendantOf(systemLoader, callerLoader)) {\n useCallerLoader = false;\n }\n if (useCallerLoader && useSystemLoader && isDescendantOf(callerLoader, systemLoader)) {\n useSystemLoader = false;\n }\n if (!useCallerLoader && !useContextLoader && !useSystemLoader) {\n // Should not happen\n throw new RuntimeException(\"Could not find a usable ClassLoader\");\n }\n // There will generally only be one class left after this. In rare cases, you may have a separate\n // callerLoader and contextLoader, but those cases are ill-defined -- see:\n // http://www.javaworld.com/article/2077344/core-java/find-a-way-out-of-the-classloader-maze.html?page=2\n // We specifically add the classloaders in the following order however, so that in the case that there\n // are two of them left, they are resolved in this order. The relative ordering of callerLoader and\n // contextLoader is due to the recommendation at the above URL.\n if (useSystemLoader) {\n classLoadersSet.add(systemLoader);\n }\n if (useCallerLoader) {\n classLoadersSet.add(callerLoader);\n }\n if (useContextLoader) {\n classLoadersSet.add(contextLoader);\n }\n\n final List<ClassLoader> classLoaders = classLoadersSet.getList();\n if (log != null) {\n for (final ClassLoader classLoader : classLoaders) {\n log.log(\"Found ClassLoader \" + classLoader.toString());\n }\n log.addElapsedTime();\n }\n return classLoaders;\n }",
"public void importClass(String klass) throws Exception;",
"ClassLoader getWebComponentClassLoader(URI componentId);",
"@Override\n\tpublic void setClassMissing() {\n\n\t}",
"private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }",
"public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }",
"private Class m16122a(String str) {\n try {\n return Class.forName(str);\n } catch (ClassNotFoundException unused) {\n return null;\n }\n }",
"public abstract Class resolveClass(GenerationContext context);",
"private boolean isInstanceOfNoAnnotationURLClassLoader(ClassLoader loader)\r\n {\r\n Class parent = loader.getClass();\r\n while (parent != null)\r\n {\r\n if (\"NoAnnotationURLClassLoader\".equals(parent.getSimpleName()))\r\n {\r\n return true;\r\n }\r\n parent = parent.getSuperclass();\r\n }\r\n return false;\r\n }",
"public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}",
"private static URL[] findJARs() {\n\tFilenameFilter filter = new FilenameFilter() {\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\tString lcname = name.toLowerCase();\n//System.out.println(lcname+\" => \"+(lcname.endsWith(\".jar\") && !lcname.startsWith(\"multivalent\")));\n\t\t\treturn lcname.endsWith(\".jar\") && !lcname.startsWith(\"multivalent\")/*no snapshots*/ && new File(dir, name).canRead();\n\t\t}\n\t};\n\n\t// look for JARs in same directory (or, during development, in c:/temp)\n//\tFile dir;\n\tString jar = URIs.decode/*in case space in path*/(Multivalent.class.getResource(\"Multivalent.class\").toString());\n//System.out.println(\"Bootstrap res = \"+jar);\n\tString top;\n\tif (jar.startsWith(\"jar:\")) { // deployment: e.g., \"jar:file:/C:/temp/Multivalent20011127.jar!/multivalent/Multivalent.class\"\n\t\tjar = jar.substring(\"jar:file:\".length(), jar.indexOf('!'));\n\t\ttop = jar.substring(0, jar.lastIndexOf('/')+1);\n\t//} else if (new File(\"/c:/temp\").exists()) { // my development => CLASSPATH\n\t//\ttop = \"/c:/temp\";\n\t\t// CLASSPATH is selfsame JAR -- ignore as ClassLoader gets anyhow\n\n\t} else { // others' development: e.g., \"file:/D:/prj/Multivalent/www/jar/multivalent/Multivalent.class\"\n\t\tint inx = jar.lastIndexOf('/'); // chop \"Multivalent.class\"\n\t\tinx = jar.lastIndexOf('/', inx-1); // chop \"multivalent\"\n\n\t\tjar = jar.substring(\"file:\".length(), inx+1);\n//System.out.println(\"jar = \"+jar);\n\t\ttop = jar;\n\t}\n\n\n\tList urls = new ArrayList(20);\n\n\tif (standalone_) System.out.println(\"Searching for JARs in \"+top);\n\ttry {\n\t\tFile[] f = new File(top).listFiles(filter);\n\t\tfor (int i=0,imax=f.length; i<imax; i++) {\n\t\t\turls.add(f[i].toURI().toURL());\n\t\t\tif (standalone_) System.out.println(\"\\t\"+f[i]);\n\t\t}\n\t} catch (MalformedURLException canthappen) { System.err.println(canthappen/*f[i]*/); System.err.println(\"Move to different directory\"); }\n\n\treturn (URL[])urls.toArray(new URL[0]);\n }",
"public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}",
"private String getClassName(String fileName){\n String className = FilenameUtils.getBaseName(fileName);\n return className;\n }",
"protected ClassLoader getClassLoader() throws PortletException {\n return getClass().getClassLoader();\n }",
"@Override\n protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {\n // First, check if the class has already been loaded\n Class<?> c = findLoadedClass(name);\n if (c == null) {\n try {\n\n // Next, try to resolve it from the mutated path. \n c = super.findClass(name);\n } catch (ClassNotFoundException e) {\n // And if all else fails delegate to the parent.\n c = super.loadClass(name, resolve);\n }\n }\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }",
"private Class<?> loadClass(String className) {\n try {\n return Class.forName(className);\n } catch (ClassNotFoundException ignore) {\n return null;\n }\n }",
"private void checkClassName(String className) throws ClassNotFoundException {\n StringTokenizer tokenizer = new StringTokenizer(className, \".\");\n boolean first = true;\n while (tokenizer.hasMoreTokens()) {\n String token = tokenizer.nextToken();\n // Each dot-separated piece must be a valid identifier\n // and the first token can also be \"*\". (Note that\n // numeric class ids are not permitted. They must\n // match a loaded class.)\n if (!Utils.isJavaIdentifier(token) && !(first && token.equals(\"*\"))) {\n throw new ClassNotFoundException();\n }\n first = false;\n }\n }",
"public Class<?> loadApplicationClass(String name) {\n \n for (GraphClassLoader graphClassLoader : this.classLoaders) {\n Class<?> loadClass = graphClassLoader.loadApplicationClass(name, \n false //don't try delegate\n );\n \n if (logger.isDebugEnabled()) {\n logger.debug(\"Attempting to load class \" + name + \" from classloader \" + graphClassLoader + \" on behalf of delegate \" + this);\n }\n \n if (loadClass != null) {\n return loadClass;\n }\n }\n \n return null;\n }",
"protected void loadRoutesFromClasses(final App app){\n\t\t//Load web app's routes.\n log.debug(\"Load routes[base-path=/] from classes in base package '{}'\", app.getBasePackage());\n\t\tfinal String basePackage = app.getBasePackage();\n\t\tapp.config().getResources().processClasses((cls) -> {\n\t\t\tif(cls.getName().startsWith(basePackage)){\n\t\t\t\tif(as.isControllerClass(cls)){\n log.debug(\" Load controller '{}'\", cls.getName());\n\t\t\t\t\tloadControllerClass(app, \"/\", cls);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t//Load web module's routes.\n\t\tfor(ModuleConfig module : app.getWebConfig().getModules()){\n\t\t\t// don't repeat load controller\n\t\t\tif(Strings.startsWith(module.getBasePackage()+\".\",basePackage+\".\")){\n\t\t\t\tif(Strings.isEmpty(module.getBasePath())||Strings.equals(\"/\",module.getBasePath())){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n log.debug(\"Scanning module resource(s) in package '{}'...\", module.getBasePackage());\n ResourceSet rs = Resources.scanPackage(module.getBasePackage());\n\n if(rs.isEmpty()) {\n log.info(\"No resource scanned in base package '{}' of module '{}', is the module exists?\",\n\t\t\t\t\t\tmodule.getBasePackage(), module.getName());\n }else{\n String appContextPath = app.getContextPath().equals(\"\") ? \"/\" : app.getContextPath();\n String moduleContextPath = module.getContextPath();\n\n if(Strings.isEmpty(moduleContextPath) || appContextPath.equals(moduleContextPath)) {\n\n log.debug(\"Load routes[base-path={}' from classes in base package '{}' of module '{}'.\",\n module.getBasePath(), module.getBasePackage(), module.getName());\n\n rs.processClasses((cls) -> {\n if(as.isControllerClass(cls)) {\n loadControllerClass(app, module.getBasePath(), cls);\n }\n });\n\n }\n }\n }\n\t}",
"@Override\n public Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {\n return null;\n }",
"private String trimClassPaths (String s) {\n int idx = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == '.') {\n idx = i;\n break;\n }\n }\n String trimmed = s.substring(idx + 1);\n return trimmed;\n }",
"private static boolean classExists(String className) {\n\t\tClass<?> theLogicClass = null;\n\t\ttry {\n\t\t\ttheLogicClass = ClassLoaderManager.getInstance().getLogicClassFromName(className);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t// Do nothing\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tlog.debug(\"SystemBusinessLogicFinder.classExists : candidate logic class \" + \n\t\t\t\t\t\tclassName + \" was not found - ignoring\");\n\t\t\t\tif (ex.getCause() == null || ! (ex.getCause() instanceof ClassNotFoundException)) {\n\t\t\t\t\tlog.debug(\"Error while loading logic class \" + className, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theLogicClass != null;\n\t}",
"private static Class<?> loadClass(String className) {\n\t\tClass<?> theLogicClass = null;\n\t\ttry {\n\t\t\ttheLogicClass = ClassLoaderManager.getInstance().getLogicClassFromName(className);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Unable to load logic class: \" + className, ex);\n\t\t}\n\t\treturn theLogicClass;\n\t}",
"private Servlets() {\n\t\tthrow new AssertionError();\n\t}",
"@Test\r\n public void testImportStringPriorities() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser0 = TypeParsers.create();\r\n typeParser0.addImport(\"java.awt.List\");\r\n typeParser0.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser0.parse(\"List\");\r\n assertEquals(t0, java.awt.List.class);\r\n \r\n TypeParser typeParser1 = TypeParsers.create();\r\n typeParser1.addImport(\"java.awt.*\");\r\n typeParser1.addImport(\"java.util.List\");\r\n\r\n Type t1 = typeParser1.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n \r\n }",
"private RubyClass defineClassIfAllowed(String name, RubyClass superClass) {\n if (superClass != null && profile.allowClass(name)) {\n return defineClass(name, superClass, superClass.getAllocator());\n }\n return null;\n }",
"protected ClassLoader getRestrictedClassloader(Profile profile) throws MalformedURLException\n {\n StringContainsClassRestrictor recipeLoader = null;\n URL libUrl = servletContext.getResource(\"/WEB-INF/\" + RECIPE_LIBRARY_PATH + \"/\" + profile.getRecipeLibraryFile());\n recipeLoader = new StringContainsClassRestrictor(new URL[] { libUrl }, servletContext.getClassLoader(), RESTRICTED_PACKAGES);\n return recipeLoader;\n }",
"java.lang.String getClassName();",
"public void testJavaClassRepository874() throws Exception {\n\t\tJavaClassRepository var2730 = new JavaClassRepository();\n\t\tvar2730.getClass(Gadget.class.getCanonicalName());\n\t\tvar2730.getClass(LoDStaticCall.class.getCanonicalName());\n\t}",
"private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }",
"@Test\r\n public void testOnDemandImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser.parse(\"List\");\r\n assertEquals(t0, java.util.List.class);\r\n }",
"public String getClassName();",
"private ClassUtil() {}",
"private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 654 */ String str = param2Class.getName();\n/* 655 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }",
"private Class<?> getClassFromHistoryEntry(final String clazz) {\n try {\n return Class.forName(clazz);\n } catch (ClassNotFoundException cnfe) {\n // I know this can't happen\n }\n \n return null;\n }",
"public static String getAppJarName() {\n try {\n String r = (String)Class.forName(\"hr.restart.util.IntParam\")\n .getMethod(\"getTag\", new Class[] {String.class})\n .invoke(null, new Object[] {\"appjarname\"});\n System.out.println(\"appjarname = \"+r);\n return r.equals(\"\")?\"ra-spa.jar\":r;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"ra-spa.jar\";\n }",
"private static boolean matchesPackage(Class<?> param2Class, String param2String) {\n/* 656 */ String str = param2Class.getName();\n/* 657 */ return (str.startsWith(param2String) && str.lastIndexOf('.') == param2String.length() - 1);\n/* */ }",
"private List<ExtensionClassLoader> getClassLoaders() {\n final List<ExtensionClassLoader> classLoaders = new ArrayList<>();\n\n // start with the class loader that loaded ExtensionManager, should be WebAppClassLoader for API WAR\n final ExtensionClassLoader frameworkClassLoader = new ExtensionClassLoader(\"web-api\", new URL[0], this.getClass().getClassLoader());\n classLoaders.add(frameworkClassLoader);\n\n // we want to use the system class loader as the parent of the extension class loaders\n ClassLoader systemClassLoader = FlowPersistenceProvider.class.getClassLoader();\n\n // add a class loader for each extension dir\n final Set<String> extensionDirs = properties.getExtensionsDirs();\n for (final String dir : extensionDirs) {\n if (!StringUtils.isBlank(dir)) {\n final ExtensionClassLoader classLoader = createClassLoader(dir, systemClassLoader);\n if (classLoader != null) {\n classLoaders.add(classLoader);\n }\n }\n }\n\n return classLoaders;\n }"
] | [
"0.5954853",
"0.54999304",
"0.5471964",
"0.54456943",
"0.5395812",
"0.5386149",
"0.5386149",
"0.5316394",
"0.5278457",
"0.5257799",
"0.52521217",
"0.52493083",
"0.5203976",
"0.5181742",
"0.5181742",
"0.5165888",
"0.51653147",
"0.5120923",
"0.511131",
"0.51068395",
"0.51041317",
"0.50860935",
"0.5073056",
"0.5062715",
"0.5055994",
"0.5038029",
"0.5017832",
"0.5011976",
"0.5004765",
"0.49917397",
"0.49669376",
"0.49485928",
"0.49372336",
"0.4936471",
"0.49130896",
"0.4904885",
"0.490107",
"0.48869956",
"0.48694733",
"0.4866299",
"0.48615795",
"0.4852001",
"0.48502755",
"0.48436803",
"0.48425236",
"0.48415315",
"0.4837658",
"0.48103535",
"0.480879",
"0.48036572",
"0.4801073",
"0.47985896",
"0.47913668",
"0.47881877",
"0.47876424",
"0.47762305",
"0.47735256",
"0.4758741",
"0.47582",
"0.47578982",
"0.47577366",
"0.4748842",
"0.47484767",
"0.4744544",
"0.47414088",
"0.4740806",
"0.47385278",
"0.4736906",
"0.47361106",
"0.47321078",
"0.4730409",
"0.47284144",
"0.47241107",
"0.47207984",
"0.47207394",
"0.47118688",
"0.47081012",
"0.4707964",
"0.4707732",
"0.47052377",
"0.4704818",
"0.46962032",
"0.46955293",
"0.46912608",
"0.4689982",
"0.4682119",
"0.46820483",
"0.46756423",
"0.4662603",
"0.4662225",
"0.4659607",
"0.4652865",
"0.4652441",
"0.46482694",
"0.46473706",
"0.4641154",
"0.4639995",
"0.46387258",
"0.4636693",
"0.46256694",
"0.46255472"
] | 0.0 | -1 |
features can be singleobj or objarrays, sumup all counts. | public static int fullSize(Object... features) {
if (features == null) {
return 0;
}
int size = 0;
for (Object feature: features) {
if (feature instanceof Object[]) {
size += ((Object[]) feature).length;
} else if (feature instanceof Collection) {
size += ((Collection<?>) feature).size();
} else {
size++;
}
}
return size;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int countTypedFeatures();",
"int countFeatures();",
"int countFeatures();",
"int getFeaturesCount();",
"public int getFeaturesCount();",
"protected Long getOverallStats(List<PropertyType> featuresWithType, List<Statistic> stats, NxQueryBuilder qb) {\n for (PropertyType prop : featuresWithType) {\n String propName = prop.getName();\n if (prop.getType() != null) {\n switch (prop.getType()) {\n case CATEGORY_TYPE:\n case TEXT_TYPE:\n // TODO assuming that text is a property ! could be a blob\n qb.addAggregate(makeAggregate(AGG_MISSING, propName, EMPTY_PROPS));\n qb.addAggregate(makeAggregate(AGG_TYPE_TERMS, propName, TERM_PROPS));\n qb.addAggregate(makeAggregate(AGG_CARDINALITY, propName, EMPTY_PROPS));\n break;\n case IMAGE_TYPE:\n qb.addAggregate(makeAggregate(AGG_MISSING, contentProperty(propName), EMPTY_PROPS));\n break;\n default:\n // Only 3 types at the moment, we would need numeric type in the future. //\n }\n } else {\n // Assuming without type it is text or category !\n qb.addAggregate(makeAggregate(AGG_MISSING, propName, EMPTY_PROPS));\n }\n }\n EsResult esResult = Framework.getService(ElasticSearchService.class).queryAndAggregate(qb);\n stats.addAll(esResult.getAggregates().stream().map(Statistic::from).collect(Collectors.toList()));\n long total = esResult.getElasticsearchResponse().getHits().getTotalHits().value;\n stats.add(Statistic.of(STATS_TOTAL, STATS_TOTAL, STATS_TOTAL, null, total));\n\n return total;\n }",
"int getFeatureCount();",
"int sizeOfFeatureArray();",
"int sizeOfFeatureArray();",
"public int getFeatureCount() {\n\r\n\t\treturn _features.length;\r\n\t}",
"public int numberOfFeatures(){\n\t\treturn indexByFeature.keySet().size();\n\t}",
"public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$6);\r\n }\r\n }",
"public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$6);\r\n }\r\n }",
"public int sizeOfFeatureArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FEATURE$14);\r\n }\r\n }",
"int sizeOfPlanFeatureArray();",
"long getFeaturesUsed();",
"public void increaseFeatureCount() {\n this.featureCount++;\n }",
"public int numFeatures() {\n return FTypes.values().length;\n }",
"private void initializeSentimentFeaturesCount() {\n\t\tint count = 0;\n\n\t\t// Number of positive words\n\t\tif (Features.isNumberOfPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of negative words\n\t\tif (Features.isNumberOfNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional positive words\n\t\tif (Features.isNumberOfHighlyEmoPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional negative words\n\t\tif (Features.isNumberOfHighlyEmoNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized positive words\n\t\tif (Features.isNumberOfCapitalizedPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized Negative Words\n\t\tif (Features.isNumberOfCapitalizedNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Ratio of Emotional Words\n\t\tif (Features.isRatioOfEmotionalWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Positive Emoticons\n\t\tif (Features.isNumberOfPositiveEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Emoticons\n\t\tif (Features.isNumberOfNegativeEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Neutral\" Emoticons\n\t\tif (Features.isNumberOfNeutralEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Joking\" Emoticons\n\t\tif (Features.isNumberOfJokingEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Slangs\n\t\tif (Features.isNumberOfPositiveSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Slangs\n\t\tif (Features.isNumberOfNegativeSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Hashtags\n\t\tif (Features.isNumberOfPositiveHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Negative Hashtags\n\t\tif (Features.isNumberOfNegativeHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Words\n\t\tif (Features.isContrastWordsVsWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Hashtags\n\t\tif (Features.isContrastWordsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Emoticons\n\t\tif (Features.isContrastWordsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Hashtags\n\t\tif (Features.isContrastHashtagsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Emoticons\n\t\tif (Features.isContrastHashtagsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSelectBasicFeaturesWindow.setNumberOfSentimentRelatedFeatures(count);\n\t\tSelectBasicFeaturesWindow.countOfSentimentRelatedFeatures.set(count);\n\t}",
"public void count() {\n\t\talgae = -1;\n\t\tcrab = -1;\n\t\tbigFish = -1;\n\t\tfor(GameObjects o: objects) {\n\t\t\tswitch(o.toString()) {\n\t\t\tcase \"algae\":\n\t\t\t\talgae +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"crab\":\n\t\t\t\tcrab +=1;\n\t\t\t\tbreak;\n\t\t\tcase \"big fish\":\n\t\t\t\tbigFish +=1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public Map<String, Integer> getFeatures(List<String> objects) {\n\n HashMap<String, Integer> features = new HashMap<>();\n\n for (String cCategory : objects) {\n //Create feature name by add \n //language + the prefix boolean + the feature name to Lower Case + true/false\n String[] tmpSplit = cCategory.toLowerCase().split(\":\");\n String featureName = tmpSplit[0].trim();\n\n String featureTrue\n = language\n + \".boolean.\"\n + featureName\n + \".true\";\n\n String featureFalse\n = language\n + \".boolean.\"\n + featureName\n + \".false\";\n\n if (Boolean.parseBoolean(tmpSplit[1])) {\n //Add featureTrue ton Map with value 1\n features.put(featureTrue, 1);\n //Add featureFalse ton Map with value 1\n features.put(featureFalse, 0);\n } else {\n //Add featureTrue ton Map with value 1\n features.put(featureTrue, 0);\n //Add featureFalse ton Map with value 1\n features.put(featureFalse, 1);\n }\n }\n\n return features;\n }",
"public int getProcessedCount()\r\n {\r\n return myFeatureCount;\r\n }",
"private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }",
"void documentFrequncy(Set<String> features,\n int index,\n int troush\n ) {\n for (String str : features) {\n switch (index) {\n case 1:\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyeco.put(str, e);\n }\n e = 0;\n break;\n case 2:\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyedu.put(str, e);\n }\n e = 0;\n break;\n case 3:\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyspo.put(str, e);\n }\n e = 0;\n break;\n case 4:\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencycul.put(str, e);\n }\n e = 0;\n break;\n case 5:\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyaccid.put(str, e);\n }\n e = 0;\n break;\n case 6:\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyenv.put(str, e);\n }\n e = 0;\n break;\n case 7:\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencydep.put(str, e);\n }\n e = 0;\n break;\n case 8:\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencylaw.put(str, e);\n }\n e = 0;\n break;\n case 9:\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyagri.put(str, e);\n }\n e = 0;\n break;\n case 10:\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencypoltics.put(str, e);\n }\n e = 0;\n break;\n// case 11:\n//\n// for (int i = 0; i < count11; i++) {\n// if (social_affairsdocument[i].contains(str)) {\n// e++;\n// }\n// }\n// if (e > troush) {\n// documntfrequencysocial.put(str, e);\n// }\n// e = 0;\n// break;\n case 11:\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencysci.put(str, e);\n }\n e = 0;\n break;\n case 12:\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(str)) {\n e++;\n }\n }\n if (e > troush) {\n documntfrequencyhel.put(str, e);\n }\n e = 0;\n break;\n case 13:\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(str)) {\n e++;\n }\n }\n\n if (e > troush) {\n documntfrequencyarmy.put(str, e);\n }\n e = 0;\n break;\n default:\n break;\n }\n\n }\n }",
"long count(Collection<? extends Object> values);",
"public int countFeatures(BoundingBox boundingBox) {\n return countFeatures(false, null, boundingBox);\n }",
"public void addClassesCounts(String[] classes){\n\n\t\tfor(String singleClass : classes){\n\n\t\t\t//if there is no entry at feature count level for this class add an empty entry\n\t\t\tif(featureCountTotalsPerClass.get(singleClass) == null){\n\t\t\t\tfeatureCountTotalsPerClass.put(singleClass, new LinkedHashMap<Integer, Integer>());\n\t\t\t}\n\n\t\t\t//same for the class counts (initialise to 1)\n\t\t\tif(classTotalCounts.get(singleClass) == null){\n\t\t\t\tclassTotalCounts.put(singleClass, 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//just add the count\n\t\t\t\tclassTotalCounts.put(singleClass, classTotalCounts.get(singleClass) + 1);\n\t\t\t}\n\n\t\t}\n\n\t}",
"private void countSubDataPropertyOfAxiomsMetric() {\r\n\t\tint subDataPropertyOfAxiomsCount = ontology.getAxiomCount(AxiomType.SUB_DATA_PROPERTY,\r\n\t\t\t\tOntologyUtility.ImportClosures(imports));\r\n\t\treturnObject.put(\"subDataPropertyOfAxioms\", subDataPropertyOfAxiomsCount);\r\n\r\n\t}",
"private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }",
"public int getFeaturesSize();",
"public void calcualteFeatureValue(Collection<Instance> instanceCollection);",
"public void addFeatureCount(int featureIndex, int initialFeatureCount, String[] classes){\n\t\t\n\t\tint featureCount = initialFeatureCount; \n\t\t\n\t\t//add feature count at class level\n\t\tfor(String singleClass : classes){\n\t\t\t//if there is no entry for the feature add the entry initialised to featureCount\n\t\t\tif(featureCountTotalsPerClass.get(singleClass).get(featureIndex) == null){\n\t\t\t\tfeatureCountTotalsPerClass.get(singleClass).put(featureIndex, featureCount);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//otherwise add feature count to the entry (we store the accumulator)\n\t\t\t\tfeatureCountTotalsPerClass.get(singleClass).put(featureIndex, featureCountTotalsPerClass.get(singleClass).get(featureIndex) + featureCount);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public int getFeaturesCount(Das2FeaturesQueryI query) { want to support fast way of determining feature count across entire genome assembly\n\t// query requirements to support fast method:\n\t// no overlaps, insides, excludes, coordinates, links, names, notes parameters\n\t// single captype parameter\n\t// note that this will be less efficient for \"split\" data types, where each sequence in the \n\t// assembly has its own table, thus requiring either querying each table or querying \n\t// mysql INFORMATION_SCHEMA.TABLES and summing across table counts. Fortunately there \n\t// appears to be a practical limit on the the number of tables one would need to query, \n\t// since for partial assemblies where the number of sequences in the assembly is likely \n\t// to be large (example, bosTau4, 12,000 sequences) UCSC doesn't use split tables \n\t// (I'm assuming to avoid for example 12,000 tables needed for a bosTau4 split data captype)\n\n\t// example of alternative with querying INFORMATION_SCHEMA.TABLES: \n\t// SELECT TABLE_NAME, TABLE_ROWS, UPDATE_TIME FROM INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = 'apiMel2' AND TABLE_NAME like '%_chainDm2';\n\t//\n\t// see http://stackoverflow.com/questions/1018336/getting-row-count-for-a-table-in-mysql\n\t// for argument for using INFORMATION_SCHEMA instead of \"select count(*)\", if mysql is \n\t// using InnoDB engine or if engine is unknown. If engine is known to be MyISAM then \n\t// \"select count(*)\" is fine. Based on current hgcentral.sql DB initialization script, \n\t// UCSC appears to only use MyISAM, but not sure if this will always be the case\n\t//\n\t// would also like to support fast method of feature count for a single sequence\n\t// but for many UCSC data types, this would require a much less efficient \n\t// select statement with a \"where\" clause, so not supporting this at least for no\n\t//\n\tint feat_count = 0;\n\tList<URI> types = query.getTypes();\n\tif (types.size() == 1 && \n\t query.getOverlaps().size() == 0 &&\n\t query.getInsides().size() == 0 &&\n\t query.getExcludes().size() == 0 && \n\t query.getCoordinates().size() == 0 &&\n\t query.getLinks().size() == 0 && \n\t query.getNames().size() == 0 &&\n\t query.getNotes().size() == 0 ) {\n\n\t URI typeuri = types.get(0);\n\t UcscType utype = (UcscType) getTypesCapability().getType(typeuri);\n\t boolean is_split = utype.isSplit();\n\t TrackType track_type = utype.getTrackType();\n\t String table_name_clause;\n\t if (is_split) {\n\t\ttable_name_clause = \"TABLE_NAME like '%_\" + utype.getName() + \"'\";\n\t }\n\t else {\n\t\ttable_name_clause = \"TABLE_NAME = '\" + utype.getTableName() + \"'\";\n\t }\n\t Connection conn = null;\n\t Statement stmt = null;\n\t ResultSet rs = null;\n\t try {\n\t\tconn = ucsc_version.getDbConnection();\n\t\tString genome_name = ucsc_version.getName();\n\t\t// String count_query = \"SELECT COUNT(*) FROM \" + utype.getName();\n\t\tString count_query = \"SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES \" + \n\t\t \"where TABLE_SCHEMA = '\" + genome_name + \"' AND \" + table_name_clause;\n\t\tstmt = conn.createStatement();\n\t\trs = stmt.executeQuery(count_query);\n\t\t// looping will cover both non-split cases (single entry) and \n\t\t// split cases (entry per sequence)\n\t\twhile (rs.next()) {\n\t\t if (is_split && rs.getString(\"TABLE_NAME\").startsWith(\"all_\")) {\n\t\t\t// skip \"all_***\" tables for split table types, since counts should be reflected \n\t\t\t// in individaul sequence tables\n\t\t\tcontinue;\n\t\t }\n\t\t else {\n\t\t\tfeat_count += rs.getInt(\"TABLE_ROWS\");\n\t\t }\n\t\t}\n\t\tif (DEBUG_ANNOT_COUNT) { System.out.println(utype.getName() + \" total annot count: \" + feat_count); }\n\t } catch (Exception ex) {\n\t\tLogger.getLogger(UcscFeaturesCapability.class.getName()).log(Level.SEVERE, null, ex);\n\t\tfeat_count = -1; // return feat_count of -1 ==> means couldn't be determined\n\t }\n\t finally {\n\t\ttry {\n\t\t if (rs != null) { rs.close(); }\n\t\t if (stmt != null) { stmt.close(); }\n\t\t if (conn != null) { conn.close(); }\n\t\t} catch (SQLException ex) { ex.printStackTrace(); }\n\t }\n\t}\n\t \n\telse {\n\t // can also easily add support for inefficient but more general query mechanism by \n\t // calling getFeatues(query), then doing response.getFeatures().size()\n\t //\tString count_query = \"SELECT COUNT(*) FROM \" + table_name;\n\n\t // return feat_count of -1 ==> means couldn't be determined\n\t feat_count = -1;\n\t}\n\treturn feat_count;\n }",
"public int size(Feature f){\n\t\treturn featureIndex(f).size();\n\t}",
"int getObjectAnnotationsCount();",
"int getObjectAnnotationsCount();",
"public int selectCount(Object[] obj) {\n\t\treturn 0;\n\t}",
"public int countFeatures(BoundingBox boundingBox, String where) {\n return countFeatures(false, null, boundingBox, where);\n }",
"public int countFeatures(BoundingBox boundingBox, String where,\n String[] whereArgs) {\n return countFeatures(false, null, boundingBox, where, whereArgs);\n }",
"@Override\n\tpublic boolean addAll(Collection<? extends SimpleFeature> collection) {\n\t\tboolean ret = super.addAll(collection);\n\t\tfor (SimpleFeature f : collection) {\n\t\t\taddToIndex(f);\n\t\t}\n\t\treturn ret;\n\t}",
"public Map<Integer, Boolean> testCategorization(String topic, String[] features) {\n\n\t\tint n = trainingSet.size(); // Count docs.\n\n\t\t// Count docs in class.\n\t\tint nc = 0;\n\t\tfor (Integer id : trainingSet) {\n\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\tif (inClass)\n\t\t\t\tnc++;\n\t\t}\n\n\t\tdouble prior_c = nc / (double) n;\n\t\tdouble prior_cbar = (n - nc) / (double) n;\n\n\t\tMap<String, Double> condProb_c = new HashMap<String, Double>();\n\t\tMap<String, Double> condProb_cbar = new HashMap<String, Double>();\n\n\t\t// Count docs in class containing term.\n\t\tfor (String term : features) {\n\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\tint nct_c = 0, nct_cbar = 0;\n\t\t\tfor (Integer id : trainingSet) {\n\t\t\t\tboolean inClass = this.getDocument(id).getTopics().contains(topic);\n\t\t\t\tif (postings.contains(id)) { // document contains the term\n\t\t\t\t\tif (inClass)\n\t\t\t\t\t\tnct_c++;\n\t\t\t\t\telse\n\t\t\t\t\t\tnct_cbar++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// And calculate conditional probabilities.\n\t\t\tcondProb_c.put(term, (nct_c + 1) / (double) (nc + 2));\n\t\t\tcondProb_cbar.put(term, (nct_cbar + 1) / (double) ((n - nc) + 2));\n\t\t}\n\n\t\t// ---APPLY BERNOULLI----\n\n\t\tMap<Integer, Boolean> marked = new HashMap<Integer, Boolean>();\n\t\tfor (Integer id : testSet) {\n\t\t\tdouble score_c = Math.log(prior_c);\n\t\t\tdouble score_cbar = Math.log(prior_cbar);\n\t\t\tfor (String term : features) {\n\t\t\t\tSet<Integer> postings = terms.get(term).getPostings().keySet();\n\t\t\t\tif (postings.contains(id)) {\n\t\t\t\t\tscore_c += Math.log(condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(condProb_cbar.get(term));\n\t\t\t\t} else {\n\t\t\t\t\tscore_c += Math.log(1 - condProb_c.get(term));\n\t\t\t\t\tscore_cbar += Math.log(1 - condProb_cbar.get(term));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (score_c > score_cbar)\n\t\t\t\tmarked.put(id, true);\n\t\t\telse\n\t\t\t\tmarked.put(id, false);\n\t\t}\n\t\treturn marked;\n\t}",
"public int getNumberOfFeatures() {\n\t\treturn numberOfFeatures;\n\t}",
"int countByExample(CollectExample example);",
"public Integer countAll();",
"public void compareFeatures() {\n computeDistances();\n evaluationLogic();\n // compute recall and precision\n recall = truePositiveCount / (truePositiveCount + falseNegativeCount);\n // avoid division by zero\n float denominator = truePositiveCount + falsePositiveCount;\n precision = denominator == 0 ? 0 : truePositiveCount / denominator;\n }",
"public int countFeatures(GeometryEnvelope envelope, String where) {\n return countFeatures(false, null, envelope, where);\n }",
"public int countFeatures(BoundingBox boundingBox, Projection projection) {\n return countFeatures(false, null, boundingBox, projection);\n }",
"public int countFeatures(GeometryEnvelope envelope) {\n return featureDao.countIn(queryIdsSQL(envelope));\n }",
"int getAggregateFunctionsCount();",
"private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"@Override\n public long count() {\n return super.doCountAll();\n }",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"public int countAll();",
"Integer countAll();",
"@Override\r\n\tpublic final <S extends MODEL> int countAll(Class<S> targetedEntity) {\r\n\t\tthrow DaoRuntimeException.UnSupportedFeatureError();\r\n\r\n\t}",
"public int countFeatures(BoundingBox boundingBox,\n Map<String, Object> fieldValues) {\n return countFeatures(false, null, boundingBox, fieldValues);\n }",
"public static int numberObjects()\r\n\t{\r\n\t\treturn(no_of_obj);\r\n\t}",
"public long countAll();",
"public int countFeatures(BoundingBox boundingBox, Projection projection,\n String where) {\n return countFeatures(false, null, boundingBox, projection, where);\n }",
"public int countFeatures(BoundingBox boundingBox, Projection projection,\n String where, String[] whereArgs) {\n return countFeatures(false, null, boundingBox, projection, where,\n whereArgs);\n }",
"public int getObjectCount() {\n\t\treturn objects.size(); // Replace with your code\n\t}",
"long countAll();",
"long countAll();",
"private double predictBySumming (org.apache.spark.mllib.linalg.Vector features) { throw new RuntimeException(); }",
"@Override\r\n\tpublic int dataCount(Map<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"void addFeatures(Features features);",
"int countByExample(CptDataStoreExample example);",
"public int countFeatures(GeometryEnvelope envelope, String where,\n String[] whereArgs) {\n return featureDao.countIn(queryIdsSQL(envelope), where, whereArgs);\n }",
"double calcScoreFromObjCount(double[] c_in, double[] c_out) {\r\n\t\t// / multi-class\r\n\t\tdouble diff, sum = 0, max_val = Double.NEGATIVE_INFINITY, min_val = Double.POSITIVE_INFINITY;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\tdiff = (c_in[i] - c_out[i]);\r\n\t\t\tif (diff > max_val) {\r\n\t\t\t\tmax_val = diff;\r\n\t\t\t}\r\n\t\t\tif (diff < min_val) {\r\n\t\t\t\tmin_val = diff;\r\n\t\t\t}\r\n\t\t\tsum += Math.abs(diff);\r\n\t\t}\r\n\t\treturn (sum - Math.abs(max_val) - Math.abs(min_val)) + Math.abs(max_val - min_val);\r\n\t}",
"int sizeOfClassificationArray();",
"int getMetricDescriptorsCount();",
"public Collection<Classification<F, C>> classifyDetailed(Collection<F> features) {\n return this.categoryProbabilities(features);\n }",
"public int size() {\n return mFeatureStructures.size();\n }",
"int getMetricCostsCount();",
"long countByExample(BaseCountractExample example);",
"int getInterestsCount();",
"public int countFeatures(BoundingBox boundingBox, Projection projection,\n Map<String, Object> fieldValues) {\n return countFeatures(false, null, boundingBox, projection, fieldValues);\n }",
"public boolean equals(Object o) {\n\n int i, j;\n\n if (o == this) return true;\n if (!(o instanceof Feature)) return false;\n Feature f = (Feature) o;\n if (!((((Feature.IS_NOMINAL(f.type)) && (Feature.IS_NOMINAL(type)))\n || ((Feature.IS_INTEGER(f.type)) && (Feature.IS_INTEGER(type)))\n || ((Feature.IS_CONTINUOUS(f.type)) && (Feature.IS_CONTINUOUS(type)))))) return false;\n\n if ((f.dmin_from_data != dmin_from_data)\n || (f.dmax_from_data != dmax_from_data)\n || (f.dmin != dmin)\n || (f.dmax != dmax)\n || (f.imin_from_data != imin_from_data)\n || (f.imax_from_data != imax_from_data)\n || (f.imin != imin)\n || (f.imax != imax)) return false;\n\n if (Feature.IS_NOMINAL(f.type)) {\n Vector<String> vf_test, v_test;\n if (f.modalities.size() != modalities.size()) return false;\n for (i = 0; i < f.modalities.size(); i++)\n if (!((String) f.modalities.elementAt(i)).equals(modalities.elementAt(i))) return false;\n\n if (f.tests.size() != tests.size()) return false;\n for (i = 0; i < f.tests.size(); i++) {\n vf_test = (Vector<String>) f.tests.elementAt(i);\n v_test = (Vector<String>) tests.elementAt(i);\n if (vf_test.size() != v_test.size()) return false;\n for (j = 0; j < vf_test.size(); j++)\n if (!((String) vf_test.elementAt(j)).equals(v_test.elementAt(j))) return false;\n }\n } else if (Feature.IS_INTEGER(f.type)) {\n if (f.tests.size() != tests.size()) return false;\n for (i = 0; i < f.tests.size(); i++)\n if (((Integer) f.tests.elementAt(i)).intValue()\n != ((Integer) tests.elementAt(i)).intValue()) return false;\n } else if (Feature.IS_CONTINUOUS(f.type)) {\n if (f.tests.size() != tests.size()) return false;\n for (i = 0; i < f.tests.size(); i++)\n if (((Double) f.tests.elementAt(i)).doubleValue()\n != ((Double) tests.elementAt(i)).doubleValue()) return false;\n }\n\n return true;\n }",
"int countByExample(AttributeExtendExample example);",
"@Test\n public void testElementCounts() {\n assertEquals(0, model3d.getBlocks().size());\n\n assertEquals(28, model3d.getEdges().size());\n assertEquals(16, model3d.getFaces().size());\n assertEquals(14, model3d.getPoints().size());\n }",
"void dfUnion() {\n // economic class\n listallDf.clear();\n alldf.clear();\n documentFrequncy(ecofeature, 1, 40);\n dfeco = new ArrayList(documntfrequencyeco.keySet());\n alldf.addAll(dfeco);\n // education class\n documentFrequncy(edufeature, 2, 40);\n dfedu = new ArrayList(documntfrequencyedu.keySet());\n alldf.addAll(dfedu);\n //sport \n documentFrequncy(spofeature, 3, 40);\n dfspo = new ArrayList(documntfrequencyspo.keySet());\n alldf.addAll(dfspo);\n // cultureal document\n documentFrequncy(culfeature, 4, 40);\n dfcul = new ArrayList(documntfrequencycul.keySet());\n alldf.addAll(dfcul);\n //accident\n documentFrequncy(accfeature, 5, 35);\n dfacc = new ArrayList(documntfrequencyaccid.keySet());\n alldf.addAll(dfacc);\n //environmental protection\n documentFrequncy(envfeature, 6, 40);\n dfenv = new ArrayList(documntfrequencyenv.keySet());\n alldf.addAll(dfenv);\n //deplomatic relation\n documentFrequncy(depfeature, 7, 35);\n dfdep = new ArrayList(documntfrequencydep.keySet());\n alldf.addAll(dfdep);\n //law and justice\n documentFrequncy(lawfeature, 8, 28);\n dflaw = new ArrayList(documntfrequencylaw.keySet());\n alldf.addAll(dflaw);\n //agriculture class\n documentFrequncy(agrifeature, 9, 42);\n dfagr = new ArrayList(documntfrequencyagri.keySet());\n alldf.addAll(dfagr);\n //poltical news class\n documentFrequncy(polfeature, 10, 40);\n dfpol = new ArrayList(documntfrequencypoltics.keySet());\n alldf.addAll(dfpol);\n //science class\n documentFrequncy(scifeature, 11, 40);\n dfsci = new ArrayList(documntfrequencysci.keySet());\n alldf.addAll(dfsci);\n //health class\n documentFrequncy(helfeature, 12, 40);\n dfhel = new ArrayList(documntfrequencyhel.keySet());\n alldf.addAll(dfhel);\n //arrmy class\n documentFrequncy(armfeature, 13, 37);\n dfarm = new ArrayList(documntfrequencyarmy.keySet());\n alldf.addAll(dfarm);\n listallDf.addAll(alldf);\n\n }",
"int getMetricValuesCount();",
"public com.flexnet.opsembedded.webservices.NumberQueryType getFeatureCount() {\n return featureCount;\n }",
"public int countFeatures(boolean distinct, String column,\n BoundingBox boundingBox, String where, String[] whereArgs) {\n return countFeatures(distinct, column, boundingBox.buildEnvelope(),\n where, whereArgs);\n }",
"int countByExample(GoodexistsingleExample example);",
"int countByExample(RepStuLearningExample example);",
"int countByExample(UTbInvCategoryExample example);",
"int countObjectFlowStates();",
"public int countFeatures(boolean distinct, String column,\n BoundingBox boundingBox, String where) {\n return countFeatures(distinct, column, boundingBox, where, null);\n }"
] | [
"0.6707104",
"0.66279286",
"0.66279286",
"0.64317447",
"0.6409779",
"0.61893094",
"0.6135236",
"0.6066138",
"0.6066138",
"0.6047535",
"0.5993273",
"0.5941767",
"0.5941767",
"0.5777212",
"0.57622564",
"0.5752593",
"0.56094986",
"0.5607409",
"0.559816",
"0.55824107",
"0.55396765",
"0.5528958",
"0.5526498",
"0.5525101",
"0.55228615",
"0.5507052",
"0.5505827",
"0.54880786",
"0.54383606",
"0.5429116",
"0.541819",
"0.5401329",
"0.53724724",
"0.5368848",
"0.53110915",
"0.53110915",
"0.5282241",
"0.5255844",
"0.52311397",
"0.5219271",
"0.52172095",
"0.5192881",
"0.5158572",
"0.5157259",
"0.5129512",
"0.512864",
"0.5122195",
"0.5120423",
"0.51196516",
"0.510856",
"0.50998724",
"0.50998724",
"0.50998724",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.5095908",
"0.50768137",
"0.50511134",
"0.5048088",
"0.5036478",
"0.5033509",
"0.5025826",
"0.50048554",
"0.5004466",
"0.49981198",
"0.49981198",
"0.49858093",
"0.4974233",
"0.4969047",
"0.49592155",
"0.4944798",
"0.49345294",
"0.49192593",
"0.49006173",
"0.48859447",
"0.48769277",
"0.48556098",
"0.48337734",
"0.48263583",
"0.4820866",
"0.48160008",
"0.48117918",
"0.48108572",
"0.48079982",
"0.48075593",
"0.48064888",
"0.48021406",
"0.47986656",
"0.47956765",
"0.47920552",
"0.47815168",
"0.47784165"
] | 0.701035 | 0 |
compute feautre's value according to attrib. | public static double featureValue(Attribute attrib, Object feature) {
switch (attrib.type()) {
case Attribute.NOMINAL:
classCheck(attrib, feature, String.class);
int idx = attrib.indexOfValue((String)feature);
if (idx == -1) {
onIllegalArg(attrib, feature);
}
return (double)idx;
case Attribute.NUMERIC:
if (feature instanceof Number) {
return (Double)feature;
} else if (feature instanceof String) {
try {
return Double.valueOf((String) feature).doubleValue();
} catch (NumberFormatException e) {
// fall through to throw
}
}
onIllegalArg(attrib, feature);
case Attribute.STRING:
classCheck(attrib, feature, String.class);
return attrib.addStringValue((String)feature);
case Attribute.DATE:
classCheck(attrib, feature, String.class);
try {
return attrib.parseDate((String)feature);
} catch (ParseException e) {
onIllegalArg(attrib, feature);
}
case Attribute.RELATIONAL:
classCheck(attrib, feature, String.class);
try {
ArffReader arff = new ArffReader(new StringReader((String) feature), attrib.relation(), 0);
return attrib.addRelation(arff.getData());
} catch (Exception e) {
onIllegalArg(attrib, feature);
}
default:
onIllegalArg(attrib, feature);
}
return -1; // can't get here, infact.
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract float getValue(Entity e,FloatTrait t);",
"public double getFlete(){\n return localFlete;\n }",
"public void setFlete(double param){\n \n this.localFlete=param;\n \n\n }",
"public Float getFloatAttribute();",
"float getValue();",
"float getValue();",
"float getValue();",
"public abstract float getValue();",
"public int getFECHACRREVAL() {\n return fechacrreval;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Attrib getAttrib() {\r\n return attrib;\r\n }",
"float calcularFinal(){\n return (calif1*0.3f)+(calif2*0.3f)+(calif3*0.4f);// debo agregar la f para que lo tome como float y no como double\r\n }",
"public double getF();",
"public int getFe() {\n return fe;\n }",
"double getBasedOnValue();",
"int getFeatureValue();",
"public void setMontoFacturado(double param){\n \n this.localMontoFacturado=param;\n \n\n }",
"public int getFilial();",
"public int getFila(){\n\t\treturn fila;\n\t}",
"public abstract double getPreis();",
"final public float getFloatAttr() {\r\n\t\t\tif(mName.length() == 0)\r\n\t\t\t\treturn -1;\r\n\t\t\tif(mSaveAttr == null)\r\n\t\t\t\treturn getAttr(mName).Value;\r\n\t\t\treturn mSaveAttr.Value;\r\n\t\t}",
"protected abstract void setValue(Entity e,FloatTrait t,float value);",
"public Float getFloat(String attr) {\n return (Float) super.get(attr);\n }",
"@Override\n\tpublic double value(final Attribute att) {\n\t\treturn 0;\n\t}",
"public void setF(){\n\t\tf=calculateF();\n\t}",
"public float carga(){\n return (this.capacidade/this.tamanho);\n }",
"float getIva();",
"final public float getFloatAttr(final String name) {\r\n\t\tfor(final Attr attr : mAttributes) {\r\n\t\t\tif(attr.Name.equals(name))\r\n\t\t\t\treturn attr.Value;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public int getFila() {\r\n\t\treturn fila;\r\n\t}",
"public int getFila() {\r\n\t\treturn fila;\r\n\t}",
"public void calcualteFeatureValue(Collection<Instance> instanceCollection);",
"float getA();",
"public int dameFila() {\n return this.fila;\n }",
"public int getFila() {\n\t\treturn fila;\n\t}",
"public abstract double computeValue(Density density);",
"public double getFrecuencia() {\r\n return frecuencia;\r\n }",
"public abstract float getasFloat(int tuple, int val);",
"private double getValMorp ( cell c, morphogen m) {\t\t\r\n\t\tif ( m.equals(morphogen.a))\r\n\t\t\treturn c.getVal1();\r\n\t\telse\r\n\t\t\treturn c.getVal2();\r\n\t}",
"public double portataMassicaFumi( ){\r\n\t\treturn portatamassica;\r\n\t}",
"public float getA() {\r\n return a;\r\n }",
"int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }",
"public abstract double getValue();",
"public int getF() {\n\t\treturn f;\n\t}",
"public int getFECHAINICVAL() {\n return fechainicval;\n }",
"double getValue();",
"double getValue();",
"double getValue();",
"public double value(){\n\t return (double) this.f;\n }",
"public void setMontoFacturadoSinDescuento(double param){\n \n this.localMontoFacturadoSinDescuento=param;\n \n\n }",
"public double getMontoFacturado(){\n return localMontoFacturado;\n }",
"public int obtenerFila() {\n\t\treturn fila;\n\t}",
"float getBatt();",
"public void setFe(int value) {\n this.fe = value;\n }",
"public int getFE(){\n return this._FE;\n }",
"public double getFeIF() {\n return _avTable.getDouble(ATTR_FE_IF, 0.0);\n }",
"@java.lang.Override\n public float getA() {\n return a_;\n }",
"@java.lang.Override\n public float getA() {\n return a_;\n }",
"Object getValue(VisualPropertyType calcType);",
"private float generateSpecialAttributes(HashMap content) {\n // the XML for special attributes will be in the content, and look like <specialAttribute><name></name><long_desc></long_desc><short_desc></short_desc><value></value></specialAttribute>\n Object[] attribute1 = generateSpecialAttribute(content, \"\", 1);\n\t\t\n Object[] attribute2 = generateSpecialAttribute(content, (String)attribute1[0], 2);\n\t\t\n\t\treturn (float)(Float)attribute1[1]+(float)(Float)attribute2[1];\n }",
"@Override\n public int accion() {\n return this.alcance*2/3*3;\n }",
"public float getA() {\n return a;\n }",
"int getLum(){\n return getPercentageValue(\"lum\");\n }",
"public boolean getValor(int fila, int col) {\n\t\treturn matriz.getValor(fila, col);\n\t}",
"public int FitVal(){\r\n return _FitVal;\r\n}",
"@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}",
"double getPerimetro(){\n return 2 * 3.14 * raggio;\n }",
"public String getValue(int i) {\n/* 151 */ return ((Attr)this.m_attrs.item(i)).getValue();\n/* */ }",
"public double calculateValue() {\n if (!isLeaf && Double.isNaN(value)) {\n for (List<LatticeNode> list : children) {\n double tempVal = 0;\n for (LatticeNode node : list) {\n tempVal += ((CALatticeNode) node).calculateValue();\n }\n if (!list.isEmpty())\n value = tempVal;\n }\n }\n weight = Math.abs(value);\n return value;\n }",
"public double calFee() {\n return weight * FEE + GiftBox.this.price;\n }",
"public void setFeIF(double value) {\n _avTable.set(ATTR_FE_IF, value);\n }",
"public final void calcular() {\n long dias = Duration.between(retirada, devolucao).toDays();\n valor = veiculo.getModelo().getCategoria().getDiaria().multiply(new BigDecimal(dias));\n }",
"public void setPercepcion(double param){\n \n this.localPercepcion=param;\n \n\n }",
"public float floatValue() {\n return ( (Float) getAllele()).floatValue();\n }",
"public static boolean attribute_arg_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"attribute_arg_value\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, ATTRIBUTE_ARG_VALUE, \"<attribute arg value>\");\n r = attribute_arg_value_scalar(b, l + 1);\n if (!r) r = attribute_arg_value_array(b, l + 1);\n if (!r) r = model_function(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }",
"public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }",
"public Number getFee() {\n return (Number) getAttributeInternal(FEE);\n }",
"public IFatura vendaToFatura();",
"@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo;\n\t}",
"protected abstract T getNormalFlagValue();",
"Object getValor();",
"private double getValorAjuste(HashMap infoAssinante) throws Exception\n\t{\n\t\tdouble result = 0;\n\t\t\n\t\tString msisdn = (String)infoAssinante.get(\"IDT_MSISDN\");\n\t\tdouble minCredito = ((Double)infoAssinante.get(\"MIN_CREDITO\")).doubleValue();\n\t\tdouble minFF = ((Double)infoAssinante.get(\"MIN_FF\")).doubleValue(); \n\t\tint idtCodigoNacional = (new Integer(msisdn.substring(2, 4))).intValue();\n\t\tdouble vlrBonusMinuto = getVlrBonusMinuto(idtCodigoNacional);\n\t\tdouble vlrBonusMinutoFF = getVlrBonusMinutoFF(idtCodigoNacional);\n\t\t\n\t\tresult = ((minCredito - minFF)*vlrBonusMinuto) + (minFF*vlrBonusMinutoFF);\n\t\t\n\t\treturn result;\n\t}",
"public void setFECHACRREVAL(int value) {\n this.fechacrreval = value;\n }",
"public double getPercepcion(){\n return localPercepcion;\n }",
"public abstract float perimetro();",
"@Override\n\tpublic FareDetailParam getData() {\n\t\tFareDetailParam fd = new FareDetailParam();\n\t\tfd.setFylx(fylx.getFieldValue());\n\t\tfd.setFylxLike(fylx.getFieldText());\n\t\tfd.setJe(je.getFieldValue());\n\t\t\n\t\treturn fd;\n\t}",
"double getRealValue();",
"public abstract double calcular();",
"public float getValue() {\n return value_;\n }",
"public double getValue();",
"BigDecimal getFare();",
"@Override\n\tpublic void setValue(final Attribute att, final double value) {\n\n\t}",
"public void setFxValue(int parametre) {\n this.fxValue = parametre;\n }",
"public int obtenerFE(nodoArbolAVL x){\n if(x== null){\n return -1;\n }else{\n return x.fe;\n }\n }",
"public int fondMagasin(){\n\tint total =this.jeton;\n\tfor(Caisse c1 : this.lesCaisses){\n\ttotal = c1.getTotal()+total;\n\t}\n\treturn total;\n}",
"double getDiametro(){\n return raggio * 2;\n }",
"public static Forca get_f(){\n\t\treturn f;\n\t}",
"@Override\n public Object getValueAt(int f, int c) {\n csFilaTabla obj = this.filas.get(f);\n switch(c){\n case 0: return obj.getSemilla();\n case 1: return obj.getOperacion();\n case 2: return obj.getRandom();\n }\n return null;\n }",
"public int choisirAffichageValeur(SigneAffichage sa, DKnob sld){\n\t\tint val;\n\t\tint pas=ts.getEntInter();\n\t\tif(sa.equals(SigneAffichage.negatif)){\t\t\t\n\t\t\tval=(int)((pas*2) * sld.getValue())-pas;\n\t\t\tts.setNombreDeTrait(pas*2);\n\t\t}else if(sa.equals(SigneAffichage.positif)){\n\t\t\tval=(int)((pas) * sld.getValue());\n\t\t\tts.setNombreDeTrait(pas);\n\t\t}else{\n\t\t\tint Puissance=(int)(pas*sld.getValue());\n\t\t\tval=(int) Math.pow(2, Puissance);\n\t\t\tts.setNombreDeTrait(pas);\n\t\t}\n\t\treturn val;\n\t}",
"private int giveValue(int joueur, int adversaire, Grid grid) {\n return evaluate(joueur, grid) - evaluate(adversaire, grid);\n }",
"private String getAttrValue(Object name) {\n\t return (String)this.mAtts.get(name);//.toString();\n\t}",
"public void setAttributes(FactAttributes param) {\r\n localAttributesTracker = true;\r\n\r\n this.localAttributes = param;\r\n\r\n\r\n }"
] | [
"0.64198875",
"0.6093752",
"0.6058854",
"0.6050175",
"0.599829",
"0.599829",
"0.599829",
"0.59499675",
"0.59355533",
"0.57905155",
"0.5785761",
"0.57603395",
"0.5688964",
"0.5675247",
"0.5673279",
"0.5672765",
"0.56211084",
"0.5608185",
"0.5591688",
"0.5589046",
"0.5583255",
"0.5570805",
"0.55696446",
"0.55675256",
"0.5560157",
"0.55576986",
"0.55487555",
"0.55472374",
"0.55472374",
"0.55205697",
"0.55194306",
"0.55137277",
"0.5481822",
"0.5456326",
"0.5448237",
"0.5447573",
"0.54354167",
"0.5431272",
"0.5411753",
"0.5410914",
"0.5391647",
"0.5388839",
"0.5380507",
"0.5376967",
"0.5376967",
"0.5376967",
"0.5373259",
"0.536912",
"0.53685826",
"0.536018",
"0.53529686",
"0.53499854",
"0.53464377",
"0.534476",
"0.5338456",
"0.5322758",
"0.5304834",
"0.5304326",
"0.5299479",
"0.52975667",
"0.52943146",
"0.52797866",
"0.5270024",
"0.5268489",
"0.5262332",
"0.5245929",
"0.524087",
"0.5234674",
"0.5234318",
"0.52276033",
"0.522278",
"0.521759",
"0.5211234",
"0.5209158",
"0.52084935",
"0.5205914",
"0.51973796",
"0.51947826",
"0.519322",
"0.51902753",
"0.5188965",
"0.518801",
"0.51826227",
"0.51738137",
"0.51729864",
"0.5168293",
"0.5159212",
"0.5155286",
"0.5153662",
"0.5152182",
"0.5143363",
"0.51397187",
"0.51345235",
"0.51303184",
"0.51273865",
"0.5127027",
"0.51236737",
"0.51223135",
"0.51185995",
"0.5116348"
] | 0.5899799 | 9 |
TODO Autogenerated method stub | public static void main(String[] args) {
Set<String> hashset = new HashSet<String>();
hashset.add("Selenium");
hashset.add("Java");
hashset.add("Python");
hashset.add("dotNet");
System.out.println("Elements in hash set = "+hashset);
Object[] obArr = hashset.toArray();
for (Object ob : obArr)
System.out.println(ob);
} | {
"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 |
location data for display | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_location);
//Retrieve location object from calling activity
Intent intent = getIntent();
location = intent.getExtras().getParcelable("location");
//Set title for AppBar
setTitle(location.getTitle());
//Populate all views
populateView();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getLocation() { return location; }",
"public String getLocation() { return location; }",
"public String getLocation(){\n return this.location;\n }",
"public String getLocation(){\r\n return location;\r\n }",
"public String getLocationString() {\r\n\t\treturn \"Location = (\" + Math.round(getLocationX() * 10) / 10.0 + \", \" + Math.round(getLocationY() * 10) / 10.0 + \")\";\r\n\t}",
"@Override\r\n\tpublic String toString() {\r\n\t\treturn getLocation();\r\n\t}",
"String getLocation();",
"String getLocation();",
"String getLocation();",
"public int getLocation()\r\n {\r\n return location;\r\n }",
"public String getLocation(){\n return location;\n }",
"public String getLocation(){\r\n return Location;\r\n }",
"String getLocationLabel();",
"public String getLocation()\n {\n return location;\n }",
"protected String getLocation(){\r\n return this.location;\r\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public int getLocation()\r\n {\n }",
"public String getLocation() {\r\n return location;\r\n }",
"public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }",
"public String getLocation() {\r\n\t\treturn location; \r\n\t}",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"public String getLocation() {\n return this.location;\n }",
"static public void set_location_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"location name:\", \"rating:\", \"population:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\n\t\t\t\t\" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\t\t\t\t\"c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_countries c, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.country_id=c.id and lc.location_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by c.`GDP (billion $)` desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct c.`id`, c.`name`, c.`area (1000 km^2)`, c.`GDP per capita (1000 $)`, \" +\n\t\t\t\t\" c.`population (million)`, c.`capital`, c.`GDP (billion $)` \" +\n\t\t\t\t\" from curr_places_countries c \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id:\", \"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"COUNTRIES\";\n\t}",
"public String getLocation() {\n return this.location;\n }",
"java.lang.String getLocation();",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n\t\treturn \"-12.9990189,-38.5140298\";\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}",
"String getLocation() {\n return super.getLocation()+ \", z : \" + z;\n }",
"public org.afscme.enterprise.organization.LocationData getLocationData() {\n return locationData;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public String getLocation() {\n return location;\n }",
"public double getLocation(){\n\t\treturn location;\n\t}",
"@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}",
"private void getLocation() {\n\n }",
"public String getLocation() {\n return location;\n }",
"private String describeLocation() {\n\t\tSWLocation location = this.world.getEntityManager().whereIs(this);\n\t\treturn this.getShortDescription() + \" [\" + this.getHitpoints() + \"] is at \" + location.getShortDescription();\n\t}",
"public abstract String getLocation();",
"public String getLocation() {\r\n\t\treturn location;\r\n\t}",
"public String getLocationName(){\n return myLoc;\n }",
"public String location() {\n return this.location;\n }",
"public String location() {\n return this.location;\n }",
"public Point getLocation() { return loc; }",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"String location();",
"@Override\n public String getLocation() {\n return location;\n }",
"public abstract String getDisplayLocation();",
"public native final String location() /*-{\n\t\treturn this[\"location\"];\n\t}-*/;",
"public double[] getLocation()\n\t{\n\t\treturn location;\n\t}",
"private void displayLocation() {\n\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (mLastLocation != null) {\n double latitude = mLastLocation.getLatitude();\n double longitude = mLastLocation.getLongitude();\n\n\n String add = getAddressString(latitude, longitude);\n\n //Check in\n student_checkin chkIn = new student_checkin(getActivity(), sessionId, \"Lat: \" + latitude + \" Long: \" + longitude);\n chkIn.execute();\n lblLocation.setText(latitude + \", \" + longitude);\n cords.setText(add);\n\n\n\n } else {\n\n lblLocation\n .setText(\"(Couldn't get the location. Make sure location is enabled on the device)\");\n }\n }",
"public String getLocation() {\n\t\treturn location;\n\t}",
"NameValue getLocation(T data);",
"public String getLocation() {\n return mLocation;\n }",
"public byte[] getLocation() {\r\n return location;\r\n }",
"private void setLocationData(Location location){\r\n currentLat = location.getLatitude();\r\n currentLng = location.getLongitude();\r\n }",
"private String requestInfo(Location location) {\n return \"location(lat \" + location.getLat() + \", lon \" + location.getLat() + \") \";\n }",
"public java.lang.String getLocation() {\n return location;\n }",
"public String getLocation() {\n\t\t\treturn location;\n\t\t}",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"Location getLocation();",
"public java.lang.String getLocation() {\n return location;\n }",
"public String getLocationString() {\n return getCenter().toString();\n }",
"public String getLocation() {\n\t\treturn mLocation;\n\t}",
"String getLocation(boolean detail);",
"@Override\r\n public String toString() {\r\n return \"Location:: xPos: \" + xPos + \" yPos: \" + yPos + \"\\nBoundingBox: \" + boundingBox;\r\n }",
"private void _Setup_GetLocData() {\n\t\tString log_msg = \"CONS.LocData.LONGITUDE=\"\n\t\t\t\t\t+ String.valueOf(CONS.LocData.LONGITUDE);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t\tIntent i = this.getIntent();\n\t\t\n\t\tthis.longitude\t= i.getDoubleExtra(\n\t\t\t\t\t\t\tCONS.IntentData.iName_Showmap_Longitude,\n\t\t\t\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\tthis.latitude\t= i.getDoubleExtra(\n\t\t\t\tCONS.IntentData.iName_Showmap_Latitude,\n\t\t\t\tCONS.IntentData.Showmap_DefaultValue);\n\t\t\n\t\t// Log\n\t\tlog_msg = \"this.latitude=\" + String.valueOf(this.latitude)\n\t\t\t\t\t\t+ \"/\"\n\t\t\t\t\t\t+ \"this.longitude=\" + String.valueOf(this.longitude);\n\n\t\tLog.d(\"[\" + \"ShowMapActv.java : \"\n\t\t\t\t+ +Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \" : \"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getMethodName()\n\t\t\t\t+ \"]\", log_msg);\n\t\t\n\t}",
"public final String getLocation() {\n return location;\n }",
"com.google.ads.googleads.v6.resources.LocationView getLocationView();",
"private String getLocationForPrint(double latitude, double longitude) {\n int latDegree = (new Double(Math.floor(latitude))).intValue();\n int longDegree = (new Double(Math.floor(longitude))).intValue();\n String latEnd = getString(R.string.latitude_south);\n String longEnd = getString(R.string.longitude_west);\n if (latDegree > 0) {\n latEnd = getString(R.string.latitude_north);\n\n }\n if (longDegree > 0) {\n longEnd = getString(R.string.longitude_east);\n }\n double latSecond = (latitude - latDegree) * 100;\n double latMinDouble = (latSecond * 3d / 5d);\n int latMinute = new Double(Math.floor(latMinDouble)).intValue();\n\n double longSecond = (longitude - longDegree) * 100;\n double longMinDouble = (longSecond * 3d / 5d);\n int longMinute = new Double(Math.floor(longMinDouble)).intValue();\n// return String.format(getString(R.string.geo_location_info), latDegree,\n// latMinute, latEnd, longDegree, longMinute, longEnd);\n return getString(R.string.geo_location_info);\n\n }",
"public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }",
"com.google.ads.googleads.v14.common.LocationInfo getLocation();",
"private void loadLocationDetailsValue(Ad ad, Location location) {\n this.txtLocationSize.setText(ad.getAdSize());\n this.txtLocationX.setText(String.valueOf(location.getLocationCoordonateX()));\n this.txtLocationY.setText(String.valueOf(location.getLocationCoordonateY()));\n }",
"synchronized String getLocString() {\n String MSG_TERMINATOR = \";\";\n String DATA_SEPARATOR = \",\";\n\n if (loc == null) {\n return System.currentTimeMillis() + DATA_SEPARATOR + \"No Location!\" + MSG_TERMINATOR;\n }\n\n return String.valueOf(System.currentTimeMillis()) +\n DATA_SEPARATOR +\n loc.getLongitude() +\n DATA_SEPARATOR +\n loc.getLatitude() +\n DATA_SEPARATOR +\n loc.getAltitude() +\n DATA_SEPARATOR +\n loc.getSpeed() +\n DATA_SEPARATOR +\n loc.getBearing() +\n DATA_SEPARATOR +\n loc.getAccuracy() +\n DATA_SEPARATOR +\n loc.getTime() +\n DATA_SEPARATOR +\n providerEnabled.toString() +\n DATA_SEPARATOR +\n lastTemp +\n DATA_SEPARATOR +\n lastGravity +\n DATA_SEPARATOR +\n lastPressure +\n MSG_TERMINATOR;\n }",
"public void getLocation(){\n }",
"public PVector getLoc() {\n return location;\n }",
"public PVector getLoc() {\n return location;\n }",
"private void displayLocation() {\n\n if(customProgressDialog.isShowing())\n customProgressDialog.cancel();\n\n boolean hasPermissionFine = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n boolean hasPermissionCoarse = (ContextCompat.checkSelfPermission(LocationChooser.this,\n android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED);\n if (!hasPermissionFine || !hasPermissionCoarse) {\n ActivityCompat.requestPermissions(LocationChooser.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION}, REQUEST_LOCATION);\n } else {\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n }\n mLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (mLocation != null) {\n sLat = mLocation.getLatitude();\n sLang = mLocation.getLongitude();\n Log.d(\"curren location:\", String.valueOf(sLat) + \"::\" + String.valueOf(sLang));\n source.setText(\"Your location\");\n //locationText.setText(String.valueOf(sLat)+\"::\"+String.valueOf(sLang));\n } else {\n Toast.makeText(this, \"Location not Detected.\", Toast.LENGTH_SHORT).show();\n // showSettingsAlert();\n }\n }",
"public Location getLocation(){\n return location;\n }",
"public Location getLocation() \n\t{\n\t\treturn location;\n\t}",
"public int getLocation() {\n\t\treturn 0;\n\t}"
] | [
"0.72892976",
"0.72892976",
"0.7258697",
"0.7243011",
"0.72103196",
"0.72097564",
"0.7153092",
"0.7153092",
"0.7153092",
"0.71364516",
"0.71277",
"0.7087746",
"0.70722646",
"0.7037722",
"0.70344865",
"0.7020579",
"0.70064396",
"0.69880694",
"0.69843763",
"0.6978358",
"0.69753927",
"0.69753927",
"0.69753927",
"0.69753927",
"0.69753927",
"0.6973197",
"0.6963826",
"0.6963456",
"0.6946582",
"0.694067",
"0.69329655",
"0.6910794",
"0.6901244",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.68871754",
"0.6887084",
"0.6882595",
"0.6879342",
"0.68710226",
"0.6867829",
"0.6863842",
"0.68569463",
"0.6856369",
"0.6849558",
"0.6849558",
"0.68434024",
"0.6818119",
"0.6818119",
"0.6818119",
"0.6818119",
"0.6818119",
"0.6818119",
"0.6818119",
"0.6818119",
"0.681635",
"0.68049765",
"0.6801572",
"0.67986035",
"0.67904776",
"0.6787529",
"0.6779706",
"0.6761027",
"0.67180365",
"0.6707591",
"0.66979337",
"0.6688106",
"0.6679147",
"0.66731626",
"0.66731626",
"0.66731626",
"0.66731626",
"0.66680413",
"0.66667336",
"0.6658681",
"0.6625546",
"0.6620389",
"0.6608022",
"0.65976876",
"0.6570393",
"0.65671784",
"0.654693",
"0.6539939",
"0.6527414",
"0.6518104",
"0.6512891",
"0.6499495",
"0.6499495",
"0.64811546",
"0.646671",
"0.6456027",
"0.64308804"
] | 0.0 | -1 |
Add a marker in the location currently being viewed and move the map's camera to the same location. | @Override
public void onMapReady(GoogleMap googleMap) {
try{
Geocoder geo = new Geocoder(this);
//Get address provided for location as Address object
List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);
Address address = geo.getFromLocationName(location.getAddress(),1).get(0);
LatLng position= new LatLng(address.getLatitude(),address.getLongitude());
googleMap.addMarker(new MarkerOptions().position(position)
.title(location.getTitle()));
googleMap.setMinZoomPreference(12);
googleMap.setMaxZoomPreference(15);
googleMap.moveCamera(CameraUpdateFactory.newLatLng(position));
}
catch (IOException e){
e.printStackTrace();
}
catch(IndexOutOfBoundsException e){
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(15) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\" Current Location\");\n option.snippet(\"....\");\n option.position(latLng);\n option.draggable(true);//Making the marker draggable\n\n Marker currentMarker = mMap.addMarker(option);\n currentMarker.showInfoWindow();\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n\n }",
"private void addCurrentMarker(double lat, double lon) {\n mLatLng = new LatLng(lat, lon);\n marker_inter = map.addMarker(new MarkerViewOptions()\n .position(mLatLng)\n .title(\"Intervention\")\n .snippet(\"Desc inter\")\n .icon(iconUsr));\n run = 1;\n }",
"private void addPlaceLocationMarker(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n mMap.clear();\n markerOptions.title(\"Current Position\");\n markerOptions.getPosition();\n markerOptions.title(locationName);\n mMap.addMarker(markerOptions);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng posini = new LatLng(3.4,-76.5);\n myMarker = mMap.addMarker(new MarkerOptions().position(posini));\n\n requestLocation();\n\n googleMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() {\n @Override\n public void onCameraMove() {\n if (!flag) {\n\n addMarker();\n flag = true;\n }\n }\n });\n\n }",
"private void moveMap() {\n //String to display current latitude and longitude\n String msg = latitude + \", \" + longitude;\n\n //Creating a LatLng Object to store Coordinates\n LatLng latLng = new LatLng(latitude, longitude);\n\n //Adding marker to map\n mMap.addMarker(new MarkerOptions()\n .position(latLng) //setting position\n .draggable(true) //Making the marker draggable\n .title(\"you are here\")); //Adding a title\n\n //Moving the camera\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n //Animating the camera\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15));\n\n //Displaying current coordinates in toast\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n// marker_address_tv.setText(msg);\n setAddressInTVFromLatlong(latitude, longitude);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng place = new LatLng(Double.parseDouble(lat),Double.parseDouble(longitude));\n\n mMap.addMarker(new MarkerOptions().position(place));\n moveToCurrentLocation(place);\n\n }",
"@Override\n public void onMapLoaded() {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13.3f));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n }",
"public void onLocationChanged(Location location) {\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // Add a marker to current location and move the camera\n // LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(latLng).title(\"You are here!\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }",
"private void moveCamera(LatLng latLng, float zoom){\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, zoom));\n mMap.addMarker(new MarkerOptions().position(latLng).title(mImageAddress));\n }",
"@Override\n public void onLocationChanged(Location location) {\n LatLng newLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (marker == null) {\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n textView.setText(\"Your Current Location: \" + address); //For Testing, display coordinates on textView every time it's triggered\n marker = mMap.addMarker(new MarkerOptions().position(newLocation).title(\"Your current location:\"));\n arrayMarker.add(0, marker);\n builder.include(marker.getPosition());\n marker.setSnippet(address);\n } else {\n marker.setPosition(newLocation);\n String address = getAddressFromCoordinates(location.getLatitude(), location.getLongitude());\n// textView.setText(\"\\nCurrent Location: \" + address);\n marker.setTitle(\"Your current location:\");\n marker.setSnippet(address);\n }\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 14.0f));\n renderCamera();\n }",
"@Override\n public void onMapClick(LatLng latLng) {\n map.addMarker(new MarkerOptions().position(latLng));\n }",
"private void addMarker(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .setIcon(icon)\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n }",
"@SuppressWarnings({\"MissingPermission\"})\n private void setMarkerToCurrentLocation() {\n if(mLastLocation != null){\n Log.d(TAG, \"Current location latitude = \"+ mLastLocation.getLatitude() +\n \"Current location latitude = \" + mLastLocation.getLongitude());\n LatLng currentLocationMarker = new LatLng(mLastLocation.getLatitude(), mLastLocation.getLongitude());\n mMap.addMarker(new MarkerOptions().position(currentLocationMarker).title(\"Current location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocationMarker, 10));\n }\n else{\n Log.d(TAG, \"Last location is NULL\");\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);\n }\n }",
"private void addMarker( LatLng point ) {\n \t\tthis.markers.add( this.googleMap.addMarker( this.makeMarkerAt( point ) ) );\n \t}",
"public void addMarkerToMap(LatLng latLng) {\n Marker marker = googleMap.addMarker(new MarkerOptions().position(latLng)\n .visible(false));\n markers.add(marker);\n\n }",
"private void showCurrentLocation(LatLng ll) {\n if (mMarker != null) {\n mMarker.remove();\n }\n\n if (mZoom == 0) {\n mZoom = 15;\n } else {\n mZoom = googleMap.getCameraPosition().zoom;\n }\n\n // Move the camera instantly to current postion\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(ll, mZoom));\n\n // Marker\n mMarker = googleMap.addMarker(new MarkerOptions()\n .title(getString(R.string.current_location))\n .snippet(mLocationHelper.getAddress(ll.latitude, ll.longitude).toString())\n .position(ll));\n\n // Zoom in, animating the camera.\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(mZoom), 2000, null);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"private void xxx() {\n LatLng westfieldNJ = new LatLng(40.659, -74.3474);\n mMap.addMarker(new MarkerOptions().position(westfieldNJ).title(\"Westfield, New Jersey\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(westfieldNJ));\n\n }",
"private void addMarker() {\n /** Make sure that the map has been initialised **/\n LatLng lt = new LatLng(58.722599, -103.798828);\n float focus = 1f;\n if (null != mMap) {\n ArrayList<EarthQuake> earthQuakes = (ArrayList<EarthQuake>) getIntent().getSerializableExtra(\"quakeArrayList\");\n getIntent().removeExtra(\"quakeArrayList\");\n int position = getIntent().getIntExtra(\"position\", 0);\n if (earthQuakes != null) {\n if(position==0) {\n for (int i = 0; i < earthQuakes.size(); i++) {\n mMap.addMarker(\n new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(i).getDateTime() + \"\\n\" + earthQuakes.get(i).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(i).getLat(), earthQuakes.get(i).getLon()))\n );\n }\n }else if(position>0){\n lt=new LatLng(earthQuakes.get(position).getLat(),earthQuakes.get(position).getLon());\n mMap.addMarker( new MarkerOptions()\n .visible(true)\n .title(\"Earthquake\")\n .snippet(earthQuakes.get(position).getDateTime() + \"\\n\" + earthQuakes.get(position).getMagnitude() + \"\\n\")\n .position(new LatLng(earthQuakes.get(position).getLat(), earthQuakes.get(position).getLon())));\n focus=4f;\n\n }\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lt, focus));\n\n }\n }",
"private void addDestination(double lat, double lon) {\n mLatLng = new LatLng(lat,lon);\n mMarker = new MarkerOptions()\n .position(mLatLng)\n .title(\"Location\")\n .snippet(\"Welcome to you\");\n map.addMarker(mMarker);\n\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng loc = new LatLng(v, v1);\n mMap.addMarker(new\n MarkerOptions().position(loc).title(\"0000000000\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(loc));\n }",
"public void addMapMarker() {\n if (iLat != null && !iLat.equals(\"\") && iLon != null && !iLon.equals(\"\") && iLatRef != null && !iLatRef.equals(\"\") && iLonRef != null && !iLonRef.equals(\"\")) {\n\n if (iLatRef.equals(\"N\")) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n }\n\n if (iLonRef.equals(\"E\")) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n }\n }\n\n final MapView gMap = (MapView) findViewById(R.id.map);\n\n if (addedMarker == false) {\n posMarker = gMap.getMap().addMarker(posMarkerOptions);\n posMarker.setTitle(getString(R.string.map_position));\n addedMarker = true;\n }\n\n posMarker.setVisible(true);\n posMarker.setPosition(new LatLng(iLatFloat, iLonFloat));\n\n GoogleMap gMapObj = gMap.getMap();\n\n gMapObj.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n posMarker.setPosition(latLng);\n displayCoordsInDegrees();\n\n //Use text view values instead of posMarker values\n iLat = toDMS(posMarker.getPosition().latitude);\n iLon = toDMS(posMarker.getPosition().longitude);\n\n if (posMarker.getPosition().latitude > 0) {\n //North of equator, positive value\n iLatFloat = toDegrees(iLat);\n iLatRef = \"N\";\n } else {\n //South of equator, negative value\n iLatFloat = 0 - toDegrees(iLat);\n iLatRef = \"S\";\n }\n\n if (posMarker.getPosition().longitude > 0) {\n //East of prime meridian, positive value\n iLonFloat = toDegrees(iLon);\n iLonRef = \"E\";\n } else {\n //West of prime meridian, negative value\n iLonFloat = 0 - toDegrees(iLon);\n iLonRef = \"W\";\n }\n }\n });\n }",
"private void drawMarker(LatLng point){\n\t\tgoogleMap.clear();\t\t\r\n\t\t\r\n // Creating an instance of MarkerOptions\r\n MarkerOptions markerOptions = new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point); \r\n \r\n // Setting title for the InfoWindow\r\n markerOptions.title(\"Position\");\r\n \r\n // Setting InfoWindow contents\r\n markerOptions.snippet(\"Latitude:\"+point.latitude+\",Longitude\"+point.longitude);\r\n // markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.));\r\n\r\n // Adding marker on the Google Map\r\n googleMap.addMarker(markerOptions);\r\n \r\n // Moving CameraPosition to the user input coordinates\r\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(point));\r\n\r\n // Setting the zoom level\r\n //googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); \r\n \r\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n }\n LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(\"You are Here\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.pin1));\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n if (CurrentMark!=null)\n CurrentMark.remove();\n CurrentMark=googleMap.addMarker(markerOptions);\n intial();\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"private void drawMarker(Location location){\n LatLng currentPosition = new LatLng(location.getLatitude(),location.getLongitude());\r\n runlist.add(currentPosition);\r\n\r\n\r\n for(int i = 0; i<runlist.size();i++){\r\n\r\n\r\n\r\n Marker marker = mGoogleMap.addMarker(new MarkerOptions()\r\n .position(runlist.get(i))\r\n .title(\"TRACKING\")\r\n .snippet(\"Real Time Locations\"));\r\n\r\n\r\n\r\n }\r\n\r\n AddLines();\r\n //mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0),13));\r\n mGoogleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(runlist.get(0), 13.9f));\r\n\r\n\r\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng montesson = new LatLng(48.9190286,2.1380955);\n mMap.addMarker(new MarkerOptions().position(montesson).title(\"Marker in Montesson\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(montesson));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n this.googleMap = googleMap;\n marker = googleMap.addMarker(markerOptions);\n googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }",
"public void addCurrentLocationMarker(GoogleMap mMap, LatLng coordinates,Context context){\n if (lastMarker!=null) lastMarker.remove();\n MarkerOptions markerOptions=new MarkerOptions();\n markerOptions.position(coordinates);\n\n markerOptions.icon(bitmapDescriptorFromVector(context,R.drawable.ic_current_location));\n lastMarker=mMap.addMarker(markerOptions);\n animate(mMap,coordinates);\n\n }",
"@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng myLocation = new LatLng(latitude, longitude);\n addMarker(myLocation, name);\n moveCamera(myLocation, 3);\n\n //search a place\n /*searchInput = (EditText) findViewById(R.id.map_search_input);\n searchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n if(actionId == EditorInfo.IME_ACTION_SEARCH\n || actionId == EditorInfo.IME_ACTION_DONE\n || actionId == KeyEvent.ACTION_DOWN\n || actionId == KeyEvent.KEYCODE_ENTER)\n //search location\n geoLocate();\n return false;\n }\n });*/\n\n //add location\n addButton = findViewById(R.id.map_add_button);\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.putExtra(\"latitude\", marker.getPosition().latitude);\n intent.putExtra(\"longitude\", marker.getPosition().longitude);\n intent.putExtra(\"name\", marker.getTitle());\n setResult(4, intent);\n finish();\n }\n });\n\n //long tap to add a marker\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(@NonNull LatLng latLng) {\n addMarker(latLng, name);\n }\n });\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(LocationStorage.getInstance().getLocation().getLatitude(), LocationStorage.getInstance().getLocation().getLongitude());\n// BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.ic_large_marker);\n Marker marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Current Location\").snippet(\"Hold and drag to your desired location\"));\n marker.showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(sydney, 15);\n mMap.animateCamera(cameraUpdate);\n marker.setDraggable(true);\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n LatLng latLng=marker.getPosition();\n Location temp = new Location(LocationManager.GPS_PROVIDER);\n temp.setLatitude(latLng.latitude);\n temp.setLongitude(latLng.longitude);\n LocationStorage.getInstance().setLocation(temp);\n }\n });\n// mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n// @Override\n// public boolean onMarkerClick(Marker marker) {\n//\n// return true;\n// }\n// });\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(121.5729889, 25.0776557);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"This is my first Maker\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\")\n //below line is use to add custom marker on our map.\n .icon(BitmapFromVector(getApplicationContext(), R.drawable.ic_flag)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"private void drawUserMarker(Location location) {\n LatLng current_position = new LatLng(location.getLatitude(), location.getLongitude());\n if(mUserMarker == null) {\n mUserMarker = mMap.addMarker(\n new MarkerOptions()\n .position(current_position)\n .snippet(\"Lat:\" + location.getLatitude() + \" Lng:\" + location.getLongitude())\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))\n .title(\"My Position\")\n );\n }\n else {\n mUserMarker.setPosition(current_position);\n mUserMarker.setSnippet(\"Lat:\" + location.getLatitude() + \" Lng:\" + location.getLongitude());\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n MapsInitializer.initialize(mContext);\n gMap = googleMap;\n\n //you can move map here to item specific 'location'\n int pos = getAdapterPosition();\n\n LatLng latLng = new LatLng(6.42788, 3.4274513);\n LatLng NIGERIA = new LatLng(9.0611017, 4.1763482);\n\n gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n gMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(false)\n .flat(true)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n }",
"private void showMarker() {\n\n if (myMarker == null) {\n MarkerOptions options = new MarkerOptions();//1 option co 2 thu k thieu vi tri ,hinh anh\n options.position(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));//vi tri kinh do vi do,no tra ve vi tri cuoi cung gps nhan dc ,neu\n options.title(\"dung123\");\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n //newu chua co thif sedc sinh ra bang cach add\n googleMap.addMarker(options);\n// myMarker.setTag(\"Hello\");//co the truyen doi tuig vao duoi window marker getTag\n } else {\n myMarker.setPosition(new LatLng(myLocation.getLatitude(), myLocation.getLongitude()));\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n getDataFromDatabase();\n\n // Add a marker in Sydney and move the camera\n //LatLng hellas = new LatLng(38.311449, 25.022821);\n // mMap.addMarker(new MarkerOptions().position(hellas).title(\"Marker in Aegean Sea\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hellas,5));\n\n //Initalize MyLocation stuff\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n //setMarkersOnMap();\n\n if(mLocationPermissionGranted){\n getDeviceLocation();\n }\n\n\n ic_plus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n DEFAULT_ZOOM = 17f;\n getDeviceLocation();\n\n //double lat = currentLocation.getLatitude();\n //double lon = currentLocation.getLongitude();\n LatLng currlatlon = new LatLng(currentLocation.getLatitude()+0.0002,currentLocation.getLongitude()+0.0002);\n\n\n curraddmarker = mMap.addMarker(new MarkerOptions().position(currlatlon).draggable(true));\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n hideUI();\n showConfirm();\n\n }\n });\n\n addMarker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n showUI();\n addMarker.setVisibility(View.GONE);\n\n //double lat = curraddmarker.getPosition().latitude;\n //double lon = curraddmarker.getPosition().longitude;\n\n //Toast.makeText(AEDMapActivity.this, \"Lat:\"+currentMarkerLat+\" Lon:\"+currentMarkerLon, Toast.LENGTH_SHORT).show();\n Intent i =new Intent(AEDMapActivity.this, addMarkerActivity.class);\n i.putExtra(\"Lat\",curraddmarker.getPosition().latitude);\n i.putExtra(\"Lon\",curraddmarker.getPosition().longitude);\n startActivity(i);\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n hideConfirm();\n showUI();\n curraddmarker.remove();\n\n getDeviceLocation();\n\n }\n });\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener()\n {\n @Override\n public void onMapClick(LatLng arg0)\n {\n if(menuUI){\n if(markerInfo){\n hideMarkerInfoIcon();\n return;\n }\n\n if(adminEkav || adminDimos){\n hideReportIcon();\n }\n\n menuUI = false;\n hideUI();\n\n\n }\n else{\n menuUI = true;\n showUI();\n if(adminEkav || adminDimos){\n showReportIcon();\n }\n }\n }\n });\n\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n showMarkerInfoIcon();\n\n Log.d(TAG,marker.getTag().toString());\n\n if(!markerMap.isEmpty()){\n for(int i=0; i<markerMap.size(); i++) {\n marker_id = (String) markerMap.get(i).get(\"Id\");\n //Log.d(TAG,id);\n if(marker_id.equals(marker.getTag().toString())){\n marker_name = (String) markerMap.get(i).get(\"Name\");\n marker_desc = (String) markerMap.get(i).get(\"Description\");\n marker_pic = (String) markerMap.get(i).get(\"ImageUrl\");\n marker_geo = (GeoPoint) markerMap.get(i).get(\"Geolocation\");\n\n Log.d(TAG,\"Marker Clicked!! - name: \"+marker_name+\" desc: \"+marker_desc+\" geo: \"+marker_geo+ \" imgurl: \"+marker_pic);\n\n ic_info.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i =new Intent(AEDMapActivity.this, MarkerInfoActivity.class);\n i.putExtra(\"Id\",marker_id);\n i.putExtra(\"Name\",marker_name);\n i.putExtra(\"Description\",marker_desc);\n i.putExtra(\"Lat\",marker_geo.getLatitude());\n i.putExtra(\"Lon\",marker_geo.getLongitude());\n i.putExtra(\"imgUrl\",marker_pic);\n startActivity(i);\n }\n });\n\n break;\n }\n }\n }\n\n return false;\n }\n });\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n }\n });\n\n }",
"@Override\n public void onLocationChanged(Location location) {\n LatLng miUbicacion = new LatLng(location.getLatitude(), location.getLongitude());\n\n //Marcador de la ub. actual\n mMap.addMarker(new MarkerOptions().position(miUbicacion).title(\"Ubicación actual\").icon(BitmapDescriptorFactory.fromResource(R.drawable.marca3)));\n\n //Foco de la camara según la ubicación\n mMap.moveCamera(CameraUpdateFactory.newLatLng(miUbicacion));\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(miUbicacion)\n .zoom(14)\n .bearing(90)\n .tilt(45)\n .build();\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n }",
"@Override\n\t\t\t\tpublic void onMapClick(LatLng arg0) {\n\t\t\t\t\tgoogleMap.clear();\n\n\t\t\t\t\t// Creating an instance of MarkerOptions to set position\n\t\t\t\t\t// MarkerOptions markerOptions = new MarkerOptions();\n\n\t\t\t\t\t// Setting position on the MarkerOptions\n\t\t\t\t\tmarker.position(arg0);\n\n\t\t\t\t\t// Animating to the currently touched position\n\t\t\t\t\tgoogleMap.animateCamera(CameraUpdateFactory.newLatLng(arg0));\n\n\t\t\t\t\t// Adding marker on the GoogleMap\n\t\t\t\t\tMarker marker1 = googleMap.addMarker(marker);\n\n\t\t\t\t\t// Showing InfoWindow on the GoogleMap\n\t\t\t\t\tmarker1.showInfoWindow();\n\t\t\t\t}",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n // Enable the zoom controls for the map\n mMap.getUiSettings().setZoomControlsEnabled(true);\n\n // Prompt the user for permission.\n getLocationPermission();\n\n addMarkerToMap(mMap.getCameraPosition().target, \"Plceaaa\");\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n // draggedMarker.setPosition(marker.getPosition());\n /*LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);*/\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n Log.d(TAG, \"Marker dragged to latitude\" + marker.getPosition().latitude + \" longitude \" + marker.getPosition().longitude);\n // draggedMarker = marker;\n // marker.setPosition(marker.getPosition());\n }\n });\n\n mMap.setOnCameraIdleListener(new GoogleMap.OnCameraIdleListener() {\n @Override\n public void onCameraIdle() {\n //get latlng at the center by calling\n LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);\n }\n });\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney, Australia, and move the camera.\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"private void drawMarker(LatLng point){\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting latitude and longitude for the marker\n markerOptions.position(point);\n\n // Adding marker on the Google Map\n mGoogleMap.addMarker(markerOptions);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng sydney = new LatLng(40.362552, -94.767392);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Joseph Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.362552,-94.767392), 12.0f));\n\n LatLng publicUser1 = new LatLng(40.332692, -94.870458);\n mMap.addMarker(new MarkerOptions().position(publicUser1).title(\"David Location\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.332692,-94.870458), 12.0f));\n\n LatLng publicUser2 = new LatLng(40.350650, -94.886080);\n mMap.addMarker(new MarkerOptions().position(publicUser2).title(\"Alex Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.350650,-94.886080), 12.0f));\n\n LatLng publicUser3 = new LatLng(40.357818, -94.890868);\n mMap.addMarker(new MarkerOptions().position(publicUser3).title(\"Johnson Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser1));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.357818,-94.890868), 12.0f));\n\n LatLng publicUser4 = new LatLng(40.348272, -94.871527);\n mMap.addMarker(new MarkerOptions().position(publicUser4).title(\"Mike Location\"));\n // mMap.moveCamera(CameraUpdateFactory.newLatLng(publicUser2));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(40.348272,-94.871527), 12.0f));\n }",
"@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n\r\n\r\n\r\n LatLng salud = new LatLng(18.5094113, -69.8923432);\r\n mMap.addMarker(new MarkerOptions().position(salud).draggable(true).title(\"Centro De salud\").snippet(\"Centro de salud \").icon(BitmapDescriptorFactory.fromResource(R.drawable.salud)));\r\n\r\n\r\n LatLng monjas = new LatLng(18.509410, -69.891796);\r\n mMap.addMarker(new MarkerOptions().position(monjas).title(\"Casa de las hermnas\").snippet(\"Casa de las hermnas\").icon(BitmapDescriptorFactory.fromResource(R.drawable.monjas)));\r\n\r\n\r\n LatLng parroquia = new LatLng(18.510546, -69.891847);\r\n mMap.addMarker(new MarkerOptions().position(parroquia).title(\"Parroquia\").snippet(\"Parroquia \").icon(BitmapDescriptorFactory.fromResource(R.drawable.parroquia)));\r\n LatLng escuela = new LatLng(18.5110794, -69.8921382);\r\n mMap.addMarker(new MarkerOptions().position(escuela).title(\"Escuela Hogar pituca florez\").snippet(\"Escuela hogar pituca florez\").icon(BitmapDescriptorFactory.fromResource(R.drawable.escuela)));\r\n\r\n LatLng CIJE = new LatLng(18.509463 , -69.891545);\r\n markerPrueba =googleMap.addMarker(new MarkerOptions()\r\n .position(CIJE)\r\n .title(\"CIJE, Centro Infantil Juvenil Enmanuel\").snippet(\"Centro de estudios para todas las edades\").icon(BitmapDescriptorFactory.fromResource(R.drawable.cije)));\r\n\r\n\r\n mMap.getUiSettings().setZoomControlsEnabled(true);\r\n\r\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(CIJE,18));\r\n\r\n googleMap.setOnMarkerClickListener(this);\r\n googleMap.setOnInfoWindowClickListener(this);\r\n\r\n }",
"private void createMarker(LatLng position) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(position);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.note_position));\n // set up marker\n locationMarker = googleMap.addMarker(markerOptions);\n locationMarker.setDraggable(true);\n locationMarker.showInfoWindow();\n }",
"@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n\n String address = getMarkerAddress(latLng);\n //if there is a valid address associated with marker\n if (address != null) {\n markerOptions.title(address);\n }\n mMap.clear();\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 15));\n mMap.addMarker(markerOptions);\n markerPlaced = true;\n lat = latLng.latitude;\n lon = latLng.longitude;\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n /* mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n //mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n LatLng ifto = new LatLng(-10.199202218157746, -48.31158433109522);\n mMap = googleMap;\n mMap.setOnCameraIdleListener(this);\n mMap.addMarker(new MarkerOptions().position(ifto).title(\"IFTO Campus Palmas\"));\n }",
"@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 17.0f));\n }",
"@Override\n public void onLocationChanged(Location location) {\n mMap.clear();\n\n // To hold location\n LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude());\n\n // To create marker in map\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(\"My Location\");\n\n // Add marker to the map\n mMap.addMarker(markerOptions);\n\n // Opening position with some zoom level in the map\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng liege = new LatLng(50.620552, 5.581177);\n LatLng victime = new LatLng(50.620957, 5.582263);\n mMap.addMarker(new MarkerOptions()\n .position(liege)\n .title(\"You are here !\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_YELLOW)));\n mMap.addMarker(new MarkerOptions()\n .position(victime)\n .title(\"Aurélie\")\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(liege,17));\n }",
"@Override\n public void onMapClick(LatLng latLng) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n //Set position of market\n\n\n //markerOptions.position(latLng);\n markerOptions.position(defaultLocation);\n //set title marker\n markerOptions.title(defaultLocation.latitude + \": \" + defaultLocation.longitude);\n\n //removeall markers\n // googleMap.clear();\n //Animating to zoom the marker\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(\n defaultLocation, 10\n ));\n //Add marker on map\n googleMap.addMarker(markerOptions);\n\n\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n String info = sTitle;\n // Add a marker in Sydney and move the camera\n LatLng pos = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(pos).title(info));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(pos));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 8));\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"you are in sydney\").draggable(true));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.setOnMarkerDragListener(this);\n mMap.setOnMapLongClickListener(this);\n\n }",
"private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void setLocation(String name, LatLng latLng) {\n googleMap.addMarker(new MarkerOptions().position(latLng)\n .title(name));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 18));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n\n\n\n // Add a marker in Sydney and move the camera\n sydney = new LatLng(8.552161651991246, 79.94052328405958);\n\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n\n\n //mMap.setMinZoomPreference(11);\n\n\n\n\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n // Add a marker in Sydney, Australia,\n // and move the map's camera to the same location.\n LatLng singapore = new LatLng(1.338709, 103.819519);\n googleMap.addMarker(new MarkerOptions().position(singapore)\n .title(\"Marker in Singapore\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(singapore));\n googleMap.animateCamera(CameraUpdateFactory.zoomTo(11),3000,null);\n }",
"@Override\r\n public void onMapReady(GoogleMap googleMap) {\r\n mMap = googleMap;\r\n\r\n // Add a marker in Sydney and move the camera\r\n LatLng charlotte = new LatLng(35.22, -80.84);\r\n //currentMarker = mMap.addMarker(new MarkerOptions().position(charlotte).title(\"Charlotte, NC\"));\r\n mMap.moveCamera(CameraUpdateFactory.newLatLng(charlotte));\r\n //currentMarker.setTag(0);\r\n\r\n mMap.setOnMapLongClickListener(this);\r\n\r\n\r\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n //&& ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED\r\n ) {\r\n // TODO: Consider calling\r\n\r\n return;\r\n }\r\n mMap.setMyLocationEnabled(true);\r\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener() {\r\n @Override\r\n public boolean onMyLocationButtonClick() {\r\n Log.d(\"maps\", \"On my location button click\");\r\n return false;\r\n }\r\n });\r\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n UiSettings uiSettings = mMap.getUiSettings();\n uiSettings.setZoomControlsEnabled(true);\n\n // Add a marker in Sydney and move the camera\n LatLng barcelona = new LatLng(41.3887901, 2.1589899);\n LatLng marcador1 = new LatLng(41.379564, 2.167203);\n LatLng marcador2 = new LatLng(41.394327, 2.191843);\n LatLng marcador3 = new LatLng(41.398121, 2.199290);\n LatLng marcador4 = new LatLng(41.386235, 2.146300);\n LatLng marcador5 = new LatLng(41.395933, 2.136832);\n LatLng marcador6 = new LatLng(41.441696, 2.237285);\n LatLng marcador7 = new LatLng(41.457493, 2.255982);\n LatLng marcador8 = new LatLng(41.316202, 2.028248);\n LatLng marcador9 = new LatLng(41.333813, 2.035098);\n LatLng marcador10 = new LatLng(41.357954, 2.061158);\n\n\n mMap.addMarker(new MarkerOptions().position(marcador1).title(\"Los amigos\"));\n mMap.addMarker(new MarkerOptions().position(marcador2).title(\"El dorado\"));\n mMap.addMarker(new MarkerOptions().position(marcador3).title(\"Juan y Luca\"));\n mMap.addMarker(new MarkerOptions().position(marcador4).title(\"Durums\"));\n mMap.addMarker(new MarkerOptions().position(marcador5).title(\"Restaurante Jose Fina\"));\n mMap.addMarker(new MarkerOptions().position(marcador6).title(\"Los Hermanos\"));\n mMap.addMarker(new MarkerOptions().position(marcador7).title(\"Paella para todos\"));\n mMap.addMarker(new MarkerOptions().position(marcador8).title(\"Señor Pollo\"));\n mMap.addMarker(new MarkerOptions().position(marcador9).title(\"Restaurante Boliviano\"));\n mMap.addMarker(new MarkerOptions().position(marcador10).title(\"Laguna Alalay\"));\n\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(barcelona,12), 4000,null);\n mMap.setMaxZoomPreference(1000);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n setInitialLocation(VehicleData.getLatitude(), VehicleData.getLongitude());\n }",
"@Override\n public void onCameraMove() {\n if(!markerClickflag)\n showMarkerButtons(false);\n }",
"private void drawMarker1(LatLng point){\n MarkerOptions markerOptions=new MarkerOptions();\r\n\r\n // Setting latitude and longitude for the marker\r\n markerOptions.position(point);\r\n\r\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\r\n\r\n // Adding marker on the Google Map\r\n mMap.addMarker(markerOptions);\r\n\r\n // marker.showInfoWindow();\r\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n TypedValue tv = new TypedValue();\n // move my location button down under toolbar\n if (getActivity().getTheme().resolveAttribute(R.attr.actionBarSize, tv, true))\n {\n int actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics());\n mMap.setPadding(0, actionBarHeight, 0, 0);\n }\n\n if (mParkedMarker != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLng(mParkedMarker.getPosition()));\n } else if (ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(getActivity());\n mFusedLocationClient.getLastLocation()\n .addOnSuccessListener(getActivity(), new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n LatLng myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n }\n }\n });\n } else {\n Toast.makeText(getActivity(), \"Don't have permission\", Toast.LENGTH_LONG).show();\n }\n\n\n mMap.setMaxZoomPreference(20);\n\n // Add a marker in Corvallis and move the camera\n LatLng corvallis = new LatLng(44.5646, -123.2620);\n\n mMap.setOnMapClickListener(this);\n mMap.setOnMapLongClickListener(this);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(corvallis, 14));\n\n TileProvider tileProvider = new SpotsTileProvider(getActivity());\n mTileOverlay = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(tileProvider));\n\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n LatLng indiaLatitudeLongitude = new LatLng(20.5937, 78.9629);\n MarkerOptions indiaMarker = new MarkerOptions();\n indiaMarker.position(indiaLatitudeLongitude);\n indiaMarker.title(\"I Love My India...\");\n indiaMarker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_launcher));\n mMap.addMarker(indiaMarker);\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(indiaLatitudeLongitude));\n CameraPosition newPosition = new CameraPosition.Builder()\n .target(indiaLatitudeLongitude)\n// .zoom(14)\n .build();\n\n\n MarkerOptions mumbai = new MarkerOptions();\n mumbai.position(new LatLng(20, 78));\n mumbai.title(\"Mumbai\");\n mMap.addMarker(mumbai);\n mMap.addCircle(new CircleOptions().center(new LatLng(20, 78)).radius(20000));\n\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(newPosition));\n\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n\n MarkerOptions markerOptions =new MarkerOptions().position(x).title(\"abane ramdane\");\n CircleOptions circleOptions = new CircleOptions().center(x).radius(1000).fillColor(0xffffff0).strokeColor(0xffff0000).strokeWidth(2);\n markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.house));\n mMap.addMarker(markerOptions);\n mMap.addCircle(circleOptions);\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(x, 13));\n }",
"private void updateMyLocation(ObjectLocation location){\n if(mMap==null)\n return;\n\n if(currentLocation==null){\n LatLng latLng = new LatLng(location.getLat(),location.getLng());\n Bitmap icon = ((BitmapDrawable)userImage.getDrawable()).getBitmap();\n Bitmap smallIcon = Bitmap.createScaledBitmap(icon,100,100,false);//Sony xperia mini 40x40\n MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(\"Me\").icon(BitmapDescriptorFactory.fromBitmap(smallIcon));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng,18));\n\n currentLocation = mMap.addMarker(markerOptions);\n markerOnClick.put(currentLocation,new MyMarker(user.getId(),true));\n\n ((MyApplication) this.getApplication()).setCurrentLocation(latLng);\n }else{\n animateMarker(currentLocation,new LatLng(location.getLat(),location.getLng()),new LatLngInterpolator.Linear());\n ((MyApplication) this.getApplication()).setCurrentLocation(new LatLng(location.getLat(),location.getLng()));\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mapReady = true;\n mMap = googleMap;\n // Add a marker in Sydney and move the camera\n LatLng Bangalore = new LatLng(12.972442, 77.580643);\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(Bangalore)\n .zoom(17)\n .bearing(90)\n .tilt(30)\n .build();\n mMap.addMarker(new MarkerOptions().position(Bangalore).title(\"Marker in Bangalore\"));\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setOnCameraChangeListener(new GoogleMap.OnCameraChangeListener() {\n @Override\n public void onCameraChange(CameraPosition cameraPosition) {\n updateHalos(cameraPosition);\n }\n });\n\n int permission_check = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (permission_check == PackageManager.PERMISSION_GRANTED) {\n // instanciate location manager to retrieve positions\n mManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // retrieve best provider for position tracking\n String provider = mManager.getBestProvider(new Criteria(), true);\n\n // get current location\n Location location = mManager.getLastKnownLocation(provider);\n\n mListener = new LocationListener() {\n @Override\n public void onLocationChanged(Location location) {\n //redraw marker when getLocation updates\n drawUserMarker(location);\n }\n\n @Override\n public void onProviderEnabled(String p) {\n }\n\n @Override\n public void onProviderDisabled(String p) {\n }\n\n @Override\n public void onStatusChanged(String p, int status, Bundle extras) {\n }\n };\n\n // place initial marker if current position retrieved\n if(location != null) {\n drawUserMarker(location);\n }\n\n // register location updates with given parameters\n mManager.requestLocationUpdates(provider, 1000, 0, mListener);\n } else {\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }\n\n // implement event listener for long map clicks\n GoogleMap.OnMapLongClickListener onMapLongClick = new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n\n // get marker name from text field\n String markerName = mTextField.getText().toString();\n\n // check if a marker name is set\n if(markerName.isEmpty()) {\n markerName = \"Marker\" + Integer.toString(numberOfMarkers);\n }\n\n // add marker\n Marker marker = mMap.addMarker(\n new MarkerOptions()\n .position(latLng)\n .title(markerName)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED))\n );\n\n // add halo\n Circle halo = mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(100.0)\n .strokeColor(Color.RED)\n .visible(false)\n );\n\n // add marker and halo to tracked markers\n mMarkerHalos.put(marker, halo);\n\n // lat and long to separate values\n double markerLat = latLng.latitude;\n double markerLong = latLng.longitude;\n\n // save marker to shared preferences\n Set<String> positionSet = new HashSet<String>();\n positionSet.add(Double.toString(markerLat));\n positionSet.add(Double.toString(markerLong));\n mPrefEditor.putStringSet(markerName, positionSet);\n mPrefEditor.apply();\n\n // clear text field\n mTextField.setText(\"\");\n\n // increase marker counter\n ++numberOfMarkers;\n }\n };\n\n // assign event listener to map\n mMap.setOnMapLongClickListener(onMapLongClick);\n }",
"@Override\n public void onCameraIdle() {\n LatLng midLatLng = mMap.getCameraPosition().target;\n draggedMarker.setPosition(midLatLng);\n }",
"private void drawMarker(LatLng point){\n \tMarkerOptions markerOptions = new MarkerOptions();\t\t\t\t\t\n \t\t\n \t// Setting latitude and longitude for the marker\n \tmarkerOptions.position(point);\n \tmarkerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.marker1));\n \t// Adding marker on the Google Map\n \tmap.addMarker(markerOptions); \t\t\n }",
"@Override\n public void onLocationChanged(Location location) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng meuLocal = new LatLng(latitude, longitude);\n\n if(markerLocalizacaoUsuario != null)\n markerLocalizacaoUsuario.remove();\n markerLocalizacaoUsuario = mapa.addMarker(new MarkerOptions()\n .position(meuLocal)\n .title(\"Você está aqui!\")\n .flat(true) //alinha ao norte o marcador, mesmo que gire o mapa\n .icon(bitmapDescriptorFromVector(MapaLocalActivity.this,R.drawable.marker_usuario_nav))\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.usuario))\n .anchor(0.5f, 0.5f));\n markerLocalizacaoUsuario.setTag(TipoLocal.MARKER_USER.getTipo());\n markerLocalizacaoUsuario.setRotation(location.getBearing());\n\n\n if (locUsuario == null) {\n getZoomAtual();\n mapa.animateCamera(CameraUpdateFactory.newLatLngZoom(meuLocal, getZoomAtual()), 500, null);\n }\n locUsuario = meuLocal;\n //Log.d(TAG, \"Changed: \"+ latitude +\" / \"+longitude + \" --> \"+location.getBearing());\n }",
"private void addUserMarker(LatLng loc){\n //remove existing marker from map\n if(marker!=null){\n map.removeMarker(marker);\n }\n // Creating marker style. We should use an object of type MarkerStyleCreator, set all features on it\n // and then call buildStyle method on it. This method returns an object of type MarkerStyle\n MarkerStyleBuilder markStCr = new MarkerStyleBuilder();\n markStCr.setSize(30f);\n markStCr.setBitmap(BitmapUtils.createBitmapFromAndroidBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.ic_marker)));\n MarkerStyle markSt = markStCr.buildStyle();\n\n // Creating user marker\n marker = new Marker(loc, markSt);\n\n // Adding user marker to map!\n map.addMarker(marker);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n LatLng latlong = new LatLng(29.375859, 47.977405);\n googleMap.addMarker(new MarkerOptions().position(latlong).title(\"\"));\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong, 9.0f));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng parque = new LatLng(latitud, longitud);\n mMap.addMarker(new MarkerOptions().position(parque).title(lugar).icon(BitmapDescriptorFactory.fromResource(R.drawable.icons8_terraria_48)));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(parque));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitud, longitud),16.0f));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in city and move the camera\n LatLng cityCoord = new LatLng(lat, lng);\n float zoom = (float) 9.0;\n mMap.addMarker(new MarkerOptions().position(cityCoord).title(cityAddr));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(cityCoord, zoom));\n }",
"private void SetMarkerOnMap(Double latitude,Double longitude,float color)\n {\n //Place location marker\n LatLng latLng = new LatLng(latitude, longitude);\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n String addressOfLocation = GetAddressFromLatLng(latitude, longitude);\n markerOptions.title(addressOfLocation+\"\");\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(color));\n map.addMarker(markerOptions);\n //move map camera\n map.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n map.animateCamera(CameraUpdateFactory.zoomTo(12));\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_cast_dark))\n .anchor(0.0f, 1.0f)\n .position(latLng));\n\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n Toast.makeText(getApplicationContext(), \"Has pulsado una marca\", Toast.LENGTH_LONG).show();\n return false;\n }\n });\n\n\n\n }",
"@Override\n public void onMapLongClick(LatLng latLng) {\n mMap.clear();\n\n //Adding a new marker to the current pressed position\n mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .draggable(true));\n }",
"@Override\n public void run() {\n LatLng myLoc = new LatLng(myLatitude, myLongitude);\n myMarker.setPosition(myLoc);\n }",
"public void onMapReady(GoogleMap googleMap , double lati, double longi) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(lati, longi);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\n public void onLocationChanged(Location location) {\n drawUserMarker(location);\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n LatLng marker = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(marker).title(\"You\").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 15.0f));\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng wroclaw = new LatLng(51.110, 17.034);\n mMap.addMarker(new MarkerOptions().position(wroclaw));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(wroclaw, 12));\n mMap.clear();\n // Setting a click event handler for the map\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n @Override\n public void onMapClick(LatLng latLng) {\n bSelect.setEnabled(true);\n // Creating a marker\n MarkerOptions markerOptions = new MarkerOptions();\n\n // Setting the position for the marker\n markerOptions.position(latLng);\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(\"NOWY: \" + latLng.latitude + \" : \" + latLng.longitude);\n\n markerOptions.alpha(0.6f);\n // Clears the previously touched position\n mMap.clear();\n\n // Animating to the touched position\n mMap.animateCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n\n location = latLng.latitude + \" \" + latLng.longitude;\n\n setupMarker();\n }\n });\n }",
"private void UpdateMap(){\n Log.d(\"data\", lati + \" \" + longi );\n// sydney = new LatLng(lati, longi);\n// mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n }",
"@Override\r\n public void onLocationChanged(Location location) {\n LatLng latLng_Now = new LatLng(location.getLatitude(), location.getLongitude());\r\n CameraPosition cameraPosition = new CameraPosition.Builder()\r\n .target(latLng_Now) // Sets the center of the map to LatLng (refer to previous snippet)\r\n .zoom(17) // Sets the zoom\r\n .bearing(90) // Sets the orientation of the camera to east\r\n .tilt(30) // Sets the tilt of the camera to 30 degrees\r\n .build(); // Creates a CameraPosition from the builder\r\n mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\r\n if(latLng_Prev == null){\r\n latLng_Prev = latLng_Now;\r\n }\r\n //draw line between two locations:\r\n Polyline line = mMap.addPolyline(new PolylineOptions()\r\n .add(latLng_Prev, latLng_Now)\r\n .width(5)\r\n .color(Color.RED));\r\n latLng_Prev=latLng_Now;\r\n }",
"@Override\n public void setCameraCoordinate(double latitude, double longitude) {\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(latitude, longitude)));\n }",
"@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n\n\n // Logic to handle location object\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(location.getLatitude(), location.getLongitude())).title(\"You are Here\").alpha(3);\n Marker currentLocationMarker = mMap.addMarker(markerOptions);\n mMap.moveCamera(CameraUpdateFactory.newLatLng(new LatLng(location.getLatitude(), location.getLongitude())));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()) , 17.0f));//9\n\n }\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n\n if (mMap != null) {\n\n // Enable MyLocation Button in the Map\n\n /*if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }*/\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n Toast.makeText(MapsActivity.this, \"You have to accept to enjoy all app's services!\", Toast.LENGTH_LONG).show();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n }\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng point) {\n // Already two locations\n if (markerPoints.size() > 1) {\n markerPoints.clear();\n mMap.clear();\n }\n\n // Adding new item to the ArrayList\n markerPoints.add(point);\n\n // Creating MarkerOptions\n MarkerOptions options = new MarkerOptions();\n\n // Setting the position of the marker\n options.position(point);\n\n /**\n * For the start location, the color of marker is GREEN and\n * for the end location, the color of marker is RED.\n */\n if (markerPoints.size() == 1) {\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n } else if (markerPoints.size() == 2) {\n options.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n }\n\n\n // Add new marker to the Google Map Android API V2\n mMap.addMarker(options);\n\n // Checks, whether start and end locations are captured\n if (markerPoints.size() >= 2) {\n LatLng origin = markerPoints.get(0);\n LatLng dest = markerPoints.get(1);\n\n // Getting URL to the Google Directions API\n String url = getDirectionsUrl(origin, dest);\n\n DownloadTask downloadTask = new DownloadTask();\n\n // Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }\n\n }\n\n\n });\n }\n }",
"@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\tString coordinates[] = { \"\" + location.getLatitude(),\n\t\t\t\t\t\"\" + location.getLongitude() };\n\t\t\tdouble lat = Double.parseDouble(coordinates[0]);\n\t\t\tdouble lng = Double.parseDouble(coordinates[1]);\n\n\t\t\tGeoPoint p = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6));\n\n\t\t\tMyMapOverlays marker = new MyMapOverlays(p, MapDataActivity.this);\n\t\t\tList listOfOverLays = myMap.getOverlays();\n\t\t\tlistOfOverLays.clear();\n\t\t\tlistOfOverLays.add(marker);\n\n\t\t\tmyMap.invalidate();\n\t\t\t// Toast.makeText(MapDataActivity.this,\n\t\t\t// \"lat \"+location.getLatitude()+\"long \"+location.getLongitude(),\n\t\t\t// Toast.LENGTH_SHORT).show();\n\t\t}",
"@Override\n public void onMapReady(GoogleMap googleMap)\n {\n // This method is called AFTER the map is loaded from Google Play services\n // At this point the map is ready\n\n // Store the reference to the Google Map in our member variable\n mMap = googleMap;\n // Custom marker (Big Blue one - mymarker.png)\n LatLng myPosition = new LatLng(33.671028, -117.911305);\n\n // Add a custom marker at \"myPosition\"\n mMap.addMarker(new MarkerOptions().position(myPosition).title(\"My Location\").icon(BitmapDescriptorFactory.fromResource(R.drawable.my_marker)));\n\n // Center the camera over myPosition\n CameraPosition cameraPosition = new CameraPosition.Builder().target(myPosition).zoom(15.0f).build();\n CameraUpdate cameraUpdate = CameraUpdateFactory.newCameraPosition(cameraPosition);\n // Move map to our cameraUpdate\n mMap.moveCamera(cameraUpdate);\n\n // Then add normal markers for all the caffeine locations from the allLocationsList.\n // Set the zoom level of the map to 15.0f\n\n // Now, let's plot each Location form the list with a standard marker\n for (Location location : allLocationsList)\n {\n LatLng caffeineLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.addMarker(new MarkerOptions().position(caffeineLocation).title(location.getName()));\n }\n\n }",
"private void addMarker(MapboxMap mapboxMap) {\n MarkerOptions markerOptions = new MarkerOptions();\n\n IconFactory iconFactory = IconFactory.getInstance(LocateDoctorActivity.this);\n Icon icon = iconFactory.fromResource(R.drawable.mapquest_icon);\n\n markerOptions.position(new com.mapbox.mapboxsdk.geometry.LatLng(Double.parseDouble(selectedLat), Double.parseDouble(selectedLong)));\n markerOptions.snippet(\"Selected Location\");\n markerOptions.setIcon(icon);\n mapboxMap.addMarker(markerOptions);\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n // Add a marker in Bratislava and move the camera\n LatLng bratislava = new LatLng(48.148598, 17.107748);\n mMap.addMarker(new MarkerOptions().position(bratislava).title(\"Marker in Bratislava\").snippet(\"Hope you go there\"));\n\n CameraPosition bratislavaCam = CameraPosition.builder().target(bratislava).zoom(16).bearing(0).build();\n\n mMap.moveCamera(CameraUpdateFactory.newCameraPosition(bratislavaCam));\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n LatLng sydney = new LatLng(17.2231, 78.2827);\n marker = mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Hyderbbad\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n initializeMap();\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n final LatLng latLng = new LatLng(latitude, longitude);\n mMap.addCircle(new CircleOptions()\n .center(latLng)\n .radius(75)\n .strokeWidth(2f));\n CameraUpdate center=\n CameraUpdateFactory.newLatLng(latLng);\n CameraUpdate zoom=CameraUpdateFactory.zoomTo(21);\n\n mMap.moveCamera(center);\n mMap.animateCamera(zoom);\n Marker mark= mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .title(\"I'm here...\")\n .snippet(\"Its My Location\")\n .rotation((float) -15.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));\n\n Tmarker=mMap.addMarker(new MarkerOptions()\n .snippet(tuition_id)\n .rotation((float)12.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_ORANGE))\n .position(new LatLng(lat,lan)));\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n if(marker!=null) {\n marker.remove();\n }\n marker=mMap.addMarker(new MarkerOptions()\n .snippet(\"My Home\")\n .rotation((float)0.0)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .position(latLng));\n }\n });\n\n//.fillColor(0x55ffff99));\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n }",
"@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n final LatLng[] myLoc = {new LatLng(1, 1)};\n mMap.setMyLocationEnabled(true);\n// mMap.setOnMyLocationChangeListener(new GoogleMap.OnMyLocationChangeListener() {\n// @Override\n// public void onMyLocationChange(Location location) {\n// myLoc[0] = new LatLng(location.getLatitude(), location.getLongitude());\n// mMap.addCircle(new CircleOptions().center(myLoc[0]));\n// mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLoc[0], 15));\n// }\n// });\n\n mMap.addCircle(new CircleOptions().center(new LatLng(lat, lng)));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat, lng), 18));\n\n mMap.setOnPoiClickListener(new GoogleMap.OnPoiClickListener() {\n @Override\n public void onPoiClick(PointOfInterest poi) {\n\n }\n });\n\n mMap.getUiSettings().setMapToolbarEnabled(true);\n\n // Add a marker in Sydney and move the camera\n\n\n showItems(lat, lng, radius);\n }",
"@Override\n public void onMapReady(final GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n\n\n // Add a marker in Sydney and move the camera\n final LatLng sementeryo = new LatLng(7.063907, 125.585014);\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n\n\n @Override\n public void onMapClick(LatLng point) {\n\n if(destinationMarker != null) {\n\n destinationMarker.remove();\n\n }\n marker = new MarkerOptions().position(new LatLng(point.latitude, point.longitude)).title(\"Grave Location\");\n\n marker.icon(BitmapDescriptorFactory.fromResource(R.mipmap.grave_ic1));\n destinationMarker = mMap.addMarker(marker);\n\n\n System.out.println(point.latitude + \"---\" + point.longitude);\n\n // Toast.makeText(add_map.this, (point.latitude + \"---\" + point.longitude), Toast.LENGTH_LONG).show();\n\n Button button = (Button) findViewById(R.id.addlatlang);\n\n button.setBackgroundResource(R.drawable.blue_btn);\n button.setEnabled(true);\n\n lat=point.latitude;\n lang=point.longitude;\n\n\n }\n });\n\n Location locationf;\n locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n locationf = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\n double latitude = locationf.getLatitude();\n double longitude = locationf.getLongitude();\n\n final LatLng coordinate = new LatLng(latitude, longitude); //Store these lat lng values somewhere. These should be constant.\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n coordinate, 15);\n googleMap.animateCamera(location);\n\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(coordinate,18));\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n\n\n CameraUpdate location = CameraUpdateFactory.newLatLngZoom(\n sementeryo, 17);\n googleMap.animateCamera(location);\n\n }\n }, 5000);\n\n\n\n }"
] | [
"0.7403646",
"0.7391662",
"0.73650813",
"0.726704",
"0.7214454",
"0.70940614",
"0.7092615",
"0.70907176",
"0.7067379",
"0.70668113",
"0.7042033",
"0.7028732",
"0.7001196",
"0.6942474",
"0.6908988",
"0.69028777",
"0.6887828",
"0.68842906",
"0.6866279",
"0.68627447",
"0.6824887",
"0.6823596",
"0.68158543",
"0.677716",
"0.67533785",
"0.6719564",
"0.6719564",
"0.6719564",
"0.6719564",
"0.67085594",
"0.66945314",
"0.6694093",
"0.66806984",
"0.66377556",
"0.662834",
"0.66267776",
"0.66228014",
"0.66227376",
"0.661846",
"0.6607017",
"0.6595527",
"0.65891945",
"0.65815145",
"0.65768653",
"0.65667295",
"0.6560656",
"0.6541934",
"0.6530154",
"0.6516286",
"0.6486518",
"0.64801705",
"0.64800614",
"0.6478336",
"0.6470147",
"0.64657193",
"0.646304",
"0.6448297",
"0.64475024",
"0.6446358",
"0.64441717",
"0.6432611",
"0.6425117",
"0.64240474",
"0.64168316",
"0.64146805",
"0.64097446",
"0.64062613",
"0.6403785",
"0.64017934",
"0.63991123",
"0.6398746",
"0.639778",
"0.6396945",
"0.63914704",
"0.6382371",
"0.63818145",
"0.63792735",
"0.63705033",
"0.6367063",
"0.63648015",
"0.6361484",
"0.6349333",
"0.6348007",
"0.63386744",
"0.6328538",
"0.632285",
"0.6314227",
"0.6308766",
"0.63080263",
"0.63061094",
"0.6304619",
"0.62964344",
"0.62831956",
"0.62770617",
"0.62761885",
"0.62552696",
"0.62358385",
"0.62322766",
"0.62242043",
"0.6218971",
"0.62186724"
] | 0.0 | -1 |
Returns whether Address object can be created for location address String | private boolean canFindLocationAddress(){
Geocoder geo = new Geocoder(this);
//Get address provided for location as Address object
try{
List<Address> foundAddresses = geo.getFromLocationName(location.getAddress(),1);
//Return true if an address is found
return (foundAddresses.size() == 1);
}
catch(IOException e){
e.printStackTrace();
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasAddress();",
"boolean hasAddress();",
"boolean hasHasAddress();",
"private boolean isAddressValid(String s) {\n for (Property prt : propertyList) { //(String t : propertyAddrLine1s)\n if (prt.getAddrline1().matches(s)) {\n createdProperty = prt;\n return true;\n }\n }\n return false;\n }",
"private static boolean validateAddress(String address) {\n return !address.isEmpty();\n }",
"boolean hasAddressList();",
"@java.lang.Override\n public boolean hasAddress() {\n return address_ != null;\n }",
"public boolean hasAddress() {\n return addressBuilder_ != null || address_ != null;\n }",
"public boolean isAddressValid(String address) {\n\t\tString pattern = \"(^\\\\d+(w|e|s|n)\\\\d+\\\\s\\\\w+\\\\s\\\\w+\\\\.)\";\n\t\tboolean isMatch = Pattern.matches(pattern, address);\n return isMatch;\n }",
"private boolean validateAddress() {\n if (address==null) {\n tvAddress.setText(String.format(\"%s*\", getString(R.string.address_activity)));\n showToast(getString(R.string.error_address_required));\n return false;\n }\n return true;\n }",
"boolean hasLocation();",
"boolean hasLocation();",
"boolean hasAddressCreationStrategy();",
"boolean hasQueryAddress();",
"public boolean checkAddressSuported(String address) {\n\t\treturn false;\n\t}",
"public boolean isSetAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ADDRESS$2) != null;\n }\n }",
"public boolean checkValidAddress(String address) {\n for(int i = 0; i < address.length(); i++) {\n if(address.charAt(i) == '@') {\n return true;\n }\n }\n return false;\n }",
"public boolean isSetFromAddress()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMADDRESS$6) != 0;\n }\n }",
"@Test\n public void testIsValidAddress() {\n System.out.println(\"isValidAddress\");\n String address = \"Trion Ierarxon 86, Larissa\";\n boolean expResult = true;\n boolean result = ValidVariables.isValidAddress(address);\n assertEquals(expResult, result);\n }",
"boolean hasLocationNames();",
"protected boolean containsAddress(InetAddress address) {\n\t\ttry {\n\t\t\tPreparedStatement pstmt = this.agent.getDatabaseManager().getConnection().prepareStatement(\n\t\t\t\t\tthis.agent.getDatabaseManager().selectByAddress);\n\t\t\tif (address==null) pstmt.setString(1, \"localhost\");\n\t\t\telse pstmt.setString(1, NetworkManager.addressToString(address));\n\t ResultSet rs = pstmt.executeQuery();\n\t return !(rs.isClosed());\n\t\t} catch (SQLException e) {\n \tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to check if address %s is in the database\\n\",address), e);\n\t\t}\n\t\treturn true; // Pas accessible\n\t}",
"abstract public Address createAddress(String addr);",
"public boolean isSetAddress() {\n\t\treturn this.address != null;\n\t}",
"public boolean isExisted(String addressId) {\n //check if this address is already existed.\n return true;\n }",
"public abstract boolean locationExists(Location location);",
"boolean isAddressOf(int addr) {\n return addr == mAddress;\n }",
"boolean canPlaceRobber(HexLocation hexLoc);",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean containsAddress(String address)\n {\n boolean hasAddr = false;\n //Scan addresses for this address\n address = Numeric.cleanHexPrefix(address);\n for (String thisAddr : addresses)\n {\n if (thisAddr != null && thisAddr.contains(address))\n {\n hasAddr = true;\n break;\n }\n }\n\n return hasAddr;\n }",
"public boolean hasAddress() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean existsAddress(byte ip[])\n {\n try\n {\n return (resolve(ip)!=null); \n }\n catch (UnknownHostException e)\n {\n return false; \n }\n }",
"private static boolean validAddressREST_Postman() throws JSONException, IOException {\n\t\tOkHttpClient client = new OkHttpClient();\n\n\t\tString city = \"Lombard\";\n\t\tcity = \"\\\"\" + city + \"\\\"\";\n\t\t\n\t\tString state = \"IL\";\n\t\tstate = \"\\\"\" + state + \"\\\"\";\n\t\t\n\t\tString zip = \"60148\";\n\t\tzip = \"\\\"\" + zip + \"\\\"\";\n\t\t\n\t\tMediaType mediaType = MediaType.parse(\"application/json\");\n\t\tRequestBody body = RequestBody.create(mediaType,\n\t\t\t\t\"{\\r\\n\\t\\\"AccessRequest\\\": {\\r\\n\\t\\t\\\"UserId\\\": \\\"attarsaaniya\\\",\\r\\n\\t\\t\\\"AccessLicenseNumber\\\": \"\n\t\t\t\t+ \"\\\"DD33B9ADDD7ADDC8\\\",\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Password\\\": \\\"Summer2017\\\"\\r\\n\\t},\\r\\n\\t\\\"AddressValidationRequest\\\": \"\n\t\t\t\t+ \"{\\r\\n\\t\\t\\\"Address\\\": {\\r\\n\\t\\t\\t\\\"StateProvinceCode\\\": \" + state + \",\\r\\n\\t\\t\\t\"\n\t\t\t\t+ \"\\\"PostalCode\\\": \" + zip + \",\\r\\n\\t\\t\\t\\\"City\\\": \" + city + \"\\r\\n\\t\\t},\\r\\n\\t\\t\"\n\t\t\t\t+ \"\\\"Request\\\": {\\r\\n\\t\\t\\t\\\"TransactionReference\\\": {\\r\\n\\t\\t\\t\\t\\\"CustomerContext\\\": \"\n\t\t\t\t+ \"\\\"mycustomer\\\"\\r\\n\\t\\t\\t},\\r\\n\\t\\t\\t\\\"RequestAction\\\": \\\"AV\\\"\\r\\n\\t\\t}\\r\\n\\t}\\r\\n}\");\n\t\t\n\t\tRequest request = new Request.Builder().url(\"https://wwwcie.ups.com/rest/AV\").post(body).build();\n\n\t\tokhttp3.Response response = client.newCall(request).execute();\n\t\tJSONObject jResp = new JSONObject(response.body().string());\n\t\tSystem.out.println(jResp);\n\t\t\n\t\t// there shoudl be a better way to parse through the tree tbh\n\t\t// but this seems intuitive enough to do (though so extra) \n\t\tJSONObject addrValResp = jResp.getJSONObject(\"AddressValidationResponse\");\n\t\tJSONObject addrVal = addrValResp.getJSONObject(\"AddressValidationResult\");\n\t\tJSONObject addr = addrVal.getJSONObject(\"Address\");\n\t\tString cityResponse = addr.getString(\"City\");\n\t\tString stateResponse = addr.getString(\"StateProvinceCode\");\n\t\t\n\t\tString zipResponse = addrVal.getString(\"PostalCodeLowEnd\");\n\t\t\n\t\t\n\t\tSystem.out.println(cityResponse);\n\t\tSystem.out.println(stateResponse);\n\t\tSystem.out.println(zipResponse);\n//\t\tString success = addrVal\n\t\t\n\t\treturn false;\n\t}",
"boolean equals(String address) { return this.address.getHostAddress().equals(address); }",
"public boolean isValidAddress(TextInputLayout tiAddress, EditText etAddress) {\n return (validAddress(tiAddress, etAddress) != null);\n }",
"boolean hasBitcoinAddress();",
"public String isValidAddress(String s, int size, boolean executeNow) {\n\t\tif (size == -1) {\n\t\t\tsize = 1;\n\t\t}\n\t\tCalculatedAddress a = new CalculatedAddress(dataspace);\n\t\tString errorString = a.readFromString(s);\n\t\tif (errorString != null) {\n\t\t\treturn errorString;\n\t\t}\n\t\treturn a.isValid(size, executeNow);\n\t}",
"abstract void addressValidity();",
"public boolean streetIsValid() {\n return street.length() > 0 && street.length() < MAX_STREET_LENGTH && street.indexOf(',') == -1;\n }",
"@GET\n\t @Produces(MediaType.APPLICATION_JSON)\n\t public String checkLocationValidity(@QueryParam(\"address\") String addr) {\n\t\t String response;\n\t\t if(checkaddress(addr)) {\n\t\t\t //obj.put(\"Location\", \"Office\");\n\t\t\t response = ConstructJSON.constructJSON(\"Yes Office\", true);\n\t\t } else {\n\t\t\t //obj.put(\"location\", \"not office\");\n\t\t\t response = ConstructJSON.constructJSON(\"NOT Office\", false);\n\t\t }\n\t\t System.out.println(\"----*****-----\"+response);\n\t return response;\n\t }",
"public Address createAddress(String address);",
"public boolean containsAddress(String address) {\n\t\treturn tseqnums.containsKey(address);\n\t}",
"Address createAddress();",
"private static boolean validateLocationType(String locationType) {\n return !locationType.isEmpty();\n }",
"boolean hasResponseAddress();",
"public Address validAddress(TextInputLayout tiAddress, EditText etAddress) {\n String addressString = etAddress.getText().toString().trim();\n Address address = null;\n\n if (addressString.length() == 0)\n tiAddress.setError(c.getString(R.string.required));\n else if (addressString.length() < ADDRESS_MIN_SIZE)\n tiAddress.setError(c.getString(R.string.minLength, Integer.toString(ADDRESS_MIN_SIZE)));\n else if (addressString.length() > ADDRESS_MAX_SIZE)\n tiAddress.setError(c.getString(R.string.maxLength, Integer.toString(ADDRESS_MAX_SIZE)));\n else {\n Geocoder geocoder = new Geocoder(c, Locale.getDefault());\n addressString += \", BC\";\n try {\n List<Address> addressList = geocoder.getFromLocationName(addressString, 1);\n if (addressList == null || addressList.size() == 0)\n tiAddress.setError(c.getString(R.string.invalid));\n else {\n tiAddress.setError(null);\n address = addressList.get(0);\n }\n } catch (Exception ex) {\n Log.d(TAG, ex.getMessage());\n tiAddress.setError(c.getString(R.string.checkInternet));\n }\n }\n\n return address;\n }",
"public boolean a(String str, AmapLoc amapLoc) {\n if (TextUtils.isEmpty(str) || !cw.a(amapLoc) || str.startsWith(\"#\")) {\n return false;\n }\n boolean z = true;\n if (!str.contains(\"network\")) {\n z = false;\n }\n return z;\n }",
"private boolean isValidLocationFound() {\n return latitudeValue != null && longitudeValue != null;\n }",
"public boolean checkLocations(String location, String range) {\n boolean locationPresent = location != null && !location.isEmpty();\n\n\n if (locationPresent) {\n // Parses the location and range strings into doubles\n String[] locationComponents = location.replaceAll(\" \", \"\").split(\",\");\n latitude = Double.parseDouble(locationComponents[0]);\n longitude = Double.parseDouble(locationComponents[1]);\n desiredRange = Double.parseDouble(range.replace(\"km\", \"\").trim());\n }\n return locationPresent;\n }",
"public static boolean isWellFormedAddress(String address) {\n if (address == null) {\n return false;\n }\n \n int addrLength = address.length();\n if (addrLength == 0) {\n return false;\n }\n \n // Check if the host is a valid IPv6reference.\n if (address.startsWith(\"[\")) {\n return isWellFormedIPv6Reference(address);\n }\n \n // Cannot start with a '.', '-', or end with a '-'.\n if (address.startsWith(\".\") || \n address.startsWith(\"-\") || \n address.endsWith(\"-\")) {\n return false;\n }\n \n // rightmost domain label starting with digit indicates IP address\n // since top level domain label can only start with an alpha\n // see RFC 2396 Section 3.2.2\n int index = address.lastIndexOf('.');\n if (address.endsWith(\".\")) {\n index = address.substring(0, index).lastIndexOf('.');\n }\n \n if (index+1 < addrLength && isDigit(address.charAt(index+1))) {\n return isWellFormedIPv4Address(address);\n }\n else {\n // hostname = *( domainlabel \".\" ) toplabel [ \".\" ]\n // domainlabel = alphanum | alphanum *( alphanum | \"-\" ) alphanum\n // toplabel = alpha | alpha *( alphanum | \"-\" ) alphanum\n \n // RFC 2396 states that hostnames take the form described in \n // RFC 1034 (Section 3) and RFC 1123 (Section 2.1). According\n // to RFC 1034, hostnames are limited to 255 characters.\n if (addrLength > 255) {\n return false;\n }\n \n // domain labels can contain alphanumerics and '-\"\n // but must start and end with an alphanumeric\n char testChar;\n int labelCharCount = 0;\n \n for (int i = 0; i < addrLength; i++) {\n testChar = address.charAt(i);\n if (testChar == '.') {\n if (!isAlphanum(address.charAt(i-1))) {\n return false;\n }\n if (i+1 < addrLength && !isAlphanum(address.charAt(i+1))) {\n return false;\n }\n labelCharCount = 0;\n }\n else if (!isAlphanum(testChar) && testChar != '-') {\n return false;\n }\n // RFC 1034: Labels must be 63 characters or less.\n else if (++labelCharCount > 63) {\n return false;\n }\n }\n }\n return true;\n }",
"@Override\n\tpublic boolean IsDeliveryaddressValid(String name, String street, String city, String province, String postalcode) {\n\t\t\n\t\tData data = new Data();\n\t\tList<Deliveryaddress> deliveryaddress = data.getDeliveryaddressData();\n\t\t\n\t\tfor(Deliveryaddress d: deliveryaddress) {\n\t\t\tif(name.equals(d.name) && street.equals(d.street) && city.equals(d.city) && province.equals(d.province) && postalcode.equals(d.postalcode)) {\n\t\t\t\treturn true;\n\t\t }\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"public boolean hasLocation() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasLocation() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasLocation()\n\t{\n\t\treturn location != null;\n\t}",
"public abstract Boolean isExist(LocationDto location);",
"boolean hasCoordInfo();",
"private static boolean isValidIpAddress(String value) {\n boolean status = true;\n try {\n Ip4Address ipAddress = Ip4Address.valueOf(value);\n } catch (Exception e) {\n log.debug(\"Invalid IP address string: {}\", value);\n return false;\n }\n\n return status;\n }",
"public boolean hasExternalAddressbooks() throws RemoteException;",
"public boolean hasADDRESSIND() {\n return fieldSetFlags()[8];\n }",
"boolean hasLatLng();",
"@Override\n\tpublic boolean isLocalAddress(EmailAddress address)\n\t{\n\t\treturn false;\n\t}",
"Collection<? extends String> getHasAddress();",
"public boolean isContentAddressable();",
"public static boolean validateAddress(String address) throws BitcoinException{\n\t\treturn BITCOIN.validateAddress(address).isValid();\n\t}",
"boolean hasLongitude();",
"boolean hasLongitude();",
"public boolean isAssignedToLocation() {\n if (location == null) {\n return false;\n }\n return true;\n }",
"@Override\n public boolean isCommunicte(String addr) {\n return mCommunciation.isCommunicte(addr);\n }",
"protected int isExternByAddress(String address) {\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().selectByAddress);\n\t pstmt.setString(1,address);\n\t ResultSet rs = pstmt.executeQuery();\n\t return rs.getInt(\"isExtern\");\n\t\t} catch (Exception e) {\n\t\t\tAgent.errorMessage(\n\t\t\t\t\tString.format(\"ERROR when trying to get isExtern of address %s in the database\\n\",address), e);\n\t\t}\n return 0; // Pas accessible\n\t}",
"void addHasAddress(String newHasAddress);",
"public static boolean m16888b(String str) {\n if (str.startsWith(\"tel:\") || str.startsWith(\"voicemail:\") || str.startsWith(\"sms:\") || str.startsWith(\"mailto:\") || str.startsWith(\"geo:\") || str.startsWith(\"google.streetview:\")) {\n return true;\n }\n try {\n new URL(str);\n return false;\n } catch (MalformedURLException e) {\n StringBuilder sb = new StringBuilder(\"Failed to open Url: \");\n sb.append(str);\n IAlog.m18023d(sb.toString());\n return true;\n }\n }",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"public boolean setupOwnAddress() {\n\t\tboolean success = false;\n\t\ttry {\n\t\t\tthis.ownAddress = NetworkLayer.getOwnAddress(); // TODO replace by discover?\n\t\t\tthis.showNamedMessage(\"Client listing on: \" + this.ownAddress);\n\t\t\tthis.showNamedMessage(\"NOTE: depending on detection method,\"\n\t\t\t\t\t+ \" this may NOT be the actual interface used\");\n\t\t\tthis.showNamedMessage(\"Discovered preferred local address: \" \n\t\t\t\t\t+ NetworkLayer.discoverLocalAddress());\n\t\t\tsuccess = true;\n\t\t} catch (UnknownHostException e) {\n\t\t\tthis.showNamedMessage(\"Could not determine own address: \" + e.getLocalizedMessage());\n\t\t} \n\t\treturn success;\n\t}",
"public boolean validateContactAddress(String contactId, List<String> result)\n {\n return true;\n }",
"public static boolean isValid(Location l)\n\t{\n\t\treturn l != null || Maze.isInBounds(l);\n\t}",
"public String isAddressExists(int id, String addressBook) {\n\t\treturn controller.isAddressExists(id, addressBook);\n\t}",
"boolean hasGeoInformation(String id);",
"public boolean verifyLeaveLocation(String location){\n\t\tint separator = leaveLocation.getText().indexOf(\">\");\t\t\n\t\treturn leaveLocation.getText().substring(0, separator).contains(\"(\" + location + \")\");\n\t}",
"public Address validate(Client client, String address) throws BytomException {\n\t\t\tMap<String, Object> req = new HashMap<String, Object>();\n\t\t\treq.put(\"address\", address);\n\t\t\treturn client.request(\"validate-address\", req, Address.class);\n\t\t}",
"public boolean hasMemoryAddress()\r\n/* 138: */ {\r\n/* 139:167 */ return false;\r\n/* 140: */ }",
"private boolean checkRangeAddress(int address) {\r\n return (address >= startAddress && address < endAddress);\r\n }",
"public static boolean validateLocation(String input){\n\t\tif (input.matches(\"^\\\\{\\\".*\\\"(\\\\s|):.+\\\\}$\") && input.contains(\"\\\"\" + InterviewData.INPUT + \"\\\"\")){\n\t\t\t//System.out.println(\"IS VALID: \" + input); \t\t//debug\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"boolean hasCoordinates();",
"boolean hasHasLongitude();",
"private boolean buildStreetIsAllowed() {\r\n\t\tif (clickedRoad.getEnd() == lastSettlementNode\r\n\t\t\t\t|| clickedRoad.getStart() == lastSettlementNode) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private boolean isAssignedPosition(String location) {\n return productTypeRepository.findAll().stream().anyMatch(p -> p.getLocation().equals(location));\n }",
"String getAddress();",
"String getAddress();",
"public boolean containsLocation(Location p) {\n\t\tint r = p.getRow();\n\t\tint c = p.getCol();\n\t\tint offR = r - topLeft.getRow();\n\t\tint offC = c - topLeft.getCol();\n\t\treturn 0 <= offR && offR < length && 0 <= offC && offC < width;\n\t}",
"boolean hasHasLatitude();",
"boolean hasLatitude();",
"boolean hasLatitude();",
"private boolean isAllowedAddress(String ipAddress) {\n if (allowedAddresses == null) {\n return false;\n }\n\n // IPv4\n int offset = ipAddress.lastIndexOf('.');\n if (offset == -1) {\n // IPv6\n offset = ipAddress.lastIndexOf(':');\n if (offset == -1) {\n return false;\n }\n }\n\n String ipAddressClass = ipAddress.substring(0, offset + 1) + '*';\n return (allowedAddresses.contains(ipAddressClass) || allowedAddresses.contains(ipAddress));\n }",
"private String getValidAddress(String addr) {\n\t\tint length = addr.length();\n\t\tif(length < ADDRESS_BITS) {\n\t\t\tint toAdd = ADDRESS_BITS - length;\n\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\tfor(int i = 0; i < toAdd; i++) {\n\t\t\t\tbuilder.append(0);\n\t\t\t}\n\t\t\tbuilder.append(addr);\n\t\t\treturn builder.toString();\n\t\t} else {\n\t\t\tint toRemove = length - ADDRESS_BITS;\n\t\t\t\n\t\t\treturn addr.substring(toRemove, length);\n\t\t}\n\t}"
] | [
"0.759911",
"0.759911",
"0.74118495",
"0.7189626",
"0.67880505",
"0.67586887",
"0.6701206",
"0.66910636",
"0.66383964",
"0.663375",
"0.6609181",
"0.6609181",
"0.6587685",
"0.6484887",
"0.64467293",
"0.6430563",
"0.641631",
"0.6371728",
"0.63518596",
"0.6348716",
"0.6268526",
"0.6252409",
"0.6236944",
"0.62157345",
"0.61897576",
"0.6184753",
"0.6174437",
"0.6168733",
"0.6160938",
"0.61415195",
"0.61316854",
"0.6126025",
"0.61109024",
"0.6064304",
"0.6056792",
"0.60410774",
"0.60409826",
"0.602711",
"0.6025514",
"0.5994026",
"0.59886855",
"0.59746206",
"0.59636295",
"0.5950225",
"0.58766305",
"0.58741",
"0.5870414",
"0.5865268",
"0.5832385",
"0.581234",
"0.5800338",
"0.5785282",
"0.5776473",
"0.577004",
"0.5749875",
"0.57207024",
"0.5716381",
"0.56958646",
"0.56609637",
"0.56567824",
"0.56338865",
"0.56315106",
"0.56207407",
"0.5608298",
"0.5608298",
"0.5587054",
"0.5582802",
"0.5575891",
"0.55666125",
"0.5560636",
"0.5557428",
"0.5557428",
"0.5557428",
"0.5557428",
"0.5557428",
"0.5557428",
"0.5552884",
"0.55390763",
"0.553899",
"0.5529366",
"0.5524395",
"0.55053294",
"0.5500442",
"0.5494387",
"0.5493191",
"0.5484408",
"0.5477867",
"0.5477867",
"0.5477867",
"0.5476676",
"0.546856",
"0.54664004",
"0.5465652",
"0.5465652",
"0.54650235",
"0.54590505",
"0.5421617",
"0.5421617",
"0.54196054",
"0.5417746"
] | 0.78995395 | 0 |
Populate all activity views based on available resources | private void populateView(){
//Display image without blocking, and cache it
ImageView imageView = (ImageView) findViewById(R.id.activity_location_image);
Picasso.with(this)
.load(location.getImageURL()).fit().centerCrop().into(imageView);
//Display description
TextView description = (TextView) findViewById(R.id.activity_location_description);
description.setText(location.getDescription());
//Display hours
TextView hours = (TextView) findViewById(R.id.activity_location_hours);
hours.setText(location.getStringOpenHours());
//Display google maps, map IF address can be found
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.activity_location_map);
if (canFindLocationAddress()){
//Set width and height of map
mapFragment.getView().getLayoutParams().height = getMapHeight();
mapFragment.getView().offsetLeftAndRight(50);
mapFragment.getMapAsync(this);
}
//Hide the map otherwise
else{
mapFragment.getView().setVisibility(View.INVISIBLE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadViews(){\n\t}",
"@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}",
"private void initializeViews()\n {\n ButterKnife.bind(this);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n rv_my_vehicles.setLayoutManager(layoutManager);\n rv_my_vehicles.setAdapter(myVehiclesAdapter);\n\n myVehiclesAdapter.setParent(getIntent().getIntExtra(COMING_FROM,0));\n presenter.fetchMyVehicles();\n progressDialog = alerts.getProcessDialog(this);\n progressDialog.setCancelable(false);\n\n tv_all_tool_bar_title.setText(my_vehicles);\n tv_all_tool_bar_title.setTypeface(appTypeface.getPro_narMedium());\n tv_add_new_vehicle.setTypeface(appTypeface.getPro_narMedium());\n tv_vehicles_empty.setTypeface(appTypeface.getPro_narMedium());\n }",
"private void initViews() {\n /* Intent get data handler */\n fullScreenSnap = (ImageView) findViewById(R.id.fullScreenSnap);\n mToolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbar);\n getSupportActionBar().setTitle(AppConstants.imageName);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n mToolbar.setNavigationIcon(R.drawable.back_button);\n }",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.progressive_next_view_layout, this);\n }",
"protected abstract void initViews();",
"private void initializeView() {\n InputStream is1 = getContext().getResources().openRawResource(+R.drawable.congratulations);\n mMovie1 = Movie.decodeStream(is1);\n InputStream is2 = getContext().getResources().openRawResource(+R.drawable.giffy3);\n mMovie2 = Movie.decodeStream(is2);\n InputStream is3 = getContext().getResources().openRawResource(+R.drawable.giffy4);\n mMovie3 = Movie.decodeStream(is1);\n InputStream is4 = getContext().getResources().openRawResource(+R.drawable.giphy1);\n mMovie4 = Movie.decodeStream(is4);\n }",
"private void initViews() {\n\n\t}",
"public void initViews() {\n View accountExists = activity.findViewById(R.id.button_register);\n Button buttonSubmitAuth = activity.findViewById(R.id.button_login);\n\n viewUsername = activity.findViewById(R.id.login_username);\n viewPassword = activity.findViewById(R.id.login_password);\n\n accountExists.setOnClickListener(view ->\n activity.setViewPagerCurrentItem(OnboardingActivity.Companion.getFRAGMENT_REGISTRATION()));\n\n buttonSubmitAuth.setOnClickListener(view -> authenticateUser());\n }",
"public abstract void initViews();",
"private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }",
"private void initActivities() {\n MainController mainController = new MainController();\n int n = mainController.getActivitiesByOwner(LoggedUser.getUser().getUsername()).size();\n panel = new JPanel(new GridLayout(n, 2, 10, 10));\n add(panel);\n for (int i = n - 1; i >= 0; i--) {\n panel.add(new JLabel(\" \" + mainController.getActivitiesByOwner\n (LoggedUser.getUser().getUsername()).get(i).getActivity()));\n panel.add(new JLabel(mainController.getActivitiesByOwner\n (LoggedUser.getUser().getUsername()).get(i).getTime() + \" \"));\n }\n }",
"private void initViews() {\n\n }",
"private void initViews() {\n setActionBarTitle(R.string.my_energy_metabolism);\n mViewPager = (CustomViewPager) findViewById(R.id.viewPager);\n }",
"private void inflateViews() {\n toolbar = findViewById(R.id.toolbar);\n viewPager = findViewById(R.id.view_pager);\n tabLayout = findViewById(R.id.tab_layout);\n toolbar.setTitle(\"ChatApp\");\n setSupportActionBar(toolbar);\n }",
"private void populateViewCollections() {\n\n\t}",
"private void initViews() {\n\t\t// TODO Auto-generated method stub\n\t\t// venuePager = (ViewPager)findViewById(R.id.pager);\n\n\t\tmyGallery = (LinearLayout) findViewById(R.id.horizontalScrollItems);\n\n\t\tvenueImageLarge = (ImageView) findViewById(R.id.imageVenueLarge);\n\n\t\tinfoImageView = (ImageView) findViewById(R.id.imageInfo);\n\n\t\tcloseBtn = (ImageView) findViewById(R.id.imageclose);\n\n\t\tvenueCapacity = (TextView) findViewById(R.id.venueCapacity);\n\n\t\tvenueDes = (TextView) findViewById(R.id.venueDes);\n\n\t\tvenueName = (TextView) findViewById(R.id.venueName);\n\n\t\tvenueRelative = (RelativeLayout) findViewById(R.id.venue_relative);\n\n\t\tviewAnimator = (ViewAnimator) this.findViewById(R.id.viewFlipper_venue);\n\n\t\tvenueFullname = (TextView) findViewById(R.id.venueFullnameValue);\n\n\t\tvenueCity = (TextView) findViewById(R.id.venueCityValue);\n\n\t\tvenueOwner = (TextView) findViewById(R.id.venueOwnerValue);\n\n\t\tvenueOpened = (TextView) findViewById(R.id.venueOpenedValue);\n\n\t\tvenueSurface = (TextView) findViewById(R.id.venueSurfaceValue);\n\n\t\tvenueWebsite = (TextView) findViewById(R.id.venueWebsiteValue);\n\n\n\t}",
"private void initViews() {\n vpSplashPager = findViewById(R.id.vp_splash);\n pageIndicatorView = findViewById(R.id.pageIndicatorView);\n tvSplashDesc = findViewById(R.id.tv_splash_desc);\n tvSplashSkip = findViewById(R.id.tv_splash_skip);\n tvSplashTitle = findViewById(R.id.tv_splash_title);\n }",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}",
"public void initViews() {\n rb_greenTablet = findViewById(R.id.green_tablet);\n rb_blackTablet = findViewById(R.id.black_tablet);\n rb_fireTablet = findViewById(R.id.fire_tablet);\n }",
"public void initViews(){\n }",
"@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}",
"private void initTaskViews(){\n for (Task t : taskManager.getTasksList()){\n submit(t.getName(), t.getIdInView(), t.getTimeForTask(), t.isFinished());\n }\n }",
"private void initViews() {\n mDatabaseHandler = DatabaseHandler.getInstance(HomeActivity.this);\n Toolbar toolbar = (Toolbar) findViewById(R.id.activity_home_toolbar);\n setSupportActionBar(toolbar);\n mFab = (FloatingActionButton) findViewById(R.id.activity_home_fab);\n mMonthsList = new ArrayList<>();\n }",
"protected abstract void initViews(View mView);",
"private void initViews() {\n textViewRole = findViewById(R.id.textViewAddress);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n appCompatButtonAddProperty = findViewById(R.id.appCompatButtonAddProperty);\n }",
"private void findViews() {\n // Buttons first\n closeBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"closeBtn\", \"id\", getApplication().getPackageName()));\n shareBtn = (ImageButton) findViewById(getApplication().getResources().getIdentifier(\"shareBtn\", \"id\", getApplication().getPackageName()));\n\n //ProgressBar\n loadingBar = (ProgressBar) findViewById(getApplication().getResources().getIdentifier(\"loadingBar\", \"id\", getApplication().getPackageName()));\n // Image Container\n image = (TouchImageView) findViewById(getApplication().getResources().getIdentifier(\"imageView\", \"id\", getApplication().getPackageName()));\n \n\n // Title TextView\n titleTxt = (TextView) findViewById(getApplication().getResources().getIdentifier(\"titleTxt\", \"id\", getApplication().getPackageName()));\n }",
"private void initializeViews(Context context) {\n this.context = context;\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.alphabet_indexer_view, this);\n }",
"private void initializeViews() {\n \n \t\tIViewReference[] views = PlatformUI.getWorkbench().getActiveWorkbenchWindow()\n \t\t\t\t.getActivePage().getViewReferences();\n \n\t\tIWorkbenchPart activeView = PlatformUI.getWorkbench().getActiveWorkbenchWindow()\n\t\t\t\t.getActivePage().getActivePart();\n\n \t\ttry {\n \t\t\tfor (IViewReference view : views) {\n\n\t\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()\n\t\t\t\t\t\t.showView(view.getId());\n\t\t\t}\n\n\t\t\tif (activeView instanceof CaleydoRCPViewPart) {\n\t\t\t\t// Make sure that the active part will remain active\n \t\t\t\tPlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()\n\t\t\t\t\t\t.showView(((CaleydoRCPViewPart) activeView).getSite().getId());\n \t\t\t}\n \t\t}\n \t\tcatch (PartInitException e) {\n \t\t\tthrow new IllegalStateException();\n \t\t}\n \n \t}",
"private void initialiseViews() {\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n bindings = DataBindingUtil.setContentView(this, R.layout.activity_catalog_product);\n bindings.activityCatalogProductPb.setVisibility(View.GONE);\n\n bindings.activityCatalogProductFab.setOnClickListener(v -> {\n\n Intent addProductIntent = new Intent(ProductCatalogMain.this,\n ProductEditor.class);\n startActivity(addProductIntent);\n\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n\n });\n\n setSupportActionBar(bindings.activityCatalogProductToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n tabPageAdapter = new ProductCatalogFragmentPageAdapter(getSupportFragmentManager());\n tabViewPager = bindings.activityCatalogProductVp;\n tabViewPager.setAdapter(tabPageAdapter);\n\n if (bindings.activityCatalogProductVp != null) {\n setupViewPager(bindings.activityCatalogProductVp);\n }\n\n // Sets up the Tab's and their titles.\n bindings.activityCatalogProductTl.setupWithViewPager(bindings.activityCatalogProductVp);\n\n }",
"private void initializeViews()\n {\n scrMainContainer = findViewById(R.id.scrMainContainer);\n btnBack = findViewById(R.id.btnBack);\n etEmail = findViewById(R.id.etEmail);\n tvEmailError = findViewById(R.id.tvEmailError);\n etUsername = findViewById(R.id.etUsername);\n tvUsernameError = findViewById(R.id.tvUsernameError);\n etPassword = findViewById(R.id.etPassword);\n tvPasswordError = findViewById(R.id.tvPasswordError);\n btnCreateAccount = findViewById(R.id.btnCreateAccount);\n relLoadingPanel = findViewById(R.id.relLoadingPanel);\n }",
"private static void registerAllViews() {\n Aggregation latencyDistribution =\n Aggregation.Distribution.create(BucketBoundaries.create(Arrays.asList(0.0, 5.0, 10.0, 15.0, 20.0)));\n\n // Define the views\n List<TagKey> noKeys = new ArrayList<TagKey>();\n View[] views =\n new View[]{\n View.create(\n Name.create(\"ocjavaexporter/latency\"),\n \"The distribution of latencies\",\n M_LATENCY_MS,\n latencyDistribution,\n noKeys)\n };\n\n // Create the view manager\n ViewManager vmgr = Stats.getViewManager();\n\n // Then finally register the views\n for (View view : views) {\n vmgr.registerView(view);\n }\n }",
"private void initializeViews() {\n avatarView = (AvatarView) findViewById(R.id.avatarImage);\n userNameText = (TextView) findViewById(R.id.user_profile_name);\n userJoinedText = (TextView) findViewById(R.id.user_date_joined);\n followingButton = (Button) findViewById(R.id.following_btn);\n backButton = (ImageButton) findViewById(R.id.back_button);\n settingButton = (ImageButton) findViewById(R.id.settings_button);\n cameraButton = (ImageButton) findViewById(R.id.camera_button);\n\n cameraButton.setVisibility(View.GONE);\n settingButton.setVisibility(View.GONE);\n\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n setupViewPager(viewPager);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n tabLayout.setupWithViewPager(viewPager);\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tinitView();\r\n\t\tgetListDataFromLocal();\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}",
"private void initializeViews() {\n list_latest_feeds = (RecyclerView) mView.findViewById(R.id.list_latest_feeds);\n swipeRefreshLayout = (SwipeRefreshLayout) mView.findViewById(R.id.swipeRefreshLayout);\n disabler = new RecyclerViewDisabler();\n swipeRefreshLayout.setOnRefreshListener(this);\n InterfaceListener.setOnDeleteListener(LatestFragment.this);\n\n initRecyclerView();\n }",
"private void initViews(){\n mTitle = (EditText) findViewById(R.id.scheduled_event_title);\n mDescription = (EditText) findViewById(R.id.scheduled_event_description);\n mHour = (EditText) findViewById(R.id.scheduled_event_time_hour);\n mMinute = (EditText) findViewById(R.id.scheduled_event_time_minutes);\n mCategorySpinner = (Spinner) findViewById(R.id.scheduled_spinner_categories);\n mDueDate = (TextView) findViewById(R.id.tv_scheduled_event_due_date);\n mDueTime = (TextView) findViewById(R.id.tv_scheduled_event_due_time);\n }",
"private void initializeViews() {\n titleTV = (TextView) findViewById(R.id.displayTitle);\n typeTV = (TextView) findViewById(R.id.displayType);\n categoryTV = (TextView) findViewById(R.id.displayCategory);\n amountTV = (TextView) findViewById(R.id.displayAmount);\n partyTV = (TextView) findViewById(R.id.displayParty);\n modeTV = (TextView) findViewById(R.id.displayMode);\n dateTV = (TextView) findViewById(R.id.displayDate);\n descriptionTV = (TextView) findViewById(R.id.displayDescription);\n currencyTV = (TextView)findViewById(R.id.displayCurrency);\n\n //find all buttons\n editButton = (FloatingActionButton) findViewById(R.id.editButton);\n deleteButton = (FloatingActionButton) findViewById(R.id.deleteButton);\n\n\n }",
"private void populateScreenViewMap() {\n\n log.debug(\"Populating the screens\");\n\n for (Screen screen : Screen.values()) {\n\n AbstractScreenView view = Screens.newScreen(screen);\n\n // Keep track of the view instances but don't initialise them\n screenViewMap.put(screen, view);\n\n }\n\n }",
"public void initViews(){\n layout_health = (RelativeLayout) findViewById(R.id.layout_health);\n layout_msg = (RelativeLayout) findViewById(R.id.layout_msg);\n layout_usercenter = (RelativeLayout) findViewById(R.id.layout_usercenter);\n\n// img_home = (ImageView) findViewById(R.id.img_home);\n img_health = (ImageView) findViewById(R.id.img_health);\n img_msg = (ImageView) findViewById(R.id.img_msg);\n img_usercenter = (ImageView) findViewById(R.id.img_usercenter);\n\n// tv_home = (TextView) findViewById(R.id.tv_home);\n tv_health = (TextView) findViewById(R.id.tv_health);\n tv_msg = (TextView) findViewById(R.id.tv_msg);\n tv_usercenter = (TextView) findViewById(R.id.tv_usercenter);\n\n }",
"private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }",
"private void prepareViews() {\n mTextViewHeader = (TextView) mHeaderView.findViewById(R.id.tv_text_header_enhanced_listview);\n mTextViewFooter = (TextView) mFooterView.findViewById(R.id.tv_text_footer_enhanced_listview);\n mTextViewTime = (TextView) mHeaderView.findViewById(R.id.tv_time_update_header);\n\n mArrowHeader = mHeaderView.findViewById(R.id.arrow_header);\n mArrowFooter = mFooterView.findViewById(R.id.arrow_footer);\n\n mPbHeader = mHeaderView.findViewById(R.id.pb_header_enhanced_listview);\n mPbFooter = mFooterView.findViewById(R.id.pb_footer_enhanced_listview);\n\n }",
"private void injectViews() {\n Field[] declaredFields = getClass().getDeclaredFields();\n for (Field declaredField : declaredFields) {\n if(declaredField.isAnnotationPresent(InjectView.class)) {\n declaredField.setAccessible(true);\n try {\n declaredField.set(this, findViewById(declaredField.getAnnotation(InjectView.class).value()));\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}",
"private void initViews(View view) {\n\n tvEmptyView = view.findViewById(R.id.tv_empty_view);\n swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_layout);\n\n contentLayout = view.findViewById(R.id.content_layout);\n\n RecyclerView.LayoutManager manager = new LinearLayoutManager(view.getContext());\n RecyclerView mRecyclerView = (RecyclerView) contentLayout;\n mRecyclerView.setLayoutManager(manager);\n\n String sportsType = getRequestParameters().get(ScoresContentHandler.PARAM_SPORTS_TYPE);\n mAdapter = new BroadcastListAdapter(sportsType, commentaries, view.getContext());\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.notifyDataSetChanged();\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n\n @Override\n public void onRefresh() {\n requestContent();\n }\n\n });\n }",
"public static void preloadItemViews(Context context) {\n LayoutInflater inflater =\n (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n // Use a fake parent to make the layoutParams set correctly.\n ViewGroup fakeParent = new LinearLayout(context);\n for (int id : PRELOADED_VIEW_IDS) {\n sRecycledViewPool.setMaxRecycledViews(id, PRELOADED_VIEW_SIZE);\n for (int j = 0; j < PRELOADED_VIEW_SIZE; ++j) {\n View view = inflater.inflate(id, fakeParent, false);\n ViewCache.getInstance().putView(id, view);\n }\n }\n }",
"private void findViews() {\r\n\t\t// Buttons first\r\n\t\tcloseBtn = (ImageButton) findViewById( getApplication().getResources().getIdentifier(\"closeBtn\", \"id\", getApplication().getPackageName()) );\r\n\t\tshareBtn = (ImageButton) findViewById( getApplication().getResources().getIdentifier(\"shareBtn\", \"id\", getApplication().getPackageName()) );\r\n\t\t// Photo Container\r\n\t\tphoto = (ImageView) findViewById( getApplication().getResources().getIdentifier(\"photoView\", \"id\", getApplication().getPackageName()) );\r\n\t\twarning = this.getResources().getIdentifier(\"warning\", \"drawable\", getApplication().getPackageName());\r\n\t\tplace = this.getResources().getIdentifier(\"no_media\", \"drawable\", getApplication().getPackageName());\r\n\t\tmAttacher = new PhotoViewAttacher(photo);\r\n\t\t// Title TextView\r\n\t\t//titleTxt = (TextView) findViewById( getApplication().getResources().getIdentifier(\"titleTxt\", \"id\", getApplication().getPackageName()) );\r\n\t\tprogress = (ProgressBar) findViewById( getApplication().getResources().getIdentifier(\"progressBar\", \"id\", getApplication().getPackageName()));\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}",
"public void fillViews(){\n if(interestPoint.getContents().size() > 0){\n contentList = (RecyclerView)findViewById(R.id.recyclerView);\n contentList.setAdapter(new ContentSelectionAdapter(this, interestPoint.getContents())); // Pass the ids for the icons\n contentList.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false));\n\n // Get first subject to populate views\n Content first = interestPoint.getContents().get(0);\n\n Content.DisplayValues dv = first.getDisplayValues(Locale.getDefault());\n ((TextView) findViewById(R.id.subject_title)).setText(dv.title);\n ((TextView) findViewById(R.id.subject_content)).setText(Html.fromHtml(dv.description));\n\n // Load multimedia\n LayoutInflater inflater = getLayoutInflater();\n LinearLayout linearLayout = ((LinearLayout)findViewById(R.id.content_container));\n linearLayout.removeAllViewsInLayout();\n for(Multimedia m : first.getMultimedia()){\n NetworkImageView imageView = (NetworkImageView) inflater.inflate(R.layout.content_image, null);\n String url = \"http://\" + m.geteURL();\n ImageLoader loader = RequestManager.getInstance(getApplicationContext()).getImageLoader();\n loader.get(url, loader.getImageListener(imageView, R.mipmap.ic_launcher, R.mipmap.ic_launcher_round));\n imageView.setImageUrl(url, loader);\n\n linearLayout.addView(imageView);\n }\n\n final int pathID = (int)getIntent().getExtras().getLong(\"PathwayID\");\n // Read the path from the network\n PathUtils.readPathFromNetwork(this, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n path = PathwayJSON.createFullPathFromJSON(ContentActivity.this, response);\n }catch(Exception e){\n Log.e(\"PATH LOADING ERROR\", \"Failed loading the path\");\n }\n\n ((TextView)findViewById(R.id.regionText)).setText(String.valueOf(path.getreg()));\n ((TextView)findViewById(R.id.countryText)).setText(String.valueOf(path.getcouEN()));\n\n }\n }, pathID);\n }\n }",
"private void findViews() {\n serverView = findViewById(R.id.server_view);\n portView = findViewById(R.id.port_view);\n usernameView = findViewById(R.id.username_view);\n passwordView = findViewById(R.id.password_view);\n messageView = findViewById(R.id.message_view);\n uploadButtonView = findViewById(R.id.upload_button_view);\n }",
"private void initViews() {\n user_name = (LinearLayout)findViewById(R.id.user_name);\n user_photo = (LinearLayout)findViewById(R.id.user_photo);\n user_sex = (LinearLayout)findViewById(R.id.user_sex);\n user_notes = (LinearLayout)findViewById(R.id.user_notes);\n name = (TextView)findViewById(R.id.name);\n sex = (TextView)findViewById(R.id.sex);\n notes = (TextView)findViewById(R.id.notes);\n email = (TextView)findViewById(R.id.email);\n photo = (ImageView)findViewById(R.id.photo);\n }",
"private void setViews(){\n compositeDisposable.add(storyActivityViewModel.getModeObservable().subscribe(new Consumer<StoryActivityViewModel.MODE>() {\n @Override\n public void accept(StoryActivityViewModel.MODE mode) throws Exception {\n setDoneButton(mode);\n }\n }));\n\n compositeDisposable.add(storyActivityViewModel.getPhotosObservable().subscribe(new Consumer<List<Photo>>() {\n @Override\n public void accept(List<Photo> photos) throws Exception {\n setPhotoLinear(photos);\n }\n }));\n\n compositeDisposable.add(storyActivityViewModel.getUpdatedAtObservable().subscribe(new Consumer<Date>() {\n @Override\n public void accept(Date updatedAt) throws Exception {\n setUpdatedAt(updatedAt);\n }\n }));\n\n compositeDisposable.add(storyActivityViewModel.getTitleObservable().subscribe(new Consumer<String>() {\n @Override\n public void accept(String title) throws Exception {\n setTitle(title);\n }\n }));\n\n compositeDisposable.add(storyActivityViewModel.getBodyObservable().subscribe(new Consumer<String>() {\n @Override\n public void accept(String body) throws Exception {\n setBody(body);\n }\n }));\n\n compositeDisposable.add(RxView.clicks(done).subscribe(new Consumer<Object>() {\n @Override\n public void accept(Object o) throws Exception {\n storyDone();\n }\n }));\n\n compositeDisposable.add(RxView.clicks(closePhotoDetail).subscribe(new Consumer<Object>() {\n @Override\n public void accept(Object o) throws Exception {\n closePhotoDetail();\n }\n }));\n }",
"@Override\n public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {\n getWeatherData();\n //choose among interested activities depending on weather conditions\n // for that map interested activities to weather conditions first\n recommendedRecyclerView = view.findViewById(R.id.recommendedActivityRecView);\n\n\n\n }",
"private void initViews() {\n\n buttonSomethingWentWrong = findViewById(R.id.button_somethingWentWrong);\n buttonHighlightRequest = findViewById(R.id.button_highlight_request);\n buttonSuggestion = findViewById(R.id.button_suggestion);\n closeButton = findViewById(R.id.img_close);\n }",
"@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}",
"private void setupView() {\n refresh();\n if (isEmpty(movies)) {\n // Ok. so we have no movies. THat means one of two things. Either\n // we're trying to download the movies, or we tried and failed to\n // download them. In the former case just wait. We'll get a\n // notification when they're done. In the latter case, let the user\n // know.\n if (!isNullOrEmpty(getService().getUserAddress()) && getService().getDataProviderState() == DataProvider.State.Finished) {\n showNoInformationFoundDialog();\n }\n } else {\n setupMovieGrid();\n }\n }",
"private void initViews(){\n rootView = View.inflate(getContext(), R.layout.fragment_titles, null);\n unbinder = ButterKnife.bind(this, rootView);\n listener = new TitleListener() {\n @Override\n public void onClick(View view, int position, String id , String label) {\n Intent intent = new Intent();\n intent.putExtra(MEConstants.TITLE_ID, id);\n intent.putExtra(MEConstants.TITLE_LABEL , label);\n\n getTargetFragment().onActivityResult(getTargetRequestCode() , 109 , intent);\n\n dismiss();\n }\n };\n if(!DeviceConnectivity.isNetworkAvailable(getContext())) {\n loader.setVisibility(View.GONE);\n noTitles.setVisibility(View.GONE);\n llConnectivityDialog.setVisibility(View.VISIBLE);\n llTitles.setVisibility(View.GONE);\n } else {\n getTitlesWS();\n }\n }",
"public void initViews() {\n et_overrideTeamNum = findViewById(R.id.et_overrideTeamNum);\n\n rb_red = findViewById(R.id.red);\n rb_blue = findViewById(R.id.blue);\n }",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.field_spinner_field, this);\n }",
"private void initViews(){\n listViewL1 = getLayoutInflater().inflate(R.layout.colored_fragment, null);\n gridViewL2 = getLayoutInflater().inflate(R.layout.gridslayout, null);\n setContentView(listViewL1);\n\n\n if(getSupportActionBar() != null){\n getSupportActionBar().setTitle(barTitle);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true);\n }\n\n\n\n networkLayout = (RelativeLayout)findViewById(R.id.offline);\n\n //instantiating new relic to monitor unexpected errors\n NewRelic.withApplicationToken(\n\n \"AA596b53bae74528bfb423356bd9d0d07d86142d4e\"\n ).start(this.getApplication());\n\n Krw_functions.pushOpenScreenEvent(context, \"ListAdsResultActivity/\" + getIntent().getStringExtra(\"customtitle\") + \" > \" + getIntent().getStringExtra(\"subcattitle\"));\n\n listbottombar = (RelativeLayout)findViewById(R.id.footer);\n gridbottombar = (RelativeLayout) gridViewL2.findViewById(R.id.bottombargrid);\n swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);\n gridsSwipeRefreshLayout = (SwipeRefreshLayout) gridViewL2.findViewById(R.id.swipe_refresh_layout);\n\n swipeRefreshLayout.setOnRefreshListener(this);\n gridsSwipeRefreshLayout.setOnRefreshListener(this);\n\n\n //container the UI with background codes\n homecontainer = (LinearLayout)findViewById(R.id.homecontainer);//this is the layout that holds the bottom bar icons\n\n homesearchbar = (LinearLayout)findViewById(R.id.homesearchbar);// this is the layout that holds the search bar on the bottom bar icon\n homesearchbar.setVisibility(View.INVISIBLE);\n\n noresultlayout = (RelativeLayout)findViewById(R.id.no_results);\n errorText = (TextView)findViewById(R.id.error_msg);\n gridnoresult = (RelativeLayout)gridViewL2.findViewById(R.id.no_results_grid);\n griderrorText = (TextView)gridViewL2.findViewById(R.id.errormessage);\n\n //linking interfeace wit the backend ie getting the ids of the views objects\n gridView = (GridView)gridViewL2.findViewById(R.id.gridView);\n listView = (ListView)listViewL1.findViewById(R.id.list);\n\n adapter = new Ads_Adapter(this, R.layout.list_row, movieList);\n gridAdapter = new Ads_Adapter(this, R.layout.grid_rows, movieList);\n listView.setAdapter(adapter);\n gridView.setAdapter(gridAdapter);\n\n listView.setVerticalScrollBarEnabled(false);\n gridView.setVerticalScrollBarEnabled(false );\n\n //opening a specific ad\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n openAd(position);\n }\n });\n\n listView.setOnScrollListener(new EndlessScrollListener() {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n // Triggered only when new data needs to be appended to the list\n // Add whatever code is needed to append new items to your AdapterView\n //Krw_functions.Show_Toast(getActivity(),page+\"\",true);\n if(next_url != null) {\n curent_page = page;\n loadMore(page);\n }\n // or customLoadMoreDataFromApi(totalItemsCount);\n }\n\n @Override\n public void onScrollUp() {\n listbottombar.animate()\n .translationY(1)\n .alpha(1.0f)\n .setDuration(300);\n\n\n }\n\n @Override\n public void onScrollDown() {\n listbottombar.animate()\n .translationY(listbottombar.getHeight())\n .alpha(0.0f)\n .setDuration(300);\n\n }\n });\n\n gridView.setOnScrollListener(new EndlessScrollListener() {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n // Triggered only when new data needs to be appended to the list\n // Add whatever code is needed to append new items to your AdapterView\n //Krw_functions.Show_Toast(getActivity(),page+\"\",true);\n if(next_url != null) {\n curent_page = page;\n loadMore(page);\n }\n // or customLoadMoreDataFromApi(totalItemsCount);\n }\n @Override\n public void onScrollUp() {\n gridbottombar.animate()\n .translationY(1)\n .alpha(1.0f)\n .setDuration(300);\n\n\n }\n\n @Override\n public void onScrollDown() {\n gridbottombar.animate()\n .translationY(listbottombar.getHeight())\n .alpha(0.0f)\n .setDuration(300);\n\n }\n });\n\n\n gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n openAd(position);\n }\n });\n\n searchTextG = (EditText)gridViewL2.findViewById(R.id.entersearch);\n searchText = (EditText)listViewL1.findViewById(R.id.entersearch);\n\n refresh = (ImageButton)findViewById(R.id.refresh);\n\n refresh.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n query();\n }\n });\n\n //listview buttom bar icons start\n homeButton1 = (ImageButton)listViewL1.findViewById(R.id.backHome);\n homeButton1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent home = new Intent(context, AdsListActivity.class);\n startActivity(home);\n finish();\n }\n });\n createAdsButton1 = (ImageButton)findViewById(R.id.createAds);\n /* createAdsButton1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Krw_functions.Open_Connection_or_register(ListAdsActivity.this, R.id.action_add);\n }\n });*/\n searchclose1 = (ImageButton)findViewById(R.id.searchclose); // this is the button that close the search and display homecontainer\n searchclose1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //close the search bar and submit searching text\n InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(homesearchbar.getWindowToken(), 0);\n // launch_search(searchText.getText().toString());\n homecontainer.setVisibility(View.VISIBLE);\n homesearchbar.setVisibility(View.INVISIBLE);\n searchText.setText(\"\");\n }\n });\n\n searchText.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\n if (i == EditorInfo.IME_ACTION_SEARCH) {\n homecontainer.setVisibility(View.VISIBLE);\n homesearchbar.setVisibility(View.INVISIBLE);\n // launch_search(searchText.getText().toString());\n searchText.setText(\"\");\n return true;\n }\n return false;\n }\n });\n searchText.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int start, int before, int after) {\n Log.d(\"onTextChange\", \"start is \" + start + \" and before is \" + before + \" and after is \" + after);\n searchclose1.setImageResource(switchIcons(start, after));\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n\n }\n });\n\n searchButton = (ImageButton)listViewL1.findViewById(R.id.searchButton); // this is the search button on the container bar\n searchButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //making search bar visible and making the container invisible\n// homecontainer.setVisibility(View.INVISIBLE);\n// homesearchbar.setVisibility(View.VISIBLE);\n// InputMethodManager imm = (InputMethodManager)ListAdsActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);\n// imm.showSoftInput(searchText, 0);\n// searchText.requestFocus();\n\n finish();\n\n\n }\n });\n\n profileButton1 = (ImageButton)findViewById(R.id.goToProfile);\n /* profileButton1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Krw_functions.Open_Connection_or_register(ListAdsActivity.this, R.id.action_account);\n }\n });*/\n\n //end\n\n\n //gridview buttom bar icons start\n homeButton2 = (ImageButton)gridViewL2.findViewById(R.id.backHome);\n homeButton2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent home = new Intent(context, AdsListActivity.class);\n startActivity(home);\n finish();\n }\n });\n\n createAdsButton2 = (ImageButton)gridViewL2.findViewById(R.id.createAds);\n /* createAdsButton2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Krw_functions.Open_Connection_or_register(ListAdsActivity.this, R.id.action_add);\n }\n });*/\n\n profileButton2 = (ImageButton)gridViewL2.findViewById(R.id.goToProfile);\n /* profileButton2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Krw_functions.Open_Connection_or_register(ListAdsActivity.this, R.id.action_account);\n }\n });*/\n\n gridhomecontainer = (LinearLayout)gridViewL2.findViewById(R.id.homecontainer);//this is the layout that holds the bottom bar icons\n\n gridsearchbar = (LinearLayout)gridViewL2.findViewById(R.id.homesearchbar);// this is the layout that holds the search bar on the bottom bar icon\n gridsearchbar.setVisibility(View.INVISIBLE);\n\n searchButton2 = (ImageButton)gridViewL2.findViewById(R.id.searchButton); // this is the search button on the container bar\n\n searchButton2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Log.d(\"SearchButton2\", \"gridsearchbar is visible now\");\n// gridhomecontainer.setVisibility(View.INVISIBLE);\n// gridsearchbar.setVisibility(View.VISIBLE);\n// InputMethodManager imm = (InputMethodManager)ListAdsActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);\n// imm.showSoftInput(searchTextG, 0);\n// searchTextG.requestFocus();\n finish();\n\n }\n });\n\n searchclose2 = (ImageButton)gridViewL2.findViewById(R.id.searchclose);\n searchclose2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //close the search bar and submit searching text\n InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(gridsearchbar.getWindowToken(), 0);\n //launch_search(searchTextG.getText().toString());\n gridhomecontainer.setVisibility(View.VISIBLE);\n gridsearchbar.setVisibility(View.INVISIBLE);\n searchTextG.setText(\"\");\n }\n });\n searchTextG.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\n if (i == EditorInfo.IME_ACTION_SEARCH) {\n gridhomecontainer.setVisibility(View.VISIBLE);\n gridsearchbar.setVisibility(View.INVISIBLE);\n // launch_search(searchTextG.getText().toString());\n searchTextG.setText(\"\");\n return true;\n }\n return false;\n }\n });\n\n searchTextG.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int start, int before, int after) {\n searchclose2.setImageResource(switchIcons(start, after));\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n\n }\n });\n\n loader = (pl.droidsonroids.gif.GifImageView)listViewL1.findViewById(R.id.loader);\n gridLoader = (pl.droidsonroids.gif.GifImageView)gridViewL2.findViewById(R.id.loader);\n\n loader.setVisibility(View.VISIBLE);\n gridLoader.setVisibility(View.VISIBLE);\n //end\n }",
"private void initView() {\n mRetrofit = new Retrofit.Builder()\n .baseUrl(Challenge1Activity.MY_BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n mTextViewDisplayTopRated = findViewById(R.id.text_view_display_toprated_movies);\n\n mTextViewPrev = findViewById(R.id.text_view_prev);\n mTextViewCurrentAndMaxPage = findViewById(R.id.text_view_current_and_max_page);\n mTextViewNext = findViewById(R.id.text_view_next);\n }",
"protected abstract void initContentView(View view);",
"private void initViews() {\n textViewName = (AppCompatTextView) findViewById(R.id.textViewName);\n //appCompatButtonBack= (AppCompatButton) findViewById(R.id.appCompatButtonBack);\n imageView= (ImageView) findViewById(R.id.imageView);\n recyclerViewUsers = (RecyclerView) findViewById(R.id.recyclerViewUsers);\n\n }",
"private void initViews() {\n webView = (WebView)findViewById(R.id.crop_webview);\n confirm_location = (Button)findViewById(R.id.btn_confirm_location);\n toolbar = (Toolbar)findViewById(R.id.map_toolbar);\n }",
"private void findAllViews(View view) {\n recyclerView = view.findViewById(R.id.news_recycler_view);\n emptyView = view.findViewById(R.id.empty_view);\n progressBar = view.findViewById(R.id.progress_bar);\n swipeRefreshLayout = view.findViewById(R.id.swipe_container);\n }",
"@Override\r\n\tpublic void onViewCreated(View view, Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\r\n\t\tfindViews(view);\r\n\t\tinitViews(savedInstanceState);\r\n\t}",
"private void initInjectedView(Activity activity) {\n\t\tinitInjectedView(activity,activity.getWindow().getDecorView());\n\t}",
"private void inizialiteViews() {\n tvDirectionStore = findViewById(R.id.tvDirectionStore);\n tvNameOwner = findViewById(R.id.tvNameOwnerView);\n tvNameStore = findViewById(R.id.tvNameStoreView);\n tvPhonestore = findViewById(R.id.tvPhoneNumberOwner);\n editStore = findViewById(R.id.btnEditStore);\n imageViewStore = findViewById(R.id.imageStore);\n }",
"@SuppressWarnings(\"UnusedParameters\")\n private void initInstances(View rootView, Bundle savedInstanceState) {\n progressBar = (ProgressBar) rootView.findViewById(R.id.skillProgressbar);\n recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);\n recyclerView.setHasFixedSize(true);\n gaggeredGridLayoutManager = new StaggeredGridLayoutManager(2, 1);\n recyclerView.setLayoutManager(gaggeredGridLayoutManager);\n\n if (NetworkStateUtil.isOnline()) {\n getDataFromServer();\n } else {\n getDataFromLocal();\n }\n\n }",
"private void loadResourcesData(){\n //showResourceListView();\n\n String [] resourceData = new String [20];\n\n for(int stringCount = 1; stringCount <= 20; stringCount++) {\n resourceData[stringCount - 1] = \"Title \" + stringCount;\n }\n\n mResourceListAdapter.setResourceData(resourceData);\n }",
"private void populateViews(List<ParseUser> friendUsers){\n retrieveCheeseCountsLocally();\n populateUserView();\n populateFriendsListView(friendUsers);\n populateHistoryListView();\n\t}",
"private void initViews() {\n appCompatButtonLogout = (AppCompatButton) findViewById(R.id.appCompatLogoutButton);\n appCompatButtonDelete = (AppCompatButton) findViewById(R.id.appCompatDeleteButton);\n\n }",
"private void initViews() {\n\n if (blockListAdapter != null) {\n blockListAdapter = null;\n }\n\n swipeRefreshLayout.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n rv_swipe_refresh_tv.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n rv_swipe_refresh_tv.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n noResultRefreshTextView.setOnClickListener(this);\n\n if (swipeRefreshLayout != null) {\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(true);\n firstNetworkCall();\n }\n });\n }\n\n btnBack.setOnClickListener(this);\n }",
"public void init() {\n\t\tdropViewCollections();\n\t\tbuildViewCollections();\n\t\tthis.populateViewCollections();\n\t}",
"private void fillLayout(View view) {\n findViews(view);\n\n //collect our bundle and populate our layout\n Bundle bundle = getArguments();\n\n Long id = bundle.getLong(\"id\", 0);\n String companyName = bundle.getString(\"companyName\");\n String modelName = bundle.getString(\"modelName\");\n double tankVolume = bundle.getDouble(\"tankVolume\", 0);\n String gearbox = bundle.getString(\"gearbox\");\n int seats = bundle.getInt(\"seats\", 0);\n String pictureURL = bundle.getString(\"pictureURL\");\n\n //set elements\n new DownLoadImageTask(modelDetailImageView, id, view.getContext()).execute(pictureURL);\n modelDetailIdTextView.setText(Long.toString(id));\n modelDetailCompanyNameTextView.setText(companyName);\n modelDetailModelNameTextView.setText(modelName);\n modelDetailTankVolumeTextView.setText(Double.toString(tankVolume));\n modelDetailGearboxTextView.setText(gearbox);\n modelDetailSeatsTextView.setText(Integer.toString(seats));\n\n getActivity().setTitle(\"Model #\" + id);\n }",
"protected void initializeViews(){\n mLatLng = (TextView) findViewById(R.id.lat_lng);\n mAccuracyView = (TextView) findViewById(R.id.accuracy);\n mRouteText = (TextView) findViewById(R.id.route);\n mRegionText = (TextView) findViewById(R.id.region);\n mSampleText = (TextView) findViewById(R.id.sample);\n mBeaconText = (TextView) findViewById(R.id.beacon);\n }",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.number_picker, this);\n }",
"private void initView(List<PersonWrapper> listOfPersons) {\n adapter = new PersonAdapter(context, listOfPersons);\n mPersonsView.setAdapter(adapter);\n adapter.notifyDataSetChanged();\n }",
"private void initViews() {\n mTvBalance = findViewById(R.id.tv_receive_client_balance);\n mListView = findViewById(R.id.lv_list_receive_client);\n mFab = findViewById(R.id.fab_receive_receip);\n mTvEmpty = findViewById(R.id.tv_empty_view);\n mIvEmpty = findViewById(R.id.iv_empty_view);\n mEmptyView = findViewById(R.id.empty_view);\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}",
"public void getViews() {\n cameraButton = (ImageButton) findViewById(R.id.cameraButton);\n galleryButton = (ImageButton)findViewById(R.id.galleryButton);\n tagText = (TextView) findViewById(R.id.tag_text);\n }",
"@Override\r\n protected void setupViews(Bundle bundle) {\n initPersonalInfo();\r\n }",
"private void initLsitData() {\n\t\tlist = new ArrayList<View>();\n\n\t\tlist.add(new NewsMenupagerItem(Mactivity,TY).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,YL).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,QW).initView());\n\t\tlist.add(new NewsMenupagerItem(Mactivity,MV).initView());\n\n\n\t}",
"private void findViews() {\n jurgen = (ImageView) findViewById(R.id.jurgen_view);\n jurgen.setTag(JURGEN_VIEW_TAG);\n joost = (ImageView) findViewById(R.id.joost_view);\n joost.setTag(JOOST_VIEW_TAG);\n nick = (ImageView) findViewById(R.id.nick_view);\n nick.setTag(NICK_VIEW_TAG);\n stijn = (ImageView) findViewById(R.id.stijn_view);\n stijn.setTag(STIJN_VIEW_TAG);\n }",
"protected abstract void initializeView();",
"private void initializeViews(Object object, ViewHolder holder) {\n }",
"private void setupUIViews() {\n toolbar = (Toolbar)findViewById(R.id.ToolbarMain);\n listview = (ListView)findViewById(R.id.lvMain);\n }",
"private void setupViews() {\n this.rvArticles = (RecyclerView) findViewById(R.id.rvArticles);\n this.articles = new ArrayList<>();\n this.articleArrayAdapter = new ArticleArrayAdapter(this, this.articles);\n this.rvArticles.setAdapter(this.articleArrayAdapter);\n StaggeredGridLayoutManager gridLayoutManager =\n new StaggeredGridLayoutManager(GRID_NUM_COLUMNS,\n StaggeredGridLayoutManager.VERTICAL);\n this.rvArticles.setLayoutManager(gridLayoutManager);\n ItemClickSupport.addTo(this.rvArticles).setOnItemClickListener(\n (recyclerView, position, v) -> launchArticleView(position)\n );\n SpacesItemDecoration decoration = new SpacesItemDecoration(GRID_SPACE_SIZE);\n this.rvArticles.addItemDecoration(decoration);\n this.rvArticles.addOnScrollListener(\n new EndlessRecyclerViewScrollListener(gridLayoutManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n articleSearch(searchView.getQuery().toString(), page);\n }\n });\n }",
"@SuppressWarnings(\"UnusedParameters\")\r\n private void initInstances(View rootView, Bundle savedInstanceState) {\n }",
"public void findViews() {\n titleTextView = findViewById(R.id.song_title_text_view);\n artistTextView = findViewById(R.id.song_artist_text_view);\n albumCoverImg = findViewById(R.id.album_cover_img);\n albumTextView = findViewById(R.id.album_text_view);\n playButton = findViewById(R.id.play_button);\n nextButton = findViewById(R.id.next_button);\n backButton = findViewById(R.id.back_button);\n shuffleButton = findViewById(R.id.shuffle_button);\n repeatButton = findViewById(R.id.repeat_button);\n }",
"private void initializeViews() {\n\n this.startFrameAnimation = (Button) findViewById(R.id.button_frame);\n this.startTweenAnimation = (Button) findViewById(R.id.button_tween);\n\n this.tweenAnimation = (ImageView) findViewById(R.id.tween);\n this.frameAnimation = (ImageView) findViewById(R.id.frame);\n }",
"private void initAdaptersAndViews() {\n final Context context = getContext();\n mListViewAdapter = new FlickrHomeAdapter();\n mListLayoutManager = new LinearLayoutManager(context);\n mListLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n\n mViews.listView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL_LIST));\n mViews.listView.setHasFixedSize(true);\n mViews.listView.setLayoutManager(mListLayoutManager);\n mViews.listView.setAdapter(mListViewAdapter);\n }",
"private void initView() {\n\t\tsetContentView(R.layout.activity_taskmanager);\n\n\t\tlv_datas = (ListView) findViewById(R.id.lv_taskmanager);\n\t\ttv_showInfo = (TextView) findViewById(R.id.tv_taskmanager_showInfo);\n\n\t\tmpb_mem = (MessProgress) findViewById(R.id.mpb_taskmanager_runningmem);\n\t\tmpb_num = (MessProgress) findViewById(R.id.mpb_taskmanager_runningnum);\n\t\t// progressbar\n\t\tll_process = (LinearLayout) findViewById(R.id.ll_progressbar_root);\n\n\t\tsd_drawer = (SlidingDrawer) findViewById(R.id.slidingDrawer1);\n\t\tiv_arrow1 = (ImageView) findViewById(R.id.iv_drawer_arrow1);\n\t\tiv_arrow2 = (ImageView) findViewById(R.id.iv_drawer_arrow2);\n\n\t\tsci_showsystem = (SettingCenterItem) findViewById(R.id.sci_taskmanager_showsystem);\n\t\tsci_screenoffclear = (SettingCenterItem) findViewById(R.id.sci_taskmanager_screenoffclear);\n\n\t\tmAdapter = new MyAdapter();\n\t\tlv_datas.setAdapter(mAdapter);\n\n\t\tmAM = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t}",
"private void initViews(){\n tvName = findViewById(R.id.textViewLoggedUserName);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n }",
"void initializeViews() {\n\n //Initialize the button image views layouts.\n recordButton = (ImageView) findViewById(R.id.record);\n cameraButton = (ImageView) findViewById(R.id.camera);\n archive = (ImageView) findViewById(R.id.archive);\n back = (ImageView) findViewById(R.id.back);\n captureButton = (ImageButton) findViewById(R.id.button_capture);\n }",
"@Override\n public List<View> loadInBackground() {\n emptyPreviouslyLoadedData();\n\n // preserve important HTML data\n buildComponent();\n\n // generate view for each splitted post component\n producueViews();\n\n return viewsToBeInflated;\n }",
"private void viewInit() {\n }",
"private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }",
"private void bindViewsById(View view) {\n mViewPager = (ViewPager) view.findViewById(R.id.pager);\n mViewPager.setOffscreenPageLimit(1);\n mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout);\n\n // mTvNoFavAvail = (TextView) view.findViewById(R.id.tv_no_fav_available);\n // mTvNoInternet = (TextView) view.findViewById(R.id.tv_no_internet_available);\n }",
"private void initViews() {\n\t\tmViewPager = (ViewPager) findViewById(R.id.view_pager); \n mIndicator = (IconTabPageIndicator) findViewById(R.id.indicator); \n fragments = initFragments(); \n FragmentAdapter adapter = new FragmentAdapter(fragments, getSupportFragmentManager()); \n mViewPager.setAdapter(adapter); \n mIndicator.setViewPager(mViewPager); \n mViewPager.setCurrentItem(whichPage);\n \n \n \n\t}"
] | [
"0.66744214",
"0.6558782",
"0.6502132",
"0.63999575",
"0.6387165",
"0.63698226",
"0.63153595",
"0.6312844",
"0.62895495",
"0.6253762",
"0.6253529",
"0.6250646",
"0.6233529",
"0.6214736",
"0.6211028",
"0.6161582",
"0.6131009",
"0.610479",
"0.609797",
"0.609797",
"0.6091086",
"0.60735935",
"0.6062223",
"0.6056915",
"0.60496366",
"0.60382295",
"0.6026987",
"0.60163915",
"0.60140723",
"0.6011266",
"0.6011206",
"0.60099274",
"0.60090244",
"0.599862",
"0.59917086",
"0.59867054",
"0.5977782",
"0.5966193",
"0.5965169",
"0.596174",
"0.59577936",
"0.5948585",
"0.5929146",
"0.59291446",
"0.59149635",
"0.589634",
"0.5895663",
"0.5881212",
"0.5878755",
"0.5877924",
"0.58458805",
"0.5834299",
"0.5827735",
"0.5824598",
"0.57874346",
"0.5785361",
"0.57795733",
"0.5777059",
"0.5769679",
"0.5768782",
"0.57627845",
"0.57603097",
"0.57529837",
"0.575292",
"0.5750704",
"0.57433933",
"0.5739208",
"0.57375604",
"0.5732085",
"0.57225305",
"0.5715953",
"0.5709378",
"0.5705766",
"0.57047087",
"0.5700673",
"0.5696595",
"0.5683757",
"0.5683564",
"0.5669572",
"0.5669243",
"0.5666087",
"0.56628835",
"0.565757",
"0.5655566",
"0.56542736",
"0.56512314",
"0.5642865",
"0.563499",
"0.56275326",
"0.56229156",
"0.5618324",
"0.5614087",
"0.56097955",
"0.56029046",
"0.55964774",
"0.5594563",
"0.5577859",
"0.55735916",
"0.5571352",
"0.557086",
"0.5567666"
] | 0.0 | -1 |
implementeras senare om tid finns | public void addFlag(Customer c){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"public void sendeSpielfeld();",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"public void asetaTeksti(){\n }",
"private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }",
"public void trenneVerbindung();",
"private void remplirUtiliseData() {\n\t}",
"public abstract String dohvatiKontakt();",
"@Override\n\tvoid geraDados() {\n\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"@Override\n\tpublic void transmetDonnee() {\n\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"public Tavolo (String id_tavolo, int num_posti){\n this.id_tavolo = id_tavolo;\n this.num_posti = num_posti;\n interno = true;\n disponibile = true;\n AssegnamentiTavolo = new ArrayList<Invitato>(num_posti);\n postiTot=num_posti;\n }",
"public void end() {\n\t\tlog.info(\"-----end()-----\");\n\t\tTonKhoDelegate tkDelegate = TonKhoDelegate.getInstance();\n\t\tKiemKeDelegate kiemkeDel = KiemKeDelegate.getInstance();\n\t\tif (listCtKhoLeTraEx.size() > 0) {\n\t\t\tyteLog = new YteLog();\n\t\t\tlistDataLog = \"\";\n\t\t\tif (!ngayXuat.equals(\"\")) {\n\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\ttry {\n\t\t\t\t\tDate dtNgayXuat = df.parse(ngayXuat);\n\t\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\t\tcal.setTime(dtNgayXuat);\n\t\t\t\t\tphieuTra.setPhieutrakhoNgaygiocn(cal.getTime());\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tlog.error(String.format(\"-----Error: %s\", e.toString()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\tfor (int i=0;i<listCtKhoLeTraEx.size();i++) {\n\t\t\t\t\tCtTraKho ct = listCtKhoLeTraEx.get(i).getCtTraKho();\n\t\t\t\t\t\n\t\t\t\t\t//28-4-2011 - kiem tra tai kho nhan, neu dang kiem ke thi khong duoc tra thuoc\n\t\t\t\t\tboolean tinhtrangKiemKe = kiemkeDel.dangKiemKe(ct.getCttrakhoMalk(),phieuTra.getDmkhoaNhan().getDmkhoaMaso());\n\t\t\t\t\tif(tinhtrangKiemKe == true){\n\t\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_DANGKIEMKE, ct.getCttrakhoMalk());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t//End kiem tra\n\t\t\t\t\t\n\t\t\t\t\tDouble tonkhoHienTai = tkDelegate.findByTonkhoKhoaMalienketHienTai(ct.getCttrakhoMalk(), phieuTra.getDmkhoaTra().getDmkhoaMaso());\n\t\t\t\t\tif (tonkhoHienTai < ct.getCttrakhoSoluong())\n\t\t\t\t\t{\n\t\t\t\t\t\t//Neu so luong ton hien tai < so luong tra tren phieu du tru cua khoa tra thi se khong cho tra tren phieu du tru do\n\t\t\t\t\t\t//Yeu cau huy phieu du tru va lam lai\n\t\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUTRAKHO_SLKHONGDUTRA);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdouble tt = Double.valueOf(\"0\");\n\t\t\t\tArrayList<CtTraKho> listCtx = new ArrayList<CtTraKho>();\n\t\t\t\tArrayList<TonKho> listTkTra = new ArrayList<TonKho>();\n\t\t\t\tArrayList<TonKho> listTkNhan = new ArrayList<TonKho>();\n\t\t\t\tTonKho tkTra;\n\t\t\t\tTonKho tkNhan;\n\t\t\t\t//CtTraKhoExt obj = new CtTraKhoExt();\n\t\t\t\tfor (int i=0;i<listCtKhoLeTraEx.size();i++) {\n\t\t\t\t\tCtTraKho ct = listCtKhoLeTraEx.get(i).getCtTraKho();\n\t\t\t\t\ttt += ct.getCttrakhoSoluong() * ct.getCttrakhoDongia();\n\t\t\t\t\tct.setCttrakhoThutu(Short.valueOf(\"\" + (i + 1)));\n\t\t\t\t\tlistCtx.add(ct);\n\t\t\t\t\ttkTra=createTonKhoTra(listCtKhoLeTraEx.get(i));\n\t\t\t\t\t//ctx.getTonKhoTra().setTonkhoMa(null);\n\t\t\t\t\tlistTkTra.add(tkTra);\n\t\t\t\t\t\n\t\t\t\t\ttkNhan=createTonKhoNhan(listCtKhoLeTraEx.get(i));\n\t\t\t\t\t//ctx.getTonKhoNhan().setTonkhoMa(null);\n\t\t\t\t\tlistTkNhan.add(tkNhan);\n\t\t\t\t\t\n\t\t\t\t\t//luu log thong tin thuoc\n\t\t\t\t\tlistDataLog += \"Ma LK:\"+ ct.getCttrakhoMalk()+\n\t\t\t\t\t\t\t\" Don gia: \"+ ct.getCttrakhoDongia()+ \" Don gia ban: \"+ ct.getCttrakhoDongiaban() + \n\t\t\t\t\t\t\t\" So luong: \"+ ct.getCttrakhoSoluong()+\n\t\t\t\t\t\t\t\" So lo: \"+ ct.getCttrakhoLo()+\n\t\t\t\t\t\t\t\" Nam SX: \" + ct.getCttrakhoNamnhap()+\n\t\t\t\t\t\t\t\" Nam HD: \" + ct.getCttrakhoNamhandung()+\"\\n\";\n\t\t\t\t}\n\t\t\t\tphieuTra.setPhieutrakhoThanhtien(tt);\n\t\t\t\tphieuTra.setPhieutrakhoNgaygiocn(new Date());\n\t\t\t\tphieuTra.setPhieutrakhoNgaygiophat(new Date());\n\t\t\t\t//phieuTra.setPhieutrakhoNgay(dtNgayXuat);\n\t\t\t\tPhieuTraKhoDelegate pxDelegate = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tclearInfor();\n\t\t\t\tmaPhieu = pxDelegate.thucHienTraKho(phieuTra, listCtx, listTkNhan, listTkTra);\n\t\t\t\tif (maPhieu != \"\") {\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_THANHCONG, maPhieu);\n\t\t\t\t\t//reset();\n\t\t\t\t\tisUpdate = \"0\";//@Trung fix bug 473: sau khi Ghi Nhan moi cho In phieu\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_THATBAI);\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tLuu log he thong\n\t\t yteLog.setForm(\"B4162_Kholetrahang\");\n\t\t yteLog.setUserId(identity == null ? \"NULL\" : identity.getUsername());\n\t\t yteLog.setObjectId(maPhieu);\n\t\t yteLog.setLogString(\"Ngày xuất: \"+ ngayXuat + \n\t\t \t\t\t\t\t\" Người nhập: \"+ phieuTra.getDtdmnhanvienCn(true).getDtdmnhanvienMa()+\n\t\t \t\t\t\t\t\" Người ký: \"+ phieuTra.getDtdmnhanvienBacsi(true).getDtdmnhanvienMa()+\n\t\t \t\t\t\t\t\" Kho nhận: \"+ phieuTra.getDmkhoaNhan(true).getDmkhoaMa()+\n\t\t \t\t\t\t\t\" Kho xuất: \"+ phieuTra.getDmkhoaTra(true).getDmkhoaMa()+\n\t\t \t\t\t\t\t\" Người lập: \"+ phieuTra.getDtdmnhanvienPhat(true).getDtdmnhanvienMa());\n\t\t yteLog.setDateTime(new Date());\n\t\t yteLog.setListData(listDataLog);\n\n\t\t yteLogDele.create(yteLog);\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_THATBAI);\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e.toString()));\n\t\t\t}\n\t\t} else {\n\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_DMT_NULL);\n\t\t}\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}",
"public void generTirarDados() {\n\r\n\t}",
"public void tallenna() throws SailoException {\r\n if (!muutettu) return;\r\n \r\n File fbak = new File(getBakNimi());\r\n File ftied = new File(getTiedostonNimi());\r\n fbak.delete();\r\n ftied.renameTo(fbak);\r\n\r\n try ( PrintStream fo = new PrintStream(new FileOutputStream(ftied.getCanonicalPath())) ) {\r\n for (Aika aika : this) {\r\n fo.println(aika.toString());\r\n }\r\n } catch ( FileNotFoundException ex ) {\r\n throw new SailoException(\"Tiedosto \" + ftied.getName() + \" ei aukea\");\r\n } catch ( IOException ex ) {\r\n throw new SailoException(\"Tiedoston \" + ftied.getName() + \" kirjoittamisessa ongelmia\");\r\n }\r\n\r\n muutettu = false;\r\n }",
"public Tura() {\n\t\tLicznikTur = 0;\n\t}",
"@Override\r\n public void salir() {\n }",
"private void remplirPrestaraireData() {\n\t}",
"void entrerAuGarage();",
"public void hentTrekk() {\n\n Parti parti = this.fp_liste_parti.getSelectionModel().getSelectedItem();\n\n if (this.partierLastet && parti != null){\n\n valgtParti = fp_liste_parti.getSelectionModel().getSelectedItem();\n\n for(Trekk t: valgtParti.getTrekkListe()) {\n sp_liste_trekk.getItems().add(t);\n }\n\n tab_pane.getSelectionModel().select(tab_sp);\n\n this.initierAnimasjon();\n\n } else {\n\n Sjakkbrett.visFeil(\"Parti ikke valgt\", \"Du har ikke valgt et parti\", \"Vennligst velg et parti!\");\n\n }\n\n this.sp_knapp_forrige_trekk.setDisable(false);\n this.sp_knapp_spill_av_pause.setDisable(false);\n this.sp_knapp_neste_trekk.setDisable(false);\n this.sp_kombo_hastighet.setDisable(false);\n this.sp_knapp_velg_trekk.setDisable(false);\n\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 }",
"public void Ordenamiento() {\n\n\t}",
"public void loescheEintrag() {\n\t\tzahl = 0;\n\t\tistEbenenStart = false;\n\t}",
"void tampilKarakterA();",
"public void Tyre() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"public void kaufen(BesitzrechtFeld feld) {\n try {\n System.out.println(\"Dein aktueller Kontostand beträgt: \" + getKontostand());\n System.out.println(\"Die kosten für: \" + feld.getFeldname() + \" (\" + feld.getFarbe() + \") betragen :\" + feld.getGrundstueckswert());\n System.out.println(\"Möchtest du kaufen? (ja/nein)\");\n String eingabe = br.readLine();\n if (eingabe.trim().toLowerCase().equals(\"status\")) {\n eingabe = meinStatus();\n\n }\n if (eingabe.trim().toLowerCase().equals(\"ja\")) {\n if (einzahlen(feld.getGrundstueckswert())) {\n feld.setGekauft(true);\n feld.setSpieler(this);\n felderInBesitz.add(feld);\n switch (feld.getFarbe()) {\n case \"braun\":\n braun.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + braun.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (braun.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(braun);\n break;\n }\n break;\n case \"hellblau\":\n hellblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + hellblau.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (hellblau.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(hellblau);\n break;\n }\n break;\n case \"pink\":\n pink.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + pink.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (pink.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(pink);\n break;\n }\n break;\n case \"orange\":\n orange.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + orange.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (orange.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(orange);\n break;\n }\n break;\n case \"rot\":\n rot.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + rot.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (rot.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(rot);\n break;\n }\n break;\n case \"gelb\":\n gelb.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + gelb.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (gelb.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(gelb);\n break;\n }\n break;\n case \"grün\":\n grün.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + grün.size() + \" von 3 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (grün.size() == 3) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(grün);\n break;\n }\n break;\n case \"dunkelblau\":\n dunkelblau.add((Straße) feld);\n System.out.println(\"Du hast die Straße: \" + feld.getFeldname() + \"(\" + feld.getFarbe() + \") gekauft!\");\n System.out.println(\"Du hast \" + dunkelblau.size() + \" von 2 Feldern (\" + feld.getFarbe() + \") in deinem Besitz\");\n if (dunkelblau.size() == 2) {\n Straße s = (Straße) feld;\n s.hausBauen(this, feld);\n s.mieteÄndernStraße(dunkelblau);\n break;\n }\n break;\n case \"bahnhof\":\n bahnhoefe.add((Bahnhof) feld);\n System.out.println(\"Du hast den Bahnhof: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + bahnhoefe.size() + \" von 4 Bahnhöfen in deinem Besitz\");\n Bahnhof b = (Bahnhof) feld;\n b.mieteÄndernBahnhof(bahnhoefe);\n\n break;\n case \"werk\":\n werke.add(feld);\n System.out.println(\"Du hast das Werk: \" + feld.getFeldname() + \" gekauft!\");\n System.out.println(\"Du hast \" + werke.size() + \" von 2 Werken in deinem Besitz\");\n break;\n default:\n System.out.println(\"Feld konnte keiner Farbe/Kategorie zugeordnet werden\");\n\n }\n\n }\n System.out.println(\"Dein neuer Kontostand beträgt: \" + getKontostand());\n }\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }",
"public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }",
"public void setId_trimestre(int id_trimestre) {this.id_trimestre = id_trimestre;}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void wuerfeln() {\n if (istGefängnis) {\n setIstGefängnis(false);\n if (aktuellesFeldName instanceof GefängnisFeld && !(aktuellesFeldName instanceof NurZuBesuchFeld)) {\n GefängnisFeld g = (GefängnisFeld) aktuellesFeldName;\n g.gefaengnisAktion(this);\n \n return;\n }\n\n } else {\n String[] worte = {\"Eins\", \"Zwei\", \"Drei\", \"Vier\", \"Fünf\", \"Sechs\", \"Sieben\", \"Acht\", \"Neun\", \"Zehn\", \"Elf\", \"Zwölf\"};\n\n wuerfelZahl = getRandomInteger(12, 1);\n\n this.aktuellesFeld = this.aktuellesFeld + wuerfelZahl + 1;\n if (this.aktuellesFeld >= 40) {\n setAktuellesFeld(0);\n\n }\n\n System.out.println(worte[wuerfelZahl] + \" gewürfelt\");\n\n aktuellesFeldName = spielfigurSetzen(this.aktuellesFeld);\n System.out.println(\"Du befindest dich auf Feld-Nr: \" + (this.aktuellesFeld));\n boolean check = false;\n for (Spielfelder s : felderInBesitz) {\n if (aktuellesFeldName.equals(s)) {\n check = true;\n }\n }\n\n if (!check) {\n aktuellesFeldName.spielfeldAktion(this, aktuellesFeldName);\n } else {\n System.out.println(\"Das Feld: \" + aktuellesFeldName.getFeldname() + \"(Nr: \" + aktuellesFeldName.getFeldnummer() + \")gehört dir!\");\n if (aktuellesFeldName instanceof Straße) {\n Straße strasse = (Straße) aktuellesFeldName;\n System.out.println(\"Farbe: \" + strasse.getFarbe());\n try {\n strasse.hausBauen(this, strasse);\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n }\n }\n }",
"public void themDL()\n {n.setTim(txttim.getText());\n n.setManv(ma);\n n.setDiachi(diachi);\n n.setNgaysinh(ngayinh);\n n.setSdt(sdt);\n n.setTennv(ten);\n n.setTrangthai(trangthai);\n }",
"public void datos_elegidos(){\n\n\n }",
"private void sterben()\n {\n lebendig = false;\n if(position != null) {\n feld.raeumen(position);\n position = null;\n feld = null;\n }\n }",
"public void skrivUt(){\n System.out.println(this.fornavn + \" \" + this.etternavn + \" \" + this.adresse + \" \" + this.telefonnr + \" \" + this.alder);\n }",
"public void stampajSpisak() {\n\t\t\n\t\tif (prviFilm != null) {\n\t\t\t\n\t\t\tFilm tekuciFilm = prviFilm;\n\t\t\tint count = 0;\n\t\t\t\n\t\t\tSystem.out.println(\"Filmovi: \");\n\t\t\t\n\t\t\twhile (tekuciFilm != null) {\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\"Film #\" + count + \": '\" + tekuciFilm.naziv + \"'\");\n\t\t\t\t\n\t\t\t\tif (tekuciFilm.sadrzaj == null) {\n\t\t\t\t\tSystem.out.println(\"\\tNema unetih glumaca.\");\n\t\t\t\t} else {\n\t\t\t\t\tGlumac tekuciGlumac = tekuciFilm.sadrzaj;\n\t\t\t\t\t\n\t\t\t\t\twhile (tekuciGlumac != null) {\n\t\t\t\t\t\tSystem.out.println(\"\\t\" + tekuciGlumac);\n\t\t\t\t\t\ttekuciGlumac = tekuciGlumac.veza;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttekuciFilm = tekuciFilm.veza;\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Spisak je prazan.\");\n\t\t}\n\t}",
"private void lesFil()\n\t{\n\t\tDATAFIL = datafil(false);\n\n\t\ttry ( ObjectInputStream innfil = new ObjectInputStream( new FileInputStream( DATAFIL ) ) )\n\t\t{\n\t\t\tbr = (Boligregister) innfil.readObject();\n\t\t\tvisMelding( \"Data er hentet fra fil.\" );\n\t\t}\n\t\tcatch(ClassNotFoundException cnfe)\n\t\t{\n\t\t\tvisMelding( \"<html>Feil:<br><br>\" + cnfe.getMessage() + \"<br><br>Oppretter tom datafil. Tar vare på gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(FileNotFoundException fne)\n\t\t{\n\t\t\tvisMelding( \"Ingen datafil funnet. Oppretter tom datafil.\" );\n\t\t\ttomtRegister();\n\t\t\tskrivTilFil(false);\n\t\t}\n\t\tcatch(IOException ioe)\n\t\t{\n\t\t\tvisMelding( \"<html>Innlesingsfeil. Oppretter tom datafil. Tar vare på gammel datafil.</html>\" );\n\t\t\ttomtRegister();\n\t\t\tDATAFIL = datafil(true);\n\t\t\tskrivTilFil(false);\n\t\t}\n\t}",
"private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }",
"public void tutki(Suunta suunta);",
"private void obtenerEstampas(int tipo) {\n try {\n switch(tipo){\n case 0:\n listaSobreNormal = new ListaSobreNormal();\n for (int i = 0; i < 5; i++) {\n listaSobreNormal.insertar(App.listaEstampas.obtenerEstampaSobre(tipo).getEstampa());\n }\n //listaSobreNormal.mostrar();\n App.listaUsuarios.agregarEstampasObtenidas(listaSobreNormal);\n mostrarEstampas(listaSobreNormal.getActual().getEstampa());\n break;\n case 1:\n listaSobreDorado = new ListaSobreDorado();\n for (int i = 0; i < 5; i++) {\n listaSobreDorado.insertar(App.listaEstampas.obtenerEstampaSobre(tipo).getEstampa());\n }\n //listaSobreDorado.mostrar();\n App.listaUsuarios.agregarEstampasObtenidas(listaSobreDorado);\n mostrarEstampas(listaSobreDorado.getActual().getEstampa());\n break;\n }\n } catch (Exception e) {\n System.err.println(\"error\");\n e.printStackTrace();\n }\n }",
"public void tiepTucNhap() {\n\t\tlog.info(\"-----tiepTucNhap()-----\");\n\t\tlog.info(String.format(\"-----index: %s\", updateItem));\n\t\t\n\t\tlog.info(\"tonkhoMa:\"+tonkhoMa);\n\t\tlog.info(\"xuat:\"+xuat);\n\t\tlog.info(\"dmtMa:\"+dmtMa);\n\t\tlog.info(\"updateItem:\"+updateItem);\n\t\tlog.info(\"tonkho:\"+tonkho);\n\n\t\tif (xuat == null || xuat.equals(\"\") || tonkho == null || tonkho.equals(\"\")){\n\t\t\treturn;\n\t\t}\n\t\t \n\t\tif (\"\".equals(tonkhoMa) && tonkhoMa == null) {\n\t\t\tlog.info(\"-----tonkho ma is null.\");\n\t\t} else {\n\t\t\tlog.info(String.format(\"-----tonkho ma: %s\", tonkhoMa));\n\t\t\tTonKho tk = null;\n\t\t\t\n\t\t\tTonKhoDelegate tkDelegate;\n\t\t\ttry {\n\t\t\t\ttkDelegate = TonKhoDelegate.getInstance();\n\t\t\t\t\n\t\t\t\ttk = tkDelegate.find(Integer.valueOf(tonkhoMa));\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCtTraKho ctx = new CtTraKho();\n\t\t\t\n\t\t\tDouble slXuat = new Double(\"0\");\n\t\t\tfor (int i = 0; i < listCtKhoLeTraEx.size(); i++) {\n\t\t\t\tCtTraKho ctxk = listCtKhoLeTraEx.get(i).getCtTraKho();\n\t\t\t\tif (malk.equals(ctxk.getCttrakhoMalk())) {\n\t\t\t\t\tlog.info(\"-----malk \" + malk);\n\t\t\t\t\tslXuat += ctxk.getCttrakhoSoluong();\n\t\t\t\t\tupdateItem = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tslXuat += Double.valueOf(xuat);\n\t\t\tctx.setCttrakhoSoluong(slXuat);\n\t\t\tCtTraKhoExt ctxEx = createCtXuatKho(ctx, tk);\n\t\t\tlog.info(\"-----xuat: \" + slXuat);\n\t\t\t\n\t\t\tif (updateItem.equals(-1)) {\n\t\t\t\tlog.info(\"-----them moi ct\");\n\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t} else {\n\t\t\t\tlog.info(\"-----Cap nhat ct-----\");\n\t\t\t\tif (tk != null) {\n\t\t\t\t\tlistCtKhoLeTraEx.set(updateItem, ctxEx);\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_TK_NULL, dmtMa);\n\t\t\t\t}\n\n\t\t\t\tlog.info(String.format(\"-----update ct: %s\", ctx.getCttrakhoThutu()));\n\t\t\t}\n\n\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\tlog.info(String.format(\"-----listCtXuatKho: %s\", listCtKhoLeTraEx.size()));\n\t\t\ttonkhoMa = \"\";\n\t\t\tdmtMa = \"\";\n\t\t\ttonkho = new Double(0);\n\t\t\txuat = new Double(0);\n\t\t\tupdateItem = -1;\n\t\t}\n\t\ttinhTien();\n\t}",
"public void schritt() {\r\n\t\tfor (int i = 0; i < anzahlRennautos; i++) {\r\n\t\t\tlisteRennautos[i].fahren(streckenlaenge);\r\n\t\t}\r\n\t}",
"public void verarbeite() {\n\t\t\r\n\t}",
"@Override\n\tpublic void salir() {\n\t\t\n\t}",
"void leituraEnd();",
"private int finn(T el) {\n\t\t\n\t\t//int i = 0, \n\t\tint resultat = IKKE_FUNNET;\n\t\t\n\t\tboolean funnet = false;\n\t\tT svar = null;\n\n\t\tfor (int i = 0; ((i < bak) && (!funnet)); i++) {\n\t\t\tif (liste[i].equals(el)) {\n\t\t\t\tfunnet = true;\n\t\t\t\tsvar = liste[i];\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn resultat;\n\t}",
"public void mantenimiento(){\n\t}",
"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}",
"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}",
"@Override\n\tpublic void dibuja() {\n\t\t\n\t}",
"public void Nodo(){\r\n this.valor = \"\";\r\n this.siguiente = null;\r\n }",
"@Override\n\tpublic void hasznaljak(Karakter karakter, Jegtabla hol) throws Exception{\n if(karakter.vizben_van) return;\n\t\tkarakter.takarit(2);\n tartossag--;\n if(tartossag<=0) karakter.targy_elhasznalasa(this);\n\t}",
"@Override\r\n\tpublic void solicitarTrajeta(String numero) {\n\t\tSystem.out.println(\"Leer tarjeta\");\r\n\t\t\r\n\t}",
"public void test2(){\r\n\t\tZug zug1 = st.zugErstellen(2, 2, \"Zug 1\");\r\n\t\tst.fahren();\r\n\t}",
"abstract void trataAltera();",
"public Sesiones() {\n\t\tentradasVendidas = 0;\n\t}",
"Reserva Obtener();",
"private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}",
"public Ted(int id, String firmaAdi, String ulke, String sehir, String madde,\n int miktar, String uTarihi, int raf, int satisFiyati) {\n this.id = id;\n this.miktar = miktar;\n this.raf = raf;\n this.satisFiyati = satisFiyati;\n this.firmaAdi = firmaAdi;\n this.ulke = ulke;\n this.sehir = sehir;\n this.uTarihi = uTarihi;\n this.madde = madde;\n }",
"private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}",
"public TampilanTransaksi() {\n initComponents();\n trServis = new InputTransaksi();\n jTable1.getSelectionModel().addListSelectionListener(new ListSelectionListener(){\n public void valueChanged(ListSelectionEvent e){\n row=jTable1.getSelectedRow();\n if(row!=-1){\n isiText();\n }\n }\n });\n this.statusAwal();\n }",
"public Tilaus setTilausDone(Tilaus tilaus) {\n Session session = factory.openSession();\n Transaction tx = null;\n\n try {\n tx = session.beginTransaction(); \n tilaus.setStatus(2);\n tilaus.setValmistumisAika(LocalDateTime.now());\n session.update(tilaus); \n Tyontekija tt = tilaus.getTyontekija();\n tt.setHoidetutTilaukset(tt.getHoidetutTilaukset()+1);\n tt.setVaiheessaTilaukset(tt.getVaiheessaTilaukset()-1);\n int tilauksenLaitteet = 0;\n for(Laite laite : tilaus.getLaitteet()) {\n tilauksenLaitteet++;\n }\n tt.setHoidetutLaitteet(tt.getHoidetutLaitteet()+tilauksenLaitteet);\n tt.setTyoMinuutit(tt.getTyoMinuutit()+toIntExact(Duration.between(tilaus.getTyonalleottoAika(), LocalDateTime.now()).toMinutes()));\n session.update(tt);\n tx.commit();\n } catch (HibernateException e) {\n if (tx!=null) tx.rollback();\n e.printStackTrace(); \n } finally {\n session.close(); \n }\n return tilaus;\n }",
"private Position findeNahrung(Position position)\n {\n List<Position> nachbarPositionen = \n feld.nachbarpositionen(position);\n Iterator<Position> iter = nachbarPositionen.iterator();\n while(iter.hasNext()) {\n Position pos = iter.next();\n Object tier = feld.gibObjektAn(pos);\n if(tier instanceof Hase) {\n Hase hase = (Hase) tier;\n if(hase.istLebendig()) { \n hase.sterben();\n futterLevel = HASEN_NAEHRWERT;\n return pos;\n }\n }\n }\n return null;\n }",
"public void schreibeFreizeitbaederInTxtDatei()\r\n\t\t throws IOException{\r\n\t\t\t WriterCreator writerCreator = new ConcreteTxtWriterCreator();\r\n\t\t\t WriterProduct writerProduct = writerCreator.factoryMethod();\r\n\t\t\t //Praktikum 4\r\n \t\t\tthis.getFreizeitbaeder().forEach((fzb) -> {\r\n \t\t\t\ttry {\r\n \t\t\t\t\twriterProduct.fuegeInDateiHinzu(fzb);\r\n \t\t\t\t} catch (IOException e) {\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t});\r\n \t\t\twriterProduct.schliesseDatei();\t\t \r\n }",
"public void FermerAgd() {\n //on essaye d'ouvrir un fichier dans lequel enregistrer le contenu de l'agenda\n try {\n Formatter agd_a_enreg = new Formatter(\"C:\\\\Projet_Agenda_ING3\\\\saved_agendas\");\n\n for (RdV el : this.getAgenda()) {\n //on enregistre 1 rdv par ligne\n //faire gaffe aux formats : %..\n agd_a_enreg.format(\"%s/%s/%s de %s a %s : %s , %s\\n\",\n el.getDate().getDayOfMonth(), el.getDate().getMonthValue(),\n el.getDate().getYear(), el.getHdebut(),\n el.getHfin(), el.getLibelle(), el.getRappel());\n //on supprime le rdv de l'arraylist d'agenda \n this.suppressionRdV(el);\n }\n //on ferme le fichier en ecriture\n agd_a_enreg.close();\n //on met l'attribut agenda à null une fois qu'il est \"vidé\"\n this.agd = null;\n } //en cas de probleme dans l'ouverture du fichier on affiche une erreur\n catch (Exception e) {\n System.out.print(\"Erreur d'ouverture du fichier en ecriture\\n\");\n }\n\n }",
"public void tulostaKomennot() {\n this.io.tulostaTeksti(\"Komennot: \");\n for (int i = 1; i <= this.komennot.keySet().size(); i++) {\n this.io.tulostaTeksti(this.komennot.get(i).toString());\n }\n this.io.tulostaTeksti(\"\");\n }",
"public void tampilBuku() {\n System.out.println(\"ID : \" + this.id);\n System.out.println(\"Judul : \" + this.judul);\n System.out.println(\"Tahun Terbit: \" + this.tahun);\n }",
"public static void llenarSoriana(){\r\n Producto naranja1 = new Producto (\"naranja\", \"el huertito\", 25, 0);\r\n Nodo<Producto> nTemp1 = new Nodo(naranja1);\r\n listaSoriana.agregarNodo(nTemp1);\r\n \r\n Producto naranja2 = new Producto (\"naranja\", \"el ranchito\", 34, 0);\r\n Nodo<Producto> nTemp2 = new Nodo (naranja2);\r\n listaSoriana.agregarNodo(nTemp2);\r\n \r\n Producto manzana3 = new Producto (\"manzana\", \"el rancho de don chuy\", 24, 0);\r\n Nodo<Producto> nTemp3 = new Nodo (manzana3);\r\n listaSoriana.agregarNodo(nTemp3);\r\n \r\n Producto manzana4 = new Producto (\"manzana\", \"la costeña\", 15, 0);\r\n Nodo<Producto> nTemp4 = new Nodo(manzana4);\r\n listaSoriana.agregarNodo(nTemp4);\r\n \r\n Producto platano5 = new Producto (\"platano\", \"el Huertito\", 26, 0);\r\n Nodo<Producto> nTemp5 = new Nodo (platano5);\r\n listaSoriana.agregarNodo(nTemp5);\r\n \r\n Producto platano6 = new Producto (\"platano\", \"granjita dorada\", 36, 0);\r\n Nodo<Producto> nTemp6 = new Nodo (platano6);\r\n listaSoriana.agregarNodo (nTemp6);\r\n \r\n Producto pera7 = new Producto (\"pera\", \"el rancho de don chuy\", 38, 0);\r\n Nodo<Producto> nTemp7 = new Nodo (pera7);\r\n listaSoriana.agregarNodo(nTemp7);\r\n \r\n Producto pera8 = new Producto (\"pera\", \"la costeña\", 8,0);\r\n Nodo<Producto> nTemp8 = new Nodo (pera8);\r\n listaSoriana.agregarNodo(nTemp8);\r\n \r\n Producto durazno9 = new Producto (\"durazno\", \"el huertito\", 12.50, 0);\r\n Nodo<Producto> nTemp9 = new Nodo (durazno9);\r\n listaSoriana.agregarNodo(nTemp9);\r\n \r\n Producto fresa10 = new Producto (\"fresa\", \"el rancho de don chuy\", 35.99,0);\r\n Nodo<Producto> nTemp10 = new Nodo (fresa10);\r\n listaSoriana.agregarNodo(nTemp10);\r\n \r\n Producto fresa11 = new Producto (\"fresa\", \"grajita dorada\", 29.99,0);\r\n Nodo<Producto> nTemp11 = new Nodo (fresa11);\r\n listaSoriana.agregarNodo(nTemp11);\r\n \r\n Producto melon12 = new Producto (\"melon\", \"la costeña\", 18.50, 0);\r\n Nodo<Producto> nTemp12 = new Nodo (melon12);\r\n listaSoriana.agregarNodo(nTemp12);\r\n \r\n Producto melon13 = new Producto (\"melon\", \"el huertito\", 8.50, 0);\r\n Nodo<Producto> nTemp13 = new Nodo (melon13);\r\n listaSoriana.agregarNodo(nTemp13);\r\n \r\n Producto elote14 = new Producto (\"elote\", \"el ranchito\", 6, 0);\r\n Nodo<Producto> nTemp14 = new Nodo (elote14);\r\n listaSoriana.agregarNodo(nTemp14);\r\n \r\n Producto elote15 = new Producto (\"elote\", \"moctezuma\", 12, 0);\r\n Nodo<Producto> nTemp15 = new Nodo (elote15);\r\n listaSoriana.agregarNodo(nTemp15);\r\n \r\n Producto aguacate16 = new Producto (\"aguacate\", \"la costeña\", 35, 0);\r\n Nodo<Producto> nTemp16 = new Nodo (aguacate16);\r\n listaSoriana.agregarNodo(nTemp16);\r\n \r\n Producto cebolla17 = new Producto (\"cebolla\", \"granjita dorada\", 8.99, 0);\r\n Nodo<Producto> nTemp17 = new Nodo (cebolla17);\r\n listaSoriana.agregarNodo(nTemp17);\r\n \r\n Producto tomate18 = new Producto (\"tomate\", \"el costeñito feliz\", 10.50, 0);\r\n Nodo<Producto> nTemp18 = new Nodo (tomate18);\r\n listaSoriana.agregarNodo(nTemp18);\r\n \r\n Producto tomate19 = new Producto (\"tomate\", \"el ranchito\", 8.99, 0);\r\n Nodo<Producto> nTemp19 = new Nodo (tomate19);\r\n listaSoriana.agregarNodo(nTemp19);\r\n \r\n Producto limon20 = new Producto (\"limon\", \"la costeña\", 3.50, 0);\r\n Nodo<Producto> nTemp20 = new Nodo (limon20);\r\n listaSoriana.agregarNodo(nTemp20);\r\n \r\n Producto limon21 = new Producto (\"limon\", \"el ranchito\", 10.99, 0);\r\n Nodo<Producto> nTemp21 = new Nodo (limon21);\r\n listaSoriana.agregarNodo(nTemp21);\r\n \r\n Producto papas22 = new Producto (\"papas\", \"la costeña\", 11, 0);\r\n Nodo<Producto> nTemp22 = new Nodo(papas22);\r\n listaSoriana.agregarNodo(nTemp22);\r\n \r\n Producto papas23 = new Producto (\"papas\", \"granjita dorada\", 4.99, 0);\r\n Nodo<Producto> nTemp23 = new Nodo(papas23);\r\n listaSoriana.agregarNodo(nTemp23);\r\n \r\n Producto chile24 = new Producto (\"chile\", \"el rancho de don chuy\", 2.99, 0);\r\n Nodo<Producto> nTemp24 = new Nodo (chile24);\r\n listaSoriana.agregarNodo(nTemp24);\r\n \r\n Producto chile25 = new Producto (\"chile\",\"la costeña\", 12, 0);\r\n Nodo<Producto> nTemp25 = new Nodo (chile25);\r\n listaSoriana.agregarNodo(nTemp25);\r\n \r\n Producto jamon26 = new Producto (\"jamon\",\"fud\", 25, 1);\r\n Nodo<Producto> nTemp26 = new Nodo(jamon26);\r\n listaSoriana.agregarNodo(nTemp26);\r\n \r\n Producto jamon27 = new Producto(\"jamon\", \"kir\", 13.99, 1);\r\n Nodo<Producto> nTemp27 = new Nodo(jamon27);\r\n listaSoriana.agregarNodo(nTemp27);\r\n \r\n Producto peperoni28 = new Producto (\"peperoni28\", \"fud\", 32, 1);\r\n Nodo<Producto> nTemp28 = new Nodo (peperoni28);\r\n listaSoriana.agregarNodo(nTemp28);\r\n \r\n Producto salchicha29 = new Producto (\"salchicha\", \" san rafael\", 23.99, 1);\r\n Nodo<Producto> nTemp29 = new Nodo (salchicha29);\r\n listaSoriana.agregarNodo(nTemp29); \r\n \r\n Producto huevos30 = new Producto (\"huevos\", \"san rafael\", 30.99, 1);\r\n Nodo<Producto> nTemp30 = new Nodo (huevos30);\r\n listaSoriana.agregarNodo(nTemp30);\r\n \r\n Producto chuletas31 = new Producto (\"chuletas\", \"la res dorada\", 55, 1);\r\n Nodo<Producto> nTemp31 = new Nodo (chuletas31);\r\n listaSoriana.agregarNodo(nTemp31);\r\n \r\n Producto carnemolida32 = new Producto (\"carne molida\", \"san rafael\", 34, 1);\r\n Nodo<Producto> nTemp32 = new Nodo (carnemolida32);\r\n listaSoriana.agregarNodo(nTemp32);\r\n \r\n Producto carnemolida33 = new Producto (\"carne molida\", \"la res dorada\", 32.99, 1);\r\n Nodo<Producto> nTemp33 = new Nodo (carnemolida33);\r\n listaSoriana.agregarNodo(nTemp33);\r\n \r\n Producto pollo34 = new Producto (\"pollo\", \"pollito feliz\", 38, 1);\r\n Nodo<Producto> nTemp34 = new Nodo (pollo34);\r\n listaSoriana.agregarNodo(nTemp34);\r\n \r\n Producto pescado35 = new Producto (\"pescado\", \"pescadito\", 32.99, 1);\r\n Nodo<Producto> nTemp35 = new Nodo (pescado35);\r\n listaSoriana.agregarNodo(nTemp35);\r\n \r\n Producto quesolaurel36 = new Producto (\"queso\", \"laurel\", 23.50, 1);\r\n Nodo<Producto> nTemp36 = new Nodo (quesolaurel36);\r\n listaSoriana.agregarNodo(nTemp36);\r\n \r\n Producto leche37 = new Producto (\"leche\", \"nutrileche\", 12.99, 1);\r\n Nodo<Producto> nTemp37 = new Nodo (leche37);\r\n listaSoriana.agregarNodo(nTemp37);\r\n \r\n Producto lechedeslactosada38 = new Producto (\"leche deslactosada\", \"lala\", 17.50, 1);\r\n Nodo<Producto> nTemp38 = new Nodo (lechedeslactosada38);\r\n listaSoriana.agregarNodo(nTemp38);\r\n \r\n Producto panblanco39 = new Producto (\"pan blanco\", \"bombo\", 23.99, 2);\r\n Nodo<Producto> nTemp39 = new Nodo (panblanco39);\r\n listaSoriana.agregarNodo(nTemp39);\r\n \r\n Producto atun40 = new Producto (\"atun\", \"la aleta feliz\", 12, 2);\r\n Nodo<Producto> nTemp40 = new Nodo (atun40);\r\n listaSoriana.agregarNodo(nTemp40);\r\n \r\n Producto atun41 = new Producto (\"atun\", \"el barco\", 10.99, 2);\r\n Nodo<Producto> nTemp41 = new Nodo (atun41);\r\n listaSoriana.agregarNodo(nTemp41);\r\n \r\n Producto arroz42 = new Producto (\"arroz\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp42 = new Nodo (arroz42);\r\n listaSoriana.agregarNodo(nTemp42);\r\n \r\n Producto arroz43 = new Producto (\"arroz\", \"soriana\", 9.99, 2);\r\n Nodo<Producto> nTemp43 = new Nodo (arroz43);\r\n listaSoriana.agregarNodo(nTemp43);\r\n \r\n Producto frijol44 = new Producto (\"frijol\", \"mi marca\", 10.99, 2);\r\n Nodo<Producto> nTemp44 = new Nodo (frijol44);\r\n listaSoriana.agregarNodo(nTemp44);\r\n \r\n Producto frijol45 = new Producto (\"frijol\", \"soriana\", 15.99, 2);\r\n Nodo<Producto> nTemp45 = new Nodo (frijol45);\r\n listaSoriana.agregarNodo(nTemp45);\r\n \r\n Producto azucar46 = new Producto (\"azucar\", \"mi marca\", 12.50, 2);\r\n Nodo<Producto> nTemp46 = new Nodo (azucar46);\r\n listaSoriana.agregarNodo(nTemp46);\r\n \r\n Producto azucar47 = new Producto (\"azucar\", \"zulka\", 15.99, 2);\r\n Nodo<Producto> nTemp47 = new Nodo (azucar47);\r\n listaSoriana.agregarNodo(nTemp47);\r\n \r\n Producto servilletas48 = new Producto (\"servilletas\", \"esponjosas\",10.50, 2);\r\n Nodo<Producto> nTemp48 = new Nodo (servilletas48);\r\n listaSoriana.agregarNodo(nTemp48);\r\n \r\n Producto sal49 = new Producto (\"sal\", \"mar azul\", 3.99, 2);\r\n Nodo<Producto> nTemp49 = new Nodo (sal49);\r\n listaSoriana.agregarNodo(nTemp49);\r\n \r\n Producto aceitedecocina50 = new Producto (\"aceite de cocina\", \"123\", 15.99, 2);\r\n Nodo<Producto> nTemp50 = new Nodo (aceitedecocina50);\r\n listaSoriana.agregarNodo(nTemp50);\r\n \r\n Producto caffe51 = new Producto (\"caffe\", \"nescafe\", 23, 2);\r\n Nodo<Producto> nTemp51 = new Nodo (caffe51);\r\n listaSoriana.agregarNodo(nTemp51);\r\n \r\n Producto puredetomate52 = new Producto (\"pure de tomate\", \" la costeña\", 12.99, 2);\r\n Nodo<Producto> nTemp52 = new Nodo (puredetomate52);\r\n listaSoriana.agregarNodo(nTemp52);\r\n \r\n Producto lentejas53 = new Producto (\"lentejas\", \"la granjita\", 8.99, 2);\r\n Nodo<Producto> nTemp53 = new Nodo (lentejas53);\r\n listaSoriana.agregarNodo(nTemp53);\r\n \r\n Producto zuko54 = new Producto (\"zuko\", \"zuko\", 2.99, 2);\r\n Nodo<Producto> nTemp54 = new Nodo (zuko54);\r\n listaSoriana.agregarNodo(nTemp54);\r\n \r\n Producto champu55 = new Producto (\"champu\", \"loreal\", 32, 3);\r\n Nodo<Producto> nTemp55 = new Nodo (champu55);\r\n listaSoriana.agregarNodo(nTemp55);\r\n \r\n Producto champu56 = new Producto (\"champu\", \"el risueño\", 29.99, 3);\r\n Nodo<Producto> nTemp56 = new Nodo (champu56);\r\n listaSoriana.agregarNodo(nTemp56);\r\n \r\n Producto desodorante57 = new Producto (\"desodorante\", \"nivea\", 23.50, 3);\r\n Nodo<Producto> nTemp57 = new Nodo (desodorante57);\r\n listaSoriana.agregarNodo(nTemp57);\r\n \r\n Producto pastadedientes58 = new Producto(\"pasta de dientes\", \"colgate\", 17.50, 3);\r\n Nodo<Producto> nTemp58 = new Nodo (pastadedientes58);\r\n listaSoriana.agregarNodo(nTemp58);\r\n \r\n Producto pastadedientes59 = new Producto (\"pasta de dientes\", \"el diente blanco\", 29, 3);\r\n Nodo<Producto> nTemp59 = new Nodo (pastadedientes59);\r\n listaSoriana.agregarNodo(nTemp59);\r\n \r\n Producto rastrillos60 = new Producto (\"rastrillos\", \"el filosito\", 33.99, 3);\r\n Nodo<Producto> nTemp60 = new Nodo (rastrillos60);\r\n listaSoriana.agregarNodo(nTemp60);\r\n \r\n Producto rastrillos61 = new Producto (\"rastrillos\", \"barba de oro\", 23.99, 3);\r\n Nodo<Producto> nTemp61 = new Nodo (rastrillos61);\r\n listaSoriana.agregarNodo(nTemp61);\r\n \r\n Producto hilodental62 = new Producto (\"hilo dental\", \"el diente blanco\", 32.99, 3);\r\n Nodo<Producto> nTemp62 = new Nodo (hilodental62);\r\n listaSoriana.agregarNodo(nTemp62);\r\n \r\n Producto cepillodedientes63 = new Producto (\"cepillo de dientes\", \"OBBM\", 17.99, 3);\r\n Nodo<Producto> nTemp63 = new Nodo (cepillodedientes63);\r\n listaSoriana.agregarNodo(nTemp63);\r\n \r\n Producto cloro64 = new Producto (\"cloro\", \"cloralex\", 23.50, 3);\r\n Nodo<Producto> nTemp64 = new Nodo (cloro64);\r\n listaSoriana.agregarNodo(nTemp64);\r\n \r\n Producto acondicionador65 = new Producto (\"acondicionador\", \"sedal\", 28.99, 3);\r\n Nodo<Producto> nTemp65 = new Nodo (acondicionador65);\r\n listaSoriana.agregarNodo(nTemp65);\r\n \r\n Producto acondicionador66 = new Producto (\"acondicionador\", \"pantene\", 23.99, 3);\r\n Nodo<Producto> nTemp66 = new Nodo (acondicionador66);\r\n listaSoriana.agregarNodo(nTemp66);\r\n \r\n Producto pinol67 = new Producto(\"pinol\", \"mi piso limpio\", 15, 3);\r\n Nodo<Producto> nTemp67 = new Nodo (pinol67);\r\n listaSoriana.agregarNodo(nTemp67);\r\n \r\n Producto pinol68 = new Producto (\"pinol\", \"eficaz\", 18.99, 3);\r\n Nodo<Producto> nTemp68 = new Nodo (pinol68);\r\n listaSoriana.agregarNodo(nTemp68);\r\n \r\n Producto tortillas69 = new Producto (\"tortillas\", \"maizena\", 8.99, 2);\r\n Nodo<Producto> nTemp69 = new Nodo (tortillas69);\r\n listaSoriana.agregarNodo(nTemp69);\r\n \r\n Producto cremaparacuerpo70 = new Producto (\"crema para cuerpo\", \"dove\", 13.50, 3);\r\n Nodo<Producto> nTemp70 = new Nodo (cremaparacuerpo70);\r\n listaSoriana.agregarNodo(nTemp70);\r\n \r\n Producto maizoro71 = new Producto (\"maizoro\", \"special k\", 35.99, 2);\r\n Nodo<Producto> nTemp71 = new Nodo (maizoro71);\r\n listaSoriana.agregarNodo(nTemp71);\r\n \r\n Producto maizoro72 = new Producto (\"maizoro\",\"azucaradas\", 43, 2);\r\n Nodo<Producto> nTemp72 = new Nodo (maizoro72);\r\n listaSoriana.agregarNodo(nTemp72);\r\n \r\n Producto zanahoria73 = new Producto (\"zanahoria\", \"el huertito\", 12.99, 0);\r\n Nodo<Producto> nTemp73 = new Nodo (zanahoria73);\r\n listaSoriana.agregarNodo(nTemp73);\r\n \r\n Producto maizoro74 = new Producto (\"maizoro\", \"cherrios\", 45, 2);\r\n Nodo<Producto> nTemp74 = new Nodo (maizoro74);\r\n listaSoriana.agregarNodo(nTemp74);\r\n \r\n Producto mayonesa75 = new Producto (\"mayonesa\", \"helmans\", 23, 2);\r\n Nodo<Producto> nTemp75 = new Nodo (mayonesa75);\r\n listaSoriana.agregarNodo(nTemp75);\r\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"public void Mendaftar(Pasien pasien) {\r\n // mengisi data variabel daftarPasien dengan variabel lokal daftarPasien \r\n daftarPasien.add(pasien);\r\n }",
"public void papierkorbAnzeigen() {\n\t\tfor (Datei a:papierkorb) {\n\t\t\ta.anzeigeDateiDetail();\n\t\t}\n\t}",
"private void doNovo() {\n contato = new ContatoDTO();\n popularTela();\n }",
"@Override\r\n\tpublic Telefone trazerUm(Long id, Telefone classe) throws Exception {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}",
"public void selecao () {}",
"private void nullstillFordeling(){\n int i = indeks;\n politi = -1;\n mafiaer = -1;\n venner = -1;\n mafia.nullstillSpesialister();\n spillere.tømTommeRoller();\n for (indeks = 0; roller[indeks] == null; indeks++) ;\n fordeling = null;\n }",
"public boolean insertTonKho(TonKho tk) {\n String dongia = \"\" + Utils.formatNumber(tk.getTonkhoDongia(), \"###.##\");\n dongia = dongia.replace(\".\", \"\");\n String malk = tk.getTonkhoMalienket();\n if (malk == null || malk.equals(\"\")) {\n malk = tk.getDmthuocMaso(true).getDmthuocMa() +\n tk.getDmnctMaso(true).getDmnctMa() +\n tk.getDmnguonkinhphiMaso(true).getDmnguonkinhphiMa() +\n tk.getDmquocgiaMaso(true).getDmquocgiaMa() +\n tk.getDmnhasanxuatMaso(true).getDmnhasanxuatMa() +\n //tk.getPhieunhapkhoMa(true).getPhieunhapkhoMa() +\n tk.getTonkhoNamnhap() +\n tk.getTonkhoNgayhandung() +\n tk.getTonkhoThanghandung() +\n tk.getTonkhoNamhandung() +\n tk.getTonkhoLo() +\n tk.getTonkhoSodangky() +\n dongia;\n tk.setTonkhoMalienket(malk.toUpperCase());\n }\n //System.out.println(\"malk: \"+ malk);\n //System.out.println(\"Kho: \"+ tk.getDmkhoaMaso().getDmkhoaMaso());\n TonKho tkHt = getTonKhoHienTai(malk, tk.getDmkhoaMaso().getDmkhoaMaso());\n //System.out.println(\"Ton khoHT: \"+ tkHt);\n // cap nhat gia tri ton hien tai.\n Double nhap = Double.valueOf(\"0\");\n if (tk.getTonkhoNhap() != null) {\n nhap = tk.getTonkhoNhap();\n }\n tk.setTonkhoNhap(nhap);\n //System.out.println(\"Nhap: \"+ nhap);\n Double xuat = Double.valueOf(\"0\");\n if (tk.getTonkhoXuat() != null) {\n xuat = tk.getTonkhoXuat();\n }\n tk.setTonkhoXuat(xuat);\n //System.out.println(\"Xuat: \"+ xuat);\n Double tra = Double.valueOf(\"0\");\n if (tk.getTonkhoTra() != null) {\n tra = tk.getTonkhoTra();\n }\n tk.setTonkhoTra(tra);\n //System.out.println(\"Tra: \"+ tra);\n Double ton = Double.valueOf(\"0\");\n if (tkHt != null) {\n if (tkHt.getTonkhoTon() != null) {\n ton = tkHt.getTonkhoTon();\n }\n }\n //System.out.println(\"tondau: \"+ ton);\n //*** triet them vao cap nhat ton dau\n tk.setTonkhoTondau(ton);\n //******\n ton = ton + ((nhap + tra) - xuat);\n //ThoVNA - kiem tra lai lan cuoi, neu so luong ton < sl xuat thi khong cho thuc hien xuat thuoc\n if(ton <0){\n return false;\n }\n tk.setTonkhoTon(ton);\n\n if (tk.getPhieunhapkhoMa() != null &&\n (tk.getPhieunhapkhoMa().getPhieunhapkhoMa() == null || tk.getPhieunhapkhoMa().getPhieunhapkhoMa().equals(\"\"))) {\n tk.setPhieunhapkhoMa(null);\n }\n\n\n tk.setTonkhoNgaygiocn(new Date());\n try {\n tk.setTonkhoHienthi(true);\n getEm().persist(tk);\n return true;\n } catch (Exception e) {\n context.setRollbackOnly();\n e.printStackTrace();\n }\n return false;\n }",
"private void srediTekst() throws SmartScriptParserException {\n\t\tif (stog.isEmpty()) {\n\t\t\tthrow new SmartScriptParserException(\"Too much 'END's.\");\n\t\t}\n\t\telse {\n\t\t\t((Node) stog.peek()).addChildNode(new TextNode(gradiTekst.toString()));\n\t\t}\n\n\t}",
"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 }",
"private void escoger(){\n partida.escoger(ficha1,ficha2);\n ficha1=null;\n ficha2=null;\n this.ok=partida.ok;\n }",
"protected int maakTrein(int positie){\r\n for (int i = 0; i <= treinaantal; i++){\r\n if (treinlijst[i] == null){\r\n treinlijst[i] = new Trein(positie, treinaantal++);\r\n baan.addTrein(treinlijst[i].getId());\r\n //update naar gui\r\n int trein[] = new int[1];\r\n trein[0] = treinlijst[i].getId();\r\n int[] arg = new int[1];\r\n arg[0] = positie;\r\n main.updateGui(\"trein\", trein, arg);\r\n return treinlijst[i].getId();\r\n }\r\n }\r\n return 0;\r\n }",
"protected final void reduireTempsRestant() {\n arme.reduireTempsRestant();\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 validerSaisie();",
"public void zugInWerkstatt() {\n werkstatt++;\n }",
"public Trimestre(){\n id_trimestre=0;\n numero=0;\n debut_trimestre= new Date(2012,8,12);\n fin_trimestre=new Date(2013,1,13);\n id_anneeScolaire=0;\n }",
"public void anazitisiSintagisVaseiHmerominias() {\n\t\tDate firstDt = null, lastDt = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t// Zitaw apo ton xrhsth to xroniko euros kata to opoio exei graftei sintagh\n\t\t\tfirstDt = sir.readDate(\"DWSTE ARXIKH HMEROMHNIA: \");\n\t\t\tlastDt = sir.readDate(\"DWSTE TELIKH HMEROMHNIA: \");\n\t\t\tSystem.out.println();\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t// An h hmeromhnia eggrafhs ths syntaghs einai anamesa sta xronika oria pou exei dwsei o xrhsths ektypwnetai\n\t\t\t\tif(firstDt.before(prescription[i].getDate()) && (lastDt.after(prescription[i].getDate()))) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH METAKSY:\" + firstDt + \" KAI: \" + lastDt);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}",
"public void klikkaa(Tavarat tavarat, Klikattava klikattava);",
"public void funcFinalizaAtd(){ \n \n \n AtendimentosDAO atd = new AtendimentosDAO();\n int codAtd = Integer.parseInt(txtCodAtd.getText());\n Atendimentos at = atd.PesquisaAtd(codAtd);\n at.setDescricao(txtDescricao.getText());\n atd.AlterarAtendimentoMtData(at);\n atd.AlterarStatus(codAtd, atd.retornaStatusID(\"Finalizado\"));\n inicializacao(1);\n }"
] | [
"0.7284175",
"0.63930225",
"0.63254386",
"0.62954843",
"0.62713146",
"0.6197161",
"0.61911476",
"0.6181856",
"0.61654836",
"0.6152601",
"0.61427724",
"0.6111684",
"0.60915655",
"0.6064338",
"0.60380346",
"0.6023555",
"0.60137194",
"0.60070384",
"0.5997832",
"0.5990205",
"0.59840125",
"0.5962242",
"0.59548986",
"0.59493643",
"0.59381944",
"0.5931167",
"0.5888918",
"0.58848697",
"0.58847797",
"0.5874419",
"0.5868365",
"0.58665895",
"0.5863775",
"0.5859764",
"0.58569086",
"0.5856572",
"0.5856101",
"0.58493984",
"0.58484286",
"0.58482456",
"0.5842545",
"0.5823831",
"0.5821146",
"0.5821134",
"0.58084935",
"0.57970154",
"0.5792087",
"0.57755715",
"0.57719105",
"0.57602704",
"0.57600164",
"0.5759945",
"0.57579935",
"0.57571703",
"0.57553506",
"0.5752503",
"0.5751497",
"0.57451",
"0.5744851",
"0.5741694",
"0.57339877",
"0.5728896",
"0.5728331",
"0.5724294",
"0.5722632",
"0.57198346",
"0.57168204",
"0.5715206",
"0.57002336",
"0.57001513",
"0.5697065",
"0.56938785",
"0.5692991",
"0.5691146",
"0.5691094",
"0.5690176",
"0.56848323",
"0.5684544",
"0.56770635",
"0.5673601",
"0.5662653",
"0.5659944",
"0.5659637",
"0.56559545",
"0.56547904",
"0.5649089",
"0.56400645",
"0.5638374",
"0.56350976",
"0.56332994",
"0.56325364",
"0.5631707",
"0.563084",
"0.56293106",
"0.56277055",
"0.56272787",
"0.5626677",
"0.5622216",
"0.5621306",
"0.5602966",
"0.56020796"
] | 0.0 | -1 |
Create a new RouteDao without any configuration | public RouteDao() {
super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RouteDAO() {\n\t\tconn = DBConnection.getConnection();\n\t}",
"public HRouterDAOImpl() {\r\n super();\r\n }",
"public Route() {\n }",
"@Autowired\n public RouteDao(Configuration configuration) {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class, configuration);\n }",
"public void createRoute(Route route) throws SQLException {\n\t\trDb.createRoute(route);\n\t}",
"public OnibusDAO() {}",
"public interface RouteDao extends BaseDAO<Route> {\r\n}",
"public RoutingCommandImpl() {\n }",
"private UrlDAO() { }",
"public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }",
"public DaoFactory()\n\t{\n\n\t}",
"protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}",
"public ModeOfPurchaseDAOImpl() {\r\n\r\n }",
"protected AbstractDao()\n {\n\n }",
"public interface DAOFactory {\n\n /**\n *\n * @param context\n * @return\n */\n public abstract DAO createPersonBeaconDAO(Context context);\n}",
"@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}",
"public PostDao() {\n\t}",
"String createRoute(RouteBean route);",
"private DaoManager() {\n }",
"public ProductosPuntoVentaDaoImpl() {\r\n }",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public ProductDAO() {\n }",
"public RouteFragment() {\n }",
"public RideDao() {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class);\n }",
"D getDao();",
"public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}",
"private PurchaseDAO(){\n }",
"public LPMapdataDaoImpl() {\r\n\t\t\r\n\t}",
"public AlManageOnAirDAOImpl() {\r\n super();\r\n }",
"public RoomServiceImpl(RoomDao roomDao) {\n this.roomDao=roomDao;\n }",
"public ActorDtoDAOImpl() {\n super();\n }",
"public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}",
"public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }",
"public AutorDao criarAutorDao(){\n\t\treturn new AutorDaoImpl();\n\t}",
"public UserDAO() {\n }",
"public ProtocoloDAO() {\n }",
"public RouteController() throws SQLException {\n\t\tbgCtr = new BjergbyGraphController();\n\t\toCtr = new OrderController();\n\t\trDb = new RouteDB();\n\t}",
"public UserDAO()\n {\n \n }",
"public PacienteDAO(){ \n }",
"@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }",
"public static com.services.model.BusRoute create(long brId) {\n\t\treturn getPersistence().create(brId);\n\t}",
"@Test\r\n\t public void addAnEmptyRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather());\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }",
"private CommentDAO() {\n\n\t}",
"public VRpDyHlrforbeDAOImpl() {\r\n super();\r\n }",
"public empresaDAO(){\r\n \r\n }",
"@Test\r\n\t public void addANullRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(null, null, null, null, null));\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }",
"private FirebaseDAO() {}",
"public static route createroute(routeparameter aRouteparameter) {\n Partitioner<Text> partitioner = aRouteparameter.getPartitioner();\n HashMap<Integer, Integer> hashBucketToPartition = aRouteparameter\n .getHashBucketToPartition();\n HashMap<Integer, Integer> rangeRouter = aRouteparameter.getRangeRouter();\n if (hashBucketToPartition == null) {\n if (rangeRouter == null) {\n return new HashRoute(partitioner);\n } else {\n return new RangeRoute(rangeRouter);\n }\n } else {\n return new BalancerHashRoute(partitioner, hashBucketToPartition);\n }\n }",
"private Destination createDestination(String originCode, TopRoute route) {\n\t\tString countryCode = cityService.getCountry(originCode);\n\t\tFlight flight = flightService.cheapestFlightReader(countryCode, route.getFrom(), route.getTo());\n\t\tDestination destination = new Destination(route.getTo(), flight);\n\t\treturn destination;\n\t}",
"public ReleaseplanDAOImpl() {\r\n\t\tsuper();\r\n\t}",
"AddressDao getAddressDao();",
"public DescritoresDAO() {\n\t\t\n\t}",
"private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}",
"public VRpHrStpDAOImpl() {\r\n super();\r\n }",
"public BaseRouteManager(Context context, APIConfig config) {\n mContext = context;\n mApiConfig = config;\n }",
"private ORMServiceFactory() { }",
"public abstract ToDoDao toDoDao();",
"public ProfesorDAOImpl() {\n super();\n }",
"public static DirectionsApiInterface createDirectionsApi(){\n\t\tif (Config.default_directions_api.equals(OSM)){\n\t\t\t//TODO: implement\n\t\t\tDebugger.println(\"GeoFactory - unknown DirectionsApiInterface: \" + Config.default_directions_api, 1);\n\t\t\treturn null;\n\t\t}else if (Config.default_directions_api.equals(GOOGLE)){\n\t\t\treturn new DirectionsApiGoogle();\n\t\t}else if (Config.default_directions_api.equals(GRAPHHOPPER)){\n\t\t\treturn new DirectionsApiGraphhopper();\n\t\t}else{\n\t\t\tDebugger.println(\"GeoFactory - unknown DirectionsApiInterface: \" + Config.default_directions_api, 1);\n\t\t\treturn null;\n\t\t}\n\t}",
"private UserAccountDAO(){\n }",
"public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }",
"public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }",
"public MenuDAO() {\n\t\t\n\t\tconnection = ConnectDatabase.connectDatabase();\n\t\t\n\t}",
"public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}",
"public MultaDAO() {\r\n super(MultaDAO.class);\r\n }",
"public ETLLogDAOImpl() {\r\n this(new Configuration());\r\n }",
"@Override\n\tpublic DAOProducto crearDAOProductoAlmacen() {\n\t\treturn new DAOProducto();\n\t}",
"public RAlarmLogDAOImpl() {\r\n super();\r\n }",
"private LabelDbmsDao() {\r\n }",
"public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }",
"@Test\n public void testConstructor() {\n UserDao userDao = new UserDao();\n assertNotNull(userDao.getDatabaseConnection());\n assertNotNull(userDao.getController());\n }",
"public RouteManager getRouteManager() {\n\t\tif (routeManager == null) {\n\t\t\tIRouteDAO routeDAO = new RouteDAOSqlite(dbHelper);\n\t\t\trouteManager = new RouteManager(routeDAO);\n\t\t\trouteManager.setManagerHolder(this);\n\t\t}\n\t\treturn routeManager;\n\t}",
"public HLCICPUserDAO() {\n }",
"ORGateway createORGateway();",
"public ArAgingDetailReportDAO () {}",
"ParkingSlotColorInfoDaoImpl() {\n }",
"public UserLoginDAOImpl() {\r\n\r\n }",
"public AdministratorDAO() {\n super();\n DAOClassType = Administrator.class;\n }",
"public VendorLocationsDAOImpl() {\n\t\tsuper();\n\t}",
"public RideDao(Configuration configuration) {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class, configuration);\n }",
"public BaseDaoImpl() {\n\t\tsuper();\n\t}",
"public TermDAOImpl(){\n connexion= new Connexion();\n }",
"@Override\n protected RoutesBuilder createRouteBuilder() throws Exception {\n // override this method and provide our RouteBuilder class\n return new RestDslRouteBuilder();\n }",
"public OnlineUserDAO(){}",
"public void create(){}",
"private RestaurantManager() {\n }",
"public CrudUserDao() {\r\n super();\r\n }",
"public PlanListAccionDao(Context context) {\n dbhandler = new TablaPlanesAccion(context);\n }",
"public DAOBaseImpl() {\n\t\tsuper();\n\t}",
"public static RouterDefinition createDefaultRouterDefinition() {\n RouterDefinition def = new RouterDefinition();\n def.setName(PersistenceController.class.getSimpleName());\n def.setBlocking(true);\n def.setController(PersistenceController.class);\n def.setHandlerProperties(getDefaultProperties());\n def.setRoutes(new String[] { \"/persistenceController/:entity/:ID/:action/read.html\" });\n def.setCaptureCollection(createDefaultCaptureCollection());\n return def;\n }",
"private DTOFactory() {\r\n \t}",
"private DatabaseManager() {}",
"public synchronized RoomDAO getRoomDAO() {\n\t\treturn new RoomDAO(this);\n\t}",
"RoleDao getRoleDao();",
"public interface DaoFactory {\n\n // ===== Getters =====\n\n /**\n * Give the Author Data Access Object.\n *\n * @return the Author Data Access Object.\n */\n AuthorDao getAuthorDao();\n\n /**\n * Give the Book Data Access Object.\n *\n * @return the Book Data Access Object.\n */\n BookDao getBookDao();\n\n /**\n * Give the BookBorrowed Data Access Object.\n *\n * @return the BookBorrowed Data Access Object.\n */\n BookBorrowedDao getBookBorrowedDao();\n\n /**\n * Give the bookReservation Data Access Object.\n *\n * @return the bookReservation Data Access Object.\n */\n BookReservationDao getBookReservationDao();\n\n /**\n * Give the Genre Data Access Object.\n *\n * @return the Genre Data Access Object.\n */\n GenreDao getGenreDao();\n\n /**\n * Give the Publisher Data Access Object.\n *\n * @return the Publisher Data Access Object.\n */\n PublisherDao getPublisherDao();\n\n /**\n * Give the Stock Data Access Object.\n *\n * @return the Stock Data Access Object.\n */\n StockDao getStockDao();\n\n /**\n * Give the Address Data Access Object.\n *\n * @return the Address Data Access Object.\n */\n AddressDao getAddressDao();\n\n /**\n * Give the Role Data Access Object.\n *\n * @return the Role Data Access Object.\n */\n RoleDao getRoleDao();\n\n /**\n * Give the User Data Access Object.\n *\n * @return the User Data Access Object.\n */\n UserDao getUserDao();\n\n /**\n * Give the UserOptions Data Access Object.\n *\n * @return the UserOptions Data Access Object.\n */\n UserOptionsDao getUserOptionsDao();\n\n // ===== Setters =====\n\n /**\n * Set the Author Data Access Object.\n *\n * @param authorDao the Author Data Access Object.\n */\n void setAuthorDao(final AuthorDao authorDao);\n\n /**\n * Set the Book Data Access Object.\n *\n * @param bookDao the Book Data Access Object.\n */\n void setBookDao(final BookDao bookDao);\n\n /**\n * Set the BookBorrowed Data Access Object.\n *\n * @param bookBorrowedDao the BookBorrowed Data Access Object.\n */\n void setBookBorrowedDao(final BookBorrowedDao bookBorrowedDao);\n\n /**\n * Set the BookReservation Data Access Object.\n *\n * @param bookReservationDao the BookReservation Data Access Object.\n */\n void setBookReservationDao(final BookReservationDao bookReservationDao);\n\n /**\n * Set the Genre Data Access Object.\n *\n * @param genreDao the Genre Data Access Object.\n */\n void setGenreDao(final GenreDao genreDao);\n\n /**\n * Set the Publisher Data Access Object.\n *\n * @param publisherDao the Publisher Data Access Object.\n */\n void setPublisherDao(final PublisherDao publisherDao);\n\n /**\n * Set the Stock Data Access Object.\n *\n * @param stockDao the Stock Data Access Object.\n */\n void setStockDao(final StockDao stockDao);\n\n /**\n * Set the Address Data Access Object.\n *\n * @param addressDao the Address Data Access Object.\n */\n void setAddressDao(final AddressDao addressDao);\n\n /**\n * Set the Role Data Access Object.\n *\n * @param roleDao the Role Data Access Object.\n */\n void setRoleDao(final RoleDao roleDao);\n\n /**\n * Set the User Data Access Object.\n *\n * @param userDao the User Data Access Object.\n */\n void setUserDao(final UserDao userDao);\n\n /**\n * Set the User Data Access Object.\n *\n * @param userOptionsDao\n */\n void setUserOptionsDao(final UserOptionsDao userOptionsDao);\n}",
"public static synchronized Dao getDao() {\r\n if (dao == null) {\r\n dao = new Dao();\r\n }\r\n return dao;\r\n }",
"private DAOJPAFactory() {\r\n }",
"public DepartmentsDaoImpl() {\n\t\tsuper();\n\t}",
"public DaoConnection() {\n\t\t\n\t}",
"private LocatorFactory() {\n }"
] | [
"0.69442475",
"0.65958434",
"0.64283437",
"0.637322",
"0.6234105",
"0.6012907",
"0.5935262",
"0.5927127",
"0.5866783",
"0.5848058",
"0.57768667",
"0.5767199",
"0.5719216",
"0.5700986",
"0.5697805",
"0.5696871",
"0.5667943",
"0.5625666",
"0.5608509",
"0.5606844",
"0.56045604",
"0.55671215",
"0.5555224",
"0.5545166",
"0.5526913",
"0.55082405",
"0.55010974",
"0.5499925",
"0.5495542",
"0.5484999",
"0.54842716",
"0.54672813",
"0.54606473",
"0.5438741",
"0.5438561",
"0.54334766",
"0.54306597",
"0.5425054",
"0.5416931",
"0.54165703",
"0.5406961",
"0.54002017",
"0.5374735",
"0.53663033",
"0.5365474",
"0.53506476",
"0.5347442",
"0.5346083",
"0.5344757",
"0.53434515",
"0.5341469",
"0.532588",
"0.53168935",
"0.5272933",
"0.5268419",
"0.5253216",
"0.52381545",
"0.5235737",
"0.5231244",
"0.5221532",
"0.5213524",
"0.5206052",
"0.5175643",
"0.5174101",
"0.5168679",
"0.5166972",
"0.51664895",
"0.5143429",
"0.5135652",
"0.51341707",
"0.5129983",
"0.51217186",
"0.5115181",
"0.5102919",
"0.5091938",
"0.5091542",
"0.50830156",
"0.50779164",
"0.50687486",
"0.5056275",
"0.5054294",
"0.505408",
"0.50506335",
"0.50475705",
"0.50436145",
"0.50432414",
"0.5041409",
"0.504097",
"0.50320786",
"0.50309235",
"0.5016603",
"0.50132257",
"0.5009284",
"0.5001913",
"0.5001639",
"0.49968266",
"0.49850845",
"0.49841145",
"0.49818376",
"0.49817583"
] | 0.7481996 | 0 |
Create a new RouteDao with an attached configuration | @Autowired
public RouteDao(Configuration configuration) {
super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class, configuration);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public RouteDao() {\n super(Route.ROUTE, com.dator.jqtest.dao.model.tables.pojos.Route.class);\n }",
"public RouteDAO() {\n\t\tconn = DBConnection.getConnection();\n\t}",
"public void createRoute(Route route) throws SQLException {\n\t\trDb.createRoute(route);\n\t}",
"public BaseRouteManager(Context context, APIConfig config) {\n mContext = context;\n mApiConfig = config;\n }",
"public HRouterDAOImpl() {\r\n super();\r\n }",
"String createRoute(RouteBean route);",
"public Route() {\n }",
"public RideDao(Configuration configuration) {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class, configuration);\n }",
"protected ETLLogDAOImpl(Configuration config) {\r\n config.addClass(ETLLog.class);\r\n factory = config.buildSessionFactory();\r\n }",
"public static com.services.model.BusRoute create(long brId) {\n\t\treturn getPersistence().create(brId);\n\t}",
"public interface RouteDao extends BaseDAO<Route> {\r\n}",
"public AddressDaoImpl()\n {\n \t//Initialise the related Object stores\n \n }",
"public static route createroute(routeparameter aRouteparameter) {\n Partitioner<Text> partitioner = aRouteparameter.getPartitioner();\n HashMap<Integer, Integer> hashBucketToPartition = aRouteparameter\n .getHashBucketToPartition();\n HashMap<Integer, Integer> rangeRouter = aRouteparameter.getRangeRouter();\n if (hashBucketToPartition == null) {\n if (rangeRouter == null) {\n return new HashRoute(partitioner);\n } else {\n return new RangeRoute(rangeRouter);\n }\n } else {\n return new BalancerHashRoute(partitioner, hashBucketToPartition);\n }\n }",
"public interface DAOFactory {\n\n /**\n *\n * @param context\n * @return\n */\n public abstract DAO createPersonBeaconDAO(Context context);\n}",
"private static SessionFactory buildSessionFactory() {\n\n try {\n Configuration configuration = new Configuration();\n\n Properties properties = new Properties();\n properties.load(AuthDao.class.getResourceAsStream(\"/db.properties\"));\n configuration.setProperties(properties);\n\n// configuration.addAnnotatedClass(Driver.class);\n// configuration.addAnnotatedClass(DriverStatusChange.class);\n// configuration.addAnnotatedClass(Freight.class);\n// configuration.addAnnotatedClass(Location.class);\n configuration.addAnnotatedClass(Manager.class);\n// configuration.addAnnotatedClass(Order.class);\n// configuration.addAnnotatedClass(OrderDriver.class);\n// configuration.addAnnotatedClass(OrderWaypoint.class);\n// configuration.addAnnotatedClass(Truck.class);\n// configuration.addAnnotatedClass(Waypoint.class);\n\n ServiceRegistry serviceRegistry =\n new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).build();\n\n return configuration.buildSessionFactory(serviceRegistry);\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n }",
"public ETLLogDAOImpl() {\r\n this(new Configuration());\r\n }",
"public RoomServiceImpl(RoomDao roomDao) {\n this.roomDao=roomDao;\n }",
"public CoreDao(DaoConfig config) {\n this.txManager = config.getTxManager();\n txTemplate = new TransactionTemplate(txManager);\n setSessionFactory(config.getSessionFactory());\n\n this.daoClass = config.getDaoClass();\n getHibernateTemplate().setCacheQueries(true);\n }",
"public RoutingCommandImpl() {\n }",
"private Destination createDestination(String originCode, TopRoute route) {\n\t\tString countryCode = cityService.getCountry(originCode);\n\t\tFlight flight = flightService.cheapestFlightReader(countryCode, route.getFrom(), route.getTo());\n\t\tDestination destination = new Destination(route.getTo(), flight);\n\t\treturn destination;\n\t}",
"AddressDao getAddressDao();",
"public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }",
"public EtiquetaDao() {\n //subiendola en modo Embedded\n this.sql2o = new Sql2o(\"jdbc:h2:~/demojdbc\", \"sa\", \"\");\n createTable();\n //cargaDemo();\n }",
"public TFreightConfigDao() {\n super(T_FREIGHT_CONFIG, TFreightConfig.class);\n }",
"public PostDao() {\n\t}",
"public OnibusDAO() {}",
"protected ContaCapitalCadastroDaoFactory() {\n\t\t\n\t}",
"public PlanListAccionDao(Context context) {\n dbhandler = new TablaPlanesAccion(context);\n }",
"public RouteManager getRouteManager() {\n\t\tif (routeManager == null) {\n\t\t\tIRouteDAO routeDAO = new RouteDAOSqlite(dbHelper);\n\t\t\trouteManager = new RouteManager(routeDAO);\n\t\t\trouteManager.setManagerHolder(this);\n\t\t}\n\t\treturn routeManager;\n\t}",
"public interface SysRouteCustomerConfigDao {\n\t\n\t/**\n\t * \n\t * @param bankInterface\n\t * @param bankCustomerNo\n\t * @param status\n\t * @return\n\t */\n\tpublic SysRouteCustomerConfig findByBankInterfaceAndBankCustNoAndStatus(String bankInterface, String bankCustomerNo, Status status);\n\n\t/**\n\t * @param sysRouteCustomerConfig\n\t */\n\tpublic SysRouteCustomerConfig create(SysRouteCustomerConfig sysRouteCustomerConfig);\n\t\n\t/**\n\t * \n\t * @param config\n\t * @return\n\t */\n\tpublic SysRouteCustomerConfig update(SysRouteCustomerConfig config);\n\t\n\tpublic SysRouteCustomerConfig findById(Long id);\n\t\n}",
"public interface DAOFactory {\n\n BalanceDAO createBalanceDAO();\n}",
"@Autowired\n public TFreightConfigDao(Configuration configuration) {\n super(T_FREIGHT_CONFIG, TFreightConfig.class, configuration);\n }",
"public StructureTownHallConfigDao(Configuration configuration) {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class, configuration);\n\t}",
"private UrlDAO() { }",
"@Override\n\tpublic StudentDao createDao() {\n\t\treturn new SqliteStudentDaoImpl();\n\t}",
"@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }",
"private HibernateToListDAO(){\r\n\t\tfactory = new AnnotationConfiguration().addPackage(\"il.hit.model\") //the fully qualified package name\r\n .addAnnotatedClass(User.class).addAnnotatedClass(Items.class)\r\n .addResource(\"hibernate.cfg.xml\").configure().buildSessionFactory();\r\n\t}",
"D getDao();",
"public MessageDestinationFactory() {\n this.properties = new ConfigMap();\n }",
"public MovementDAO() { this(CoreDAO.DRIVER_NAME, CoreDAO.URL, CoreDAO.USER, CoreDAO.PASSWORD);\t\t}",
"public interface RouteConfigurator {\n\n PSConnector setLocalIpAddress(String cidr);\n\n PSConnector setStaticRoute(String destCidr, String nextHopeIpAddress);\n\n void setTunnelStaticRoute(String siteId, String destCidr);\n\n PSConnector setTunnel(String tunnelId, String localIpAddress, String remoteIpAddress);\n\n void setSiteToTunnel(String siteId, String tunnelId);\n\n PSConnector setDefaultGateway(String ipAddress);\n\n Set<RouteEntry>getRouteEntrySet();\n\n\n\n}",
"public RouteController() throws SQLException {\n\t\tbgCtr = new BjergbyGraphController();\n\t\toCtr = new OrderController();\n\t\trDb = new RouteDB();\n\t}",
"@Test(expected = TermsOfUseDaoConfigurationException.class)\r\n public void testCtor_dbConnectionFactoryConfigMissing() throws Exception {\r\n configurationObject.removeChild(\"dbConnectionFactoryConfig\");\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }",
"public PensionParametersDAO(Configuration properties) {\n this.properties = properties;\n\n }",
"@Override\n public void configure() throws Exception {\n Properties properties = new Properties();\n properties.load(this.getClass().getClassLoader().getResourceAsStream(\"route.properties\"));\n String ordersFolder = properties.getProperty(\"folder.orders\");\n String postidentFolder = properties.getProperty(\"folder.postident\");\n if(ordersFolder == null || postidentFolder == null) {\n throw new RuntimeException(\"could not read properties for camel route, make sure there\" +\n \" is a file called route.properties in the root or the resoureces folder of your \" +\n \"application that contains the properties folder.orders and folder.postident\");\n }\n\n /*\n * There are two ways of starting the open-account process:\n *\n * - placing an XML file in a hot folder (see route.properties for folder location)\n * - sending a JSON order to a REST web service (see README.txt for instructions)\n */\n // This route handles files placed in the incoming orders folder (see route.properties file)\n // and routes the XML to a JMS queue:\n from(\"file://\" + ordersFolder).\n routeId(\"hot-folder order route\").\n log(\"=======================\").\n log(\"Received order from hot-folder\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"Delivering order to JMS XML queue\").\n to(\"jms:xmlQueue\");\n\n // Order objects that are sent to the REST web service are placed in a JMS queue called\n // orderQueue (see README.txt about setting up the JMS queue). This route listens for\n // incoming messages on that queue, transforms the object to XML using the marshalling\n // feature that is built into camel and delivers the resulting XML to the same queue the\n // incoming XML documents are placed in:\n from(\"jms:orderQueue\").\n routeId(\"order to xml route\").\n log(\"=======================\").\n log(\"received order from orderQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to xml\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n marshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n log(\"=======================\").\n log(\"delivering order xml to xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"jms:xmlQueue\");\n\n /*\n * This route listens for incoming messages on the JMS queue named xmlQueue. When a message\n * arrives, a CDI bean called incomingOrderService is used to extract the data from the XML\n * into a HashMap that will be passed on to the camunda BPM engine when the process instance\n * is started. The HashMap is the same as a variable map that can be passed on to process\n * instances via the camunda BPM API.\n */\n from(\"jms:xmlQueue\").\n routeId(\"start order process route\").\n log(\"=======================\").\n log(\"received order xml from xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"setting order # to '\" + CAMUNDA_BPM_BUSINESS_KEY + \"' property\").\n setProperty(CAMUNDA_BPM_BUSINESS_KEY).xpath(\"//@ordernumber\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order xml to order object\").\n unmarshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to variable map (java.util.Map) as input for the camunda BPM process\").\n process(new OrderToMapProcessor()).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"starting open-account process\").\n to(\"camunda-bpm:start?processDefinitionKey=open-account\").\n log(\"=======================\").\n log(\"open-account process started\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\")\n ;\n\n /*\n * If the order was rejected, we'll send a mail to the customer to inform him that his\n * application will not be processed.\n */\n from(\"direct:inform-customer\").\n routeId(\"inform customer route\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n beanRef(\"emailService\");\n\n /*\n * When the order is approved, it can be passed to the accountService to create an account\n * object and persist it to the database. Since the order was split up into values in a\n * java.util.Map, we'll first pass the map to the MapToOrderProcessor.\n */\n from(\"direct:setup-account\").\n routeId(\"set up account route\").\n log(\"=======================\").\n log(\"transforming process variable map to order object: ${body}\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n process(new MapToOrderProcessor()).\n log(\"=======================\").\n log(\"calling accountService to create account from incoming order\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n beanRef(\"accountService\");\n\n /*\n * Finally, this route waits for incoming postident scans to be placed in a hot folder.\n * When a document is placed there (edit route.properties to configure the location of\n * the folder), the order number is extracted from the file name and used as correlation\n * id to send a signal to the waiting process instance.\n */\n from(\"file://\" + postidentFolder).\n routeId(\"incoming postident route\").\n log(\"=======================\").\n log(\"received postident document\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"extracting order number from file name\").\n process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n String businessKey = exchange.getIn().getHeader(\"CamelFileName\").toString().split(\"-\")[1].substring(0, 4);\n exchange.setProperty(CAMUNDA_BPM_BUSINESS_KEY, businessKey);\n }\n }).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"correlating document with process instance\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"camunda-bpm://message?processDefinitionKey=open-account&activityId=wait_for_postident\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\");\n }",
"Long addRoute(Route route);",
"public DaoFactory()\n\t{\n\n\t}",
"@Test\n public void shouldLogRouteAddedAndStopped() throws Exception {\n context.start();\n\n //when adding a new route2\n DateTime startTime = DateTime.now();\n context.addRoutes(new RouteBuilder() {\n @Override\n public void configure() throws Exception {\n from(\"direct://route1\").routeId(\"route1\").to(\"mock:result\");\n from(\"direct://route2\").routeId(\"route2\").to(\"mock:result2\");\n }\n });\n\n //should have tried to find it\n doReturn(null).when(repository).findRoute(\"route1\");\n doReturn(null).when(repository).findRoute(\"route2\");\n verify(repository, times(1)).findRoute(\"route1\");\n verify(repository, times(1)).findRoute(\"route2\");\n\n //then the startup should be stored\n ArgumentCaptor<Route> routeArgumentCaptor = ArgumentCaptor.forClass(Route.class);\n verify(repository, times(2)).save(routeArgumentCaptor.capture());\n // with route1\n Route route = routeArgumentCaptor.getAllValues().get(0);\n assertThat(route.getRouteId()).isEqualTo(\"route1\");\n assertThat(route.getUri()).isEqualTo(\"direct://route1\");\n assertThat(route.getDefinition()).isNotNull();\n assertThat(route.getDefinition()).isNotEmpty();\n SortedMap<String, String> steps = route.getSteps();\n assertThat(steps).hasSize(1);\n assertThat(steps.get(steps.keySet().iterator().next())).isEqualTo(\"mock:result\");\n // then route2\n Route route2 = routeArgumentCaptor.getAllValues().get(1);\n assertThat(route2.getRouteId()).isEqualTo(\"route2\");\n assertThat(route2.getUri()).isEqualTo(\"direct://route2\");\n assertThat(route2.getDefinition()).isNotNull();\n assertThat(route2.getDefinition()).isNotEmpty();\n steps = route2.getSteps();\n assertThat(steps).hasSize(1);\n assertThat(steps.get(steps.keySet().iterator().next())).isEqualTo(\"mock:result2\");\n //and a log of the state and time\n ArgumentCaptor<RouteState> routeStateArgumentCaptor = ArgumentCaptor.forClass(RouteState.class);\n verify(repository, times(2)).save(routeStateArgumentCaptor.capture());\n // for route1\n RouteState routeState = routeStateArgumentCaptor.getAllValues().get(0);\n assertThat(routeState.getRouteId()).isEqualTo(\"route1\");\n assertThat(routeState.getState()).isEqualTo(State.Started);\n DateTime timestamp = new DateTime(routeState.getTimestamp());\n assertThat(timestamp.isBeforeNow()).isTrue();\n assertThat(timestamp.isAfter(startTime)).isTrue();\n // and route2\n RouteState routeState2 = routeStateArgumentCaptor.getAllValues().get(0);\n assertThat(routeState2.getRouteId()).isEqualTo(\"route1\");\n assertThat(routeState2.getState()).isEqualTo(State.Started);\n DateTime timestamp2 = new DateTime(routeState2.getTimestamp());\n assertThat(timestamp2.isBeforeNow()).isTrue();\n assertThat(timestamp2.isAfter(startTime)).isTrue();\n }",
"public PisoDAO createPisoDAO() {\n\n if (pisoDAO == null) {\n pisoDAO = new PisoDAO();\n }\n return pisoDAO;\n }",
"private static DBConnectionFactory createDBConnectionFactory(ConfigurationObject config) {\r\n ConfigurationObject dbConnectionFactoryConfig = Helper.getChildConfig(config,\r\n DB_CONNECTION_FACTORY_CONFIG);\r\n\r\n // Create database connection factory using the extracted configuration\r\n try {\r\n return new DBConnectionFactoryImpl(dbConnectionFactoryConfig);\r\n } catch (UnknownConnectionException e) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"Fails to create database connection factory.\", e);\r\n } catch (ConfigurationException e) {\r\n throw new LateDeliverablesTrackerConfigurationException(\r\n \"Fails to create database connection factory.\", e);\r\n }\r\n }",
"public AdminDAO()\n {\n con = DataBase.getConnection();//crear una conexión al crear un objeto AdminDAO\n }",
"public ProductosPuntoVentaDaoImpl() {\r\n }",
"public ModeOfPurchaseDAOImpl() {\r\n\r\n }",
"public ProductDAO() {\n }",
"public static Route prepareRoute(Microcks microcks, Context<Microcks> context) {\n logger.infof(\"Preparing desired Microcks Route for '%s'\", microcks.getMetadata().getName());\n\n final ObjectMeta microcksMetadata = microcks.getMetadata();\n final String microcksName = microcksMetadata.getName();\n\n RouteBuilder builder = new RouteBuilder()\n .withNewMetadata()\n .withName(getRouteName(microcks))\n .addToLabels(\"app\", microcksName)\n .addToLabels(\"group\", \"microcks\")\n .endMetadata()\n .withNewSpec()\n .withNewTo()\n .withKind(\"Service\")\n .withName(MicrocksServiceDependentResource.getServiceName(microcks))\n .endTo()\n .withNewPort()\n .withNewTargetPort(\"spring\")\n .endPort()\n .withNewTls()\n .withTermination(microcks.getSpec().getMicrocks().getOpenshift().getRoute().getTlsTermination())\n .endTls()\n .endSpec();\n\n // Add custom url is present in the spec.\n if (microcks.getSpec().getMicrocks().getUrl() != null) {\n builder.editSpec().withHost(microcks.getSpec().getMicrocks().getUrl());\n }\n\n // Add optional TLS configuration if specified in route spec.\n final OpenShiftRouteSpec routeSpec = microcks.getSpec().getMicrocks().getOpenshift().getRoute();\n if (routeSpec.getTlsKey() != null) {\n builder.editSpec().editTls().withKey(routeSpec.getTlsKey()).endTls().endSpec();\n }\n if (routeSpec.getTlsCertificate() != null) {\n builder.editSpec().editTls().withCertificate(routeSpec.getTlsCertificate()).endTls().endSpec();\n }\n if (routeSpec.getTlsCertificate() != null) {\n builder.editSpec().editTls().withCertificate(routeSpec.getTlsCertificate()).endTls().endSpec();\n }\n if (routeSpec.getTlsDestinationCaCertificate() != null) {\n builder.editSpec().editTls().withDestinationCACertificate(routeSpec.getTlsDestinationCaCertificate()).endTls().endSpec();\n }\n if (routeSpec.getTlsInsecureEdgeTerminationPolicy() != null) {\n builder.editSpec().editTls().withInsecureEdgeTerminationPolicy(routeSpec.getTlsInsecureEdgeTerminationPolicy()).endTls().endSpec();\n }\n\n return builder.build();\n }",
"public StructureTownHallConfigDao() {\n\t\tsuper(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG, StructureTownHallConfigPojo.class);\n\t}",
"@Autowired\n\tpublic ExamDao(Configuration configuration) {\n\t\tsuper(Exam.EXAM, ro.ghasachi.bt.persistence.tables.pojos.Exam.class, configuration);\n\t}",
"@Autowired\n public ArticleDao(Configuration configuration) {\n super(Article.ARTICLE, cn.edu.kmust.flst.domain.flst.tables.pojos.Article.class, configuration);\n }",
"public MiniEventTimetableConfigDao(Configuration configuration) {\n\t\tsuper(MiniEventTimetableConfig.MINI_EVENT_TIMETABLE_CONFIG, MiniEventTimetableConfigPojo.class, configuration);\n\t}",
"public void setOrderDetailDao(OrderDetailDao orderDetailDAO);",
"@Override\n protected RoutesBuilder createRouteBuilder() throws Exception {\n // override this method and provide our RouteBuilder class\n return new RestDslRouteBuilder();\n }",
"ShipmentGatewayConfig createShipmentGatewayConfig();",
"public Database(String url) {\n this.url = url;\n\n File f = new File(url);\n\n if (f.exists()) {\n try {\n f.mkdirs();\n f.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //create table relationship\n LinkedList<String> relationship_attributes = new LinkedList<>();\n relationship_attributes.add(\"id_entity1\");\n relationship_attributes.add(\"id_entity2\");\n relationship_attributes.add(\"description\");\n this.create_table(\"relationship\", relationship_attributes);\n }",
"public VoterDao(Configuration configuration) {\n super(Voter.VOTER, com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter.class, configuration);\n }",
"public CreditChainDao(Configuration configuration) {\n super(CreditChain.CREDIT_CHAIN, com.generator.tables.pojos.CreditChain.class, configuration);\n }",
"public AutorDao criarAutorDao(){\n\t\treturn new AutorDaoImpl();\n\t}",
"private void createTopology() {\n deviceService = createMock(DeviceService.class);\n linkService = createMock(LinkService.class);\n\n deviceService.addListener(anyObject(DeviceListener.class));\n linkService.addListener(anyObject(LinkListener.class));\n\n createDevices(NUM_DEVICES, NUM_PORTS_PER_DEVICE);\n createLinks(NUM_DEVICES);\n addIntfConfig();\n popluateEdgePortService();\n }",
"public static RouteFragment newInstance(String param1, String param2) {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"public static RouteFragment newInstance(String param1, String param2) {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }",
"protected AbstractDao()\n {\n\n }",
"public RouteDefinition addRoute() {\n if (getModelConfiguration().getFirstChild(ROUTE) != null) {\n throw new IllegalStateException(ROUTE + \" element already exists in implementation!\");\n }\n\n Model routeModel = new BaseModel(ROUTE_ELEMENT) {};\n addChildModel(routeModel);\n return getRoute();\n }",
"public RideDao() {\n super(Ride.RIDE, models.garaDB.tables.pojos.Ride.class);\n }",
"public TeacherDao(Configuration configuration) {\n super(Teacher.TEACHER, com.heman.bysj.jooq.tables.pojos.Teacher.class, configuration);\n }",
"@Dao\npublic interface AdminDataAccess extends UserDataAccess {\n\n //region Insert\n @Insert\n void insertRoutes(Route... routes);\n\n @Insert\n void insertLocations(Location... locations);\n\n @Insert\n void insertLanguages(Language... languages);\n\n @Insert\n void insertCoordinates(GpsCoordinate... coordinates);\n\n @Insert\n void insertDataElement(DataElement... dataElements);\n\n @Insert\n void insertUserSettings(UserSettings... userSettings);\n\n @Insert\n void insertRouteSteps(RouteStep... crossReferences);\n //endregion\n\n //region Delete\n @Delete\n void deleteRoutes(Route... routes);\n\n @Delete\n void deleteLocations(Location... locations);\n\n @Delete\n void deleteLanguages(Language... languages);\n\n @Delete\n void deleteCoordinates(GpsCoordinate... coordinates);\n\n @Delete\n void deleteDataElement(DataElement... dataElements);\n\n @Delete\n void deleteUserSettings(UserSettings... userSettings);\n //endregion\n}",
"void storeRoute(McastRoute route);",
"private void makeRoute(Route route, AbstractPort location1, AbstractPort location2) {\n route.add(location1);\n route.add(closestCrossing(location1.getLocation(), location2.getLocation()));\n route.add(location2);\n registerGameObject(route);\n }",
"public RouteFragment() {\n }",
"public TelefoneDao() {\n\t\tconnection = SingleConnection.getConnection();\n\t}",
"public RouteInstanceManager getRouteInstanceManager() {\n\t\tif (routeInstanceManager == null) {\n\t\t\tIRouteInstanceDAO routeInstanceDAO = new RouteInstanceDAOSqlite(dbHelper);\n\t\t\trouteInstanceManager = new RouteInstanceManager(routeInstanceDAO);\n\t\t\trouteInstanceManager.setManagerHolder(this);\n\t\t}\n\t\treturn routeInstanceManager;\n\t}",
"public MySqlDaoFactory() {\n creators = new HashMap<>();\n creators.put(Bank.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlBankDao(connection);\n }\n });\n\n creators.put(Deposit.class, new DaoCreator<Connection>() {\n @Override\n public GenericDAO create(Connection connection) {\n return new MySqlDepositDao(connection);\n }\n });\n\n }",
"public RegionDAO(SessionFactory factory) {\r\n this.factory = factory;\r\n }",
"RoleDao getRoleDao();",
"public ReleaseplanDAOImpl() {\r\n\t\tsuper();\r\n\t}",
"public static void addNewRoute(Realm realm, RouteListModel mRouteListModel) {\n try {\n App.showLog(\"========insert-set-as-new route=====\");\n\n realm.beginTransaction();\n RouteListModel RouteListModel = realm.copyToRealmOrUpdate(mRouteListModel);\n realm.commitTransaction();\n\n } catch (Exception e) {\n e.printStackTrace();\n try {\n realm.commitTransaction();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }\n }",
"public TransitRouteLine createFromParcel(Parcel parcel) {\n return new TransitRouteLine(parcel);\n }",
"protected void configureEmbeddedDB() {\n final EmbeddedDBProvider embeddedDBProvider = new EmbeddedDBProvider(daoConfig);\n embeddedDB = embeddedDBProvider.get();\n bind(EmbeddedDB.class).toInstance(embeddedDB);\n }",
"private OrderFacade(){\n\t\tAbstractDAOFactory f = new MySQLDAOFactory();\n \tthis.odao = f.getOrderDAO();\n\t}",
"ORGateway createORGateway();",
"public ContextDaoImpl() {\n Set<Commissioner> commissionerSet = new HashSet<>();\n List<String> logins = new ArrayList<>();\n commissionerSet.add(new Commissioner(\"victor.net\", \"25345Qw&&\", true));\n commissionerSet.add(new Commissioner(\"egor.net\", \"3456eR&21\", false));\n commissionerSet.add(new Commissioner(\"igor.net\", \"77??SDSw23\", false));\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n logins.add(\"[email protected]\");\n Database.setCandidateSet(new HashSet<>());\n Database.setVoterSet(new HashSet<>());\n Database.setLogins(logins);\n Database.setCommissionerSet(commissionerSet);\n }",
"public AlManageOnAirDAOImpl() {\r\n super();\r\n }",
"@Test(expected = IllegalArgumentException.class)\r\n public void testCtor_configurationObjectNull() {\r\n configurationObject = null;\r\n\r\n new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }",
"public interface DaoFactory {\r\n\r\n\t/**\r\n\t * Returns objects for access to account table.\r\n\t * \r\n\t * @return DAO for account table.\r\n\t */\r\n\tpublic GenericDao<Account> getAccountDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to client table.\r\n\t * \r\n\t * @return DAO for client table.\r\n\t */\r\n\tpublic GenericDao<Client> getClientDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to payment table.\r\n\t * \r\n\t * @return DAO for payment table.\r\n\t */\r\n\tpublic GenericDao<Payment> getPaymentDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to credit card table.\r\n\t * \r\n\t * @return DAO for credit card table.\r\n\t */\r\n\tpublic GenericDao<CreditCard> getCreditCardDao();\r\n\r\n\t/**\r\n\t * Returns objects for access to authorization table.\r\n\t * \r\n\t * @return DAO for authorization table.\r\n\t */\r\n\tpublic GenericDao<Autorization> getAutorizationDao();\r\n\r\n\t/**\r\n\t * This method returns connection for accessing to database.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Connection getConnection();\r\n\r\n}",
"public ClassModelDao(Configuration configuration) {\n super(ClassModel.CLASS_MODEL, com.platform.chorus.db.tables.pojos.ClassModel.class, configuration);\n }",
"@Override\n public List<Route> getRoutes(AuthContext context) throws DSException {\n\n isContextValidFor(context, roleId -> { if(roleId == -1) throw new DSAuthException(\"Invalid Context\"); }, 1,3);\n List<Route> routes = new ArrayList<>();\n try {\n List<Map<String,Object>> data = get(\"SELECT * FROM TblRoutes\");\n for(Map<String, Object> map: data) {\n Route r = new Route(map);\n List<Landmark> landmarks = new ArrayList<>();\n get(\"SELECT * FROM TblLandmarks WHERE route = ?\",r.getSerialNum()).forEach(\n stringObjectMap -> landmarks.add(new Landmark(stringObjectMap))\n );\n r.setLandmarks(landmarks);\n routes.add(r);\n }\n return routes;\n } catch (SQLException e) {\n throw new DSFormatException(e.getMessage());\n }\n }",
"public SchemaRegistryControllerImpl(MetastoreConfiguration schemaConfig,\n IDataResourceDao dataResourceDao,\n IUrl2PathDao url2PathDao) {\n this.schemaConfig = schemaConfig;\n this.dataResourceDao = dataResourceDao;\n this.url2PathDao = url2PathDao;\n LOG.info(\"------------------------------------------------------\");\n LOG.info(\"------{}\", schemaConfig);\n LOG.info(\"------------------------------------------------------\");\n }",
"@Test\r\n\t public void addANullRouteFather(){\r\n\t\t RouteFather test = routeFatherDAO.create(new RouteFather(null, null, null, null, null));\r\n\t\t Assert.assertNull(\"it should returns null\", test);\r\n\t }",
"@Mapper\npublic interface UrlDao {\n\n void create(Url url);\n\n List<Url> findAll();\n\n List<Url> findByRawChannel(@Param(\"rawChannel\")String rawChannel);\n\n void delete(@Param(\"urlId\")String urlId);\n\n}",
"public static QueryParamHandler create(Config config) {\n return create(QueryParamMapping.create(config));\n }",
"TradeRoute(String aStartPoint, String anEndPoint, int anId){\n startPoint = aStartPoint;\n endPoint = anEndPoint;\n id = anId;\n }",
"public GastoDAO(Context context){\n dbHelper = new MyDatabaseHelper(context);\n database = dbHelper.getWritableDatabase();\n }"
] | [
"0.6652136",
"0.62926984",
"0.591212",
"0.5565839",
"0.55518365",
"0.54614663",
"0.5419811",
"0.53733647",
"0.5364653",
"0.53504676",
"0.5341284",
"0.5310052",
"0.52067256",
"0.5165686",
"0.51378345",
"0.5077609",
"0.5063454",
"0.5030172",
"0.49954528",
"0.49867013",
"0.4986374",
"0.49843764",
"0.49810007",
"0.4962877",
"0.4940016",
"0.49387634",
"0.49236125",
"0.49229237",
"0.49207777",
"0.48672444",
"0.48650473",
"0.48631877",
"0.48624235",
"0.48451614",
"0.48446062",
"0.48195076",
"0.48185295",
"0.47923997",
"0.47912452",
"0.478872",
"0.47591335",
"0.4755561",
"0.47541958",
"0.47539118",
"0.47421083",
"0.4733875",
"0.47276887",
"0.47243187",
"0.46992445",
"0.4686736",
"0.4680645",
"0.46795407",
"0.46530065",
"0.46466908",
"0.46458235",
"0.4642756",
"0.4637389",
"0.46329606",
"0.46320605",
"0.46247855",
"0.46153483",
"0.46139577",
"0.4611682",
"0.4610038",
"0.46033907",
"0.45986286",
"0.45938027",
"0.4587241",
"0.4587241",
"0.45846608",
"0.45840028",
"0.45803127",
"0.45795885",
"0.45788577",
"0.45782945",
"0.4575393",
"0.45724133",
"0.45678574",
"0.45631593",
"0.45631048",
"0.45615515",
"0.4558705",
"0.4550482",
"0.4549257",
"0.45454523",
"0.4544975",
"0.45448017",
"0.45421296",
"0.45381567",
"0.45344782",
"0.45278877",
"0.45276237",
"0.4527321",
"0.45257553",
"0.45238623",
"0.45229632",
"0.4518384",
"0.45122403",
"0.4508304",
"0.45047742"
] | 0.6917056 | 0 |
Fetch records that have id IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchById(Integer... values) {
return fetch(Route.ROUTE.ID, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public List<Produto> findByIdIn(Integer... ids);",
"@GetMapping(\"/listInByIds\")\n public R<List<User>> listInByIds(@RequestParam(value = \"ids\") List<String> ids) {\n return R.ok(userService.selectBatchIds(ids));\n }",
"List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);",
"public OpenERPRecordSet getIDSubset(Object[] lst) {\r\n\t\t// bail out\r\n\t\tif (lst == null)\r\n\t\t\treturn null;\r\n\t\tif (lst.length <= 0)\r\n\t\t\treturn null;\r\n\r\n\t\t// get list of IDs as Vector, for .contains\r\n\t\tVector<Integer> idList = new Vector<Integer>();\r\n\t\tfor (int i = 0; i < lst.length; i++) {\r\n\t\t\t// while moving to vector, sort out everything that's not integer\r\n\t\t\ttry {\r\n\t\t\t\tidList.add((Integer) lst[i]);\r\n\t\t\t} catch (ClassCastException cce) {\r\n\t\t\t\tjLog.warning(\"ClassCastException while converting '\" + lst[i]\r\n\t\t\t\t\t\t+ \"' to Integer\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// create record set to return\r\n\t\tOpenERPRecordSet result = new OpenERPRecordSet(null);\r\n\r\n\t\t// look into all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// only for records that have a key\r\n\t\t\tif (!r.containsKey(\"id\"))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// if the key is requested\r\n\t\t\tInteger id = (Integer) r.get(\"id\");\r\n\t\t\tif (idList.contains(id)) {\r\n\t\t\t\t// add it to list\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult.add((OpenERPRecord) r.clone());\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// should not happen anyway.\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// return subset\r\n\t\treturn result;\r\n\t}",
"public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }",
"long countByIdInAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids);",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"List<T> findAllById(List<Object> ids) throws Exception;",
"@Override\n public List<Service> findByIdIn(List<String> ids) {\n List<ObjectId> objIds = new ArrayList<ObjectId>();\n for (String id : ids){\n objIds.add(new ObjectId(id));\n }\n\n List<Service> results = template.find(\n new Query(Criteria.where(\"_id\").in(objIds)),\n Service.class);\n\n return results;\n }",
"Collection<Long> filterByTaxon( Collection<Long> ids, Taxon taxon );",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"List<String> findAllIds();",
"@Query(value = \"select * from chat_room cr where cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\",nativeQuery = true)\n List<ChatRoomModel> findByIdsAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"Collection<?> idValues();",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"@Query(\"{ 'id': {$in: ?0} }\")\r\n\tpublic Page<Answer> findAll(List<ObjectId> ids, Pageable pageable);",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"protected abstract List performQuery(String[] ids);",
"public List getAllIds();",
"public interface LogDetailRepository extends CrudRepository<LogDetail, Long> {\n List<LogDetail> findByLogIdIn(List<Long> LogIds);\n\n\n}",
"List<Team> findByIds(List<Long> teamIds);",
"java.util.List<java.lang.Long> getIdsList();",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"public UsState[] findWhereIdEquals(int id) throws UsStateDaoException;",
"@Override\n\tpublic <T extends BasePojo> List<T> queryByIds(String ids) {\n\t\treturn null;\n\t}",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"public Items[] findWhereIdEquals(int id) throws ItemsDaoException;",
"public static void assertContainsIds(Bundle bundle, String... ids) throws FHIRPathException {\n FHIRPathEvaluator evaluator = FHIRPathEvaluator.evaluator();\n EvaluationContext evaluationContext = new EvaluationContext(bundle);\n Collection<FHIRPathNode> tmpResults = evaluator.evaluate(evaluationContext, EXPRESSION_BUNDLE_IDS);\n Collection<String> listOfIds = tmpResults.stream().map(x -> x.toString()).collect(Collectors.toList());\n for (String id : ids) {\n assertTrue(listOfIds.contains(id));\n }\n }",
"List<T> getEntitiesByIds(List<ID_TYPE> ids) throws NotImplementedException;",
"List<MemberAdvisoryComment> selectByPrimaryKeyBulk(@Param(\"ids\") List<Long> ids);",
"public interface DemoRepositoryCustom {\n\n List<Demo> findInSet(Collection<Long> ids);\n}",
"public BeanIdList findIds() throws SQLException {\n/* 154 */ boolean useBackgroundToContinueFetch = false;\n/* */ \n/* 156 */ this.startNano = System.nanoTime();\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 162 */ List<Object> idList = this.query.getIdList();\n/* 163 */ if (idList == null) {\n/* */ \n/* 165 */ idList = Collections.synchronizedList(new ArrayList());\n/* 166 */ this.query.setIdList(idList);\n/* */ } \n/* */ \n/* 169 */ BeanIdList result = new BeanIdList(idList);\n/* */ \n/* 171 */ SpiTransaction t = this.request.getTransaction();\n/* 172 */ Connection conn = t.getInternalConnection();\n/* 173 */ this.pstmt = conn.prepareStatement(this.sql);\n/* */ \n/* 175 */ if (this.query.getBufferFetchSizeHint() > 0) {\n/* 176 */ this.pstmt.setFetchSize(this.query.getBufferFetchSizeHint());\n/* */ }\n/* */ \n/* 179 */ if (this.query.getTimeout() > 0) {\n/* 180 */ this.pstmt.setQueryTimeout(this.query.getTimeout());\n/* */ }\n/* */ \n/* 183 */ this.bindLog = this.predicates.bind(new DataBind(this.pstmt));\n/* */ \n/* 185 */ ResultSet rset = this.pstmt.executeQuery();\n/* 186 */ this.dataReader = new RsetDataReader(rset);\n/* */ \n/* 188 */ boolean hitMaxRows = false;\n/* 189 */ boolean hasMoreRows = false;\n/* 190 */ this.rowCount = 0;\n/* */ \n/* 192 */ DbReadContext ctx = new DbContext();\n/* */ \n/* 194 */ while (rset.next()) {\n/* 195 */ Object idValue = this.desc.getIdBinder().read(ctx);\n/* 196 */ idList.add(idValue);\n/* */ \n/* 198 */ this.dataReader.resetColumnPosition();\n/* 199 */ this.rowCount++;\n/* */ \n/* 201 */ if (this.maxRows > 0 && this.rowCount == this.maxRows) {\n/* 202 */ hitMaxRows = true;\n/* 203 */ hasMoreRows = rset.next();\n/* */ break;\n/* */ } \n/* 206 */ if (this.bgFetchAfter > 0 && this.rowCount >= this.bgFetchAfter) {\n/* 207 */ useBackgroundToContinueFetch = true;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 212 */ if (hitMaxRows) {\n/* 213 */ result.setHasMore(hasMoreRows);\n/* */ }\n/* */ \n/* 216 */ if (useBackgroundToContinueFetch) {\n/* */ \n/* */ \n/* 219 */ this.request.setBackgroundFetching();\n/* */ \n/* */ \n/* 222 */ BackgroundIdFetch bgFetch = new BackgroundIdFetch(t, rset, this.pstmt, ctx, this.desc, result);\n/* 223 */ FutureTask<Integer> future = new FutureTask<Integer>(bgFetch);\n/* 224 */ this.backgroundExecutor.execute(future);\n/* */ \n/* */ \n/* 227 */ result.setBackgroundFetch(future);\n/* */ } \n/* */ \n/* 230 */ long exeNano = System.nanoTime() - this.startNano;\n/* 231 */ this.executionTimeMicros = (int)exeNano / 1000;\n/* */ \n/* 233 */ return result;\n/* */ } finally {\n/* */ \n/* 236 */ if (!useBackgroundToContinueFetch)\n/* */ {\n/* */ \n/* 239 */ close();\n/* */ }\n/* */ } \n/* */ }",
"@Query(value = \"select count(*) from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1\", nativeQuery = true)\n long countByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids);",
"List<E> findAll(Iterable<ID> identifiers);",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }",
"private boolean isIdInCollectionOfSingleIDVOs (int id, Collection vos)\n\t{\n\t\tboolean found = false;\n\t\t\n\t\tfor (Iterator i = vos.iterator(); !found && i.hasNext(); ) {\n\t\t\tSingleIdVO sivo = (SingleIdVO) i.next();\n\t\t\tfound = (sivo.getId() == id);\n\t\t}\n\t\t\n\t\treturn found;\n\t}",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"private ArrayList<String> obtenerIds(ArrayList<String> values){\n\t\tArrayList<String> ids = new ArrayList<>();\n\t\tfor(String valor : values){\n\t\t\tids.add(postresId.get(valor));\n\t\t}\n\t\treturn ids;\n\t}",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"List<UserContentFile> findContentFiles(@Param(\"ids\") List<Long> ids);",
"Set<II> getIds();",
"public List<models.garaDB.tables.pojos.Ride> fetchByMemberid(Integer... values) {\n return fetch(Ride.RIDE.MEMBERID, values);\n }",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface NetraNominationRepository extends NominationRepository{\n\n\n\n @Query(\"select nominations from Nomination nominations where nominations.contract.id in :contractIdList\")\n List<Nomination> findAllNomsByContractIdList(@Param(\"contractIdList\") List<Long> contractIdList);\n\n}",
"private boolean contains(Collection<Long> bundleIds, Long bundleId) {\n for (Long id : bundleIds) {\n if (id.longValue() == bundleId.longValue()) {\n return true;\n }\n }\n return false;\n }",
"long findValues(List<Object> values, List<Column> columns);",
"private Map<CollectionCacheableTestId, CollectionCacheableTestValue> findByIdsInternal(Collection<CollectionCacheableTestId> ids) {\n Map<CollectionCacheableTestId, CollectionCacheableTestValue> result = new HashMap<>();\n for (CollectionCacheableTestId id : ids) {\n CollectionCacheableTestValue value = myDbRepository.findById(id);\n // do not explicitly put null values into map\n if (value != null) {\n result.put(id, value);\n }\n }\n return result;\n }",
"List<UserInfo> getUserListByIdLists(List<Integer> idList);",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"Collection<T> findAll(Iterable<I> ids);",
"public void getUsersList(List<Long> ids, AsyncHttpResponseHandler handler) {\n if (ids == null) {\n return;\n }\n\n String apiUrl = getApiUrl(\"users/lookup.json\");\n RequestParams params = new RequestParams();\n\n String strIds = android.text.TextUtils.join(\",\", ids);\n params.put(\"user_id\", strIds);\n\n // Execute the request\n getClient().get(apiUrl, params, handler);\n }",
"@Query(\"SELECT * FROM user_table WHERE id IN (:climberIds)\")\n LiveData<List<Climber>> loadAllByIds(int[] climberIds);",
"@GET\n @Path(\"/search/{ids}\")\n @Produces(\"application/json;charset=UTF-8\")\n @GZIP\n @NoCache\n public List<SourceVo> searchSourcesById(\n @PathParam(\"ids\") String ids) {\n\n Set<Integer> idSet = Arrays.stream(ids.split(\",\"))\n .map(Integer::valueOf)\n .collect(Collectors.toSet());\n\n return sourceService.findByIds(idSet).stream()\n .map(p -> p.toVo(DataFilter.get()))\n .collect(Collectors.toList());\n }",
"public interface QuestionRepository extends CrudRepository<QuestionEntity,Long> {\n\n @Query(\"select count(id) from QuestionEntity where id in :questionIds\")\n Long validateQuestionNumbers(@Param(\"questionIds\") List<Long>questionIds);\n}",
"public static ArrayList<Long> searchKeywordEntryId(ArrayList<String> queryKeywords) {\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n List<Keywords> idList = new ArrayList<>();\n\n for(String qk : queryKeywords){\n List<Keywords> idListt =\n Keywords.find()\n .select(\"keywordEntryId\")\n .where()\n //.in(\"keyword\", queryKeywords)\n .like(\"keyword\", \"%\"+qk+\"%\")\n .findList();\n idList.addAll(idListt);\n }\n\n for (Keywords keywords : idList) {\n keywordIdList.add(keywords.getKeywordEntryId());\n }\n System.out.println(\"keywordIdList---\" + keywordIdList);\n return keywordIdList;\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByWhId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.WH_ID.in(values),limit);\n }",
"@Query(value=\"SELECT s FROM Shelf s, IN(s.book) b WHERE b.id = ?1\", nativeQuery=false\n )\n Optional<Shelf> findShelfByBookId(Integer bookId);",
"@Repository\npublic interface SysResourceRepository extends JpaRepository<SysResourceEntity, Integer> {\n @Query(\"SELECT DISTINCT n FROM SysResourceEntity m INNER JOIN SysResourceEntity n ON m.parentId = n.id WHERE m.url IN (:urls)\")\n Set<SysResourceEntity> findByList(@Param(\"urls\") List<String> urls);\n\n Set<SysResourceEntity> findByUrlIn(List<String> urls);\n}",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"public static boolean in(Integer integer, Integer... integers) {\n\treturn null != integers && null != integer && Arrays.asList(integers).contains(integer);\n }",
"List findByFilterText(Set<String> words, boolean justIds);",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCurrencyId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CURRENCY_ID.in(values),limit);\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByWhId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.WH_ID.in(values));\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByToId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.TO_ID.in(values),limit);\n }",
"private List<Long> getListOfAuthorizedById(\n List<Long> ids,\n String username,\n ResponseToFailedAuthorization failureResponse,\n AccessLevel accessLevel,\n Session session,\n String securedIdsQuery,\n String openAndSecuredIdsQuery,\n String securedParamListName,\n String openParamListName,\n String returnVarName\n ) throws Exception {\n\n ids = uniquifyIds(ids);\n\n String queryStr;\n if ( accessLevel == AccessLevel.View ) {\n queryStr = openAndSecuredIdsQuery.replace( PROJ_GRP_SUBST_STR, VIEW_PROJECT_GROUP_FIELD );\n }\n else {\n queryStr = securedIdsQuery.replace( PROJ_GRP_SUBST_STR, EDIT_PROJECT_GROUP_FIELD );\n }\n NativeQuery query = session.createNativeQuery( queryStr );\n query.addScalar( returnVarName, StandardBasicTypes.STRING );\n if ( accessLevel == AccessLevel.View ) {\n query.setParameterList( openParamListName, ids );\n }\n query.setParameterList( securedParamListName, ids );\n String queryUsername = username == null ? UNLOGGED_IN_USER : username;\n query.setParameter( USERNAME_PARAM, queryUsername );\n\n logger.debug(query.getQueryString());\n List<Long> rtnVal = query.list();\n if ( failureResponse == ResponseToFailedAuthorization.ThrowException &&\n rtnVal.size() < ids.size() ) {\n String idStr = joinIdList( ids );\n String message = makeUserReadableMessage( username, idStr );\n logger.error( message );\n throw new ForbiddenResourceException( message );\n }\n\n return rtnVal;\n }",
"public static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }",
"public ArrayList<ArrayList<Integer>> selectForQuoiEntre(int id) throws DAOException;",
"List<Long> getAuthorisedList( Long id) ;",
"List<ProductInfoOutput> findList(List<String> productIdList);",
"public List<moneytree.persist.db.generated.tables.pojos.Income> fetchById(UUID... values) {\n return fetch(Income.INCOME.ID, values);\n }",
"public List<Integer> get_valid_ids(String table) {\n //table does not exist\n if (!get_table_names().contains(table) && !table.equals(\"relationship\")) {\n throw new RuntimeException(\"Table does not exist.\");\n }\n\n\n LinkedList<Integer> valid_ids = new LinkedList<>();\n String sql = \"select id from \" + table;\n ResultSet resultSet = execute_statement(sql, true); //get all ids from the table\n\n try {\n while (resultSet.next()) {\n int i = resultSet.getInt(\"id\"); //store all ids\n valid_ids.add(i);\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return valid_ids;\n }",
"@Query(value = \"select count(*) from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1\", nativeQuery = true)\n long countByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCurrencyId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CURRENCY_ID.in(values));\n }",
"private List<Integer> filterDocIds(FilterQueryTree filterQueryTree, List<Integer> inputDocIds) {\n if (filterQueryTree == null) {\n List<Integer> allDocs = new ArrayList<>(_totalDocs);\n for (int i = 0; i < _totalDocs; ++i) {\n allDocs.add(i);\n }\n return allDocs;\n }\n\n final List<FilterQueryTree> childFilters = filterQueryTree.getChildren();\n final boolean isLeaf = (childFilters == null) || childFilters.isEmpty();\n\n if (isLeaf) {\n FilterOperator filterType = filterQueryTree.getOperator();\n String column = filterQueryTree.getColumn();\n final List<String> value = filterQueryTree.getValue();\n return getMatchingDocIds(inputDocIds, filterType, column, value);\n }\n\n List<Integer> result = filterDocIds(childFilters.get(0), inputDocIds);\n final FilterOperator operator = filterQueryTree.getOperator();\n for (int i = 1; i < childFilters.size(); ++i) {\n// List<Integer> childResult = operator.equals(FilterOperator.AND) ? filterDocIds(childFilters.get(i), result)\n// : filterDocIds(childFilters.get(i), inputDocIds);\n List<Integer> childResult = filterDocIds(childFilters.get(i), inputDocIds);\n result = combine(result, childResult, operator);\n }\n return result;\n }",
"@Override\n public List<T> findAllById(Iterable<Integer> ids) {\n List<T> entities = new ArrayList<>();\n for (int id : ids) {\n entities\n .add(findById(id).orElseThrow(() -> new EntityNotFoundException(\"ID Not found:\" + id)));\n }\n return entities;\n }",
"private static boolean checkForMultipleIDs(String id)\n\t{\n\t\tif (id.indexOf(',') >= 0)\n\t\t{\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}",
"@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}",
"public List<ro.ghasachi.bt.persistence.tables.pojos.Exam> fetchByUserid(Integer... values) {\n\t\treturn fetch(Exam.EXAM.USERID, values);\n\t}",
"public abstract List<CustomerOrder> findAll(Iterable<Long> ids);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values),limit);\n }",
"List<RoleMenu> queryByRoleIds(Set<String> _roleIds);",
"public UserRow[] getUsersBySpecificIds(int domainId, List<String> specificIds)\n throws AdminPersistenceException {\n if (specificIds == null || specificIds.size() == 0)\n return null;\n \n StringBuffer clauseIN = new StringBuffer(\"(\");\n String specificId = null;\n for (int s = 0; s < specificIds.size(); s++) {\n if (s != 0)\n clauseIN.append(\", \");\n specificId = specificIds.get(s);\n clauseIN.append(\"'\").append(\n LDAPUtility.dblBackSlashesForDNInFilters(specificId)).append(\"'\");\n }\n clauseIN.append(\")\");\n String query = SELECT_USERS_BY_SPECIFICIDS + clauseIN;\n return (UserRow[]) getRows(query, domainId).toArray(new UserRow[0]);\n }",
"@Query(value=\"SELECT * FROM users WHERE (status = :status) AND (id IN (SELECT user_id FROM documents))\", nativeQuery = true)\n Page<User> findAuthors(@Param(\"status\") int status, Pageable pageable);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByToId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.TO_ID.in(values));\n }",
"public Long[] getQueryIDs(){\n\t\treturn DataStructureUtils.toArray(ids_ranks.keySet(), Long.class);\n\t}",
"public List<cn.zyj.dbexporter.jooq.db_mall.tables.pojos.TOfferGoods> fetchByOid(Integer... values) {\n return fetch(TOfferGoods.T_OFFER_GOODS.OID, values);\n }",
"public static boolean in(int target, int... values) {\n for (int v : values) {\n if (target == v) {\n return true;\n }\n }\n return false;\n }",
"@SafeVarargs\n public static <T> boolean in(T value, T... values) {\n if (set(values).isEmpty()) return false;\n\n for (T element : values) {\n if (Objects.equals(value, element)) return true;\n }\n\n return false;\n }",
"public List<Integer> getIds(int conId, int type, int state) throws AppException;",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"java.util.List<java.lang.Integer> getOtherIdsList();",
"public Object[] getAssocOneIdValues(Object bean);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCustomerId(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CUSTOMER_ID.in(values),limit);\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCustomerId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CUSTOMER_ID.in(values));\n }"
] | [
"0.6118371",
"0.6085298",
"0.5983984",
"0.5887595",
"0.58625734",
"0.5854982",
"0.58316135",
"0.5824877",
"0.58105785",
"0.576251",
"0.57519555",
"0.56913364",
"0.5683802",
"0.5664325",
"0.56571996",
"0.562483",
"0.5618595",
"0.5589928",
"0.5541375",
"0.55104876",
"0.54454976",
"0.5436477",
"0.54346246",
"0.5432323",
"0.5414036",
"0.5412612",
"0.5411073",
"0.5391923",
"0.53858465",
"0.53301316",
"0.5262358",
"0.52415836",
"0.52329147",
"0.52276915",
"0.521929",
"0.52180815",
"0.5210163",
"0.5179999",
"0.5165349",
"0.5153376",
"0.5148704",
"0.5145716",
"0.5140992",
"0.5140209",
"0.51369286",
"0.51341695",
"0.513163",
"0.5124991",
"0.50921434",
"0.50533426",
"0.5033213",
"0.50093555",
"0.5006489",
"0.4996566",
"0.49835664",
"0.49829853",
"0.49808797",
"0.49763885",
"0.4974987",
"0.49665353",
"0.4940905",
"0.4928454",
"0.49232224",
"0.49203637",
"0.49180582",
"0.49097368",
"0.4905402",
"0.48891863",
"0.4886487",
"0.48857886",
"0.48707557",
"0.48574477",
"0.48560587",
"0.48556465",
"0.4847427",
"0.4847238",
"0.48466197",
"0.4846096",
"0.48311839",
"0.48304066",
"0.48290378",
"0.4825019",
"0.48229298",
"0.48152152",
"0.48151624",
"0.48144197",
"0.48070794",
"0.48063093",
"0.48013893",
"0.47943345",
"0.4791559",
"0.47837406",
"0.47778854",
"0.47721735",
"0.47685668",
"0.47683173",
"0.47575906",
"0.47499654",
"0.47432834",
"0.47391915",
"0.47331685"
] | 0.0 | -1 |
Fetch a unique record that has id = value | public com.dator.jqtest.dao.model.tables.pojos.Route fetchOneById(Integer value) {
return fetchOne(Route.ROUTE.ID, value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"RecordLike selectByPrimaryKey(String id);",
"public o selectById(long id);",
"Abum selectByPrimaryKey(String id);",
"PrhFree selectByPrimaryKey(Integer id);",
"Dormitory selectByPrimaryKey(Integer id);",
"Yqbd selectByPrimaryKey(Integer id);",
"IceApp selectByPrimaryKey(Long id);",
"Caiwu selectByPrimaryKey(Integer id);",
"ExtraQuery id(Object value);",
"Shareholder selectByPrimaryKey(Integer id);",
"public abstract T byId(ID id);",
"T get(PK id);",
"DataSync selectByPrimaryKey(Integer id);",
"AccessModelEntity selectByPrimaryKey(String id);",
"AccuseInfo selectByPrimaryKey(Integer id);",
"TCpySpouse selectByPrimaryKey(Integer id);",
"public Data findById(Object id);",
"User selectByPrimaryKey(String id);",
"HuoDong selectByPrimaryKey(Integer id);",
"Procdef selectByPrimaryKey(String id);",
"Model selectByPrimaryKey(Integer id);",
"SysId selectByPrimaryKey(String id);",
"Owner selectByPrimaryKey(String id);",
"OrgMemberRecord selectByPrimaryKey(String id);",
"Disease selectByPrimaryKey(Integer id);",
"Clazz selectByPrimaryKey(Integer id);",
"HpItemParamItem selectByPrimaryKey(Long id);",
"Collect selectByPrimaryKey(Integer id);",
"T getById(PK id);",
"T queryForId(ID id) throws SQLException, DaoException;",
"Account selectByPrimaryKey(String id);",
"Thing selectByPrimaryKey(String thingid);",
"Promo selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Integer id);",
"@Override\n public JurUrl selectByPrimaryKey(Integer id) {\n return jurUrlMapper.selectByPrimaryKey(id);\n }",
"Tourst selectByPrimaryKey(String id);",
"Prueba selectByPrimaryKey(Integer id);",
"SwipersDO selectByPrimaryKey(Integer id);",
"User selectByPrimaryKey(Long id);",
"Book selectByPrimaryKey(String id);",
"SupplyNeed selectByPrimaryKey(Integer id);",
"Report selectByPrimaryKey(Integer id);",
"Notice selectByPrimaryKey(Integer id);",
"BaseReturn selectByPrimaryKey(String guid);",
"V get(UniqueId uniqueId);",
"E getById(long id);",
"EtpBase selectByPrimaryKey(String id);",
"Ltsprojectpo selectByPrimaryKey(Long id);",
"CptDataStore selectByPrimaryKey(String id);",
"Factory selectByPrimaryKey(Long id);",
"Product selectByPrimaryKey(Long id);",
"D getById(K id);",
"TRepairs selectByPrimaryKey(Integer id);",
"UserEntity selectByPrimaryKey(Integer id);",
"TempletLink selectByPrimaryKey(String id);",
"CommunityInform selectByPrimaryKey(String id);",
"T get(Integer id);",
"NjProductTaticsRelation selectByPrimaryKey(String id);",
"Subject selectByPrimaryKey(Integer id);",
"PaasCustomAutomationRecord selectByPrimaryKey(Integer id);",
"NjOrderWork2 selectByPrimaryKey(String id);",
"Product selectByPrimaryKey(Integer id);",
"PrescriptionVerifyRecordDetail selectByPrimaryKey(String id);",
"Device selectByPrimaryKey(Integer id);",
"Member selectByPrimaryKey(Long id);",
"Dish selectByPrimaryKey(String id);",
"Register selectByPrimaryKey(Integer id);",
"PageFunc selectByPrimaryKey(Integer id);",
"public T selectById(int id) {\n Logger logger = getLogger();\n T object = null;\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectById())) {\n\n preparedStatement.setInt(1, id);\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n object = setObjectParams(rs);\n setObjectId(rs, object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select by id: success\");\n return object;\n }",
"Mallscroerule selectByPrimaryKey(Long id);",
"Sequipment selectByPrimaryKey(Integer id);",
"Storage selectByPrimaryKey(Integer recordId);",
"WizardValuationHistoryEntity selectByPrimaryKey(Integer id);",
"T findById(ID id) ;",
"LoginRecordDO selectByPrimaryKey(Long id);",
"QuestionOne selectByPrimaryKey(Integer id);",
"public org.jooq.test.jdbc.generatedclasses.tables.pojos.T_2698 fetchOneById(java.lang.Integer value) {\n\t\treturn fetchOne(org.jooq.test.jdbc.generatedclasses.tables.T_2698.ID, value);\n\t}",
"public TEntity getById(int id){\n String whereClause = String.format(\"Id = %1$s\", id);\n Cursor cursor = db.query(tableName, columns, whereClause, null, null, null, null);\n\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n return fromCursor(cursor);\n }\n return null;\n }",
"SysCode selectByPrimaryKey(String id);",
"Appraise selectByPrimaryKey(Integer id);",
"Dress selectByPrimaryKey(Integer did);",
"CartDO selectByPrimaryKey(Integer id);",
"FetchRequest<Customer> byId(String id);",
"Powers selectByPrimaryKey(Integer id);",
"UUser selectByPrimaryKey(Integer id);",
"LuckyBag selectByPrimaryKey(Integer id);",
"UserInfo selectByPrimaryKey(Integer id);",
"Organization selectByPrimaryKey(Integer id);",
"CraftAdvReq selectByPrimaryKey(Integer id);",
"T getById(int id);",
"FileRecordAdmin selectByPrimaryKey(String id);",
"DangerMerchant selectByPrimaryKey(Integer id);",
"ItoProduct selectByPrimaryKey(Integer id);",
"Employee selectByPrimaryKey(String id);",
"Article selectByPrimaryKey(String id);",
"TDwBzzxBzflb selectByPrimaryKey(String objId);",
"T getById(Long id);"
] | [
"0.707741",
"0.67793006",
"0.6771426",
"0.6745783",
"0.67089444",
"0.67008424",
"0.6648538",
"0.66397375",
"0.6628966",
"0.662001",
"0.65759695",
"0.65522146",
"0.6527242",
"0.65059394",
"0.6501813",
"0.6499407",
"0.6497668",
"0.6494193",
"0.64935493",
"0.64822686",
"0.64627427",
"0.64599365",
"0.6447508",
"0.64436835",
"0.6439596",
"0.642324",
"0.63997376",
"0.639733",
"0.6378502",
"0.6355367",
"0.6346872",
"0.6332622",
"0.6326271",
"0.63246113",
"0.63246113",
"0.63246113",
"0.63246113",
"0.63246113",
"0.63242793",
"0.63065904",
"0.63022774",
"0.6296883",
"0.6291885",
"0.62548923",
"0.62526095",
"0.6251307",
"0.6247458",
"0.62434053",
"0.6234059",
"0.62302816",
"0.6200252",
"0.6196327",
"0.61957735",
"0.61890626",
"0.6187839",
"0.61865795",
"0.61846",
"0.61825067",
"0.61786795",
"0.6170444",
"0.6165654",
"0.61617726",
"0.6148684",
"0.6148184",
"0.614352",
"0.61406446",
"0.61383075",
"0.6136188",
"0.6132516",
"0.61323166",
"0.61216366",
"0.6118928",
"0.6113912",
"0.61058635",
"0.61041343",
"0.6103236",
"0.6101093",
"0.60997987",
"0.6099254",
"0.60980165",
"0.60978776",
"0.60972935",
"0.60954994",
"0.6094921",
"0.60935384",
"0.6086864",
"0.60849583",
"0.6083465",
"0.6070511",
"0.6067241",
"0.6065032",
"0.6063283",
"0.60607743",
"0.60593593",
"0.6057754",
"0.60479784",
"0.60435945",
"0.6040152",
"0.60377735",
"0.6034657",
"0.602857"
] | 0.0 | -1 |
Fetch records that have name IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByName(String... values) {
return fetch(Route.ROUTE.NAME, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"public ConditionItem in(String fieldName, Object...value) {\n\t\treturn singleCondition(ConditionType.IN, fieldName, value);\n\t}",
"public void addInFilter(@Nullable String fieldName, @NonNull String values) {\n addInFilter(fieldName, SdkUtils.parseListString(values));\n }",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"public static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }",
"public List<Product> findByNameIs(String name);",
"public static SetExpression contains(String propertyName, Object[] values) {\n return new SetExpression(Operator.CONTAINS, propertyName, values);\n }",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByNickName(List<String> values) {\n return findManyByCondition(Person.PERSON.NICK_NAME.in(values));\n }",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"public List<DomainObject> getListByKeyandValue(String colname, List<Object> keyValue) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.in(colname, keyValue));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue with List<Values> Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"public ArrayList<NameRecord> getMatches(String partialName){\n\t\tpartialName=partialName.toLowerCase();\n\t\tArrayList<NameRecord> result = new ArrayList<NameRecord>();\n\t\tfor (int i = 0;i<names.size();i++){\n\t\t\tString s = names.get(i).toLowerCase();\n\t\t\tif (s.contains(partialName)){\n\t\t\t\tresult.add(list.get(i));\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandModelAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> modelName, @Param(\"fuels\") Collection<String> fuel);",
"private Set<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms) {\n\t\tSet<String> values = new HashSet<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName,\n\t\t\t\tinputAttributeName, inputAttributeKnownTerms);\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"public static SetExpression in(String propertyName, Collection<? extends Object> values) {\n return in(propertyName, values.toArray());\n }",
"@Repository\npublic interface TagRepository extends JpaRepository<Tag, Long> {\n Set<Tag> findByNameIn(Set<String> tagNames);\n}",
"@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);",
"private List<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms, int queryLimit) {\n\t\tList<String> values = new ArrayList<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName, inputAttributeName, inputAttributeKnownTerms, queryLimit);\n\t\tquery += \" LIMIT \" + queryLimit;\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAll(String field, String... values);",
"public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);",
"public Items[] findWhereNameEquals(String name) throws ItemsDaoException;",
"long findValues(List<Object> values, List<Column> columns);",
"List<E> queryAll(String namedQuery);",
"public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }",
"public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);",
"@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);",
"List<E> list(String field, String contains);",
"boolean contains(String name);",
"@In String search();",
"boolean hasContains();",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> containsAll(EntityField field, String... values);",
"@SafeVarargs\n public static <T> boolean in(T value, T... values) {\n if (set(values).isEmpty()) return false;\n\n for (T element : values) {\n if (Objects.equals(value, element)) return true;\n }\n\n return false;\n }",
"public List<Resource> findByNameContaining(String nameFragment) {\n\t\tMap<String, Object> nameFilter = new HashMap<>();\n\t\tnameFilter.put(\"name\", new ValueParameter(\"%\" + nameFragment + \"%\"));\n\t\treturn this.filter(nameFilter);\n\t}",
"public List findByNamedQuery(String queryName, String[] paramNames, Object[] paramValues);",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);",
"List<Address> findByStateIn(List<String> stateList);",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values));\n }",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"@Test\n public void testNamedParamValueInCollectionTypeValidationPassesWhenCorrect() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, 20d));\n }",
"public static boolean in(String strs, String str) {\n\treturn null != strs && null != str && Arrays.asList(strs.split(\",\")).contains(str);\n }",
"boolean contains();",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"List<Item> findByNameContainingIgnoreCase(String name);",
"public static SetExpression contains(String propertyName, Object value) {\n return contains(propertyName, new Object[] { value });\n }",
"public PaypalIpn[] findWhereValsEquals(String vals) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE vals = ? ORDER BY vals\", new Object[] { vals } );\r\n\t}",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> in(String field, String... values);",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"public ContentList findAll(String[] keys, Object[] values);",
"List<Cloth> findByNameContaining(String name);",
"public List<?> queryByCriteria(List<String> fields, List<Object> values)\n throws DataAccessLayerException {\n return queryByCriteria(fields, values, null, null, null, false);\n }",
"@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);",
"public List<com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter> fetchByFirstName(String... values) {\n return fetch(Voter.VOTER.FIRST_NAME, values);\n }",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"public interface SysRoleRepository extends CrudRepository<SysRole, Long> {\n\n List<SysRole> findAllByDescriptionIn(Collection<String> roleNames);\n}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values));\n }",
"public ArrayList<TakeStock> findMemberByName(String name) {\n\n matches.clear();\n\n for(TakeStock member : mTakeStockList) {\n\n if(member.getProducts_name().toLowerCase().contains(name)){\n matches.add(member);\n }\n\n }\n return matches; // return the matches, which is empty when no member with the given name was found\n }",
"public List<User> searchUser(String searchValue);",
"public ArrayList<Guest> searchGuestList(String name) {\n \tString checkName = name.toUpperCase();\n \tArrayList<Guest> result = new ArrayList<>();\n \tfor(Guest guest : guestList){\n if(guest.getName().toUpperCase() != null && guest.getName().toUpperCase().contains(checkName)) {\n \tresult.add(guest);\n }\n }\n \treturn result;\n }",
"public static List<Handset> search(Map<String, String> reqParam) {\n\n\t\tList<Handset> temp = new ArrayList<Handset>();\n\t\ttemp.addAll(cache.values());\n\n\t\tfor (String param : reqParam.keySet()) {\n\t\t\tString val = (String) reqParam.get(param);\n\n\t\t\tswitch (param) {\n\t\t\tcase \"priceEur\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getPriceEur() == Integer.parseInt(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sim\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getSim().toLowerCase().contains(val.toLowerCase()))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"announceDate\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getAnnounceDate().equalsIgnoreCase(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\ttemp = new ArrayList<Handset>();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"filtered handset size \" + temp.size());\n\t\treturn temp;\n\n\t}",
"public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }",
"boolean containsStudentWith(String name);",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByIndustryName(String... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.INDUSTRY_NAME, values);\n }",
"public static boolean isInList(String pkgname,String []arylist)\n\t{\n\t \tif(arylist == null)return false;\n\t\tfor(int i=0;i<arylist.length;i++)\n\t\t{\n\t\t\tif(pkgname.contains(arylist[i]))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public abstract Set<String> getQueryNames();",
"List<ProductInfoOutput> findList(List<String> productIdList);",
"public List<ViewXwZqkh> Query(String filters, String orders, Object... values);",
"@Override\n\tpublic List<Account> getAccountsByName(String name) {\n\t\treturn jdbcTemplate.query(\"select * from account where locate(?, name)>0 \", new Object[]{name}, new BeanPropertyRowMapper(Account.class));\n\t}",
"public List<ro.ghasachi.bt.persistence.tables.pojos.Exam> fetchByName(String... values) {\n\t\treturn fetch(Exam.EXAM.NAME, values);\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);",
"private boolean containsName(String name, Human ... human) {\n boolean result = false;\n\n for(Human h : human) {\n if(h.getName().toLowerCase().contains(name.toLowerCase())) {\n result = true;\n break;\n }\n }\n\n return result;\n }",
"Collection<? extends WrappedIndividual> getContains();",
"List<User> findByfnameContaining(String search);",
"@Override\n public List<StorePickStatus> queryByList(QueryParam params) {\n return getSqlSession().getMapper(StorePickStatusDao.class).queryByList(params);\n }",
"List<T> findMatches(final String value);",
"public List<com.ims.dataAccess.tables.pojos.User> fetchBySuburb(String... values) {\n return fetch(User.USER.SUBURB, values);\n }",
"List findByFilterText(Set<String> words, boolean justIds);",
"public List<Object> queryByWhere(String col_name, String dto, List<List<Triple>> filter, List<String> keys) {\n\t\tList<Object> res = new ArrayList<Object>();\n\t\tDBCollection dbc = db.getCollection(col_name);\n\t\t// filter\n\t\tBasicDBObject all_ref = new BasicDBObject();\n\t\tDBObject _keys = new BasicDBObject();\n\t\t\n\t\tif(keys != null)\n\t\t\tfor(String key : keys) \n\t\t\t\t_keys.put(key, true);\n\t\t\n\t\tBasicDBList list = new BasicDBList();\n\t\tfor(List<Triple> and : filter) {\n\t\t\tBasicDBObject ref = new BasicDBObject();\n\t\t\tfor(Triple tri : and) {\n\t\t\t\tif(!ref.containsField(tri.key_name)) {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) \n\t\t\t\t\t\tref.put(tri.key_name, tri.value);\n\t\t\t\t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tref.put(tri.key_name, new BasicDBObject(tri.condition, tri.value));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) {\n\t\t\t\t\t\t// TODO It is impossible\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tBasicDBObject bo = (BasicDBObject)ref.get(tri.key_name);\n\t\t\t\t\t\tbo.append(tri.condition, tri.value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // end an \"and\" query\n\t\t\tlist.add(ref);\n\t\t}\n\t\t\n\t\tall_ref.put(\"$or\", list);\n\t\t\n\t\ttry {\n\t DBCursor cur = dbc.find(all_ref, _keys);\n\t \twhile (cur.hasNext()) {\n\t \t\tDBObject doc = cur.next();\n\t \t\ttry {\n\t \t\t\tres.add(Util.deserialize(doc, dto));\n\t \t\t} catch(InvocationTargetException ite) {\n\t \t\t\tite.printStackTrace();\n\t \t\t} \t\t\n\t \t\t//System.out.println(doc);\n\t }\n\n\t\t} catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n\n \treturn res;\n\t}",
"public Usuario[] findWhereNombreEquals(String nombre) throws SQLException;",
"public static boolean in(String str, String... strs) {\n\treturn null != strs && null != str && Arrays.asList(strs).contains(str);\n }",
"@Test(expected=IllegalArgumentException.class)\n public void testNamedParamValueInCollectionTypeValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1);\n query.named().setValue(NAMED_PARAM_1, Arrays.asList(10d, \"Moo\"));\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_BY.in(values));\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByStatus(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.STATUS.in(values));\n }",
"List<Employee> findByNameContaining(String keyword, Sort sort);",
"public List<T> searchByName(String name) throws DAOException {\n Helper.checkNullAndEmpty(name, \"name\");\n Helper.checkEntityManager(entityManager);\n\n String queryString = \"select e from \"\n + entityBeanType.getCanonicalName() + \" as e\"\n + \" where e.name = :name\" + \" and e.deleted = false\";\n\n try {\n return Helper.getEntities(\"name\", name, entityManager, queryString);\n } catch (Exception e) {\n throw new DAOException(\"Failed to search entities by name:\" + name + \".\", e);\n }\n }"
] | [
"0.64787245",
"0.63966537",
"0.6357186",
"0.62069565",
"0.61871797",
"0.5930089",
"0.5865555",
"0.5816682",
"0.5801772",
"0.55782986",
"0.5559247",
"0.54679656",
"0.5455439",
"0.5447918",
"0.54234064",
"0.5420519",
"0.5398054",
"0.5394402",
"0.5389061",
"0.53771347",
"0.5369347",
"0.53650457",
"0.5314066",
"0.5305541",
"0.5292439",
"0.5285832",
"0.5241548",
"0.5221119",
"0.5202352",
"0.51988465",
"0.5155873",
"0.5149922",
"0.51478845",
"0.5146956",
"0.513899",
"0.5101789",
"0.51010436",
"0.5092737",
"0.5075306",
"0.5057381",
"0.50498027",
"0.504629",
"0.5034706",
"0.4999508",
"0.49895498",
"0.49811342",
"0.49569964",
"0.49376312",
"0.49310902",
"0.49270168",
"0.491038",
"0.48742315",
"0.48738903",
"0.48704964",
"0.4866341",
"0.4864403",
"0.48499146",
"0.48448986",
"0.4842142",
"0.48380783",
"0.48379543",
"0.48295137",
"0.48292547",
"0.48162496",
"0.4814934",
"0.47949466",
"0.4792139",
"0.47827846",
"0.47778443",
"0.47643122",
"0.4756814",
"0.47534877",
"0.47478253",
"0.47337684",
"0.47306556",
"0.47270012",
"0.47244787",
"0.47169557",
"0.47037297",
"0.4684501",
"0.46810412",
"0.4679635",
"0.46717414",
"0.46666512",
"0.46619383",
"0.46557513",
"0.4641139",
"0.46403432",
"0.46364972",
"0.46278682",
"0.46276468",
"0.46253258",
"0.46251345",
"0.4621891",
"0.46208113",
"0.46189293",
"0.4617758",
"0.46131957",
"0.4612921",
"0.45957443",
"0.45946798"
] | 0.0 | -1 |
Fetch a unique record that has name = value | public com.dator.jqtest.dao.model.tables.pojos.Route fetchOneByName(String value) {
return fetchOne(Route.ROUTE.NAME, value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Student fetchBy(String name);",
"SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}",
"public StudentDto findByName(String name) \n\t{\n\n\t\tSession session = factory.openSession();\n\t\tQuery<StudentDto> query = session.createQuery(\"from StudentDto where name = :n\");\n\t\tquery.setParameter(\"n\", name);\n\t\tStudentDto studentDto = query.uniqueResult();\n\t\tsession.close();\n\n\t\treturn studentDto;\n\t}",
"public Items[] findWhereNameEquals(String name) throws ItemsDaoException;",
"Collection<Patient> findByName(String name, int id);",
"Object find(String name);",
"RecordLike selectByPrimaryKey(String id);",
"@Override\n\tpublic List<Account> getAccountsByName(String name) {\n\t\treturn jdbcTemplate.query(\"select * from account where locate(?, name)>0 \", new Object[]{name}, new BeanPropertyRowMapper(Account.class));\n\t}",
"Card selectByPrimaryKey(String card);",
"public Stock getFromMap(String name){\n\tif(table.containsKey(name)){\n\tStock rval = table.get(name);\n\treturn rval;\n\t}\n\telse{\n\t\t//call pull from URL and return newStock \n\t\taddToMap(String name, Stock newStock);\n\t\tgetFromMap(name);\n\t}\n}",
"Car findByName(String name);",
"V get(UniqueId uniqueId);",
"public V fetch(String name) {\n return mCache.fetch(name, mSource);\n }",
"Thing selectByPrimaryKey(String thingid);",
"@Override\r\n\tpublic user selectByName(String name) {\n\t\treturn userM.selectByName(name);\r\n\t\r\n\t}",
"public Customer getSpecificCustomerByName(String name){\n Customer specificCustomer = null;\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer WHERE FirstName LIKE ? OR LastName LIKE ?\");\n preparedStatement.setString(1, name);\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n specificCustomer = new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n );\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return specificCustomer;\n }",
"E getByName(String name);",
"Abum selectByPrimaryKey(String id);",
"Owner selectByPrimaryKey(String id);",
"Disproduct selectByPrimaryKey(String samId);",
"public static String getQueryValue(String name) {\n String result = null;\n Map<String, ArrayList<String>> query = getQuery();\n\n if (query != null) {\n result = query.get(name).get(0);\n }\n\n return result;\n }",
"public abstract T findByName(String name) ;",
"@Override\r\n\tpublic List<AsxDataVO> findByName(String name) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn mongoTemplate.find(new Query(Criteria.where(\"email\").is(name)), AsxDataVO.class);\r\n\t}",
"@Nullable\n @Contract(pure = true)\n public Entry byName(@NotNull String name) {\n return mappingByName.get(name);\n }",
"List<Item> findByName(String name);",
"@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)\r\n\tpublic Music queryByName(String name) {\n\t\tMusic music = musicdao.selectByName(name);\r\n\t\treturn music;\r\n\t}",
"public Future<io.remicro.saga.entities.tables.pojos.Person> findOneByNickName(String value) {\n return findOneByCondition(Person.PERSON.NICK_NAME.eq(value));\n }",
"OrgMemberRecord selectByPrimaryKey(String id);",
"@Query(value=\"select I.ID , I.NAME from ITEM I\",nativeQuery = true)\n\tpublic Item findByName(String name);",
"Basicinfo selectByPrimaryKey(String taxregcode);",
"@Override\n\tpublic List<T> findByName(String name) {\n\t\treturn baseDaoImpl.findByName(name);\n\t}",
"User get(String name);",
"@Override\n\tpublic DmcObject findUniqueObject(DmcObjectName name) {\n\t\treturn null;\n\t}",
"Kaiwa selectByPrimaryKey(String maht);",
"public void test_findUniqueByNamedOfQuery() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME_EXT, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t\t\r\n\t\tperson = (Person) this.persistenceService.findUniqueByNamedOfQuery(FIND_PERSON_BY_NAME, getParamMap(2));\r\n\t\tassertForFindUniquePerson(person);\r\n\t}",
"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 }",
"BaseReturn selectByPrimaryKey(String guid);",
"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 }",
"Heaver findByName(String name);",
"Employee selectByPrimaryKey(String id);",
"@Query(value = \"{'name': {$regex : ?0, $options: 'i'}}\", sort = \"{ name: 1}\")\n List<Item> findByName(String name);",
"AccuseInfo selectByPrimaryKey(Integer id);",
"public OpenERPRecord get(String key, Object value) {\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord n = i.next();\r\n\t\t\tif (!n.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tif ((n.get(key) == null) && (value == null))\r\n\t\t\t\treturn n;\r\n\t\t\tif (n.get(key).equals(value))\r\n\t\t\t\treturn n;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public T findByName(String nume) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"nume\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setString(1, nume);\n\t\t\trs = st.executeQuery();\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"Device selectByPrimaryKey(String deviceNo);",
"public T first(String attr, Object value) throws SQLException {\n\t\t\n\t\tPreparedStatement stmt = statement(\"`\"+ attr + \"` = ? \",\"1\");\n\t\tstmt.setObject(1, value);\n\t\tResultSet rs = stmt.executeQuery();\n\t\tResultSetMetaData meta = rs.getMetaData();\n\t\tif(rs.first()) {\n\t\t\tT obj = null;\n\t\t\ttry {\n\t\t\t\tobj = cls().newInstance();\n\t\t\t\tobj.set_from_db(meta, rs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn obj;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"Storage selectByPrimaryKey(Integer recordId);",
"public EventDataEntry getEntryByName(String name) {\r\n for (int i = 0; i < eventFields.size(); i++) {\r\n EventDataEntry currentEntry = eventFields.get(i);\r\n if (currentEntry.getColumnName().equalsIgnoreCase(name)) {\r\n return currentEntry;\r\n }\r\n }\r\n return null;\r\n }",
"public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }",
"Expertise findByName(String name);",
"@Query(\"name = ?\")\n List<PersonDocument> findByName(String name);",
"List<Product> findByName(String name);",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"Name findNameByPersonPrimary(int idPerson);",
"Online selectByPrimaryKey(String hash);",
"ResultSet searchName(String name) {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \tString query = \"SELECT * FROM Pokemon WHERE Name = \" + \"'\" + name + \"'\";\n \t\n \treturn search.executeQuery(query);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"List<Subject> findByName(String name);",
"public static DataCaseWorker where(String key, String value) {\n DataCaseWorker caseWorker = new DataCaseWorker();\n Database.getInstance().query(Database.compose(\n \"SELECT id, person_id, user_id\",\n \"FROM case_workers\",\n \"WHERE \" + key + \" = \" + value + \"\"\n ),\n rs -> {\n caseWorker.setId(rs.getInt(1));\n caseWorker.SetPersonId(rs.getInt(2));\n DataPerson dataPerson = DataPerson.find(rs.getInt(2));\n caseWorker.setFirstName(dataPerson.getFirstName());\n caseWorker.setMiddleName(dataPerson.getMiddleName());\n caseWorker.setLastName(dataPerson.getMiddleName());\n caseWorker.setAddress(dataPerson.getAddress());\n caseWorker.setPhone(dataPerson.getPhone());\n caseWorker.setEmail(dataPerson.getEmail());\n caseWorker.setUser(DataUser.find(rs.getInt(3)));\n });\n\n return caseWorker;\n }",
"ExtraQuery id(Object value);",
"public Campus fetchByname(java.lang.String name);",
"@Override\n public boolean containsNameProfesor(String Name) {\n try {\n Entity retValue = null; \n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT * FROM persona where nombre = ?\");\n\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n if (rs.next()) {\n return true; \n } \n \n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n return false;\n }",
"public abstract T getEntityByColumnName(String columnName, String value);",
"public void test_findUniqueByProperty() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByProperty(Person.class, NAME_PROPERTY, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t}",
"List<Person> findByIdAndName(int id,String name);",
"public List<DomainObject> getListByKeyandValue(String colname, Object value) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.eq(colname, value));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"ProEmployee selectByPrimaryKey(String id);",
"Userinfo selectByPrimaryKey(String userId);",
"@Override\n public User getUserByName(final String name){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where username = :name\");\n query.setParameter(\"name\", name);\n return (User) query.uniqueResult();\n }",
"public String getParam(String name) {\n // For now, we ignore multiple instances of the same parameter (which is otherwise valid).\n // Also, this is O(n). If it ever becomes important, switch to HashMap<LinkedList>, though\n // order will be lost.\n\n for (NameValuePair pair : queryValues) {\n if (pair.name.equals(name)) {\n return pair.value;\n }\n }\n\n return null;\n }",
"GirlInfo selectByPrimaryKey(Integer id);",
"UserModel findByName(String name);",
"AirlineEntity findByName(String name);",
"@Override\r\n\tpublic Subject getSubjectByName(String name) {\r\n\t\tList<Subject> result = runOwnQuery(\"FROM Subject WHERE name = ?1\", name);\r\n\t\tif (result.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn result.get(0);\r\n\t}",
"public static ResultSet searchBySurname(String name) {\r\n\t\ttry{\r\n\t\t\tconnection = DriverManager.getConnection(connectionString);\r\n\t\t\tstmt = connection.prepareStatement(\"SELECT * FROM Patient WHERE Surname =?;\");\r\n\t\t\tstmt.setString(1, name);\r\n\t\t\tdata = stmt.executeQuery();\r\n\t\t}\r\n\t\tcatch (SQLException ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn data;\r\n\t}",
"public DomainObject getRecordByKeyandValue(String keyName, Object keyValue) {\r\n DomainObject returnValue = null;\r\n Session session = getSession();\r\n List<DomainObject> lst = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.eq(keyName, keyValue));\r\n lst = query.list();\r\n if (lst != null && lst.size() > 0) {\r\n returnValue = lst.get(0);\r\n }\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getRecordByKeyandValue Method:\" + e, e);\r\n } finally {\r\n if (session.isOpen()) {\r\n session.close();\r\n }\r\n }\r\n return returnValue;\r\n }",
"AccessModelEntity selectByPrimaryKey(String id);",
"public IRubyObject fetchConstant(String name) {\n assert IdUtil.isConstant(name);\n return constantTableFetch(name);\n }",
"public Service consultName(String name){\r\n \tCriteria criteria = session.createCriteria(Service.class);\r\n \tcriteria.add(Restrictions.like(\"name\",name));\r\n \treturn (Service)criteria.list().get(0);\r\n }",
"User selectByPrimaryKey(String id);",
"IceApp selectByPrimaryKey(Long id);",
"@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }",
"@org.apache.thrift.annotation.Nullable\r\n public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }",
"public static DistributionState getByName(String name) {\r\n for(int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n DistributionState result = VALUES_ARRAY[i];\r\n if(result.getName().equals(name)) {\r\n return result;\r\n }\r\n }\r\n return null;\r\n }",
"Caiwu selectByPrimaryKey(Integer id);",
"@Query(\"spouse.name = ?\")\n List<PersonDocument> findBySpouseName(String name);",
"ResultDto selectByPrimaryKey(String number);",
"public ResultSet retrivecompname(String compname)throws Exception {\n\trs=DbConnect.getStatement().executeQuery(\"select compname from company where comp_id=\"+compname+\"\");\r\n\treturn rs;\r\n}",
"@Test(expected=IllegalArgumentException.class)\n public void testNamedValueNotDuplicateValidation() {\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).eq().named(NAMED_PARAM_1);\n query.where(personProxy.getName()).eq().named(NAMED_PARAM_1);\n }",
"public static TypeDictionaryDicoEffetTactiqueRecherche getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTypeDictionaryDicoEffetTactiqueRecherche result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"Person findPerson(String name);",
"public List<Student> searchStudent(String name) {\n List<Student> studentList = new ArrayList<>();\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Students WHERE name = ? \", new String[]{name});\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 String queryByName(Map<String, Object> parameter) {\n return new SQL() {{\n SELECT(\"p.user_id\");\n SELECT(\"u.user_name\");\n SELECT(\"p.*\");\n\n FROM(TABLE_NAME + \" p\");\n\n JOIN(\"t_escheduler_user u on p.user_id = u.id\");\n\n WHERE(\"p.name = #{name}\");\n WHERE(\"p.flag = 1\");\n }}.toString();\n }",
"@Override\n public User getByName(String name) {\n return ChainWrappers.lambdaQueryChain(userMapper)\n .eq(User::getName, name).one();\n }",
"protected Object retrieveUniqueInstanceByAttributeInternal(final Session session, \n final Class< ? extends Serializable > instanceClass, \n final String attributeName, \n final String attributeValue) {\n final StringBuilder queryString = new StringBuilder(\"from \");\n queryString.append(instanceClass.getSimpleName());\n queryString.append(\" where \");\n queryString.append(attributeName);\n queryString.append(\"='\");\n queryString.append(attributeValue);\n queryString.append(\"'\");\n Query query = session.createQuery(queryString.toString());\n query.setReadOnly(true);\n query.setCacheable(true);\n Object result = query.uniqueResult();\n return result;\n }",
"public Usuario[] findWhereNombreEquals(String nombre) throws SQLException;",
"Member selectByPrimaryKey(Long id);",
"Shareholder selectByPrimaryKey(Integer id);",
"SysId selectByPrimaryKey(String id);",
"@Override\n\tpublic Movie searchMovieByName(String name) {\n\t\tString sql=\"Select * from movie where MOVIE_NAME='\"+name+\"'\";\n\t\tJdbcTemplate jdbcTemplate=JdbcTemplateFactory.getJdbcTemplate();\n\t\tList<Movie> nameMList=jdbcTemplate.query(sql, new MovieRowMapper());\n\t\tif(nameMList==null||nameMList.isEmpty()){\n\t\t\treturn null;\n\t\t}\n\t\treturn nameMList.get(0);\n\t}",
"@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}",
"public CourseDTO findByName(String name) throws ApplicationException {\n log.debug(\"Model findByName Started\");\n StringBuffer sql = new StringBuffer(\n \"SELECT * FROM ST_COURSE WHERE NAME=?\");\n CourseDTO dto = null;\n Connection conn = null;\n try {\n conn = JDBCDataSource.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sql.toString());\n pstmt.setString(1, name);\n ResultSet rs = pstmt.executeQuery();\n while (rs.next()) {\n dto = new CourseDTO();\n dto.setId(rs.getLong(1));\n \tdto.setName(rs.getString(2));\n \tdto.setCourceId(rs.getLong(3));\n \tdto.setDuration(rs.getInt(4));\n \tdto.setCreatedBy(rs.getString(5));\n \tdto.setModifiedBy(rs.getString(6));\n \tdto.setCreatedDatetime(rs.getTimestamp(7));\n \tdto.setModifiedDatetime(rs.getTimestamp(8));\n\n\n }\n rs.close();\n } catch (Exception e) {\n log.error(\"Database Exception..\", e);\n throw new ApplicationException(\n \"Exception : Exception in getting College by Name\");\n } finally {\n JDBCDataSource.closeConnection(conn);\n }\n log.debug(\"Model findByName End\");\n return dto;\n }"
] | [
"0.61136335",
"0.58454645",
"0.5739822",
"0.5737208",
"0.5704531",
"0.56548554",
"0.56426144",
"0.5628949",
"0.558532",
"0.5551735",
"0.5536054",
"0.55126184",
"0.54969597",
"0.54548347",
"0.54452765",
"0.5439223",
"0.54357237",
"0.5433371",
"0.5423823",
"0.5421556",
"0.5410412",
"0.5410229",
"0.5380471",
"0.5375756",
"0.5373396",
"0.53716004",
"0.5357944",
"0.53370905",
"0.53361124",
"0.5335661",
"0.5331221",
"0.53307045",
"0.5330471",
"0.53241014",
"0.52979934",
"0.5293653",
"0.5285369",
"0.52769715",
"0.52674204",
"0.5242856",
"0.5236973",
"0.5229311",
"0.5224439",
"0.5214816",
"0.52080196",
"0.52027595",
"0.5202537",
"0.52007556",
"0.5200695",
"0.51983535",
"0.51953185",
"0.5194444",
"0.51939005",
"0.5188811",
"0.5188796",
"0.5186341",
"0.5182317",
"0.5177903",
"0.5172647",
"0.5170355",
"0.5170171",
"0.5162563",
"0.51524705",
"0.51499957",
"0.51486176",
"0.5145243",
"0.51437247",
"0.5141986",
"0.51326567",
"0.5130352",
"0.51237893",
"0.51223314",
"0.5121566",
"0.51196903",
"0.5118437",
"0.5116841",
"0.511646",
"0.51123226",
"0.5110278",
"0.5105491",
"0.5101391",
"0.5101391",
"0.509934",
"0.509876",
"0.5097732",
"0.5092426",
"0.509027",
"0.50897634",
"0.50889343",
"0.508779",
"0.5087472",
"0.50872177",
"0.5085372",
"0.5079912",
"0.507766",
"0.5073147",
"0.5071824",
"0.50708944",
"0.50673175",
"0.50637233",
"0.5062238"
] | 0.0 | -1 |
Fetch records that have parent_name IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByParentName(String... values) {
return fetch(Route.ROUTE.PARENT_NAME, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public List<Person> findAllChildrenOf(String name) {\n return relations.stream()\n .filter(x -> x.getValue0().name.equals(\"John\")\n && x.getValue1() == Relationship.PARENT)\n .map(Triplet::getValue2)\n .collect(Collectors.toList());\n }",
"@Repository\npublic interface SysResourceRepository extends JpaRepository<SysResourceEntity, Integer> {\n @Query(\"SELECT DISTINCT n FROM SysResourceEntity m INNER JOIN SysResourceEntity n ON m.parentId = n.id WHERE m.url IN (:urls)\")\n Set<SysResourceEntity> findByList(@Param(\"urls\") List<String> urls);\n\n Set<SysResourceEntity> findByUrlIn(List<String> urls);\n}",
"java.util.List<java.lang.String>\n getParentIdList();",
"@Override\n public boolean visit(SQLInListExpr expr) {\n expr.getExpr().setParent(expr);\n return true;\n }",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"List<ChangesetParents> selectByExample(ChangesetParentsExample example);",
"@Override\n\tpublic ArrayList<Parent> queryAll() {\n\t\treturn parentDao.queryAll();\n\t}",
"Condition in(QueryParameter parameter, Object... values);",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"public Expression generateExpression(GenerationContext context) {\r\n Expression whereClause = getLeft().generateExpression(context);\r\n List arguments = getTheObjects();\r\n Node firstArg = (Node)arguments.get(0);\r\n if (firstArg.isSubqueryNode()) {\r\n SubqueryNode subqueryNode = (SubqueryNode)firstArg;\r\n ReportQuery reportQuery = subqueryNode.getReportQuery(context);\r\n if (notIndicated()) {\r\n whereClause = whereClause.notIn(reportQuery);\r\n }\r\n else {\r\n whereClause = whereClause.in(reportQuery);\r\n }\r\n } else if (isListParameterOrSubquery && firstArg.isParameterNode()) {\r\n if (notIndicated()) {\r\n whereClause = whereClause.notIn(firstArg.generateExpression(context));\r\n } else {\r\n whereClause = whereClause.in(firstArg.generateExpression(context));\r\n }\r\n } else {\r\n Vector inArguments = new Vector(arguments.size());\r\n for (Iterator iter = arguments.iterator(); iter.hasNext();) {\r\n Node nextNode = (Node)iter.next();\r\n inArguments.add(nextNode.generateExpression(context));\r\n }\r\n if (inArguments.size() > 0) {\r\n if (notIndicated()) {\r\n whereClause = whereClause.notIn(inArguments);\r\n } else {\r\n whereClause = whereClause.in(inArguments);\r\n }\r\n }\r\n }\r\n return whereClause;\r\n }",
"List<FileEntity> findByParentFile(FileEntity parentFile);",
"private List<Integer> filterDocIds(FilterQueryTree filterQueryTree, List<Integer> inputDocIds) {\n if (filterQueryTree == null) {\n List<Integer> allDocs = new ArrayList<>(_totalDocs);\n for (int i = 0; i < _totalDocs; ++i) {\n allDocs.add(i);\n }\n return allDocs;\n }\n\n final List<FilterQueryTree> childFilters = filterQueryTree.getChildren();\n final boolean isLeaf = (childFilters == null) || childFilters.isEmpty();\n\n if (isLeaf) {\n FilterOperator filterType = filterQueryTree.getOperator();\n String column = filterQueryTree.getColumn();\n final List<String> value = filterQueryTree.getValue();\n return getMatchingDocIds(inputDocIds, filterType, column, value);\n }\n\n List<Integer> result = filterDocIds(childFilters.get(0), inputDocIds);\n final FilterOperator operator = filterQueryTree.getOperator();\n for (int i = 1; i < childFilters.size(); ++i) {\n// List<Integer> childResult = operator.equals(FilterOperator.AND) ? filterDocIds(childFilters.get(i), result)\n// : filterDocIds(childFilters.get(i), inputDocIds);\n List<Integer> childResult = filterDocIds(childFilters.get(i), inputDocIds);\n result = combine(result, childResult, operator);\n }\n return result;\n }",
"public QuerySequence notInList(String fName, Collection c) {\n if (!ListUtil.isEmpty(c)) {\n List split = ListUtil.split(500, c); // операция IN ограничена 1000 значениями, для надежности делим ее на операции по 500\n int count = 0;\n child.add(new QueryChain(new SimpleFragmentFactory(\"(\")));\n for (Object v : split) {\n condition(fName, new QueryChain(new NotInListFragmentFactory(), new QueryParameter(getFieldAlias(), v)));\n if (count++ < split.size() - 1) child.add(new QueryChain(Primitives.AND.getFragmentFactory()));\n }\n child.add(new QueryChain(new SimpleFragmentFactory(\")\")));\n } else {\n condition(fName, new QueryChain(new InListFragmentFactory(), new QueryParameter(getFieldAlias(), c)));\n }\n return getParent();\n }",
"public boolean isHaveChildren(List source, String treeid) {\n\t\tboolean result = false;\r\n\t\tif (source == null || source.isEmpty() || source.size() < 1\r\n\t\t\t\t|| StringUtils.isEmpty(treeid)) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tIterator it = source.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap item = (Map) it.next();\r\n\t\t\tif (item.get(StringPool.TREE_PARENTID) != null) {\r\n\t\t\t\tif (item.get(StringPool.TREE_PARENTID).toString()\r\n\t\t\t\t\t\t.equals(treeid)) {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"private List<DownloadPackage> searchByParentCode(String parentCode) {\n Collection<DownloadPackage> packages = application.getPackageMap().values();\n List<DownloadPackage> results = new ArrayList<DownloadPackage>();\n for (DownloadPackage pack : packages) {\n if (parentCode == null) {\n if (pack.getParentCode() == null) {\n results.add(pack);\n }\n } else if (parentCode.equals(pack.getParentCode())) {\n results.add(pack);\n }\n }\n return results;\n }",
"public T any(final QueryBuilder<?> parent) {\r\n\t\treturn op(ConditionValueType.ANY, parent);\r\n\t}",
"public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}",
"public List<SubQueryDef> getSubQueries();",
"@Override\n\tpublic List<Menu> getListByUsernameAndParentId(String username,\n\t\t\tLong parentId) {\n\t\tString hql = \" from Menu where enable=1 and autoId in(select menuId from GroupMenu where groupId in(SELECT groupId FROM UserMenuGroup where username='\"\n\t\t\t\t+ username + \"')) and parentId=\" + parentId;\n\t\thql+=\" order by menuOrder asc\";\n\t\tQuery query = getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}",
"@Generated\n @Selector(\"includesSubentities\")\n public native boolean includesSubentities();",
"@Override\n public List<ExecutionEntity> findChildExecutionsByParentExecutionId(String parentExecutionId) {\n log.debug(\"findChildExecutionsByParentExecutionId[parentExecutionId={}]\", parentExecutionId);\n return findMany(findExecutionsByParentExecutionId, parentExecutionId, executionsByParentIdMatcher);\n }",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"@Query(\"\"\"\n SELECT pe FROM ProgrammingExercise pe\n WHERE pe.shortName IS NOT NULL AND (\n pe.id IN (\n SELECT coursePe.id\n FROM ProgrammingExercise coursePe\n WHERE coursePe.course.instructorGroupName IN :groups\n AND (coursePe.title LIKE %:partialTitle% OR coursePe.course.title LIKE %:partialCourseTitle%)\n ) OR pe.id IN (\n SELECT examPe.id\n FROM ProgrammingExercise examPe\n WHERE examPe.exerciseGroup.exam.course.instructorGroupName IN :groups\n AND (examPe.title LIKE %:partialTitle% OR examPe.exerciseGroup.exam.course.title LIKE %:partialCourseTitle%)\n )\n )\n \"\"\")\n Page<ProgrammingExercise> findByTitleInExerciseOrCourseAndUserHasAccessToCourse(@Param(\"partialTitle\") String partialTitle,\n @Param(\"partialCourseTitle\") String partialCourseTitle, @Param(\"groups\") Set<String> groups, Pageable pageable);",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"public Criteria andParentIdEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"parent_id = \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"List<Cloth> findByNameContaining(String name);",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"public boolean isHaveParent(List source, String treeid) {\n\t\tboolean result = false;\r\n\t\tif (source == null || source.size() < 1) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tMap currentTree = this.getTree(source, treeid);\r\n\t\tif (currentTree.get(StringPool.TREE_PARENTID) == null) {\r\n\t\t\tresult = false;\r\n\t\t} else {\r\n\t\t\tMap parentTree = this.getTree(source, currentTree.get(\r\n\t\t\t\t\tStringPool.TREE_PARENTID).toString());\r\n\t\t\tif (parentTree == null) {\r\n\t\t\t\tresult = false;\r\n\t\t\t} else {\r\n\t\t\t\tif (source.contains(parentTree)) {\r\n\t\t\t\t\tresult = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic List<Project> findProjectsByParentProjectId(int ownerAccountId,\n\t\t\tint parentProjectId, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.<Integer>findDomainObjectsByGenericTypeColumnVal(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.ParentProjectId\", parentProjectId, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByParentProjectId MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByParentProjectId Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public InstitutionBean[] loadByParentid(Integer value) throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution WHERE parentid=?\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n Manager.setInteger(ps, 1, value);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }",
"@Override\n public boolean visit(SQLInSubQueryExpr subQuery) {\n subQuery.getExpr().setParent(subQuery);\n return true;\n }",
"@Repository\npublic interface TagRepository extends JpaRepository<Tag, Long> {\n Set<Tag> findByNameIn(Set<String> tagNames);\n}",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"@Test\n \tpublic void whereClauseForNodeName() {\n \t\tnode23.setName(\"name\");\n \t\tcheckWhereCondition(join(\"=\", \"_node23.name\", \"'name'\"));\n \t}",
"public interface IngredientRepository extends JpaRepository<Ingredient, Long> {\n\n @Query(\"SELECT i FROM Ingredients i WHERE NOT EXISTS (SELECT ic FROM IngredientCategories ic JOIN ic.ingredients ings WHERE i IN ings)\")\n Collection<? extends Ingredient> findRootIngredients();\n}",
"@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);",
"@GET\n\t@Path(\"/component/{componentName}\")\n\t@Produces( MediaType.APPLICATION_JSON )\n\tList<String> findPossibleParentInstances( @PathParam(\"name\") String applicationName, @PathParam(\"componentName\") String componentName );",
"public ResultSet leesParentIdLijst() {\n String sql = \"select distinct f2.id parent_id\\n\" +\n \" from bookmarkfolders f1\\n\" +\n \" join bookmarkfolders f2 on f1.parent_id = f2.id\\n\" +\n \" order by f2.id;\";\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"@Test\n \tpublic void whereClauseForNodeSibling() {\n \t\tnode23.addJoin(new Sibling(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_rank23.parent\", \"_rank42.parent\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n\t\t\t\t\"_component23.name IS NULL\"\n \t\t);\n \t}",
"private Set<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms) {\n\t\tSet<String> values = new HashSet<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName,\n\t\t\t\tinputAttributeName, inputAttributeKnownTerms);\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"public Set<Long> getParents() {\n String key = parentName + parentGenus;\n if (!parentNameToParentBlocks.containsKey(key)) {\n return null;\n }\n return parentNameToParentBlocks.get(key);\n }",
"public List<String> getQueryNames() throws SettingsException {\n\t\ttry {\n\t\t\tsearchPrefs.sync();\n\t\t\t\n\t\t\tString[] children = searchPrefs.childrenNames();\n\t\t\tArrayList<String> names = new ArrayList<String>(children.length);\n\t\t\tfor( String child : children ) {\n\t\t\t\tString name = searchPrefs.node(child).get(NAME_KEY, null);\n\t\t\t\tif( name != null )\n\t\t\t\t\tnames.add(name);\n\t\t\t\telse\n\t\t\t\t\t_log.warn(\"No name for search key: \" + child);\n\t\t\t}\n\t\t\t\n\t\t\treturn names;\n\t\t\t\n\t\t} catch( BackingStoreException e ) {\n\t\t\tfinal String MSG = \"Could not load queries from store.\";\n\t\t\t_log.error(MSG, e);\n\t\t\tthrow new SettingsException(MSG, e);\n\t\t}\n\t}",
"public List<Product> findByNameIs(String name);",
"@Override\n @SuppressWarnings(\"unchecked\")\n public Collection<String> getChildEntities(final String parentPath,\n final int start,\n final int count) throws CalFacadeException {\n HibSession sess = getSess();\n\n StringBuilder sb = new StringBuilder(\"select col.name from \");\n sb.append(BwEventObj.class.getName());\n sb.append(\" col where col.colPath=:colPath\");\n\n sess.createQuery(sb.toString());\n\n sess.setString(\"colPath\", parentPath);\n\n sess.setFirstResult(start);\n sess.setMaxResults(count);\n\n List res = sess.getList();\n\n if (Util.isEmpty(res)) {\n return null;\n }\n\n return res;\n }",
"@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);",
"public List<JsonNode> findAllCriteria(JsonNode element) {\n List<JsonNode> criteria = new ArrayList<>();\n Stack<JsonNode> fringe = new Stack<>();\n fringe.push(element);\n\n while (!fringe.isEmpty()) {\n JsonNode currentElement = fringe.pop();\n if (currentElement.get(\"content\").get(\"type\").asText().equals(Type.SECTION.toString())) {\n for (JsonNode e: currentElement.get(\"children\")) {\n fringe.push(e);\n }\n } else {\n criteria.add(currentElement);\n }\n }\n\n return criteria;\n }",
"Set<KidDTO> findByParentId(@Param(\"parentId\") long parentId);",
"@Select(\"select id,item from dicts where id in (23,24,25,26,27)\")\n\tList<Dict> findLevels();",
"public void selectParents() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@Test\n \tpublic void whereClauseForNodeInclusion() {\n \t\tnode23.addJoin(new Inclusion(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\">=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}",
"public boolean isHaveParent(List source, Tree tree) {\n\t\tboolean result = false;\r\n\t\tif (!source.contains(tree)) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tif (tree.getParentTree() != null) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public interface IChildrenQuery<C extends SuperVO> {\n\n List<C> queryByParentPk(String parentPk);\n}",
"public ConditionItem in(String fieldName, Object...value) {\n\t\treturn singleCondition(ConditionType.IN, fieldName, value);\n\t}",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"private List<ParentEntityNode> entityParentIsPresent(String entityId, LosConfigDetails owner,\n\t\t\tLosConfigDetails owned, LosConfigDetails affilated, LosConfigDetails subsidary, String commercialSuffix) {\n\t\tList<String> childIds = new ArrayList<>();\n\t\tList<String> iterationChildIdS = new ArrayList<>();\n\t\tList<String> levelTwoChildIds = new ArrayList<>();\n\t\tList<ParentEntityNode> treeData = parentEntityNodeRepository.findEntityTreeData(entityId);\n\t\ttreeData.stream().forEach(clids -> {\n\t\t\tif (clids.getChildId().endsWith(commercialSuffix)) {\n\t\t\t\tlevelTwoChildIds.add(clids.getChildId());\n\t\t\t}\n\t\t});\n\t\tif (!levelTwoChildIds.isEmpty()) {\n\t\t\tList<ParentEntityNode> getParents = getParentDataReverseOrder(levelTwoChildIds);\n\t\t\tgetParents.stream().forEach(findCtoCRel -> {\n\t\t\t\tif (findCtoCRel.getChildId().endsWith(commercialSuffix)\n\t\t\t\t\t\t&& getConfigId(findCtoCRel).equals(LOSEntityConstants.OWNER)) {\n\t\t\t\t\tfindCtoCRel.setLosConfigDetails(subsidary);\n\t\t\t\t\tfindCtoCRel.setChildren(Arrays.asList());\n\t\t\t\t\ttreeData.add(findCtoCRel);\n\t\t\t\t} else {\n\t\t\t\t\tfindCtoCRel.setChildren(Arrays.asList());\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tList<ParentEntityNode> parentData = getParentDataReverseOrder(Arrays.asList(entityId));\n\t\tparentData.stream()\n\t\t\t\t.forEach(parent -> changingRelations(owner, owned, subsidary, commercialSuffix, childIds, parent));\n\t\tif (entityId.endsWith(commercialSuffix)) {\n\t\t\tentityParentIsPresentSecondLeveIteration(entityId, owner, affilated, subsidary, commercialSuffix, childIds,\n\t\t\t\t\titerationChildIdS, treeData);\n\t\t}\n\t\ttreeData.addAll(parentData);\n\t\treturn treeData;\n\t}",
"public boolean hasContainingParentId() {\n return fieldSetFlags()[1];\n }",
"@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}",
"static DbQuery createChildValueQuery(String childKeyName) {\n DbQuery query = new DbQuery();\n query.order = OrderBy.CHILD;\n query.keyName = childKeyName;\n return query;\n }",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface NetraNominationRepository extends NominationRepository{\n\n\n\n @Query(\"select nominations from Nomination nominations where nominations.contract.id in :contractIdList\")\n List<Nomination> findAllNomsByContractIdList(@Param(\"contractIdList\") List<Long> contractIdList);\n\n}",
"protected Object[] getFilteredChildren(TableViewer viewer){\n\t\tObject parent = viewer.getInput();\n\t\tif(parent==null) return new Object[0];\n\t\tObject[] result = null;\n\t\tif (parent != null) {\n\t\t\tIStructuredContentProvider cp = (IStructuredContentProvider) viewer.getContentProvider();\n\t\t\tif (cp != null) {\n\t\t\t\tresult = cp.getElements(parent);\n\t\t\t\tif(result==null) return new Object[0];\n\t\t\t\tfor (int i = 0, n = result.length; i < n; ++i) {\n\t\t\t\t\tif(result[i]==null) return new Object[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tViewerFilter[] filters = viewer.getFilters();\n\t\tif (filters != null) {\n\t\t\tfor (ViewerFilter f:filters) {\n\t\t\t\tObject[] filteredResult = f.filter(viewer, parent, result);\n\t\t\t\tresult = filteredResult;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"@Repository\npublic interface ChildrenInfoRepository extends JpaRepository<ChildrenInfo,Long>,JpaSpecificationExecutor<ChildrenInfo> {\n\n List<ChildrenInfo> findAllByIdIn(List<Long> id);\n\n List<ChildrenInfo> findAllByParentIdIn(List<Long> id);\n\n ChildrenInfo findOneByParentId(Long id);\n}",
"@Override\n public List<ICategory> findByParent(Long parent) {\n return locationDao.findByParent(CategoryType.JOB_CATEGORY, parent);\n }",
"public List getnomodulenodesByParent(long parentId, String ids) {\n\t\tList<Component> cList=null;\n\t\tif(ids.equals(\"()\")){\n\t\t\t cList= sessionFactory.getCurrentSession().createQuery(\"from Component c where c.parentId = ?\")\n\t\t\t\t\t\t.setParameter(0, parentId)\n\t\t\t\t\t\t.list();\n\t\t}else{\n\t\t\t cList= sessionFactory.getCurrentSession().createQuery(\"from Component c where c.parentId = ? and c.id not in\"+ids)\n\t\t\t\t\t\t.setParameter(0, parentId)\n\t\t\t\t\t\t.list();\n\t\t}\n\t\t\n\t\t\t\treturn cList;\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);",
"public Query getRecursiveQuery(String fieldOrGroup) throws ParseException;",
"public boolean isHaveParent(List source, Map transedTree) {\n\t\tboolean result = false;\r\n\t\tif (source.isEmpty() || source.size() < 1 || source == null\r\n\t\t\t\t|| transedTree.isEmpty() || transedTree == null) {\r\n\t\t\treturn result;\r\n\t\t} else {\r\n\t\t\tif (transedTree.get(StringPool.TREE_PARENTID) == null) {\r\n\t\t\t\tresult = false;\r\n\t\t\t} else {\r\n\t\t\t\tMap parentTree = this.getTree(source, transedTree.get(\r\n\t\t\t\t\t\tStringPool.TREE_PARENTID).toString());\r\n\t\t\t\tif (parentTree.isEmpty() || parentTree == null) {\r\n\t\t\t\t\tresult = false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (source.contains(parentTree)) {\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tresult = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"List<Teachplan> findByCourseidAndParentid(String courseId, String parentId);",
"public List<SaveGameNode> getAllChilden(String name) {\r\n List<SaveGameNode> list = new ArrayList();\r\n list.addAll(this.children.stream().filter(child -> child.equals(name)).collect(Collectors.toList()));\r\n return list;\r\n }",
"List<RoleMenu> queryByRoleIds(Set<String> _roleIds);",
"public List<Resource> findByNameContaining(String nameFragment) {\n\t\tMap<String, Object> nameFilter = new HashMap<>();\n\t\tnameFilter.put(\"name\", new ValueParameter(\"%\" + nameFragment + \"%\"));\n\t\treturn this.filter(nameFilter);\n\t}",
"private void filter(String text) {\n ArrayList<ChildItem> filterdNames = new ArrayList<>();\n\n //looping through existing elements\n for (ChildItem s : dataParent ) {\n\n //if the existing elements contains the search input\n if (s.getKode_barang().toLowerCase().contains(text.toLowerCase())) {\n //adding the element to filtered list\n filterdNames.add(s);\n }\n }\n\n //calling a method of the adapter class and passing the filtered list\n adapter.filterList(filterdNames);\n }",
"public Keeper[] searchByName(String name){\r\n ArrayList<Keeper> keeperList = new ArrayList<Keeper>();\r\n for(Keeper keeper:keepers){\r\n if(keeper.getName().contains(name)){\r\n keeperList.add(keeper);\r\n }\r\n }\r\n if(keeperList.isEmpty()){return null;}\r\n return keeperList.toArray(new Keeper[keeperList.size()]); \r\n }",
"public native boolean searchAsChild() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\treturn jso.searchAsChild;\n }-*/;",
"@Override\n\tpublic List<Subordination> findBySender(Employee employee) throws DBOperationException {\n\t\tPreparedStatement statement = null;\n\t\tList<Subordination> subList = new ArrayList<>();\n\t\tSubordination sub = null;\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(SUBORDINATION_BY_SENDER);\n\t\t\tstatement.setInt(1, employee.getEmployeeID());\n\t\t\tResultSet rSet = statement.executeQuery();\n\t\t\twhile (rSet.next()) {\n\t\t\t\tsub = new Subordination();\n\t\t\t\tinitSubordination(rSet, sub);\n\t\t\t\tsubList.add(sub);\n\t\t\t}\n\t\t\tstatement.close();\n\t\t\trSet.close();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DBOperationException(\"Subordination not found. DB error.\", e);\n\t\t} \n\t\treturn subList;\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE u.fuel IN :fuels\")\n\tList<Car> findAllCarWithSameFuel(@Param(\"fuels\") String fuel);",
"private List<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms, int queryLimit) {\n\t\tList<String> values = new ArrayList<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName, inputAttributeName, inputAttributeKnownTerms, queryLimit);\n\t\tquery += \" LIMIT \" + queryLimit;\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"private static boolean contains(Component parent,Component child) {\n\t\tComponent c = child;\n\t\twhile(c!=null) {\n\t\t\tc = c.getParent();\n\t\t\t\n\t\t\tif(parent==c) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean hasParentalStatus();",
"@SuppressWarnings(\"UnusedReturnValue\")\n public List<String> depthFirstSearch(List<String> array) {\n // Write your code here.\n array.add(name);\n for (Node child : children) {\n child.depthFirstSearch(array);\n }\n return array;\n }",
"List<E> list(String field, String contains);",
"@Override\n public Optional<Node<T>> findBy(T value) {\n Optional<Node<T>> rsl = Optional.empty();\n Queue<Node<T>> data = new LinkedList<>();\n data.offer(this.root);\n while (!data.isEmpty()) {\n Node<T> el = data.poll();\n if (el.eqValues(value)) {\n rsl = Optional.of(el);\n break;\n }\n for (Node<T> child : el.leaves()) {\n data.offer(child);\n }\n }\n return rsl;\n }",
"public List<Inmovilizacion> queryDeep(String where, String... selectionArg) {\n Cursor cursor = db.rawQuery(getSelectDeep() + where, selectionArg);\n return loadDeepAllAndCloseCursor(cursor);\n }",
"public interface SysRoleRepository extends CrudRepository<SysRole, Long> {\n\n List<SysRole> findAllByDescriptionIn(Collection<String> roleNames);\n}",
"@Query(\"select q from Question q where q.questionCategory.categoryName like ?1 and q.questionLevel.levelName like ?2 \"\r\n\t\t\t+ \"and q.questionType.typeName like ?3 and q.userQuestion.fullName like ?4 and q.dateCreated = ?5 and q.questionTag.tagName like ?6\" )\r\n\tList<Question> filterByAll(String categoryName, String levelName, String typeName, \r\n\t\t\tString fullName, Date dateCreated, String tagName, Pageable pageable );",
"public Criteria andParentIdNotEqualToColumn(BDicTreeCode.Column column) {\n addCriterion(new StringBuilder(\"parent_id <> \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }",
"@Override\n\tpublic boolean test(TreeNode node) {\n\t\tif (includedInResultByNode.containsKey(node)) {\n\t\t\treturn includedInResultByNode.get(node);\n\t\t} else if (node.getParent() == null || node.getParent() == evaluationRootNode) { // this is a root node, so it is considered eager\n\t\t\tincludedInResultByNode.put(node, true);\n\t\t\treturn true;\n\t\t} else if (node.getParent().isLazyChildren() && !node.getParent().isExpanded()) { // parent has lazy children\n\t\t\tincludedInResultByNode.put(node, false);\n\t\t\treturn false;\n\t\t} else { // whatever holds for the parent, also holds for this node\n\t\t\tboolean parentIncluded = test(node.getParent());\n\t\t\tincludedInResultByNode.put(node, parentIncluded);\n\t\t\treturn parentIncluded;\n\t\t}\n\t}",
"private List<EntityRelationshipType> parentPresent(String entityId, List<EntityRelationshipType> relationList,\n\t\t\tLosConfigDetails owner, LosConfigDetails owned, LosConfigDetails affilated, LosConfigDetails subsidary) {\n\t\tList<EntityRelationshipType> affialiateDataList = new ArrayList<>();\n\t\tList<EntityRelationshipType> child = new ArrayList<>();\n\t\tList<String> individualEntityId2List = new ArrayList<String>();\n\t\tList<String> commercialEntityId2List = new ArrayList<String>();\n\t\tList<String> childrenEntityId2List = new ArrayList<String>();\n\t\tList<EntityRelationshipType> children = entityRelationshipTypeRepository\n\t\t\t\t.findByEntityId1AndDeletedAndStatus(Arrays.asList(entityId));\n\t\tList<EntityRelationshipType> parents = entityRelationshipTypeRepository\n\t\t\t\t.findByEntityId2AndDeleted(Arrays.asList(entityId));\n\t\tparents.stream().forEach(getIndividualEntityId2 -> {\n\t\t\tif ((getRelationTypeId(getIndividualEntityId2).equals(LOSEntityConstants.OWNER)\n\t\t\t\t\t|| getRelationTypeId(getIndividualEntityId2).equals(LOSEntityConstants.OWNED))\n\t\t\t\t\t&& getIndividualEntityId2.getEntityId2().endsWith(LOSEntityConstants.INDIVIDUAL_SUFFIX_CODE)) {\n\t\t\t\tindividualEntityId2List.add(getIndividualEntityId2.getEntityId2());\n\t\t\t} else if (getIndividualEntityId2.getEntityId2().endsWith(LOSEntityConstants.COMMERCIAL_SUFFIX_CODE)\n\t\t\t\t\t&& (getRelationTypeId(getIndividualEntityId2).equals(LOSEntityConstants.SUBSIDIARY)\n\t\t\t\t\t\t\t|| getRelationTypeId(getIndividualEntityId2).equals(LOSEntityConstants.AFFILIATED)\n\t\t\t\t\t\t\t|| getRelationTypeId(getIndividualEntityId2).equals(LOSEntityConstants.OWNER))) {\n\t\t\t\tcommercialEntityId2List.add(getIndividualEntityId2.getEntityId2());\n\t\t\t}\n\t\t});\n\t\tchildren.forEach(getEntityId2 -> {\n\t\t\tif (!childrenEntityId2List.contains(getEntityId2.getEntityId2())) {\n\t\t\t\tchildrenEntityId2List.add(getEntityId2.getEntityId2());\n\t\t\t}\n\t\t});\n\t\tif (!individualEntityId2List.isEmpty() || !childrenEntityId2List.isEmpty()\n\t\t\t\t|| !commercialEntityId2List.isEmpty()) {\n\t\t\treturn checkEntityIdsList(entityId, relationList, owner, owned, affilated, subsidary, affialiateDataList,\n\t\t\t\t\tindividualEntityId2List, commercialEntityId2List, childrenEntityId2List, children, parents);\n\t\t} else {\n\t\t\tchild.addAll(children);\n\t\t\tchild.addAll(parents);\n\t\t}\n\t\treturn child;\n\t}",
"public static boolean isArray_parentId() {\n return false;\n }",
"List<Address> findByStateIn(List<String> stateList);",
"public static Map<String, String> getSubCategories(String parent) throws SQLException \n\t{\n\t\tHashMap<String, String> table = new HashMap<String, String>();\n\t\t\n\t\tConnection conn = DBConnector.getInstance().getConn();\n\t\t\n\t\tString sql = \"SELECT * FROM mhtc_sch.getCategories(FALSE, ?)\";\n\t\tPreparedStatement pstatement = conn.prepareStatement(sql);\n\t\tpstatement.setInt(1, Integer.parseInt(parent));\n\t\tResultSet rs = pstatement.executeQuery();\n\t\t\n\t\twhile (rs.next()) \n\t\t{\n\t\t\tString categoryID = rs.getString(\"Id\").toLowerCase();\n\t\t\tString categoryName = rs.getString(\"Name\");\n\t\t\ttable.put(categoryName, categoryID);\n\t\t}\n\t\t\n\t\treturn table;\n\t}",
"@Query(\"select i from Item i where lower(i.name) like lower(:namePart)\")\n List<Item> searchInNames(@Param(\"namePart\") String namePart);",
"@Cacheable(value = \"codeList\",key = \"#parentId\")\n List<CodeTable> getListByParent(String parentId);",
"public NestedClause getXQueryClause();",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }",
"public static ArrayList<Node> findChildrenOfNode(Node parent, Label label) {\n\t\tArrayList<Node> result = new ArrayList<Node>();\n\t\tfor (Relationship rel : parent.getRelationships(Direction.OUTGOING)) {\n\t\t\tNode child = rel.getOtherNode(parent);\n\t\t\tif (child.hasLabel(label)) {\n\t\t\t\tresult.add(child);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}"
] | [
"0.56123245",
"0.5434004",
"0.52708167",
"0.515932",
"0.51325494",
"0.51197124",
"0.50158757",
"0.49833155",
"0.4966892",
"0.49497265",
"0.48450148",
"0.4836772",
"0.47688687",
"0.47636294",
"0.4730744",
"0.46828094",
"0.46824026",
"0.4671445",
"0.4666392",
"0.46577996",
"0.4627901",
"0.46270204",
"0.46223536",
"0.46181616",
"0.46097824",
"0.45992285",
"0.4578462",
"0.45752388",
"0.45745423",
"0.45689338",
"0.4550919",
"0.4536683",
"0.45343813",
"0.4533867",
"0.45230797",
"0.45220575",
"0.4519627",
"0.4518908",
"0.45032057",
"0.44964913",
"0.44903237",
"0.44776773",
"0.44755575",
"0.4469519",
"0.44681516",
"0.4467967",
"0.4464991",
"0.4454336",
"0.44476748",
"0.44447878",
"0.44340724",
"0.44335327",
"0.44216216",
"0.44198996",
"0.44178104",
"0.4416086",
"0.44100717",
"0.43994457",
"0.4398116",
"0.4397876",
"0.4397203",
"0.43880934",
"0.43821108",
"0.43805358",
"0.43793792",
"0.4352709",
"0.4346771",
"0.4344946",
"0.43419585",
"0.43393642",
"0.43288752",
"0.43178657",
"0.43035504",
"0.4287322",
"0.42811766",
"0.4274921",
"0.4265536",
"0.4255585",
"0.42521504",
"0.42466012",
"0.42409855",
"0.4240645",
"0.4235423",
"0.42311117",
"0.4227086",
"0.42234215",
"0.4219322",
"0.4216907",
"0.42154",
"0.42150316",
"0.42111784",
"0.42073625",
"0.42065343",
"0.42058006",
"0.42025685",
"0.41991284",
"0.4196871",
"0.4195567",
"0.4194144",
"0.41916737"
] | 0.46387455 | 20 |
Fetch records that have strategies IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByStrategies(String... values) {
return fetch(Route.ROUTE.STRATEGIES, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"long findValues(List<Object> values, List<Column> columns);",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"@Override\n public List<StorePickStatus> queryByList(QueryParam params) {\n return getSqlSession().getMapper(StorePickStatusDao.class).queryByList(params);\n }",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"boolean hasContains();",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values));\n }",
"public List getValidarSapExistencia(Map criteria);",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"List<Providers> selectByExample(ProvidersExample example);",
"@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }",
"@Query(\"SELECT e.stations FROM EmployeeEntity e where e.id in :employeeId\")\n List<StationEntity> getStationsOfEmployee(@Param(\"employeeId\") long employeeId);",
"@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);",
"boolean hasConditionList();",
"List<CommonQuestionStrategyType> selectByExample(CommonQuestionStrategyTypeExample example);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values),limit);\n }",
"Collection<? extends WrappedIndividual> getContains();",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"List<Object[]> findBySql(String sql, final Object... objects);",
"public static List<Handset> search(Map<String, String> reqParam) {\n\n\t\tList<Handset> temp = new ArrayList<Handset>();\n\t\ttemp.addAll(cache.values());\n\n\t\tfor (String param : reqParam.keySet()) {\n\t\t\tString val = (String) reqParam.get(param);\n\n\t\t\tswitch (param) {\n\t\t\tcase \"priceEur\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getPriceEur() == Integer.parseInt(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sim\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getSim().toLowerCase().contains(val.toLowerCase()))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"announceDate\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getAnnounceDate().equalsIgnoreCase(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\ttemp = new ArrayList<Handset>();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"filtered handset size \" + temp.size());\n\t\treturn temp;\n\n\t}",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"long countByIdInAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values));\n }",
"public UsState[] findByDynamicWhere(String sql, Object[] sqlParams) throws UsStateDaoException;",
"public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"public static List<Apn> query(Context context) {\n String[] simCodes = getSimOperatorCodes(context);\n String[] networkCodes = getNetworkOperatorCodes(context);\n\n Set<Apn> resultSet = new HashSet<>();\n resultSet.addAll(query(context, simCodes[0], simCodes[1]));\n resultSet.addAll(query(context, networkCodes[0], networkCodes[1]));\n\n List<Apn> result = new ArrayList<>(resultSet.size());\n result.addAll(resultSet);\n return result;\n }",
"List<Online> selectByExample(OnlineExample example);",
"List<SupplyNeed> selectByExample(SupplyNeedExample example);",
"List<ConfigData> selectByExample(ConfigDataExample example);",
"public LinkedHashSet<Integer> getCasesMatchingValueSet(String indexName, String[] targetValueSet) {\n String[] args = new String[1 + targetValueSet.length];\n args[0] = indexName;\n for (int i = 0; i < targetValueSet.length; ++i) {\n args[i + 1] = targetValueSet[i];\n }\n String inSet = getArgumentBasedVariableSet(targetValueSet.length);\n\n String whereExpr = String.format(\"%s = ? AND %s IN %s\", COL_INDEX_NAME, COL_INDEX_TARGET, inSet);\n\n if (SqlStorage.STORAGE_OUTPUT_DEBUG) {\n String query = String.format(\"SELECT %s FROM %s WHERE %s\", COL_CASE_RECORD_ID, TABLE_NAME, whereExpr);\n DbUtil.explainSql(db, query, args);\n }\n\n Cursor c = db.query(TABLE_NAME, new String[]{COL_CASE_RECORD_ID}, whereExpr, args, null, null, null);\n LinkedHashSet<Integer> ret = new LinkedHashSet<>();\n\n SqlStorage.fillIdWindow(c, COL_CASE_RECORD_ID, ret);\n return ret;\n }",
"List<Student> selectByExample(StudentCriteria example);",
"List<?> query(Object inputObject, Settings settings);",
"List<Engine> selectByExample(EngineExample example);",
"public PaypalIpn[] findWhereValsEquals(String vals) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE vals = ? ORDER BY vals\", new Object[] { vals } );\r\n\t}",
"List<Address> findByStateIn(List<String> stateList);",
"List<StatusByUser> selectByExample(StatusByUserExample example);",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);",
"List<EmpTaskInfo> queryEmpTasksByCond(Map paramMap);",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public FeatureCursor queryFeatures(GeometryEnvelope envelope,\n Map<String, Object> fieldValues) {\n return featureDao.queryIn(queryIdsSQL(envelope), fieldValues);\n }",
"public LearningResultHasActivity[] findByDynamicWhere(String sql, Object[] sqlParams) throws LearningResultHasActivityDaoException;",
"public List<ViewXwZqkh> Query(String filters, String orders, Object... values);",
"public List<DomainObject> getListByKeyandValue(String colname, List<Object> keyValue) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.in(colname, keyValue));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue with List<Values> Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"Collection<Long> filterByTaxon( Collection<Long> ids, Taxon taxon );",
"public Map<Integer, Boolean> getContains(Geometry geom) throws SQLException {\n return retrieveExpected(createNativeContainsStatement(geom), BOOLEAN);\n }",
"public EvaluationsDegree[] findByDynamicWhere(String sql, Object[] sqlParams) throws EvaluationsDegreeDaoException;",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"public boolean containsAny(ISelect s){\r\n return false;\r\n }",
"public List<Usuario> findWhere(Map<String, String> params){\n try {\n QueryBuilder<Usuario, Integer> queryBuilder = dao.queryBuilder();\n Where<Usuario, Integer> where = queryBuilder.where();\n\n for(Map.Entry<String, String> param: params.entrySet()) {\n where.eq(param.getKey(), param.getValue());\n }\n\n where.and(params.size());\n PreparedQuery<Usuario> preparedQuery = queryBuilder.prepare();\n return dao.query(preparedQuery);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return null;\n }",
"List<Object[]> findByHql(String hql, final Object... objects) ;",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"public List<Transaction> idAndTypefilterTransaction(Predicate<Transaction> typeStrategy,\n Predicate<Transaction> idStrategy) throws ParseException {\n return processAllTransaction().getTransactionList().stream().filter(typeStrategy).filter(idStrategy).collect(Collectors.toList());\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);",
"List<Customers> selectByCustomers(Customers customers);",
"public PreferenceBean[] loadByWhere(String where, int[] fieldList) throws SQLException\n {\n String sql = null;\n if(fieldList == null)\n sql = \"select \" + ALL_FIELDS + \" from preference \" + where;\n else\n {\n StringBuffer buff = new StringBuffer(128);\n buff.append(\"select \");\n for(int i = 0; i < fieldList.length; i++)\n {\n if(i != 0)\n buff.append(\",\");\n buff.append(FIELD_NAMES[fieldList[i]]);\n }\n buff.append(\" from preference \");\n buff.append(where);\n sql = buff.toString();\n buff = null;\n }\n Connection c = null;\n Statement pStatement = null;\n ResultSet rs = null;\n java.util.ArrayList v = null;\n try \n {\n c = getConnection();\n pStatement = c.createStatement();\n rs = pStatement.executeQuery(sql);\n v = new java.util.ArrayList();\n while(rs.next())\n {\n if(fieldList == null)\n v.add(decodeRow(rs));\n else\n v.add(decodeRow(rs, fieldList));\n }\n\n return (PreferenceBean[])v.toArray(new PreferenceBean[0]);\n }\n finally\n {\n if (v != null) { v.clear(); }\n getManager().close(pStatement, rs);\n freeConnection(c);\n }\n }",
"boolean hasOnlyProceduresInAnyValues();",
"public void processLargeInList(Set values);",
"public interface CustomerSubsetFilterStrategy {\r\n Set<Customer> applyFilter(List<Customer> customers);\r\n}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_BY.in(values));\n }",
"io.dstore.values.BooleanValue getOnlyProceduresInAnyValues();",
"private int[] matches(int[] partition, int feature, boolean value) {\r\n\t\t// to allocate the array we first check how many samples we're talking\r\n\t\t// about\r\n\t\tint nMatches = 0;\r\n\t\tfor (int i = 0; i < partition.length; i++) {\r\n\t\t\tif (input[partition[i]][feature] == value)\r\n\t\t\t\tnMatches++;\r\n\t\t}\r\n\t\tint[] subset = new int[nMatches]; // allocate the array holding the\r\n\t\t\t\t\t\t\t\t\t\t\t// matching sample indices\r\n\t\tint cnt = 0;\r\n\t\t// collect the matching samples\r\n\t\tfor (int i = 0; i < partition.length; i++) {\r\n\t\t\tif (input[partition[i]][feature] == value)\r\n\t\t\t\tsubset[cnt++] = partition[i];\r\n\t\t}\r\n\t\treturn subset;\r\n\t}",
"public List getValidarCuvExistencia(Map criteria);",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }",
"List<Blacklist> selectByExample(BlacklistExample example);",
"List<Destinations> selectByExample(DestinationsExample example);",
"boolean contains();",
"public List<Product> findAllEnabled();",
"@Override\n public List<StorePickStatus> queryByListStore(QueryParam params) {\n return getSqlSession().getMapper(StorePickStatusDao.class).queryByListStore(params);\n }",
"public Cliente[] findByDynamicWhere(String sql, Object[] sqlParams) throws ClienteDaoException;",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values),limit);\n }",
"List<Accessprofile> listWithCriteras(List<SearchCriteria> searchCriterias);",
"List<UserGift> selectByExample(UserGiftCriteria example);",
"public Cliente[] findWhereEstadoEquals(String estado) throws ClienteDaoException;",
"List<SkuAvailability> lookupSKUAvailability(List<Long> skuIds, boolean realTime);",
"public FeatureCursor queryFeatures(boolean distinct,\n GeometryEnvelope envelope, Map<String, Object> fieldValues) {\n return featureDao.queryIn(distinct, queryIdsSQL(envelope), fieldValues);\n }",
"public List<Employee> findEmployeesForServiceBySkills(Set<EmployeeSkill> skills) {\n Set<EmployeeSkill> employeeSkills = skills;\n List<Employee> employeeAvailable = new ArrayList<>();\n\n List<Employee> allEmployees = employeeRepository.findAll();\n for (Employee employee: allEmployees) {\n Set<EmployeeSkill> intersectionSkills = new HashSet<>();\n intersectionSkills.addAll(employeeSkills);\n intersectionSkills.retainAll(employee.getSkills());\n\n // Check if employee is available on given days and posses certain skills\n if(intersectionSkills.size() == employeeSkills.size()) {\n employeeAvailable.add(employee);\n }\n }\n\n return employeeAvailable;\n }",
"Pair<Boolean, List<Result>> execQuery(int matchLimit);",
"@Query(\"\"\"\n SELECT COUNT (DISTINCT p) FROM ProgrammingExerciseStudentParticipation p\n JOIN p.submissions s\n WHERE p.exercise.assessmentType <> 'AUTOMATIC'\n AND p.exercise.id IN :exerciseIds\n AND s.submitted = TRUE\n AND (s.type <> 'ILLEGAL' OR s.type IS NULL)\n \"\"\")\n long countAllSubmissionsByExerciseIdsSubmitted(@Param(\"exerciseIds\") Set<Long> exerciseIds);",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAll(String field, String... values);",
"List<Trueorfalse> selectByExample(RowBounds rowBounds);",
"public List<IndicatorCriteria> getIndicatorCriteriasByAgencyOid(Long agencyOid);",
"private List<AjouterFacetValue> filterSelectedFacetValues(List<FacetValue> pSelectedFacetValues,\n List<FacetValueNode> pAjouterFacetValueNodeList) {\n List<AjouterFacetValue> filteredFacetValues = new LinkedList<AjouterFacetValue>();\n AjouterFacetValue ajFacetValue = null;\n for (FacetValueNode fvn : pAjouterFacetValueNodeList) {\n \tboolean contains = false;\n \tFacetValue facetValue = fvn.getFacetValue();\n for (FacetValue selectedFacetValues : pSelectedFacetValues) {\n\t\t\t\tif (selectedFacetValues instanceof DisjunctionMultiValue) {\n\t\t\t\t\tDisjunctionMultiValue dfv = (DisjunctionMultiValue) selectedFacetValues;\n\t\t\t\t\tObject[] dfvls = dfv.getValues();\n\t\t\t\t\tfor (Object object : dfvls) {\n Object value = facetValue instanceof FacetDisjunctionMultiValue ? ((FacetDisjunctionMultiValue)facetValue).getSingleValue() : \n facetValue instanceof RangeFacetDisjunctionMultiValue ? ((RangeFacetDisjunctionMultiValue)facetValue).getSingleValue() : \n facetValue.getValue();\n if (object.equals(value)) {\n\t\t\t\t\t\t\tcontains = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (selectedFacetValues.equals(facetValue)) {\n\t\t\t\t\t\tcontains = true;\n\t\t\t\t\t\tbreak;\n }\n\t\t\t\t}\n\t\t\t}\n \tajFacetValue = new AjouterFacetValue(facetValue, contains);\n \t\tfilteredFacetValues.add(ajFacetValue);\n \t/*if (!contains) {\n \t\tajFacetValue = new AjouterFacetValue(fvn.getFacetValue(), false);\n \t\tfilteredFacetValues.add(ajFacetValue);\n \t}*/\n /*if (!pSelectedFacetValues.contains(fvn.getFacetValue())) {\n ajFacetValue = new AjouterFacetValue(fvn.getFacetValue(), false);\n filteredFacetValues.add(ajFacetValue);\n }*/\n }\n\n return filteredFacetValues;\n }",
"List<Shareholder> selectByExample(ShareholderExample example);",
"@Query(\"select l from Location l where idLocation not in (select location.idLocation from LocationStore lo)\")\n List<Location> findAvailableLocation();",
"List findByFilterText(Set<String> words, boolean justIds);",
"@Query(value = \"select count(*) from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1\", nativeQuery = true)\n long countByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids);",
"List<InspectionAgency> selectByExample(InspectionAgencyExample example);",
"java.util.List<java.lang.Integer> getRequestedValuesList();",
"@Override\n\tpublic boolean hasNext() {\n\t\tthis.res = new Row();\n\t\ttry{\n\t\t\twhile(index < dataCopy.size()){\n\t\t\t\tdata2 = dataCopy.get(index++);\t\t\t\t\t\t\t\n\t\t\t\tif(whereExp != null && !eval1.eval(whereExp).toBool()) continue;\t\n\t\t\t\t\n\t\t\t\tTableContainer.orderByData.add(new Row());\n\t\t\t\tfor(PrimitiveValue v : data2.rowList)\n\t\t\t\t\tTableContainer.orderByData.get(count).rowList.add(v);\t\n\t\t\t\tcount++;\n\t\t\t\n\t\t\t\t/*if the query is SELECT * FROM R*/\n\t\t\t\tif(flag2){\n\t\t\t\t\tres = data2;\n\t\t\t\t}else{\n\t\t\t\t\t/*if it is the regular query*/\n\t\t\t\t\tfor (int i = 0; i < itemLen; i++) res.rowList.add(eval1.eval((selectItemsExpression.get(i))));\n\t\t\t\t}\n\t\t\t\treturn true;\t\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 false;\n\t}"
] | [
"0.623752",
"0.5537785",
"0.526101",
"0.52357674",
"0.5015092",
"0.5013957",
"0.50032496",
"0.5002032",
"0.49766982",
"0.4894526",
"0.48917913",
"0.48875314",
"0.48873428",
"0.48680946",
"0.48573977",
"0.48523358",
"0.48435462",
"0.480912",
"0.47980568",
"0.4773305",
"0.47200307",
"0.4711539",
"0.47047737",
"0.4690814",
"0.4687943",
"0.46601063",
"0.4656426",
"0.4649804",
"0.46457666",
"0.46253088",
"0.46016973",
"0.4601225",
"0.4596789",
"0.4594731",
"0.45839858",
"0.45797998",
"0.4572599",
"0.4564217",
"0.45636812",
"0.45620427",
"0.45609775",
"0.4559389",
"0.4558989",
"0.4546513",
"0.45462418",
"0.45396036",
"0.45387268",
"0.45386583",
"0.4533792",
"0.45289078",
"0.45253444",
"0.4521265",
"0.45176816",
"0.45161915",
"0.45066816",
"0.45010155",
"0.4496792",
"0.44904155",
"0.44824988",
"0.4481906",
"0.44786158",
"0.44779736",
"0.44751894",
"0.44632977",
"0.4455242",
"0.445417",
"0.44521558",
"0.44396457",
"0.44372663",
"0.44362706",
"0.44304258",
"0.4430014",
"0.44269285",
"0.44250262",
"0.4419401",
"0.44178507",
"0.4416584",
"0.4414588",
"0.44094926",
"0.4406283",
"0.44060656",
"0.4405829",
"0.4401269",
"0.43970725",
"0.43916923",
"0.43897516",
"0.43864432",
"0.43859053",
"0.43844464",
"0.43811318",
"0.43784693",
"0.43752268",
"0.43749115",
"0.4370501",
"0.43696827",
"0.4369605",
"0.43688488",
"0.43686032",
"0.4366692",
"0.43598223",
"0.43584725"
] | 0.0 | -1 |
Fetch records that have order IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByOrder(Integer... values) {
return fetch(Route.ROUTE.ORDER, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public Iterable<Order> getOrdersByCheckInOrStatus(Business business, Key<CheckIn> checkInKey, String status) {\n\t\t//Return empty list if we have no checkin\n\t\tif(checkInKey == null)\n\t\t\treturn new ArrayList<Order>();\n\t\tQuery<Order> query = orderRepo.query().ancestor(business).filter(\"checkIn\", checkInKey); \n\t\t\n\t\tif(status != null && !status.isEmpty()) {\n\t\t\t// Filter by status if set.\n\t\t\tquery = query.filter(\"status\", status.toUpperCase());\n\t\t}\n\t\telse {\n\t\t\t// Only retrieve placed or retrieved orders.\n\t\t\tquery.filter(\"status in\", EnumSet.of(OrderStatus.PLACED, OrderStatus.RECEIVED));\n\t\t}\n\t\t\n\t\treturn query;\n\t}",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@Query(\"SELECT DISTINCT obj FROM Order obj JOIN FETCH obj.products \" \r\n\t\t\t\t+ \" WHERE obj.status = 0 ORDER BY obj.moment ASC\" )\r\n\tList<Order> findOrdersWithProducts();",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"@Override\n\tpublic List<OrderIn> findList(Map<String, Object> queryMap) {\n\t\treturn orderInDao.findList(queryMap);\n\t}",
"List<Order> selectByExample(OrderExample example);",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndIdInIsActiveTrue(@Param(\"type\") String type,@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"public static List<Contains> getContainsByOrderID(int orderID) throws ClassNotFoundException\n {\n List<Contains> allContains = new ArrayList<>();\n try\n {\n try (Connection con = CS360DB.getConnection();\n Statement stmt = con.createStatement())\n {\n\n StringBuilder insQuery = new StringBuilder();\n\n insQuery.append(\"SELECT * FROM contains \")\n .append(\" WHERE \")\n .append(\" orderID = \").append(\"'\").append(orderID).append(\"';\");\n\n stmt.execute(insQuery.toString());\n\n ResultSet res = stmt.getResultSet();\n\n while (res.next() == true)\n {\n Contains contains = new Contains();\n contains.setOrderID(Integer.valueOf(res.getString(\"orderID\")));\n contains.setProductID(Integer.valueOf(res.getString(\"productID\")));\n contains.setQuantity(Integer.valueOf(res.getString(\"quantity\")));\n allContains.add(contains);\n }\n\n // Close connection\n stmt.close();\n con.close();\n }\n\n }\n catch (SQLException ex)\n {\n // Log exception\n Logger.getLogger(Contains.class.getName()).log(Level.SEVERE,null,ex);\n }\n\n return allContains;\n }",
"@Query(value = \"select * from chat_room cr where cr.cr_type=:type and cr.cr_name=:name and cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\", nativeQuery = true)\n List<ChatRoomModel> findByTypeAndNameAndIdInIsActiveTrue(@Param(\"type\") String type, @Param(\"name\") String name, @Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"List<Order> findOrdersByParameters(Map<String, Object> orderParameters) throws DaoProjectException;",
"public abstract List<CustomerOrder> findAll(Iterable<Long> ids);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values));\n }",
"long findValues(List<Object> values, List<Column> columns);",
"public List<ViewXwZqkh> Query(String filters, String orders, Object... values);",
"Collection<Long> filterByTaxon( Collection<Long> ids, Taxon taxon );",
"public List<?> queryByCriteria(List<String> fields, List<Object> values,\n List<String> operands, String orderBy, boolean orderAscending)\n throws DataAccessLayerException {\n return queryByCriteria(fields, values, operands, null, orderBy,\n orderAscending);\n }",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"List<R_order> selectByExample(R_orderExample example);",
"public abstract Page<CustomerOrder> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);",
"List<Orderall> selectByExample(OrderallExample example);",
"long countByIdInAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids);",
"List<ExchangeOrder> selectByExample(ExchangeOrderExample example);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values),limit);\n }",
"List<Address> findByStateIn(List<String> stateList);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values));\n }",
"@Override\r\n\tpublic List<OrderDomain> findByWhere(OrderDomain orderDomain) {\n\t\treturn getPersistanceManager().find(getNamespace() + \".findByWhere\", orderDomain);\r\n\t}",
"@Query(value = \"select * from chat_room cr where cr.cr_id in :ids and cr.cr_is_active=1 order by cr.cr_created_date desc limit :offset,:count\",nativeQuery = true)\n List<ChatRoomModel> findByIdsAndIsActiveTrue(@Param(\"ids\") List<BigInteger> ids, @Param(\"offset\") int offset, @Param(\"count\") int count);",
"public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }",
"public List<Orders> findOrder(Map<String, Object> params);",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findByIV_FO_TOR_ID(java.lang.String IV_FO_TOR_ID, int skip, int take)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByIV_FO_TOR_ID\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \" x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x.\\\"_rf\\\"\"\n + \",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bl\\\" = ?)\";\n _selectSQL = \"select \" + _selectSQL;\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FO_TOR_ID,\n };\n com.sybase.collections.GenericList<Object> res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, skip, take, ru.terralink.mvideo.sap.Orders.class);\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"List<BusnessOrder> selectByExample(BusnessOrderExample example);",
"List<OrderDetail> selectByExample(OrderDetailExample example);",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findByIV_FU_TOR_ID(java.lang.String IV_FU_TOR_ID, int skip, int take)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.findByIV_FU_TOR_ID\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \" x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x.\\\"_rf\\\"\"\n + \",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" FROM \\\"mvideo5_1_0_orders\\\" x WHERE (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"bm\\\" = ?)\";\n _selectSQL = \"select \" + _selectSQL;\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"string\"),\n };\n Object[] values = new Object[] { \n IV_FU_TOR_ID,\n };\n com.sybase.collections.GenericList<Object> res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, skip, take, ru.terralink.mvideo.sap.Orders.class);\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_BY.in(values));\n }",
"List<UserOrder> findUserOrdersByUserId(Long userId);",
"List<ClOrderInfo> selectByExample(ClOrderInfoExample example);",
"List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);",
"Orderall selectByPrimaryKey(String orderid);",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"List<Order> selectAll(int userid);",
"@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"boolean hasOrderByDataItem();",
"public List<Produto> findByIdIn(Integer... ids);",
"@Override\n public List<PrescriptionRecord> findListByParams(Map map) {\n Map<String, Object> param = new HashMap<String, Object>(map);\n \n String sort = (String) map.get(\"sortType\");\n if(sort!=null) {\n param.put(\"sortType\", sort);\n }else {\n param.put(\"sortType\", \"DESC\");\n }\n \n List<ShardMeta> shardMetas = generateShardMetas();\n Integer pageSize = (Integer) param.get(\"pageSize\");\n boolean findRange = StringUtils.isBlank((String) param.get(\"orderNo\")) && pageSize != null;\n Integer startNum = findRange ? (Integer) param.get(\"startNum\") : 0;\n Integer subStartNum = startNum / shardMetas.size();\n \n List<PrescriptionRecord> allOrders = new ArrayList<PrescriptionRecord>();\n try {\n // 指定订单号则跳过\n if (findRange) {\n param.put(\"subStartNum\", subStartNum);\n // 提交第一次查询,查询每个分片的订单范围\n List<Future<List<Long>>> rangeTasks = submitRangeQuery(param, shardMetas, queryPool);\n long minTime = Long.MAX_VALUE;\n long maxTime = Long.MIN_VALUE;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n // 根据每个分片的订单范围计算出全局的订单范围\n for (int i = 0; i < rangeTasks.size(); i++) {\n ShardMeta shardMeta = iterator.next();\n List<Long> timestamps = rangeTasks.get(i).get();\n if (timestamps.isEmpty()) {\n continue;\n }\n \n shardMeta.setMaxTime(timestamps.get(0));\n shardMeta.setMinTime(timestamps.get(timestamps.size() - 1));\n if (maxTime < shardMeta.getMaxTime()) {\n maxTime = shardMeta.getMaxTime();\n }\n if (minTime > shardMeta.getMinTime()) {\n minTime = shardMeta.getMinTime();\n }\n }\n param.put(\"startTime\", minTime);\n param.put(\"endTime\", maxTime);\n }\n \n // 提交第二次查询,查询每个分片符合范围的订单\n List<Future<List<PrescriptionRecord>>> orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n int offset = 0;\n Iterator<ShardMeta> iterator = shardMetas.iterator();\n List<ShardMeta> offsetShards = new ArrayList<ShardMeta>();\n // 合并所有分片的结果\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks) {\n ShardMeta shardMeta = iterator.next();\n List<PrescriptionRecord> orderViews = orderTask.get();\n if (findRange) {\n if (shardMeta.getMaxTime() == Long.MIN_VALUE) {\n offsetShards.add(shardMeta);\n } else {\n int shardAheadCount = getAheadCount(orderViews, shardMeta.getMaxTime());\n // 累加全局偏移量\n offset += subStartNum - shardAheadCount;\n // 删除不需要后补齐查询的分片信息\n if (orderViews.size() - shardAheadCount < pageSize)\n iterator.remove();\n }\n }\n allOrders.addAll(orderViews);\n }\n \n if (!findRange || allOrders.isEmpty())\n return allOrders;\n /*\n // 进行分片偏移量查询\n if (!offsetShards.isEmpty()) {\n Object startTime = param.get(\"startTime\");\n param.put(\"startTime\", param.get(\"endTime\"));\n param.put(\"endTime\", map.get(\"endTime\"));\n \n List<Future<Long>> offsetTasks = submitOffsetQuery(param, offsetShards, queryPool);\n for (Future<Long> offsetTask : offsetTasks)\n offset += offsetTask.get();\n \n param.put(\"startTime\", startTime);\n }\n \n // 进行第三次查询\n int targetOffset = startNum - offset;\n int endIndex = targetOffset + pageSize;\n if (endIndex > allOrders.size() && !shardMetas.isEmpty()) {\n int backfill = endIndex - allOrders.size();\n param.put(\"backfill\", backfill);\n param.put(\"endTime\", param.get(\"startTime\"));\n param.put(\"startTime\", map.get(\"startTime\"));\n orderTasks = submitOrderQuery(param, shardMetas, queryPool);\n for (Future<List<PrescriptionRecord>> orderTask : orderTasks)\n allOrders.addAll(orderTask.get());\n }\n \n */\n int targetOffset = startNum;\n int endIndex = startNum + pageSize;\n \n if (allOrders.size() <= targetOffset)\n return Collections.EMPTY_LIST;\n \n \n // 对合并后的结果统一排序,并根据全局偏移量定位分页的第一条订单的偏移量,提取分页结果\n \n sortByCreateTime(allOrders);\n return allOrders.subList(targetOffset, Math.min(endIndex, allOrders.size()));\n } catch (Exception e) {\n e.printStackTrace();\n throw new SystemException(e);\n }\n }",
"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 FeatureCursor queryFeaturesForChunk(\n Map<String, Object> fieldValues, String orderBy, int limit) {\n return featureDao.queryInForChunk(queryIdsSQL(), fieldValues, orderBy,\n limit);\n }",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values),limit);\n }",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"public List<?> queryByCriteria(final List<String> fields,\n final List<Object> values, final List<String> operands,\n final Integer resultCount, final String orderBy,\n final boolean orderAscending) throws DataAccessLayerException {\n return queryByCriteria(fields, values, operands, resultCount, orderBy,\n orderAscending, null);\n }",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpBy(Collection<String> values, int limit) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_BY.in(values),limit);\n }",
"public List<Object> queryByWhere(String col_name, String dto, List<List<Triple>> filter, List<String> keys) {\n\t\tList<Object> res = new ArrayList<Object>();\n\t\tDBCollection dbc = db.getCollection(col_name);\n\t\t// filter\n\t\tBasicDBObject all_ref = new BasicDBObject();\n\t\tDBObject _keys = new BasicDBObject();\n\t\t\n\t\tif(keys != null)\n\t\t\tfor(String key : keys) \n\t\t\t\t_keys.put(key, true);\n\t\t\n\t\tBasicDBList list = new BasicDBList();\n\t\tfor(List<Triple> and : filter) {\n\t\t\tBasicDBObject ref = new BasicDBObject();\n\t\t\tfor(Triple tri : and) {\n\t\t\t\tif(!ref.containsField(tri.key_name)) {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) \n\t\t\t\t\t\tref.put(tri.key_name, tri.value);\n\t\t\t\t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tref.put(tri.key_name, new BasicDBObject(tri.condition, tri.value));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) {\n\t\t\t\t\t\t// TODO It is impossible\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tBasicDBObject bo = (BasicDBObject)ref.get(tri.key_name);\n\t\t\t\t\t\tbo.append(tri.condition, tri.value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // end an \"and\" query\n\t\t\tlist.add(ref);\n\t\t}\n\t\t\n\t\tall_ref.put(\"$or\", list);\n\t\t\n\t\ttry {\n\t DBCursor cur = dbc.find(all_ref, _keys);\n\t \twhile (cur.hasNext()) {\n\t \t\tDBObject doc = cur.next();\n\t \t\ttry {\n\t \t\t\tres.add(Util.deserialize(doc, dto));\n\t \t\t} catch(InvocationTargetException ite) {\n\t \t\t\tite.printStackTrace();\n\t \t\t} \t\t\n\t \t\t//System.out.println(doc);\n\t }\n\n\t\t} catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n\n \treturn res;\n\t}",
"@Override\n\tpublic boolean hasNext() {\n\t\tthis.res = new Row();\n\t\ttry{\n\t\t\twhile(index < dataCopy.size()){\n\t\t\t\tdata2 = dataCopy.get(index++);\t\t\t\t\t\t\t\n\t\t\t\tif(whereExp != null && !eval1.eval(whereExp).toBool()) continue;\t\n\t\t\t\t\n\t\t\t\tTableContainer.orderByData.add(new Row());\n\t\t\t\tfor(PrimitiveValue v : data2.rowList)\n\t\t\t\t\tTableContainer.orderByData.get(count).rowList.add(v);\t\n\t\t\t\tcount++;\n\t\t\t\n\t\t\t\t/*if the query is SELECT * FROM R*/\n\t\t\t\tif(flag2){\n\t\t\t\t\tres = data2;\n\t\t\t\t}else{\n\t\t\t\t\t/*if it is the regular query*/\n\t\t\t\t\tfor (int i = 0; i < itemLen; i++) res.rowList.add(eval1.eval((selectItemsExpression.get(i))));\n\t\t\t\t}\n\t\t\t\treturn true;\t\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 false;\n\t}",
"@Override\n public List<StorePickStatus> queryByList(QueryParam params) {\n return getSqlSession().getMapper(StorePickStatusDao.class).queryByList(params);\n }",
"public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByPublishedIn(java.lang.Integer... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.PUBLISHED_IN, values);\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"public interface OrderRepository extends JpaRepository<Order, Long>{\r\n\t\r\n\t// We need a response containing only PEDDING products ordered from older to new\r\n\t//Using JPQL query (similar to SQL)\r\n\t// After \"FROM\" clause you need to use the class name\r\n\t// JOIN FETCH does a INNER JOIN\r\n\t// The enum type PENDDING corresponds to 0 \r\n\t@Query(\"SELECT DISTINCT obj FROM Order obj JOIN FETCH obj.products \" \r\n\t\t\t\t+ \" WHERE obj.status = 0 ORDER BY obj.moment ASC\" )\r\n\tList<Order> findOrdersWithProducts();\r\n}",
"public final TIntSet query(Envelope envelope) {\n final TIntSet ret = new TIntHashSet();\n visit(envelope, false, (bin, mapKey) -> {\n ret.addAll(bin);\n return false;\n });\n return ret;\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByStatus(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.STATUS.in(values));\n }",
"boolean hasContains();",
"List<State> findStatesBetweenOrders( int nOrder1, int nOrder2, int nIdWorkflow );",
"@Override\n\tpublic List<WxOrder> queryOrderList(PagingDto dto) {\n\t\treturn orderMapper.queryOrderList(dto);\n\t}",
"@Test\n public void testGetOrdersByDate() {\n\n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderListByDate = service.getOrdersByDate(ld);\n List<Order> filteredList = new ArrayList<>();\n\n for (Order currentOrder : orderListByDate) {\n if (currentOrder.getOrderDate().contains(\"06232017\")) {\n filteredList.add(currentOrder);\n }\n }\n\n assertEquals(2, filteredList.size());\n }",
"List<TSortOrder> selectByExample(TSortOrderExample example);",
"public List<DomainObject> getListByKeyandValue(String colname, List<Object> keyValue) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.in(colname, keyValue));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue with List<Values> Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}",
"@Query(value=\"SELECT * FROM users WHERE (status = :status) AND (id IN (SELECT user_id FROM documents))\", nativeQuery = true)\n Page<User> findAuthors(@Param(\"status\") int status, Pageable pageable);",
"List<NjOrderCallbackLog> selectByExample(NjOrderCallbackLogExample example);",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"@Override\n public List<Account> findByleftJoinOrders() {\n QAccount account = QAccount.account;\n QOrder order = QOrder.order;\n return from(account)\n .distinct()\n .leftJoin(account.orders, order).fetchJoin()\n .orderBy(account.id.asc(), order.id.asc())\n .fetch();\n }",
"List selectByExample(OrderPreferentialExample example) throws SQLException;",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface NetraNominationRepository extends NominationRepository{\n\n\n\n @Query(\"select nominations from Nomination nominations where nominations.contract.id in :contractIdList\")\n List<Nomination> findAllNomsByContractIdList(@Param(\"contractIdList\") List<Long> contractIdList);\n\n}",
"List<Customers> selectByCustomers(Customers customers);",
"public interface LogDetailRepository extends CrudRepository<LogDetail, Long> {\n List<LogDetail> findByLogIdIn(List<Long> LogIds);\n\n\n}",
"@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);",
"boolean matches(@NotNull List<OrderConstraintsType> orderConstraints);",
"public Vector findRegionList(\n String searchBy,\n String name,\n Boolean isAllSupregs,\n Integer supregid,\n Integer order)\n throws Exception {\n\n DebugSupport.printlnTest(\"!!RegionObject findRegionList name=\"+name);\t\n Query query = new Query();\n query.append(\n \"SELECT r.regionid regionid, r.regname regname, r.supregid supregid, sr.supregname supregname\");\n query.append(\"FROM Regions r, Superregions sr\");\n query.append(\"WHERE r.supregid=sr.supregid\");\n\n if (searchBy.equals(SearchConstants.SEARCHBY_NAME)) {\n query.append(\"AND r.regname matches upper(?)\", name);\n }\n if (!isAllSupregs.booleanValue()) {\n query.append(\"AND r.supregid=?\", supregid);\n }\n query.append(\"ORDER BY\");\n if (order.intValue() == ORDER_BY_CODE_ASC) {\n query.append(\"1\");\n }else if (order.intValue() == ORDER_BY_CODE_DESC) {\n query.append(\"1 DESC\");\n }else if (order.intValue() == ORDER_BY_SUPREGNAME_ASC) {\n query.append(\"4,2\");\n }else if (order.intValue() == ORDER_BY_SUPREGNAME_DESC) {\n query.append(\"4 DESC,2 DESC\");\n }else if (order.intValue() == ORDER_BY_REGNAME_ASC) {\n query.append(\"2\");\n }else if (order.intValue() == ORDER_BY_REGNAME_DESC) {\n query.append(\"2 DESC\");\n }\n return findVector(query);\n}",
"public ConditionItem in(String fieldName, Object...value) {\n\t\treturn singleCondition(ConditionType.IN, fieldName, value);\n\t}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedAt(Collection<LocalDateTime> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_AT.in(values));\n }",
"public java.util.List<Todo> filterFindByG_S(long groupId, int[] statuses);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByCustomerId(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.CUSTOMER_ID.in(values));\n }",
"public PaypalIpn[] findWhereValsEquals(String vals) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE vals = ? ORDER BY vals\", new Object[] { vals } );\r\n\t}",
"public OpenERPRecordSet getIDSubset(Object[] lst) {\r\n\t\t// bail out\r\n\t\tif (lst == null)\r\n\t\t\treturn null;\r\n\t\tif (lst.length <= 0)\r\n\t\t\treturn null;\r\n\r\n\t\t// get list of IDs as Vector, for .contains\r\n\t\tVector<Integer> idList = new Vector<Integer>();\r\n\t\tfor (int i = 0; i < lst.length; i++) {\r\n\t\t\t// while moving to vector, sort out everything that's not integer\r\n\t\t\ttry {\r\n\t\t\t\tidList.add((Integer) lst[i]);\r\n\t\t\t} catch (ClassCastException cce) {\r\n\t\t\t\tjLog.warning(\"ClassCastException while converting '\" + lst[i]\r\n\t\t\t\t\t\t+ \"' to Integer\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// create record set to return\r\n\t\tOpenERPRecordSet result = new OpenERPRecordSet(null);\r\n\r\n\t\t// look into all records\r\n\t\tIterator<OpenERPRecord> i = records.iterator();\r\n\r\n\t\twhile (i.hasNext()) {\r\n\t\t\tOpenERPRecord r = i.next();\r\n\r\n\t\t\t// only for records that have a key\r\n\t\t\tif (!r.containsKey(\"id\"))\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// if the key is requested\r\n\t\t\tInteger id = (Integer) r.get(\"id\");\r\n\t\t\tif (idList.contains(id)) {\r\n\t\t\t\t// add it to list\r\n\t\t\t\ttry {\r\n\t\t\t\t\tresult.add((OpenERPRecord) r.clone());\r\n\t\t\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\t\t\t// should not happen anyway.\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// return subset\r\n\t\treturn result;\r\n\t}",
"public boolean containsValue(Object value) {\n for (int i = 0; i < size; i++) {\n Entry entry = order[i];\n\n if (eq(value, entry.getValue())) {\n return true;\n }\n }\n\n return false;\n }",
"public List<?> queryByCriteria(List<String> fields, List<Object> values)\n throws DataAccessLayerException {\n return queryByCriteria(fields, values, null, null, null, false);\n }",
"public Iterable<Order> getOrdersBySpot(Business business, Long spotId, Long checkInId) {\n\t\tQuery<Order> query = orderRepo.getOfy().query(Order.class).ancestor(business)\n\t\t\t\t.filter(\"status !=\", OrderStatus.CART.toString());\n\t\t\n\t\tif(checkInId != null) {\n\t\t\tquery = query.filter(\"checkIn\", CheckIn.getKey(checkInId));\n\t\t}\n\n\t\treturn query;\n\t}",
"public interface DemoRepositoryCustom {\n\n List<Demo> findInSet(Collection<Long> ids);\n}",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> getRelationsOrderss_for_Relations(java.lang.Long surrogateKey, int skip, int take)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.getRelationsOrderss_for_Relations\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n \n \n String _selectSQL = \" x.\\\"a\\\",x.\\\"b\\\",x.\\\"c\\\",x.\\\"d\\\",x.\\\"e\\\",x.\\\"f\\\",x.\\\"g\\\",x.\\\"h\\\",x.\\\"i\\\",x.\\\"j\\\",x.\\\"l\\\",x.\\\"m\\\",x.\\\"n\\\",x.\\\"o\\\",x.\\\"p\\\",x.\\\"q\\\",x.\\\"r\\\",x.\\\"s\\\",x.\\\"t\\\",x.\\\"u\\\",x.\\\"v\\\",x.\\\"w\\\",x.\\\"x\\\",x.\\\"y\\\",x.\\\"z\\\",x.\\\"ba\\\",x.\\\"bb\\\",x.\\\"bc\\\",x.\\\"bd\\\",x.\\\"be\\\",x.\\\"bf\\\",x.\\\"bg\\\",x.\\\"bh\\\",x.\\\"bi\\\",x.\\\"bj\\\",x.\\\"bl\\\",x.\\\"bm\\\",x.\\\"pending\\\",x.\\\"_pc\\\",x.\\\"_rp\\\",x.\\\"_rf\\\"\"\n + \",x.\\\"relationsFK\\\",x.\\\"bn\\\",x.\\\"_rc\\\",x.\\\"_ds\\\",x.\\\"cvpOperation_length\\\",x.\\\"cvpOperationLobs_length\\\" from \\\"mvideo5_1_0_orders\\\" x where (((x.\\\"pending\\\" = 1 or not exists (select x_os.\\\"bn\\\" from \\\"mvideo5_1_0_orders_os\\\" x_os where x_os.\\\"bn\\\" = x.\\\"bn\\\")))) and ( x.\\\"relationsFK\\\"=?)\";\n _selectSQL = \"select \" + _selectSQL;\n String[] ids = new String[0];\n com.sybase.reflection.DataType[] dts = new com.sybase.reflection.DataType[]{ \n com.sybase.reflection.DataType.forName(\"long?\"),\n };\n Object[] values = new Object[] { \n surrogateKey,\n };\n com.sybase.collections.GenericList<Object> res = DELEGATE.findWithSQL(_selectSQL, dts, values, ids, skip, take, ru.terralink.mvideo.sap.Orders.class);\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)res;\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpAt(Collection<LocalDateTime> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_AT.in(values));\n }",
"LinkedHashSet<String> getOrderedBeanIds();",
"List<Object[]> findBySql(String sql, final Object... objects);"
] | [
"0.5994353",
"0.5622411",
"0.5497561",
"0.5481641",
"0.5399047",
"0.5332366",
"0.52199215",
"0.5202178",
"0.51885056",
"0.5121144",
"0.5094587",
"0.5088859",
"0.50871825",
"0.50664866",
"0.50297505",
"0.502896",
"0.5025882",
"0.50164616",
"0.5005364",
"0.49926075",
"0.49638513",
"0.496266",
"0.49105382",
"0.49079555",
"0.48853022",
"0.48700905",
"0.4861339",
"0.4854582",
"0.48543826",
"0.48462605",
"0.4838232",
"0.48372754",
"0.48320276",
"0.48204258",
"0.4809235",
"0.480414",
"0.48020646",
"0.47985283",
"0.47906175",
"0.47887018",
"0.4761375",
"0.47527567",
"0.47425842",
"0.47118762",
"0.46921688",
"0.46854144",
"0.46841362",
"0.4677627",
"0.46673045",
"0.46656948",
"0.46595618",
"0.4657293",
"0.46433344",
"0.46416712",
"0.4638371",
"0.46340677",
"0.46330088",
"0.4628652",
"0.4616082",
"0.46036452",
"0.45995355",
"0.45922998",
"0.45922357",
"0.4586911",
"0.4576514",
"0.45751742",
"0.45697996",
"0.4557164",
"0.455393",
"0.4545311",
"0.45392162",
"0.45388776",
"0.45384637",
"0.45365742",
"0.45320985",
"0.45132825",
"0.450695",
"0.44854745",
"0.448362",
"0.4482028",
"0.44794834",
"0.4472965",
"0.44707322",
"0.4469603",
"0.44683734",
"0.4463039",
"0.4450368",
"0.44456473",
"0.44412345",
"0.44402495",
"0.444004",
"0.4439648",
"0.44395378",
"0.4439047",
"0.44363517",
"0.44359204",
"0.4433106",
"0.44230473",
"0.44197497",
"0.44177392",
"0.44174856"
] | 0.0 | -1 |
Fetch records that have target_name IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByTargetName(String... values) {
return fetch(Route.ROUTE.TARGET_NAME, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"public boolean contains(String target){\n\t\treturn list.contains(target);\n\t}",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"public LinkedHashSet<Integer> getCasesMatchingValueSet(String indexName, String[] targetValueSet) {\n String[] args = new String[1 + targetValueSet.length];\n args[0] = indexName;\n for (int i = 0; i < targetValueSet.length; ++i) {\n args[i + 1] = targetValueSet[i];\n }\n String inSet = getArgumentBasedVariableSet(targetValueSet.length);\n\n String whereExpr = String.format(\"%s = ? AND %s IN %s\", COL_INDEX_NAME, COL_INDEX_TARGET, inSet);\n\n if (SqlStorage.STORAGE_OUTPUT_DEBUG) {\n String query = String.format(\"SELECT %s FROM %s WHERE %s\", COL_CASE_RECORD_ID, TABLE_NAME, whereExpr);\n DbUtil.explainSql(db, query, args);\n }\n\n Cursor c = db.query(TABLE_NAME, new String[]{COL_CASE_RECORD_ID}, whereExpr, args, null, null, null);\n LinkedHashSet<Integer> ret = new LinkedHashSet<>();\n\n SqlStorage.fillIdWindow(c, COL_CASE_RECORD_ID, ret);\n return ret;\n }",
"public static boolean in(int target, int... values) {\n for (int v : values) {\n if (target == v) {\n return true;\n }\n }\n return false;\n }",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);",
"public Map<Integer, TargetDef> getTargetQueries();",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAll(String field, String... values);",
"private List<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms, int queryLimit) {\n\t\tList<String> values = new ArrayList<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName, inputAttributeName, inputAttributeKnownTerms, queryLimit);\n\t\tquery += \" LIMIT \" + queryLimit;\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"private Set<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms) {\n\t\tSet<String> values = new HashSet<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName,\n\t\t\t\tinputAttributeName, inputAttributeKnownTerms);\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"private void filter(String text) {\n List<Target> filteredlist = new ArrayList<>();\n // running a for loop to compare elements.\n for (Target item : repositoryList) {\n // checking if the entered string matched with any item of our recycler view.\n if (item.getNameTarget().toLowerCase().contains(text.toLowerCase())) {\n // if the item is matched we are\n // adding it to our filtered list.\n filteredlist.add(item);\n }\n } adapter.updateData(filteredlist);\n }",
"@In String search();",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"public LinkedHashSet<Integer> getCasesMatchingIndex(String indexName, String targetValue) {\n String[] args = new String[]{indexName, targetValue};\n if (SqlStorage.STORAGE_OUTPUT_DEBUG) {\n String query = String.format(\"SELECT %s FROM %s WHERE %s = ? AND %s = ?\", COL_CASE_RECORD_ID, TABLE_NAME, COL_INDEX_NAME, COL_INDEX_TARGET);\n DbUtil.explainSql(db, query, args);\n }\n Cursor c = db.query(TABLE_NAME, new String[]{COL_CASE_RECORD_ID}, COL_INDEX_NAME + \" = ? AND \" + COL_INDEX_TARGET + \" = ?\", args, null, null, null);\n LinkedHashSet<Integer> ret = new LinkedHashSet<>();\n SqlStorage.fillIdWindow(c, COL_CASE_RECORD_ID, ret);\n return ret;\n }",
"public List<User> findUsersByFirstNameContainsOrLastNameContains(String firstName, String lastName);",
"public boolean searchAssignmentInCourse(Assignment targetAssignment) {\n\n for (int i = 0; i < getAssignmentListInCourse().size(); ++i) {\n if (getAssignmentInAssignmentCourseList(i).getAssignmentName() == targetAssignment.getAssignmentName()) {\n return true;\n }\n }\n\n return false;\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAny(String field, String... values);",
"Object getTargetexists();",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> containsAll(EntityField field, String... values);",
"boolean hasContains();",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"public static SetExpression contains(String propertyName, Object[] values) {\n return new SetExpression(Operator.CONTAINS, propertyName, values);\n }",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"private List loadTargetList(HttpServletRequest request) {\n\t\tTargetDao targetDao = (TargetDao) getBean(\"TargetDao\");\n\t\treturn targetDao.getTargets(AgnUtils.getCompanyID(request));\n\t\t\n\t}",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"public boolean matches(String target){\n return symbol.contains(target);\n }",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }",
"List<Destinations> selectByExample(DestinationsExample example);",
"public ConditionItem in(String fieldName, Object...value) {\n\t\treturn singleCondition(ConditionType.IN, fieldName, value);\n\t}",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByUserId(List<String> values) {\n return findManyByCondition(Person.PERSON.USER_ID.in(values));\n }",
"long findValues(List<Object> values, List<Column> columns);",
"public boolean contains(T target);",
"public boolean contains (T target);",
"public boolean contains (T target);",
"public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }",
"public static List<Handset> search(Map<String, String> reqParam) {\n\n\t\tList<Handset> temp = new ArrayList<Handset>();\n\t\ttemp.addAll(cache.values());\n\n\t\tfor (String param : reqParam.keySet()) {\n\t\t\tString val = (String) reqParam.get(param);\n\n\t\t\tswitch (param) {\n\t\t\tcase \"priceEur\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getPriceEur() == Integer.parseInt(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sim\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getSim().toLowerCase().contains(val.toLowerCase()))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"announceDate\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getAnnounceDate().equalsIgnoreCase(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\ttemp = new ArrayList<Handset>();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"filtered handset size \" + temp.size());\n\t\treturn temp;\n\n\t}",
"@Override\r\n\tpublic List<ParamInfo> queryParamInfoByTargetId(String targetId) {\n\t\treturn pm.selectByTargetId(targetId);\r\n\t}",
"public ArrayList<String> SearchForNameIDPath(String searchTarget)\r\n {\r\n //TODO introducer index should be received as an input argument\r\n int INTRODUCER_INDEX = 0;\r\n nameIDsOnPath = new ArrayList<>();\r\n if (SkipSimParameters.getSimulationType().equals(Constants.SimulationType.STATIC))\r\n {\r\n ArrayList<Integer> searchResultSet = new ArrayList<>();\r\n int result = SearchByNameID(searchTarget,\r\n (Node) getTG().mNodeSet.getNode(INTRODUCER_INDEX),\r\n getTG().mNodeSet,\r\n mTopologyGenerator.mNodeSet.getNode(0).getLookup(0, 1),\r\n mTopologyGenerator.mNodeSet.getNode(0).getLookup(0, 0),\r\n 0,\r\n new Message(),\r\n searchResultSet);\r\n }\r\n else\r\n {\r\n for (int i = 0; i < SkipSimParameters.getSystemCapacity(); i++)\r\n {\r\n if (((Node) mTopologyGenerator.mNodeSet.getNode(i)).isOnline() && mTopologyGenerator.mNodeSet.getNode(i).getNameID().equals(searchTarget))\r\n {\r\n nameIDsOnPath.add(searchTarget);\r\n }\r\n }\r\n }\r\n\r\n return nameIDsOnPath;\r\n\r\n }",
"private boolean isTargetGroupInUse(int targetGroupID, Set<String> targetExpressions) {\n\t\tfor(String targetExpression : targetExpressions) {\n\t\t\tSet<Integer> ids = this.targetService.getTargetIdsFromExpressionString(targetExpression);\n\t\t\t\n\t\t\tif(ids.contains(targetGroupID)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"List<Address> findByStateIn(List<String> stateList);",
"List<Cloth> findByNameContaining(String name);",
"public boolean contains(String target)\t\n\t{\n\t\t// searches for the target: O(n).\n\t\tif(head==null) {\n\t\t\treturn false;\n\t\t}\n\t\tint count = 0;\n\t\tnode p = head;\n\t\twhile(p.next != null&&!(p.getData()+\"\").equals(target))\n\t\t{\n\t\t\tp=p.next;\n\t\t}\n\t\tif(p!=null&&(p.getData()+\"\").equals(target))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public DualTableSingleMatchModelQuerySet bulkReadIndexToCaseIdMatch(String indexName, Collection<Integer> cuedCases) {\n DualTableSingleMatchModelQuerySet set = new DualTableSingleMatchModelQuerySet();\n String caseIdIndex = TableBuilder.scrubName(Case.INDEX_CASE_ID);\n\n //NOTE: This is possibly slower than it appears. I think the cast screws up sqlites's\n //ability to do an indexed match\n List<Pair<String, String[]>> whereParamList = TableBuilder.sqlList(cuedCases, \"CAST(? as INT)\");\n for (Pair<String, String[]> querySet : whereParamList) {\n\n String query =String.format(\n \"SELECT %s,%s \" +\n \"FROM %s \" +\n \"INNER JOIN %s \" +\n \"ON %s = %s \" +\n \"WHERE %s = '%s' \" +\n \"AND \" +\n \"%s IN %s\",\n\n COL_CASE_RECORD_ID, ACase.STORAGE_KEY + \".\" + DatabaseHelper.ID_COL,\n TABLE_NAME,\n ACase.STORAGE_KEY,\n COL_INDEX_TARGET, caseIdIndex,\n COL_INDEX_NAME, indexName,\n COL_CASE_RECORD_ID, querySet.first);\n\n android.database.Cursor c = db.rawQuery(query, querySet.second);\n\n try {\n if (c.getCount() == 0) {\n return set;\n } else {\n c.moveToFirst();\n while (!c.isAfterLast()) {\n int caseId = c.getInt(c.getColumnIndexOrThrow(COL_CASE_RECORD_ID));\n int targetCase = c.getInt(c.getColumnIndex(DatabaseHelper.ID_COL));\n set.loadResult(caseId, targetCase);\n c.moveToNext();\n }\n }\n } finally {\n c.close();\n }\n }\n return set;\n }",
"public Future<List<io.remicro.saga.entities.tables.pojos.Person>> findManyByNickName(List<String> values) {\n return findManyByCondition(Person.PERSON.NICK_NAME.in(values));\n }",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"public LearningResultHasActivity[] findWhereNamePhaseEquals(String namePhase) throws LearningResultHasActivityDaoException;",
"public ArrayList<NameRecord> getMatches(String partialName){\n\t\tpartialName=partialName.toLowerCase();\n\t\tArrayList<NameRecord> result = new ArrayList<NameRecord>();\n\t\tfor (int i = 0;i<names.size();i++){\n\t\t\tString s = names.get(i).toLowerCase();\n\t\t\tif (s.contains(partialName)){\n\t\t\t\tresult.add(list.get(i));\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> in(String field, String... values);",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.modelName IN :models\")\n\tList<Car> findAllByBrandAndModel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"models\") Collection<String> model);",
"public List<Employee> findEmployee(String name) {\n\t\tCriteriaQuery<Employee> createQuery = emp.getCriteriaBuilder().createQuery(Employee.class);\n\t\tRoot<Employee> root = createQuery.from(Employee.class);\n\t\tcreateQuery.where(root.get(\"name\").in(name));\n\t\treturn emp.createQuery(createQuery).getResultList();\n\t}",
"@Override\r\n\tpublic List<Map<String, Object>> selectTargetUser(HttpServletRequest request) throws Exception {\n\t\tString target = request.getParameter(\"target\");\r\n\t\tString insa_code = SessionUtil.getSession(\"memberSession\", \"INSA_CODE\");\r\n\t\t\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"target\", target);\r\n\t\tmap.put(\"insa_code\", insa_code);\r\n\t\t\r\n\t\treturn dao.selectTargetUser(map);\r\n\t}",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"List<ProductInfoOutput> findList(List<String> productIdList);",
"private static Set<Dataset> findDatasets(Datasource d, String query) {\n String[] words = query.split(\"\\\\+\");\n Set<String> keyWords = new HashSet<String>();\n for (String word : words) {\n keyWords.add(word.toLowerCase());\n }\n Set<Dataset> ret = new HashSet<Dataset>();\n String tags;\n for (Dataset set : d.getDatasets()) {\n tags = set.getTags();\n if (intersects(tags, keyWords)) {\n ret.add(set);\n }\n } \n return ret;\n }",
"List<E> queryAll(String namedQuery);",
"public List<Product> findByNameIs(String name);",
"protected abstract List performQuery(String[] ids);",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> contains(String field, String propertyValue);",
"public static SetExpression contains(String propertyName, Object value) {\n return contains(propertyName, new Object[] { value });\n }",
"List findByFilterText(Set<String> words, boolean justIds);",
"@Override\r\n\tpublic List<Map<String, Object>> selectTargetList(HttpServletRequest request) throws Exception {\n\r\n\t\tString host = request.getParameter(\"host\");\r\n\t\t\r\n\t\treturn dao.selectTargetList(host);\r\n\t}",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> containsAny(EntityField field, String... values);",
"List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);",
"List<T> findMatches(final String value);",
"public boolean searchDocumentInCourse(Document targetDocument) {\n\n for (int i = 0; i < getDocumentListInCourse().size(); ++i) {\n if (getDocumentInDocumantCourseList(i).getDocumentName() == targetDocument.getDocumentName()) {\n return true;\n }\n }\n\n return false;\n }",
"@PreAuthorize(\"hasPermission('string', 'ALL', new org.jasig.portal.spring.security.evaluator.AuthorizableActivity('UP_PERMISSIONS', 'VIEW_PERMISSIONS'))\")\n @RequestMapping(value=\"/permissions/{activity}/targets.json\", method = RequestMethod.GET)\n public ModelAndView getTargets(@PathVariable(\"activity\") Long activityId,\n @RequestParam(\"q\") String query,\n HttpServletRequest req, HttpServletResponse response)\n throws Exception {\n \n IPermissionActivity activity = permissionOwnerDao.getPermissionActivity(activityId);\n IPermissionTargetProvider provider = targetProviderRegistry.getTargetProvider(activity.getTargetProviderKey());\n \n SortedSet<IPermissionTarget> matchingTargets = new TreeSet<IPermissionTarget>();\n // add matching results for this identifier provider to the set\n Collection<IPermissionTarget> targets = provider.searchTargets(query);\n for (IPermissionTarget target : targets) {\n if ((StringUtils.isNotBlank(target.getName()) && target\n .getName().toLowerCase().contains(query))\n || target.getKey().toLowerCase().contains(query)) {\n matchingTargets.addAll(targets);\n }\n }\n\n ModelAndView mv = new ModelAndView();\n mv.addObject(\"targets\", targets);\n mv.setViewName(\"json\");\n \n return mv;\n }",
"@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }",
"public boolean searchUserInCourse(User targetUser) {\n\n for (int i = 0; i < getUserListInCourse().size(); ++i) {\n if (getUserInUserCourseList(i).getUserName() == targetUser.getUserName()) {\n return true;\n }\n }\n\n return false;\n }",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"Collection<? extends WrappedIndividual> getContains();",
"public void addInFilter(@Nullable String fieldName, @NonNull String values) {\n addInFilter(fieldName, SdkUtils.parseListString(values));\n }",
"public abstract Set<String> getQueryNames();",
"private void setSpectrumIdsTarget(List<String> spectrumIdsTarget)\r\n\t{\r\n\t\tthis.spectrumIdsTarget = spectrumIdsTarget;\r\n\t}",
"boolean hasTargetJobName();",
"private boolean containsName(String name, Human ... human) {\n boolean result = false;\n\n for(Human h : human) {\n if(h.getName().toLowerCase().contains(name.toLowerCase())) {\n result = true;\n break;\n }\n }\n\n return result;\n }",
"private boolean doAllDataSourcesHaveSamples(List<ILogicalOperator> leafInputs, IOptimizationContext context)\n throws AlgebricksException {\n for (ILogicalOperator li : leafInputs) {\n DataSourceScanOperator scanOp = (DataSourceScanOperator) findDataSourceScanOperator(li);\n if (scanOp == null)\n continue;\n Index index = joinEnum.getStatsHandle().findSampleIndex(scanOp, context);\n if (index == null) {\n return false;\n }\n }\n return true;\n }",
"boolean contains(String name);",
"private boolean contains(List<NodeId> array, NodeId searchValue) {\n return array != null && array.contains(searchValue);\n }",
"public String matchIngredientsToRecipes() {\n String query = \"SELECT DISTINCT r.id, r.name, count(RecipeID) AS count FROM recipes AS r JOIN ingredientamount AS i ON r.id = i.RecipeID where i.IngredientID IN (\";\n\n for (int i = 0; i < selectedIngredients.size(); i++) {\n if (i != 0) {\n query = query + \",\";\n }\n query = query + selectedIngredients.get(i);\n }\n query = query + \") GROUP BY RecipeID\";\n return query;\n }",
"@Query(\"SELECT u FROM Car u WHERE u.brandName IN :names AND u.fuel IN :fuels\")\n\tList<Car> findAllByBrandAndFuel(@Param(\"names\") Collection<String> brandName,\n\t\t\t@Param(\"fuels\") Collection<String> fuel);",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }",
"public Artist[] getAllArtistsMatchingQuery(String query) {\n List<Artist> results = new ArrayList<>();\n for(Artist Artist: getArtistList()){\n if(Artist.getName().toLowerCase().contains(query.toLowerCase())){\n results.add(Artist);\n }\n }\n return results.toArray(new Artist[results.size()]);\n }",
"public TaskList matchTasks(String keyword) {\n TaskList matches = new TaskList();\n\n for (int i = 0; i < tasks.size(); i++) {\n Task task = tasks.get(i);\n if (task.toString().contains(keyword)) {\n matches.addTask(task);\n }\n }\n return matches;\n }",
"boolean hasConditionList();",
"public void execute_multipleParameterPredicate_test(int expectedNum, String userInput, String parameter,\n boolean isIgnoreCase, boolean isAnd,\n List<Person> expectedList) throws ParseException {\n String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, expectedNum);\n ContainsKeywordsPredicate predicate = prepareMultiPredicate(isIgnoreCase, isAnd, userInput, parameter);\n PatientFindCommand command = new PatientFindCommand(predicate);\n expectedModel.updateFilteredPersonList(predicate);\n assertCommandSuccess(command, model, commandHistory, expectedMessage, expectedModel);\n assertEquals(expectedList, model.getFilteredPersonList());\n }",
"@Repository\npublic interface SysResourceRepository extends JpaRepository<SysResourceEntity, Integer> {\n @Query(\"SELECT DISTINCT n FROM SysResourceEntity m INNER JOIN SysResourceEntity n ON m.parentId = n.id WHERE m.url IN (:urls)\")\n Set<SysResourceEntity> findByList(@Param(\"urls\") List<String> urls);\n\n Set<SysResourceEntity> findByUrlIn(List<String> urls);\n}",
"@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);",
"public List<Employe> findByEnameInOrEaddIn(List<String> names,List<String> addresses);",
"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 static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }",
"public List<DomainObject> getListByKeyandValue(String colname, List<Object> keyValue) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.in(colname, keyValue));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue with List<Values> Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"List<Resource> selectByExample(ResourceExample example);"
] | [
"0.5647441",
"0.5357605",
"0.5248938",
"0.5234581",
"0.51685697",
"0.51269275",
"0.50926965",
"0.5069323",
"0.4996474",
"0.49833956",
"0.49252182",
"0.48866373",
"0.48582605",
"0.47868297",
"0.47816664",
"0.47769615",
"0.47407338",
"0.4713734",
"0.4702425",
"0.47020867",
"0.46920586",
"0.4688555",
"0.46819028",
"0.4676409",
"0.46483943",
"0.46358755",
"0.46241313",
"0.46036866",
"0.46027875",
"0.46000484",
"0.4587809",
"0.45873952",
"0.45832798",
"0.45768154",
"0.4565575",
"0.45592624",
"0.45579922",
"0.45525265",
"0.45525265",
"0.45519024",
"0.4550823",
"0.4544986",
"0.45432582",
"0.45426527",
"0.45370695",
"0.45077327",
"0.45069665",
"0.4503229",
"0.44824532",
"0.4480632",
"0.44736904",
"0.44709286",
"0.44680077",
"0.44612813",
"0.44590697",
"0.4452791",
"0.44424525",
"0.4438549",
"0.44297734",
"0.44206655",
"0.44202387",
"0.44028732",
"0.44020024",
"0.44014964",
"0.43976495",
"0.43940756",
"0.43929976",
"0.43817893",
"0.43772602",
"0.43772033",
"0.43765748",
"0.4373084",
"0.43679163",
"0.43494567",
"0.43401265",
"0.43384206",
"0.43325457",
"0.43303755",
"0.4330014",
"0.43187103",
"0.43172556",
"0.43094128",
"0.42998973",
"0.42966163",
"0.42944205",
"0.42835653",
"0.4270925",
"0.42662892",
"0.4259413",
"0.42563424",
"0.42562202",
"0.42558402",
"0.4255572",
"0.42491496",
"0.4247674",
"0.42392388",
"0.42342925",
"0.42318335",
"0.42286757",
"0.4224085"
] | 0.46490765 | 24 |
Fetch records that have isDefault IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByIsdefault(Byte... values) {
return fetch(Route.ROUTE.ISDEFAULT, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean testMultiple(Set<Long> selectedSet, int columnId, boolean defaultflag) {\n final Cursor c = mListAdapter.getCursor();\n if (c == null || c.isClosed()) {\n return false;\n }\n c.moveToPosition(-1);\n while (c.moveToNext()) {\n long id = c.getInt(MessagesAdapter.COLUMN_ID);\n if (selectedSet.contains(Long.valueOf(id))) {\n if (c.getInt(columnId) == (defaultflag ? 1 : 0)) {\n return true;\n }\n }\n }\n return false;\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.automatic IN :automatics\")\n\tList<Car> findIsAutomatic(@Param(\"automatics\") boolean automatic);",
"public List<Boolean> getBooleanList(final String key, final List<Boolean> defaultValue) {\n return getList(Boolean.class, key, defaultValue);\n }",
"public boolean isDefaultValue(String lookupValue){\n boolean isDefault = false;\n //get the map value and compare\n if(this.defaultValuesMap.containsValue(lookupValue)){\n \n isDefault = true;\n }\n \n \n return isDefault;\n }",
"List<ConfigData> selectByExample(ConfigDataExample example);",
"public List<String> getOrElse(String key, List<String> defaultValue, boolean isMultiValued) {\n\t\tif (key == null || key.isEmpty()) {\n\t\t\tLOGGER.error(\"getOrElse multivalued requires a non-null/non-empty argument\");\n\t\t\tthrow new IllegalArgumentException(\"getOrElse multivalued requires a non-null/non-empty argument\");\t\t\t\n\t\t}\n\t\tList<String> result;\n\t\ttry {\n\t\t\tresult = get(key, isMultiValued);\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No multi-value was found for key {}: an Optional.empty() will be returned\", key);\n\t\t\tresult = defaultValue;\n\t\t}\n\t\treturn result;\n\t}",
"Condition in(QueryParameter parameter, Object... values);",
"io.dstore.values.BooleanValue getOnlyProceduresInAnyValues();",
"List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);",
"@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.isNew IN :nya\")\n\tList<Car> findAllNewCar(@Param(\"nya\") boolean nya);",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"boolean getConditionListNull();",
"public abstract String[] getDefaultValues();",
"boolean hasDefaultValue();",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"List<UserGift> selectByExample(UserGiftCriteria example);",
"public boolean allAre(ISelect s){\r\n return true; \r\n }",
"List<PageItemCfg> selectByExample(PageItemCfgExample example);",
"@Deprecated\n private boolean predicate(ArrayList<String> conditions, String name, String value, boolean defaults){\n\n for(String condition : conditions){\n String[] split = condition.split(\" \");\n String term = split[0];\n String operator = split[1];\n String requirement = split[2];\n\n // This is the column that we want to compare\n if(term.equals(name)){\n\n if(operator.equals(\"=\")){\n return requirement.equals(value);\n }\n // Must be integers or numbers\n else if(operator.equals(\">\")){\n int a = Integer.parseInt(value);\n int b = Integer.parseInt(requirement);\n\n return a > b;\n }\n else if(operator.equals(\"<\")){\n\n int a = Integer.parseInt(value);\n int b = Integer.parseInt(requirement);\n\n return a < b;\n\n }\n else if(operator.equals(\"!=\")){\n\n return !requirement.equals(value);\n }\n else{\n System.out.println(\"Relation.predicate: Unexpected scenario occurred\");\n System.exit(2);\n }\n\n }\n\n }\n\n return defaults;\n }",
"io.dstore.values.BooleanValue getPredefinedValues();",
"io.dstore.values.StringValue getConditionList();",
"boolean getSearchValueNull();",
"public boolean hasValues()\r\n\t{\r\n\t\t\r\n\t\tif ((this.criteriaType != null && !this.criteriaType.trim().equals(\"\"))\r\n\t\t\t\t&& (this.criteriaValues != null && !this.criteriaValues.isEmpty()))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}",
"List<StatusByUser> selectByExample(StatusByUserExample example);",
"public Boolean getCanSelectValues() {\r\n return getAttributeAsBoolean(\"canSelectValues\");\r\n }",
"private void defaultForEmptyConditions()\n {\n /*\n * When any of the Conditions has all Left Hand Side, Operator and\n * Right Hand Side as empty then set Operator to default value of\n * CVL_WF_OPRSImpl.EQUAL(mimic default situation).\n * Note if this is not done then the condition will store null value\n * for Left Hand Side, Operator and Right Hand Side, and the whole condition\n * record will not be displayed on \"Manage Approval Conditions\" page\n * because the page selection query uses an equal join with R_WF_APRV_COND\n * and CVL_WF_OPRS tables.\n */\n for ( int liCtr = 1 ; liCtr <= 5 ; liCtr++ )\n {\n if( isNull(\"AND_COND_LHS_\" + liCtr) && isNull(\"AND_COND_OPR_\" + liCtr)\n && isNull(\"AND_COND_RHS_\" + liCtr) )\n {\n getData(\"AND_COND_OPR_\" + liCtr).setbyte((byte)3);\n }\n }//end for\n }",
"List<AdminUser> selectByExample(AdminUserCriteria example);",
"List<AdminUser> selectByExample(AdminUserCriteria example);",
"public PaypalIpn[] findWhereValsEquals(String vals) throws PaypalIpnDaoException\r\n\t{\r\n\t\treturn findByDynamicSelect( SQL_SELECT + \" WHERE vals = ? ORDER BY vals\", new Object[] { vals } );\r\n\t}",
"List<Basicinfo> selectByExample(BasicinfoCriteria example);",
"boolean getOnlyProceduresInAnyValuesNull();",
"public List getResult(String conditing) {\n\t\treturn null;\r\n\t}",
"List<Notifiction> selectByExample(NotifictionExample example);",
"public List getResult(String conditing, int begin, int max) {\n\t\treturn null;\r\n\t}",
"public interface EmailTemplateRepository extends JpaRepository<EmailTemplate, Long> {\n List<EmailTemplate> findByNotificationTypeAndDefaultEmailTemplatesTrue(NotificationType notificationType);\n EmailTemplate findByUuid(String uuid);\n}",
"@Override\n\tpublic Object[] advSearchCondition() {\n\t\treturn null;\n\t}",
"boolean hasConditionList();",
"public boolean supportsEmptyInList() {\n \t\treturn true;\n \t}",
"@Override\n\tpublic List<DataDictionaryValueEntity> querySpecialPickUp() {\n\t\treturn null;\n\t}",
"public boolean[] getBooleanArray(final String key, final boolean... defaultValue) {\n return get(boolean[].class, key, defaultValue);\n }",
"List<Student> selectByExample(StudentCriteria example);",
"public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchByIsDeleted(ULong... values) {\n return fetch(UserEmail.USER_EMAIL.IS_DELETED, values);\n }",
"public Map<Integer, Boolean> getIsNotEmpty() throws SQLException {\n return retrieveExpected(createNativeIsNotEmptyStatement(), BOOLEAN);\n }",
"public static boolean isNotBlankAndSpecificValues(String value, List<String> defaultValues) {\n if (StringUtils.isNotBlank(value)) {\n return defaultValues.contains(value);\n } else {\n return false;\n }\n }",
"boolean hasPredefinedValues();",
"List<Trueorfalse> selectByExample(RowBounds rowBounds);",
"public List<SurveyTemplateEntity> findByActiveIsTrue();",
"private boolean getOptionalBooleanProperty(String[] propertyNameList, boolean defaultValue) {\n\t\tString value = getOptionalStringProperty(propertyNameList);\n if (value != null)\n return value.equalsIgnoreCase(\"true\") || value.equalsIgnoreCase(\"yes\");\n return defaultValue;\n\t}",
"public boolean hasDefaultValues()\r\n\t{\r\n\t\tif (stepName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDisplayName != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (stepDescription != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (roleId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (userId != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (permissions != null)\r\n\t\t\treturn false;\r\n\r\n\t\tif (priority != 0)\r\n\t\t\treturn false;\r\n\r\n\t\treturn true;\r\n\t}",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"List<Customer> findByFirstNameAndIsDisabledFalse(String firstName);",
"List<Email> selectByExample(EmailCriteria example);",
"io.dstore.values.BooleanValue getOrderByDay();",
"static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }",
"List<ReviewLevelSetting> selectByExample(ReviewLevelSettingExample example);",
"public List<org.nazymko.road_to_b.dao.tables.pojos.UserContact> fetchByIsDisabled(Boolean... values) {\n\t\treturn fetch(UserContact.USER_CONTACT.IS_DISABLED, values);\n\t}",
"public PreferenceBean[] loadByWhere(String where, int[] fieldList) throws SQLException\n {\n String sql = null;\n if(fieldList == null)\n sql = \"select \" + ALL_FIELDS + \" from preference \" + where;\n else\n {\n StringBuffer buff = new StringBuffer(128);\n buff.append(\"select \");\n for(int i = 0; i < fieldList.length; i++)\n {\n if(i != 0)\n buff.append(\",\");\n buff.append(FIELD_NAMES[fieldList[i]]);\n }\n buff.append(\" from preference \");\n buff.append(where);\n sql = buff.toString();\n buff = null;\n }\n Connection c = null;\n Statement pStatement = null;\n ResultSet rs = null;\n java.util.ArrayList v = null;\n try \n {\n c = getConnection();\n pStatement = c.createStatement();\n rs = pStatement.executeQuery(sql);\n v = new java.util.ArrayList();\n while(rs.next())\n {\n if(fieldList == null)\n v.add(decodeRow(rs));\n else\n v.add(decodeRow(rs, fieldList));\n }\n\n return (PreferenceBean[])v.toArray(new PreferenceBean[0]);\n }\n finally\n {\n if (v != null) { v.clear(); }\n getManager().close(pStatement, rs);\n freeConnection(c);\n }\n }",
"public UserRow[] searchUsers(UserRow userModel, boolean isAnd)\n throws AdminPersistenceException {\n boolean concatAndOr = false;\n String andOr;\n StringBuffer theQuery = new StringBuffer(SELECT_SEARCH_USERS);\n Vector<Integer> ids = new Vector<Integer>();\n Vector<String> params = new Vector<String>();\n \n if (isAnd) {\n andOr = \") AND (\";\n } else {\n andOr = \") OR (\";\n }\n concatAndOr = addIdToQuery(ids, theQuery, userModel.id, \"id\", concatAndOr,\n andOr);\n concatAndOr = addIdToQuery(ids, theQuery, userModel.domainId, \"domainId\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.specificId,\n \"specificId\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.login, \"login\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.firstName,\n \"firstName\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.lastName,\n \"lastName\", concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.eMail, \"email\",\n concatAndOr, andOr);\n concatAndOr = addParamToQuery(params, theQuery, userModel.accessLevel,\n \"accessLevel\", concatAndOr, andOr);\n concatAndOr =\n addParamToQuery(params, theQuery, userModel.loginQuestion, \"loginQuestion\", concatAndOr,\n andOr);\n concatAndOr =\n addParamToQuery(params, theQuery, userModel.loginAnswer, \"loginAnswer\", concatAndOr, andOr);\n if (concatAndOr) {\n theQuery.append(\") AND (accessLevel <> 'R')\");\n } else {\n theQuery.append(\" WHERE (accessLevel <> 'R')\");\n }\n theQuery.append(\" order by UPPER(lastName)\");\n \n int[] idsArray = new int[ids.size()];\n for (int i = 0; i < ids.size(); i++) {\n idsArray[i] = ids.get(i).intValue();\n }\n \n return getRows(theQuery.toString(), idsArray, params.toArray(new String[0])).toArray(\n new UserRow[0]);\n }",
"List<SelectUserRecruit> selectByExample(SelectUserRecruitExample example);",
"public boolean containsAny(ISelect s){\r\n return false;\r\n }",
"public boolean isResultSetCollectionEnabledWithUnreadValueFillIn();",
"public interface MongoAddressRepository extends MongoRepository<Address,String> {\n\n List<Address> findByCustomerId(String customer_id,Pagination page);\n\n Address findByCustomerIdAndIsDefault(String customer_id,int is_default);\n\n\n}",
"default CompletableFuture<List<Box>> queryVisible() {\n //Fill search Map with the Values\n final Map<String,Object> searchData = new HashMap<String,Object>() {\n {\n put(BoxPersistenceDAO.QUERY_PARAM_DELFLAG, false);\n }\n\n @Override\n public Object put(String key, Object o) {\n if (o != null) return super.put(key, o);\n return null;\n }\n };\n\n return query(searchData);\n }",
"boolean getIsIndexOnValues();",
"List<ConfigData> selectByExampleWithBLOBs(ConfigDataExample example);",
"io.dstore.values.BooleanValue getGroupByCategory();",
"List<User> selectByExample(UserExample example);",
"List<User> selectByExample(UserExample example);",
"List<User> selectByExample(UserExample example);",
"@Override\n\tpublic List<Setting> queryall() {\n\t\treturn SettingMapper.queryall();\n\t}",
"protected String in(String sql, String key){\n boolean isNeedDynamic = this.isNeedDynamic(key);\n if (isNeedDynamic) {\n LogUtils.debug(\"{} is equals to set default value, be delete\", key);\n return \" ( 1 = 1 or '1' = ?) \";\n }\n return sql;\n }",
"private String bindData(Array value, ArrayList params) {\n String op;\n \n if (operator == null) {\n op = null;\n } else if (operator.equals(\"=\")) {\n op = \"IN\";\n } else if (operator.equals(\"!=\")) {\n op = \"NOT IN\";\n } else {\n op = operator;\n }\n if (value.size() <= 0) {\n return bindNull();\n } else {\n return cond(column, op, literal(value));\n }\n }",
"boolean isSetMultiple();",
"ManageValueSetSearchModel searchValueSetsForDraft(int startIndex, int pageSize);",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"List<CompanyExtend> selectByExample(CompanyExtendExample example);",
"List<BizUserWhiteList> selectByExample(BizUserWhiteListExample example);",
"@Query(value = \"SELECT * FROM proveedor WHERE (:idTipoProveedor = 0 OR\"\n + \" idTipoProveedor=:idTipoProveedor) AND (:idCondCompra=0 OR idCondCompra=:idCondCompra)\"\n + \" AND (:estadoCuenta = 2 OR estaActiva=:estadoCuenta)AND (:idLocalidad=0 OR \"\n + \"idLocalidad=:idLocalidad)\" , nativeQuery = true)\n public List<Proveedor> listarPorFiltros(@Param(\"idTipoProveedor\") int idTipoProveedor,\n @Param(\"idCondCompra\") int idCondCompra,@Param(\"estadoCuenta\") \n int estadoCuenta,@Param(\"idLocalidad\") int idLocalidad);",
"boolean getPredefinedValuesNull();",
"List<Online> selectByExample(OnlineExample example);",
"private List<AjouterFacetValue> filterSelectedFacetValues(List<FacetValue> pSelectedFacetValues,\n List<FacetValueNode> pAjouterFacetValueNodeList) {\n List<AjouterFacetValue> filteredFacetValues = new LinkedList<AjouterFacetValue>();\n AjouterFacetValue ajFacetValue = null;\n for (FacetValueNode fvn : pAjouterFacetValueNodeList) {\n \tboolean contains = false;\n \tFacetValue facetValue = fvn.getFacetValue();\n for (FacetValue selectedFacetValues : pSelectedFacetValues) {\n\t\t\t\tif (selectedFacetValues instanceof DisjunctionMultiValue) {\n\t\t\t\t\tDisjunctionMultiValue dfv = (DisjunctionMultiValue) selectedFacetValues;\n\t\t\t\t\tObject[] dfvls = dfv.getValues();\n\t\t\t\t\tfor (Object object : dfvls) {\n Object value = facetValue instanceof FacetDisjunctionMultiValue ? ((FacetDisjunctionMultiValue)facetValue).getSingleValue() : \n facetValue instanceof RangeFacetDisjunctionMultiValue ? ((RangeFacetDisjunctionMultiValue)facetValue).getSingleValue() : \n facetValue.getValue();\n if (object.equals(value)) {\n\t\t\t\t\t\t\tcontains = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (selectedFacetValues.equals(facetValue)) {\n\t\t\t\t\t\tcontains = true;\n\t\t\t\t\t\tbreak;\n }\n\t\t\t\t}\n\t\t\t}\n \tajFacetValue = new AjouterFacetValue(facetValue, contains);\n \t\tfilteredFacetValues.add(ajFacetValue);\n \t/*if (!contains) {\n \t\tajFacetValue = new AjouterFacetValue(fvn.getFacetValue(), false);\n \t\tfilteredFacetValues.add(ajFacetValue);\n \t}*/\n /*if (!pSelectedFacetValues.contains(fvn.getFacetValue())) {\n ajFacetValue = new AjouterFacetValue(fvn.getFacetValue(), false);\n filteredFacetValues.add(ajFacetValue);\n }*/\n }\n\n return filteredFacetValues;\n }",
"List<CommonQuestionStrategyType> selectByExample(CommonQuestionStrategyTypeExample example);",
"List<Storage> selectByExample(StorageExample example);",
"@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (o == null || getClass() != o.getClass()) {\n return false;\n }\n ArrayDefaultValue arrayDefaultValue = (ArrayDefaultValue) o;\n return Objects.equals(this.id, arrayDefaultValue.id) &&\n Objects.equals(this.outcomes, arrayDefaultValue.outcomes);\n }",
"public List<moneytree.persist.db.generated.tables.pojos.Income> fetchByHide(Boolean... values) {\n return fetch(Income.INCOME.HIDE, values);\n }",
"boolean hasSearchValue();",
"@Override\n public List<StorePickStatus> queryByList(QueryParam params) {\n return getSqlSession().getMapper(StorePickStatusDao.class).queryByList(params);\n }",
"@Override\n\tpublic List<Checkingin> selectAll() {\n\t\treturn null;\n\t}",
"@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}",
"@Query(\"select new com.vpa.core.models.LabelValueBean(c.id,c.name) from City c where c.enable = 1 and c.name like :alphabets\")\n\tList<LabelValueBean> findAutoSelectCityNames(@Param(\"alphabets\") String alphabets);",
"List<Blacklist> selectByExample(BlacklistExample example);",
"@Test\n public void testNamedParamWithImmediateValue() {\n List<Long> ids = Arrays.asList(10L, 5L);\n Person personProxy = query.from(Person.class);\n query.where(personProxy.getId()).in().named(NAMED_PARAM_1, ids);\n\n validate(\" from Person hobj1 where hobj1.id in (:np1)\", ids);\n }",
"public List<Product> findAllEnabled();",
"private void defaultSelectedFilterOption() {\n activeSelectBtn.setChecked(true);\n upcomingSelectBtn.setChecked(true);\n inProgressSelctBtn.setChecked(true);\n yettoJoinSelctBtn.setChecked(true);\n bookmarkedSelctBtn.setChecked(false);\n category1SelectBtn.setChecked(true);\n category2SelectBtn.setChecked(true);\n category3SelectBtn.setChecked(true);\n category4SelectBtn.setChecked(true);\n category5SelectBtn.setChecked(true);\n category6SelectBtn.setChecked(true);\n category7SelectBtn.setChecked(true);\n category8SelectBtn.setChecked(true);\n category9SelectBtn.setChecked(true);\n category10SelectBtn.setChecked(true);\n }",
"List<DeliveryBoy> findAllByActive(Boolean activeRecords);",
"String getOptionsOrDefault(\n String key,\n String defaultValue);",
"String getOptionsOrDefault(\n String key,\n String defaultValue);",
"String getOptionsOrDefault(\n String key,\n String defaultValue);"
] | [
"0.5704112",
"0.53129584",
"0.51112634",
"0.5041284",
"0.50298196",
"0.50279874",
"0.4995207",
"0.49710166",
"0.4961157",
"0.4944858",
"0.4877602",
"0.48748776",
"0.4863585",
"0.48200974",
"0.4789219",
"0.47799164",
"0.4746589",
"0.47464812",
"0.47441208",
"0.4733591",
"0.47316965",
"0.4730823",
"0.47071233",
"0.46932125",
"0.4687085",
"0.4684104",
"0.46836936",
"0.46811366",
"0.46811366",
"0.46775183",
"0.46545452",
"0.46504557",
"0.4647107",
"0.46279275",
"0.46202216",
"0.46043804",
"0.46019483",
"0.45794675",
"0.4568015",
"0.4565797",
"0.45612916",
"0.45601034",
"0.4558138",
"0.45575464",
"0.45477605",
"0.4525108",
"0.4521643",
"0.4513037",
"0.45113423",
"0.45111632",
"0.45107144",
"0.45061398",
"0.45017183",
"0.44898814",
"0.44898403",
"0.448967",
"0.4488503",
"0.44878542",
"0.44846773",
"0.44828686",
"0.44634542",
"0.44628635",
"0.44627425",
"0.44603032",
"0.44590828",
"0.445549",
"0.44553193",
"0.44552287",
"0.44449663",
"0.44449663",
"0.44449663",
"0.44447944",
"0.44430113",
"0.4440351",
"0.44398645",
"0.44306368",
"0.44255984",
"0.44237226",
"0.4421159",
"0.44190636",
"0.44133046",
"0.44121918",
"0.44102088",
"0.4402828",
"0.44026428",
"0.43970004",
"0.43897164",
"0.43887746",
"0.43812448",
"0.43812072",
"0.43785715",
"0.43726557",
"0.4369224",
"0.43684524",
"0.43662262",
"0.43639642",
"0.43602106",
"0.436018",
"0.436018",
"0.436018"
] | 0.5043823 | 3 |
Fetch records that have description IN (values) | public List<com.dator.jqtest.dao.model.tables.pojos.Route> fetchByDescription(String... values) {
return fetch(Route.ROUTE.DESCRIPTION, values);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Condition in(QueryParameter parameter, Object... values);",
"private String getContainsList(){\n\t\t\n\t\tArrayList<String> containsList = new ArrayList<String>();\n\t\t\n\t\tIterator<String> it = tagArray.iterator();\n\t\tString tag;\n\t\t\n\t\twhile (it.hasNext()) {\n\t\t\t\n\t\t\ttag = it.next();\n\t\t\t\n\t\t\tString containsClause = \"PrimaryTag='\" + \n\t\t\t tag + \"'\";\n\t\t\t \n\t\t\tcontainsList.add(containsClause);\n\t\t\t\n\t\t}\n\t\t\n\t\tString retVal = StringUtils.join(containsList, \" or \");\n\n\t\treturn retVal;\n\t}",
"public void addWhereIn(String attributeName, Collection values, String operator) {\r\n\t\tif (!values.isEmpty()) {\r\n\t\t\tString valueListString = StringUtils.join(values, ',');\r\n\t\t\taddWhere(attributeName + \" in (\"+valueListString+\")\", operator);\r\n\t\t}\r\n\t}",
"@Override\n public List<Event> searchByDescription(String description) {\n TypedQuery<EventAdapter> query = em.createQuery(\n \"SELECT e FROM EventAdapter e \"\n + \"WHERE e.description = :description \"\n + \"ORDER BY e.id\", EventAdapter.class)\n .setParameter(\"description\", description);\n\n return query.getResultList()\n .parallelStream()\n .map(EventAdapter::getEvent)\n .collect(Collectors.toList());\n }",
"public interface SysRoleRepository extends CrudRepository<SysRole, Long> {\n\n List<SysRole> findAllByDescriptionIn(Collection<String> roleNames);\n}",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull List<T> values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"List<ProductInfoOutput> findList(List<String> productIdList);",
"public static void findByIn() {\n\t\tFindIterable<Document> findIterable = collection.find(in(\"status\", \"A\", \"D\"));\r\n\t\tprint(findIterable);\r\n\t}",
"@Query(value = INGREDIENT_SELECT + DESCRIPTION_SEARCH + EXT_DESCRIPTION + NOT_DELETES)\n List<Ingredient> findByIngredientDescriptionContaining(@Param(\"description\")String description, Pageable request);",
"List<E> list(String field, String contains);",
"public Project[] findWhereDescriptionEquals(String description) throws ProjectDaoException {\n\t\treturn findByDynamicSelect(SQL_SELECT + \" WHERE DESCRIPTION = ? ORDER BY DESCRIPTION\", new Object[] { description });\n\t}",
"public interface InventoryRepository extends JpaRepository<Inventory,Integer> {\n\n @Query(\"select i from Inventory i ,in(i.good) g where g.goodId=:goodId\")\n public List<Inventory> selectAllGoodId(@Param(\"goodId\") int goodId);\n}",
"public List<Product> findByDescription(String description);",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"public List<CatalogDescription> getCatalogDescriptions(Map<String, String> eqCriteria, Map<String, String> searchCriteria);",
"long findValues(List<Object> values, List<Column> columns);",
"@Test\n public void testSqlExistsMultiValuedWithForeignRestriction() {\n Query<Garage> garagesQuery = existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME,\n equal(Car.FEATURES, \"convertible\")\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain garage2\", results.contains(garage2));\n assertTrue(\"results should contain garage5\", results.contains(garage5));\n }",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public boolean descriptionContains(String value){\n return(((MvwDefinitionDMO) core).descriptionContains(value));\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.brandName IN :names\")\n\tList<Car> findByBrand(@Param(\"names\") Collection<String> brandName);",
"public Query in(String key, Object[] value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.IN), key, value);\n return this;\n }",
"@Query(\"SELECT a FROM Appointment a WHERE a.description like ?1\")\n\t public List<Appointment> searchByDescription(String searchstr);",
"public static <T> ManyAssociationContainsSpecification<T> contains( ManyAssociation<T> manyAssoc, T value )\n {\n return new ManyAssociationContainsSpecification<>( manyAssociation( manyAssoc ), value );\n }",
"@Override\n\t\tpublic String toSQL() {\n\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\tsb.append(fieldName).append(\" IN (\");\n\t\t\tboolean first=true;\n\t\t\tfor(Object o :values) {\n\t\t\t\tif(first) {\n\t\t\t\t\tfirst=false;\n\t\t\t\t}else {\n\t\t\t\t\tsb.append(\",\");\n\t\t\t\t}\n\t\t\t\tsb.append(toSql(o));\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\treturn sb.toString() ;\n\t\t}",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAll(String field, String... values);",
"List<Authority> findByNameIn(List<AuthorityName> names);",
"boolean hasContains();",
"public String createWhereIN(int iterations) {\n StringBuilder sb = new StringBuilder();\n sb.append(\" IN (\");\n for (int ndx = 0; ndx < iterations; ndx++) {\n sb.append(\"?,\");\n }\n sb.deleteCharAt(sb.length() - 1); // remove last comma.\n sb.append(\")\");\n return sb.toString();\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> containsAll(EntityField field, String... values);",
"public SgfensPedidoProducto[] findWhereDescripcionEquals(String descripcion) throws SgfensPedidoProductoDaoException;",
"public List<com.moseeker.baseorm.db.profiledb.tables.pojos.ProfileWorkexp> fetchByDescription(String... values) {\n return fetch(ProfileWorkexp.PROFILE_WORKEXP.DESCRIPTION, values);\n }",
"List<CfgSearchRecommend> selectByExample(CfgSearchRecommendExample example);",
"public <T> void addInFilter(@Nullable String fieldName, @NonNull T[] values) {\n addFilter(fieldName, FilterOperator.IN, values);\n }",
"public boolean inBag(String searchString) {\r\n\t\tboolean found = false;\r\n\t\tfor(Iterator<Item> it = items.iterator(); it.hasNext() && !found; ) {\r\n\t\t\tif(it.next().getDescription().contains(searchString)) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t\t\r\n\t}",
"public static SetExpression contains(String propertyName, Object[] values) {\n return new SetExpression(Operator.CONTAINS, propertyName, values);\n }",
"public ContentList findAll(String[] keys, Object[] values);",
"@In String search();",
"public static List<List<String>> filterRecords(List<List<String>> rows, Query query, List<String> header) {\r\n\r\n\t\tlogger.debug(\"filterRecords\");\r\n\r\n\t\tif (query.getRestrictions() != null) {\r\n\r\n\t\t\trows = evaluateRestrictions(rows, query);\r\n\t\t}\r\n\r\n\t\treturn rows;\r\n\t}",
"List<Address> findByStateIn(List<String> stateList);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByApprovedBy(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.APPROVED_BY.in(values));\n }",
"@Repository\npublic interface SysResourceRepository extends JpaRepository<SysResourceEntity, Integer> {\n @Query(\"SELECT DISTINCT n FROM SysResourceEntity m INNER JOIN SysResourceEntity n ON m.parentId = n.id WHERE m.url IN (:urls)\")\n Set<SysResourceEntity> findByList(@Param(\"urls\") List<String> urls);\n\n Set<SysResourceEntity> findByUrlIn(List<String> urls);\n}",
"boolean contains();",
"List<SpecValuePO> selectByExample(SpecValuePOExample example);",
"public List<DomainObject> getListByKeyandValue(String colname, List<Object> keyValue) {\r\n Session session = getSession();\r\n List<DomainObject> retList = null;\r\n try {\r\n Criteria query = session.createCriteria(getPersistentClass()).add(Restrictions.in(colname, keyValue));\r\n retList = query.list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getListByKeyandValue with List<Values> Method:\" + e, e);\r\n } finally {\r\n// if (session.isOpen()) {\r\n// session.close();\r\n// }\r\n }\r\n return retList;\r\n }",
"@Repository\npublic interface TagRepository extends JpaRepository<Tag, Long> {\n Set<Tag> findByNameIn(Set<String> tagNames);\n}",
"List<Product> getProductsContainingProductNameOrShortDescription(String productSearchString);",
"public void processLargeInList(Set values);",
"@Override\n public List<ResourceTagJoinVO> searchByIds(Long... tagIds) {\n int DETAILS_BATCH_SIZE = 2000;\n String batchCfg = _configDao.getValue(\"detail.batch.query.size\");\n if (batchCfg != null) {\n DETAILS_BATCH_SIZE = Integer.parseInt(batchCfg);\n }\n // query details by batches\n List<ResourceTagJoinVO> uvList = new ArrayList<ResourceTagJoinVO>();\n // query details by batches\n int curr_index = 0;\n if (tagIds.length > DETAILS_BATCH_SIZE) {\n while ((curr_index + DETAILS_BATCH_SIZE) <= tagIds.length) {\n Long[] ids = new Long[DETAILS_BATCH_SIZE];\n for (int k = 0, j = curr_index; j < curr_index + DETAILS_BATCH_SIZE; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n curr_index += DETAILS_BATCH_SIZE;\n }\n }\n if (curr_index < tagIds.length) {\n int batch_size = (tagIds.length - curr_index);\n // set the ids value\n Long[] ids = new Long[batch_size];\n for (int k = 0, j = curr_index; j < curr_index + batch_size; j++, k++) {\n ids[k] = tagIds[j];\n }\n SearchCriteria<ResourceTagJoinVO> sc = tagSearch.create();\n sc.setParameters(\"idIN\", ids);\n List<ResourceTagJoinVO> vms = searchIncludingRemoved(sc, null, null, false);\n if (vms != null) {\n uvList.addAll(vms);\n }\n }\n return uvList;\n }",
"public List<?> queryByCriteria(List<String> fields, List<Object> values)\n throws DataAccessLayerException {\n return queryByCriteria(fields, values, null, null, null, false);\n }",
"public interface QuantitativeMultipleAnswerQuestionRepository extends JpaRepository<QuantitativeMultipleAnswerQuestion, Long>, JpaSpecificationExecutor<QuantitativeMultipleAnswerQuestion> {\n\n @Query(\"select q from QuantitativeMultipleAnswerQuestion q where q.id in :ids\")\n List<QuantitativeMultipleAnswerQuestion> findAll(@Param(\"ids\") List<Long> ids);\n\n}",
"public NominaPuesto[] findWhereDescripcionEquals(String descripcion) throws NominaPuestoDaoException;",
"@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }",
"@Repository\npublic interface ProductCategoryRepository extends JpaRepository<ProductCategory, Integer> {\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\n}",
"@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }",
"List<EssayQuestionDetail> findByIdIn(List<Long> detailIds);",
"List<ConfigData> selectByExample(ConfigDataExample example);",
"List findByFilterText(Set<String> words, boolean justIds);",
"public static List<Handset> search(Map<String, String> reqParam) {\n\n\t\tList<Handset> temp = new ArrayList<Handset>();\n\t\ttemp.addAll(cache.values());\n\n\t\tfor (String param : reqParam.keySet()) {\n\t\t\tString val = (String) reqParam.get(param);\n\n\t\t\tswitch (param) {\n\t\t\tcase \"priceEur\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getPriceEur() == Integer.parseInt(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"sim\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getSim().toLowerCase().contains(val.toLowerCase()))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"announceDate\": {\n\t\t\t\ttemp = temp.stream().filter(handset -> handset.getRelease().getAnnounceDate().equalsIgnoreCase(val))\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\ttemp = new ArrayList<Handset>();\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"filtered handset size \" + temp.size());\n\t\treturn temp;\n\n\t}",
"public SmsAgendaGrupo[] findWhereDescripcionGrupoEquals(String descripcionGrupo) throws SmsAgendaGrupoDaoException;",
"public boolean descriptionExists(String course_id);",
"List<Accessprofile> listWithCriteras(List<SearchCriteria> searchCriterias);",
"List<Blacklist> selectByExample(BlacklistExample example);",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByActive(Collection<Boolean> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.ACTIVE.in(values));\n }",
"@Query(\"SELECT * FROM test WHERE patientId IN (:patientId)\")\n LiveData<List<Test>> getTestByPatiendId(int patientId);",
"public ConditionItem in(String fieldName, Object...value) {\n\t\treturn singleCondition(ConditionType.IN, fieldName, value);\n\t}",
"public List<String> extractIllnesses(String description) {\n\t\tList<String> newSentences = this.getSentences(description);\n\t\t\n\t\t// For each sentence, generate valid word sequences\n\t\tList<String> allValidWordSequences = new ArrayList<String>();\n\t\tnewSentences.forEach(s -> allValidWordSequences.addAll(this.getWordCombinations(s)));\n\n\t\tSicknessMap medicalRecords = SicknessMap.getInstance();\n\t\tList<String> results = allValidWordSequences.stream()\n\t\t\t\t.filter(potentialIllness -> medicalRecords.contains(potentialIllness))\n\t\t\t\t.map(actualIllness -> medicalRecords.getByKey(actualIllness))\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn results;\n\t}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByTags(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.TAGS.in(values));\n }",
"@SuppressWarnings(\"unused\")\n@Repository\npublic interface NetraNominationRepository extends NominationRepository{\n\n\n\n @Query(\"select nominations from Nomination nominations where nominations.contract.id in :contractIdList\")\n List<Nomination> findAllNomsByContractIdList(@Param(\"contractIdList\") List<Long> contractIdList);\n\n}",
"public Collection<EfoTermCount> searchTerms(Collection<String> values) {\n List<EfoTermCount> result = new ArrayList<EfoTermCount>();\n Set<String> ids = new HashSet<String>();\n for (String val : values) {\n for (EfoTerm term : efo.searchTerm(val)) {\n Long count = getCount(term.getId());\n if (count != null && !ids.contains(term.getId())) {\n result.add(new EfoTermCount(term, count));\n ids.add(term.getId());\n }\n }\n }\n return result;\n }",
"private List<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms, int queryLimit) {\n\t\tList<String> values = new ArrayList<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName, inputAttributeName, inputAttributeKnownTerms, queryLimit);\n\t\tquery += \" LIMIT \" + queryLimit;\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"Collection<? extends WrappedIndividual> getContains();",
"public List<ViewXwZqkh> Query(String filters, String orders, Object... values);",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> contains(String field, String propertyValue);",
"boolean hasConditionList();",
"public void addInFilter(@Nullable String fieldName, @NonNull String values) {\n addInFilter(fieldName, SdkUtils.parseListString(values));\n }",
"@Query(value = \"SELECT u FROM Car u WHERE u.modelName IN :modelNames\")\n\tList<Car> findCarsByModelName(@Param(\"modelNames\") String modelName);",
"List<Ad> selectByExample(AdExample example);",
"@Repository\npublic interface HistoryEventRepository extends CrudRepository<HistoryEvent,HistoryID> {\n\n List<HistoryEvent> findAllByIdDateBetween(Date from,Date to);\n\n @Query(\"SELECT h FROM HistoryEvent h WHERE h.id.date between :from and :to and h.id.name IN :names\")\n List<HistoryEvent> findByList(@Param(\"from\") Date from, @Param(\"to\") Date to, @Param(\"names\") List<String> names );\n\n @Query(\"SELECT distinct h.id.name FROM HistoryEvent h WHERE h.id.date between :from and :to\")\n List<String> getEventNames(@Param(\"from\") Date from, @Param(\"to\") Date to);\n\n}",
"private static Set<Dataset> findDatasets(Datasource d, String query) {\n String[] words = query.split(\"\\\\+\");\n Set<String> keyWords = new HashSet<String>();\n for (String word : words) {\n keyWords.add(word.toLowerCase());\n }\n Set<Dataset> ret = new HashSet<Dataset>();\n String tags;\n for (Dataset set : d.getDatasets()) {\n tags = set.getTags();\n if (intersects(tags, keyWords)) {\n ret.add(set);\n }\n } \n return ret;\n }",
"@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByComment(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.COMMENT.in(values));\n }",
"public static SetExpression in(String propertyName, Object[] values) {\n return new SetExpression(Operator.IN, propertyName, values);\n }",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByMetadata(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.METADATA.in(values));\n }",
"List<SupplyNeed> selectByExample(SupplyNeedExample example);",
"@Query(value = \"SELECT u FROM Car u WHERE lower (u.color) IN :colors\")\n\tList<Car> findCarsByColor(@Param(\"colors\") String color);",
"private Set<String> projectSelectIn(GenericDAO genericDAO, String relationName, String projectAttributeName,\n\t\t\tString inputAttributeName, String inputAttributeKnownTerms) {\n\t\tSet<String> values = new HashSet<String>();\n\t\tString query = String.format(PROJET_SELECTIN_SQL_STATEMENT, projectAttributeName, relationName,\n\t\t\t\tinputAttributeName, inputAttributeKnownTerms);\n\t\tGenericTableObject result = genericDAO.executeQuery(query);\n\t\tif (result != null) {\n\t\t\tfor (Tuple tuple : result.getTable()) {\n\t\t\t\tvalues.add(tuple.getStringValues().get(0));\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByStatus(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.STATUS.in(values));\n }",
"@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> containsAny(String field, String... values);",
"List<Schedule> selectByExample(ScheduleCriteria example);",
"public List search(String text){\r\n\t\tif(this.inverntory.empty())\r\n\t\t\tthrow new RuntimeException(\"Inventory is empty.\");\r\n\t\tList matchings = new List();\r\n\t\t// as long as inventory is not empty\r\n\t\t\r\n\t\twhile(!this.inverntory.empty()){\r\n\t\t /* Note:\r\n\t\t * public boolean contains(CharSequence s) Returns true if and only if\r\n\t\t * this string contains the specified sequence of char values. \r\n\t\t * contains(CharSequence s):boolean expects a CharSequence s as parameter.\r\n\t\t * CharSequence is an interface implemented by String\r\n\t\t */\r\n\t\t\t\r\n\t\t // check if entered string matches the description of the item\r\n\t\t if( ((LibraryItem) inverntory.elem()).getDescription().contains(text) ) {\r\n\t\t\t\t// add matchings to our list\r\n\t\t\t\tmatchings.add(this.inverntory.elem());\r\n\t\t\t}\r\n\t\t\t// if head of list is not target string, advance in list\r\n\t\t\telse {\r\n\t\t\t\tthis.inverntory.advance();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if you reach the end of the list, return the matchings\t\t\t\r\n\t\treturn matchings;\r\n\t}",
"@Query(value = INGREDIENT_SELECT + DESCRIPTION_SEARCH + EXT_DESCRIPTION + INCLUDE_CATEGORY + NOT_DELETES)\n List<Ingredient> findByIngredientDescriptionContainingAndCategoryCode(@Param(\"description\") String description,@Param(\"categoryCode\") Long categoryCode, Pageable pageRequest);",
"public java.util.List<org.jooq.test.h2.generatedclasses.tables.pojos.VBook> fetchByPublishedIn(java.lang.Integer... values) {\n\t\treturn fetch(org.jooq.test.h2.generatedclasses.tables.VBook.V_BOOK.PUBLISHED_IN, values);\n\t}",
"public Future<List<cn.vertxup.psi.domain.tables.pojos.POutTicket>> findManyByOpDept(Collection<String> values) {\n return findManyByCondition(POutTicket.P_OUT_TICKET.OP_DEPT.in(values));\n }",
"List<T> searchByExample(T entity);",
"public interface ProductCategoryRepository extends JpaRepository<ProductCategory,Integer>{\r\n List<ProductCategory> findByCategoryTypeIn(List<Integer> categoryTypeList);\r\n //查询类目\r\n}",
"List<Resource> selectByExample(ResourceExample example);",
"private List<ClinicItem> filter(List<ClinicItem> cList, String query){\n query = query.toLowerCase();\n final List<ClinicItem> filteredModeList = new ArrayList<>();\n\n for(ClinicItem vetClinic:cList){\n if(vetClinic.getName().toLowerCase().contains(query)){\n filteredModeList.add(vetClinic); }\n }\n return filteredModeList;\n }",
"@Test\n\tpublic void selectFromCourseTable_where() {\n\t\tList arrayList = em.createNamedQuery(\"query_with_where_name_like_call\",Course.class).getResultList();\n\t\tlogger.info(\"\\n\\n>>>>>>> Select c FROM Course c WHERE name like '%call%' -> {}\", arrayList);\n\t}",
"public List<Product> findByNameIs(String name);",
"public boolean contains(Interest i);",
"@Override\n public Iterator<Item> findByMetadataField(Context context, String schema, String element, String qualifier, String value)\n throws SQLException, AuthorizeException\n {\n MetadataSchema mds = metadataSchemaService.find(context, schema);\n if (mds == null)\n {\n throw new IllegalArgumentException(\"No such metadata schema: \" + schema);\n }\n MetadataField mdf = metadataFieldService.findByElement(context, mds, element, qualifier);\n if (mdf == null)\n {\n throw new IllegalArgumentException(\n \"No such metadata field: schema=\" + schema + \", element=\" + element + \", qualifier=\" + qualifier);\n }\n if (Item.ANY.equals(value))\n {\n return itemDAO.findByMetadataField(context, mdf, null, true);\n }\n else\n {\n return itemDAO.findByMetadataField(context, mdf, value, true);\n }\n }"
] | [
"0.57721883",
"0.5461951",
"0.5405385",
"0.5192511",
"0.5183433",
"0.5141533",
"0.5128444",
"0.51105785",
"0.51056683",
"0.50713193",
"0.50682247",
"0.5048135",
"0.50401855",
"0.5019177",
"0.49962845",
"0.4980511",
"0.49772725",
"0.4975426",
"0.49586344",
"0.49521366",
"0.49505863",
"0.4950144",
"0.4935542",
"0.49195945",
"0.4885902",
"0.48723066",
"0.48695087",
"0.4832823",
"0.48313713",
"0.48274326",
"0.4794948",
"0.4793363",
"0.47725254",
"0.47672623",
"0.473829",
"0.47319907",
"0.4724976",
"0.47234154",
"0.47227052",
"0.47198963",
"0.4717249",
"0.4714621",
"0.46941",
"0.4692745",
"0.46837193",
"0.46831885",
"0.46770507",
"0.4673132",
"0.4667182",
"0.46665257",
"0.46661204",
"0.46642175",
"0.46596286",
"0.46594194",
"0.46349385",
"0.46212226",
"0.46121386",
"0.46046522",
"0.46025404",
"0.45887187",
"0.4584789",
"0.45831725",
"0.45651567",
"0.45572266",
"0.45426723",
"0.45418432",
"0.45386052",
"0.45379043",
"0.4529869",
"0.45295557",
"0.45238224",
"0.4519724",
"0.45076698",
"0.4504413",
"0.4502475",
"0.45023814",
"0.45006847",
"0.44955027",
"0.44945368",
"0.449364",
"0.448923",
"0.4483484",
"0.44793165",
"0.44722462",
"0.44635507",
"0.44564265",
"0.44508258",
"0.4448927",
"0.4443261",
"0.4440015",
"0.44386765",
"0.4436209",
"0.44241792",
"0.44198662",
"0.44189343",
"0.44158655",
"0.44141644",
"0.44138348",
"0.4397772",
"0.4393133",
"0.43896097"
] | 0.0 | -1 |
Check the given station is in which lines and return them | public ArrayList<Line> inLine(Station s)
{
ArrayList<Line> returnList = new ArrayList<>();
for(Line l: line)
{
if(l.stationExists(s))
{
returnList.add(l);
}
}
return returnList;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void checkStationExists() {\n\n stationExists = false;\n dataExists = false;\n stationExistsCount = 0;\n thisSubdesCount = 0;\n// stationIgnore = false;\n\n for (int i = 0; i < MAX_STATIONS; i++) {\n stationExistsArray[i] = false;\n loadedDepthMin[i] = 9999;\n loadedDepthMax[i] = -9999;\n spldattimArray[i] = \"\";\n currentsRecordCountArray[i] = 0;\n watphyRecordCountArray[i] = 0;\n stationStatusDB[i] = \"\";\n subdesCount[i] = 0;\n for (int j = 0; j < MAX_SUBDES; j++) {\n subdesArray[i][j] = \"\";\n } // for (int j = 0; j < MAX_SUBDES; j++)\n\n } // for (int i = 0; i < MAX_STATIONS; i++)\n\n // true if station with same station Id (first select) or\n // station with same date_start & latitude & longitude &\n // <data>.spltim & <data>.subdes (second select)\n String where = MrnStation.STATION_ID + \"='\" + station.getStationId() + \"'\";\n if (dbg) System.out.println(\"<br>checkStationExists: station: where = \" +\n where);\n\n // Is there already a station record with the same station-id?\n MrnStation[] tStation2 = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationExists: tStation2.length = \" +\n tStation2.length);\n if (tStation2.length > 0) {\n //stationStatusLD = \"di\"; // == duplicate station-id\n outputDebug(\"checkStationExists: station Id found: \" +\n station.getStationId(\"\"));\n stationExists = true;\n stationExistsArray[0] = true;\n } else {\n //stationStatusLD = \"ds\"; // == duplicate station (lat/lon/date/time)\n outputDebug(\"checkStationExists: station Id not found: \" +\n station.getStationId(\"\"));\n } // if (tStation2.length > 0)\n\n // are there any other stations around the same day that fall within the\n // latitude range? (it could include the station found above)\n\n // get the previous and next day for the select, in case the\n // spldattim is just before or after midnight\n java.text.SimpleDateFormat formatter =\n new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(station.getDateStart());\n calDate.add(java.util.Calendar.DATE, -1);\n String dateStartMin = formatter.format(calDate.getTime());\n\n calDate.setTime(station.getDateEnd());\n calDate.add(java.util.Calendar.DATE, +1);\n String dateEndMax = formatter.format(calDate.getTime());\n\n where =\n MrnStation.DATE_START + \">=\" +\n Tables.getDateFormat(dateStartMin) + \" and \" +\n MrnStation.DATE_END + \"<=\" +\n Tables.getDateFormat(dateEndMax) + \" and \" +\n MrnStation.LATITUDE + \" between \" +\n (station.getLatitude()-areaRangeVal) + \" and \" +\n (station.getLatitude()+areaRangeVal) + \" and \" +\n MrnStation.LONGITUDE + \" between \" +\n (station.getLongitude()-areaRangeVal) + \" and \" +\n (station.getLongitude()+areaRangeVal);\n if (dbg) System.out.println(\"<br><br>checkStationExists: station: \" +\n \"where = \" + where);\n\n // get the records\n MrnStation[] tStation3 = new MrnStation().get(\n \"*\", where, MrnStation.STATION_ID);\n if (dbg) System.out.println(\"<br><br>checkStationExists: \" +\n \"tStation3.length = \" + tStation3.length);\n\n // put both sets of stations found in one array for processing\n tStation = new MrnStation[tStation2.length + tStation3.length];\n if (dbg) System.out.println(\"<br><br>checkStationExists: \" +\n \"tStation.length = \" + tStation.length);\n int ii = 0;\n for (int i = 0; i < tStation2.length; i++) { // same station_id\n tStation[ii] = tStation2[i];\n ii++;\n } // for (int i = 0; i < tStation2.length; i++)\n for (int i = 0; i < tStation3.length; i++) { // satem lat/lon/date/time\n tStation[ii] = tStation3[i];\n ii++;\n } // for (int i = 0; i < tStation3.length; i++)\n\n // process the records\n stationUpdated = false;\n for (int i = 0; i < tStation.length; i++) {\n\n // same station id already done\n if ((i == 0) ||\n !tStation[i].getStationId().equals(station.getStationId())) {\n\n if (tStation[i].getStationId().equals(station.getStationId())) {\n stationStatusTmp = \"di\"; // == duplicate station-id\n } else {\n stationStatusTmp = \"ds\"; // == duplicate station (lat/lon/date/time)\n } // if (tStation[i].getStationId().equals(station.getStationId()))\n\n String dbgMess = \"checkStationExists: station found in area: \" +\n i + \" \" + station.getStationId(\"\") + \" \" +\n tStation[i].getStationId(\"\");\n\n getExistingStationDetails(tStation[i], i);\n\n if (stationExistsArray[i]) {\n stationExistsCount++;\n\n outputDebug(dbgMess + \": within time range\");\n\n// if (loadFlag) {\n// updateStationDetails(i);\n// } else {\n // d == Duplicate stationId/station only\n // s == Subdes: duplicate Station (lat/lon/date/time) && subdes\n stationStatusDB[i] = stationStatusTmp;\n if (subdesCount[i] == 0) {\n // d == Duplicate stationId/station only (lat/lon/date/time)\n stationStatusDB[i] += \"d\";\n if (\"did\".equals(stationStatusDB[i])) {\n didCount++;\n } else {\n dsdCount++;\n } // if (\"did\".equals(stationStatusDB))\n } else { // if (subdesCount == 0)\n // s == Subdes: duplicate Station (lat/lon/date/time) && subdes\n stationStatusDB[i] += \"s\";\n if (\"dis\".equals(stationStatusDB[i])) {\n disCount++;\n } else {\n dssCount++;\n } // if (\"dia\".equals(stationStatusDB))\n\n thisSubdesCount += subdesCount[i];\n\n } // if (subdesCount == 0)\n// } // if (loadFlag)\n } else {\n outputDebug(dbgMess + \": NOT within time range\");\n } // if (stationExistsArray[i]) {\n\n } // if (!tStation.getStationId().equals(station.getStationId())\n\n } // for (int i = 0; i < tStation.length; i++)\n\n if (dbg) System.out.println(\"checkStationExists: stationStatusTmo = \" + stationStatusTmp);\n\n // either stations with same station Id or within same\n // area & date-time range found\n if (stationExists) {\n duplicateStations = true;\n if (dataExists) {\n stationStatusLD = \"dup\";\n } else {\n stationStatusLD = \"new\";\n newStationCount++;\n } // if (dataExists)\n } else {\n stationStatusLD = \"new\";\n newStationCount++;\n } // if (stationExists)\n\n if (dbg) System.out.println(\"checkStationExists: stationStatusLD = \" + stationStatusLD);\n if (dbg) System.out.println(\"checkStationExists: stationStatusTmo = \" + stationStatusTmp);\n for (int i = 0; i < tStation.length; i++) {\n if (dbg) System.out.println(\"checkStationExists: stationStatusDB[i] = \" +\n i + \" \" + stationStatusDB[i]);\n } // for (int i = 0; i < tStation.length; i++)\n\n }",
"public ArrayList<Coordinate> transportLinePath()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<Coordinate> line_coordinates = new ArrayList<Coordinate>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates.add(stop.getCoordinate());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates.add(s.getCoordinates().get(1));\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n\r\n }\r\n\r\n line_coordinates.add(getStopsMap().get(getStopsMap().size()-1).getCoordinate());\r\n return line_coordinates;\r\n }",
"void checkStationId(int lineCount, String testStationId) {\n if (!stationId.equals(testStationId)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Station Id does not match previous station record \" +\n stationId + \": \" + testStationId);\n } // if (!stationId.equals(station.getStationId(\"\")))\n }",
"private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }",
"@Test\r\n void findRouteDifferentLine() {\r\n List<Station> route = model.findRoute(9, 60);\r\n assertNotNull(route);\r\n assertEquals(10, route.size());\r\n assertEquals(\"SuffolkDowns\", route.get(0).getName());\r\n assertEquals(\"Broadway\", route.get(9).getName());\r\n }",
"@Test\r\n void findRouteSameLine() {\r\n List<Station> route = model.findRoute(1, 20);\r\n assertNotNull(route);\r\n assertEquals(6, route.size());\r\n assertEquals(\"OakGrove\", route.get(0).getName());\r\n assertEquals(\"NorthStation\", route.get(5).getName());\r\n }",
"public Station getStationByCode(int code)\r\n\t{\r\n\t\tfor(Line l: line)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif(l.getStationByCode(code) != null)\r\n\t\t\t{\r\n\t\t\t\treturn l.getStationByCode(code);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"void getExistingStationDetails(MrnStation tStation, int i) {\n // find out the existing station details for the report\n // check if also within a date-time range\n\n Timestamp tmpSpldattim = null;\n if (dataType == CURRENTS) {\n tmpSpldattim = currents.getSpldattim();\n } else if (dataType == SEDIMENT) {\n tmpSpldattim = sedphy.getSpldattim();\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpSpldattim = watphy.getSpldattim();\n } // if (dataType == CURRENTS)\n\n // find the date range for this station\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(tmpSpldattim); //Timestamp.valueOf(startDateTime));\n\n calDate.add(java.util.Calendar.MINUTE, -timeRangeVal);\n Timestamp dateTimeMinTs = new Timestamp(calDate.getTime().getTime());\n\n calDate.add(java.util.Calendar.MINUTE, timeRangeVal*2);\n Timestamp dateTimeMaxTs = new Timestamp(calDate.getTime().getTime());\n\n if (dbg) System.out.println(\"<br><br>getExistingStationDetails: \" +\n \"dateTimeMinTs = \" + dateTimeMinTs);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"dateTimeMaxTs = \" + dateTimeMaxTs);\n\n //if (dbg) System.out.println(\"<br>checkStationExists: in loop: \" +\n // \"tStation[i] = \" + tStation[i]);\n\n String where = \"STATION_ID='\" + tStation.getStationId() + \"'\";\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"data where = \" + where);\n String order = \"SUBDES\";\n\n String prevSubdes = \"\";\n int k = 0;\n\n //\n // are there any currents records for this station\n //------------------------------------------------\n tCurrents = new MrnCurrents().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents.length = \" + tCurrents.length);\n\n for (int j = 0; j < tCurrents.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSpldattim() = \" +\n tCurrents[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tCurrents[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n tCurrents[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n// tCurrents[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tCurrents[j].getSpldattim(\"\");\n currentsRecordCountArray[i]++;\n\n if (dataType == CURRENTS) {\n dataExists = true;\n\n // get the min and max depth\n if (tCurrents[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tCurrents[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", currents.getSubdes() = \" + currents.getSubdes(\"\"));\n //if (tCurrents[j].getSubdes(\"\").equals(subdes)) {\n if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tCurrents[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tCurrents[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSubdes() = \" +\n tCurrents[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tCurrents[j].getSubdes(\"\");\n\n } // if (dataType == CURRENTS)\n\n } // if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tCurrents.length; j++)\n\n //\n // are there any sedphy records for this station\n //------------------------------------------------\n tSedphy = new MrnSedphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy.length = \" + tSedphy.length);\n\n for (int j = 0; j < tSedphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSpldattim() = \" + tSedphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tSedphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n tSedphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n// tSedphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tSedphy[j].getSpldattim(\"\");\n sedphyRecordCountArray[i]++;\n\n if (dataType == SEDIMENT) {\n dataExists = true;\n\n // get the min and max depth\n if (tSedphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n if (tSedphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", sedphy.getSubdes() = \" + sedphy.getSubdes(\"\"));\n //if (tSedphy[j].getSubdes(\"\").equals(subdes)) {\n if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tSedphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tSedphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSubdes() = \" +\n tSedphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tSedphy[j].getSubdes(\"\");\n\n } // if (dataType == SEDIMENT)\n\n } // if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tSedphy.length; j++)\n\n //\n // are there any watphy records for this station\n //------------------------------------------------\n tWatphy = new MrnWatphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy.length = \" + tWatphy.length);\n\n for (int j = 0; j < tWatphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSpldattim() = \" + tWatphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tWatphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n tWatphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n// tWatphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tWatphy[j].getSpldattim(\"\");\n watphyRecordCountArray[i]++;\n\n if ((dataType == WATER) || (dataType == WATERWOD)) {\n dataExists = true;\n\n // get the min and max depth\n if (tWatphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tWatphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", watphy.getSubdes() = \" + watphy.getSubdes(\"\"));\n //if (tWatphy[j].getSubdes(\"\").equals(subdes)) {\n if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tWatphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tWatphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSubdes() = \" +\n tWatphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tWatphy[j].getSubdes(\"\");\n\n } // if ((dataType == WATER) || (dataType == WATERWOD))\n\n } // if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tWatphy.length; j++)\n\n }",
"private boolean isStation(SensorEvent e) {\n for (int[] p : STATION_POSITIONS) {\n if (atSensor(e, p[0], p[1])) {\n return true;\n }\n }\n return false;\n }",
"public ArrayList<String> transportLinePathIDs()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<String> line_coordinates_ids = new ArrayList<String>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates_ids.add(stop.getId());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n }\r\n\r\n line_coordinates_ids.add(getStopsMap().get(getStopsMap().size()-1).getId());\r\n return line_coordinates_ids;\r\n }",
"@Override\n\tpublic List<FxzfLane> getByStation(String station) {\n\t\treturn selectList(\"getByStation\", station);\n\t}",
"public ArrayList<Station> searchTrainTimes ( String stationName,int deparH, String befAft) {\r\n ArrayList<Station> result = new ArrayList<>();\r\n \r\n Station station;\r\n String s_name;\r\n int hh;\r\n int mm;\r\n \r\n AdditionalTestData();\r\n \r\n Iterator<Station> iterator = stationList.iterator();\r\n \r\n // record start time\r\n long sTime = System.currentTimeMillis();\r\n while (iterator.hasNext()) {\r\n \r\n station = iterator.next();\r\n s_name = station.getStationName();\r\n hh = station.getDepartureHour();\r\n mm = station.getDepartureMinute();\r\n \r\n System.out.println(\"Searching..........: \" + stationName + \"----\" + deparH);\r\n \r\n if( befAft.compareTo( \"After\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh >= deparH )\r\n result.add(station);\r\n }\r\n \r\n if( befAft.compareTo( \"Before\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh <= deparH)\r\n result.add(station);\r\n }\r\n }\r\n \r\n long eTime = System.currentTimeMillis();\r\n \r\n long timeNeeded = eTime - sTime;\r\n System.out.println(\"Time needed:\" + timeNeeded);\r\n \r\n return result; \r\n }",
"public boolean checkLines(List<Point> as) {\n\t\treturn this.trk.containsAll(as);\n\t}",
"public Station getStationByPos(int x, int y)\r\n\t{\r\n\t\t\r\n\t\tfor(Line l : line)\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\tfor(int j = 0 ; j < l.getNumberOfStation() ; j++)\r\n\t\t\t{\r\n\t\t\t\tStation tmp = l.returnStation(i);\r\n\t\t\t\t\r\n\t\t\t\tif(Math.abs(tmp.getPosX() - x) < 5 && Math.abs(tmp.getPosY() - y) < 5)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn tmp;\r\n\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}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"void checkStationUIExists() {\n\n int recordCount = 9999;\n int duplicateCount = 0;\n\n String where = MrnStation.DATE_START + \"=\" +\n Tables.getDateFormat(station.getDateStart()) +\n \" and \" + MrnStation.LATITUDE +\n \" between \" + (station.getLatitude()-areaRangeVal) +\n \" and \" + (station.getLatitude()+areaRangeVal) +\n \" and \" + MrnStation.LONGITUDE +\n \" between \" + (station.getLongitude()-areaRangeVal) +\n \" and \" + (station.getLongitude()+areaRangeVal) ;\n if (dbg) System.out.println(\"<br>checkStationUIExists: where = \" + where);\n //outputDebug(\"checkStationUIExists: where = \" + where);\n\n MrnStation[] stns = new MrnStation().get(where);\n if (dbg) System.out.println(\"<br>checkStationUIExists: stns.length = \" + stns.length);\n //outputDebug(\"checkStationUIExists: number of stations found = \" + stns.length);\n\n String debugMessage = \"\\ncheckStationUIExists: duplicate UI check \\n \" +\n station.getDateStart(\"\").substring(0,10) +\n \", \" + ec.frm(station.getLatitude(),10,5) +\n \", \" + ec.frm(station.getLongitude(),10,5) +\n \", \" + station.getStnnam(\"\") +\n \" (\" + station.getStationId(\"\") + \")\";\n\n if (stns.length == 0) {\n outputDebug(debugMessage + \": duplicate UI not found\");\n } else {\n\n outputDebug(debugMessage);\n\n // check for duplicate station names (stnnam)\n while (recordCount > 0) {\n\n // count station names the same\n recordCount = 0;\n for (int i = 0; i < stns.length; i++) {\n if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\"))) {\n recordCount++;\n } // if (stns[i].getStnnam(\"\").equals(station.getStnnam(\"\")))\n } // for (int i = 0; i < stns.length; i++)\n\n if (dbg) System.out.println(\"<br>checkStationUIExists: recordCount = \" +\n recordCount + \", stnnam = \" + station.getStnnam(\"\"));\n\n debugMessage = \" \" + station.getStnnam(\"\") +\n \", recordCount (same stnnam) = \" + recordCount;\n\n if (recordCount > 0) {\n duplicateCount++;\n\n station.setStnnam(station.getStnnam(\"\") + duplicateCount);\n\n debugMessage += \" - new stnnam = \" +\n station.getStnnam(\"\");\n //outputDebug(debugMessage);\n if (dbg) System.out.println(\"checkStationUIExists: new stnnam = \" +\n station.getStnnam(\"\"));\n }// if (recordCount > 0)\n\n outputDebug(debugMessage);\n\n } // while (recordCount > 0)\n\n } // if (stns.length == 0)\n\n }",
"public ArrayList<Line> searchLinesByConnection(Connection currentConnection) {\n if (currentConnection != null) {\n ArrayList<Line> currentLines = new ArrayList<>();\n for (int i = 0; i < lines.size(); i++) {\n /*\n if ((lines.get(i).getStartX() == currentConnection.x1 && lines.get(i).getStartY() == currentConnection.y1 &&\n lines.get(i).getEndX() == currentConnection.x2 && lines.get(i).getEndY() == currentConnection.y2) ||\n (lines.get(i).getStartX() == currentConnection.x2 && lines.get(i).getStartY() == currentConnection.y2 &&\n lines.get(i).getEndX() == currentConnection.x1 && lines.get(i).getEndY() == currentConnection.y1)) {\n currentLines.add(lines.get(i));\n }\n */\n if (doesLineMatchConnection(lines.get(i), currentConnection)) {\n currentLines.add(lines.get(i));\n }\n }\n return currentLines;\n }\n return null;\n }",
"private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }",
"@Override\n\tpublic List<FxzfLane> getByStation(String station) {\n\t\treturn fxzfLaneDao.getByStation(station);\n\t}",
"public void check_station(Station s) throws Exception{\r\n\t\ts.add_user(this);\r\n\t\tSystem.out.println(\"Station State: \" + s.isState());\r\n\t\tSystem.out.println(\"Station Id: \" + s.getId());\r\n\t\tSystem.out.println(\"Station Type: \" + s.getType());\r\n\t\tSystem.out.println(\"Station Position: \" + s.getPosition()[0] + \" \" + s.getPosition()[1]);\r\n\t\tSystem.out.println(\"Mech Slots Available: \" + (s.getPlaces_mech().size()-s.count_mech()));\r\n\t\tSystem.out.println(\"Elec Slots Available: \" + (s.getPlaces_elec().size()-s.count_elec()));\r\n\t\tSystem.out.println(\"Mech Bicycles Available: \" + (s.count_mech()));\r\n\t\tSystem.out.println(\"Elec Bicycles Available: \" + (s.count_elec()));\r\n\t}",
"public Station[] getAdjacentStations(Station station)\n {\n //Locate the station's index in the list of stations.\n int station_index = -1;\n for (int i = 0; i < stations.length; ++i)\n {\n if (station == stations[i])\n {\n station_index = i;\n break;\n }\n }\n //If nothing found, return null. This station does not exist in the graph.\n if (station_index == -1)\n return null;\n\n //Iterate over the row in the matrix containing edges from this station.\n //Extract all stations to which edges extend.\n LinkedList<Station> adjacent_stations = new LinkedList<Station>();\n for (int i = 0; i < edges[station_index].length; ++i)\n {\n if (edges[station_index][i] && stations[i] != null)\n adjacent_stations.add(stations[i]);\n }\n\n return adjacent_stations.toArray(new Station[0]);\n }",
"public abstract Map<Integer, Station> getStations(boolean includeSilent);",
"private String findLine(String line, String search){\n List<String> lines = line.lines().collect(Collectors.toList());\n for (String l: lines) {\n if(l.contains(search)){\n return l;\n }\n }\n return \"\";\n }",
"List<Stopsinlinedb> fetchStopsInLines();",
"boolean isSetStation();",
"private Vector <BusStopInfo> findStopInfo(BusStopInterface busStop)\r\n {\r\n Vector <BusStopInfo> result = new Vector<BusStopInfo>();\r\n Awtobus checking = null;\r\n for(int i=0; i < lines.size(); i++)\r\n {\r\n checking = lines.get(i);\r\n int length = checking.busLine.getNumberOfBusStops();\r\n for(int j=0; j<length; j++)\r\n {\r\n if(busStop == checking.busLine.getBusStop(j))\r\n {\r\n result.add(new BusStopInfo(checking, j));\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"public Obs findStops(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY) {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t/**\n\t\t * Stops sets and time stamps for these stops\n\t\t */\n\t\tString stops = \"\";\n\t\tString tstops = \"\";\n\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\ttry {\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Add buffer mode to the stops\n\t\t\t\t\t\t */\n\t\t\t\t\t\tint index = modeIndex(buffer);\n\t\t\t\t\t\tif (index != -1) {\n\t\t\t\t\t\t\t// System.out.println(\"Find stop\");\n\t\t\t\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\t\t\t\tstops += CLM;\n\t\t\t\t\t\t\t\ttstops += CLM;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstops += buffer.get(index);\n\t\t\t\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// else {\n\t\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t\t/**\n\t\t\t\t\t * Reset maximum distances\n\t\t\t\t\t */\n\t\t\t\t\tmax_distance = 0;\n\t\t\t\t\t// }\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\t/**\n\t\t\t * Add buffer mode to the stops\n\t\t\t */\n\t\t\tint index = modeIndex(buffer);\n\t\t\tif (index != -1) {\n\t\t\t\t// System.out.println(\"Find from the remaining buffer\");\n\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\tstops += CLM;\n\t\t\t\t\ttstops += CLM;\n\t\t\t\t}\n\t\t\t\tstops += buffer.get(index);\n\t\t\t\ttstops += tbuffer.get(index);\n\n\t\t\t}\n\n\t\t}\n\n\t\t// System.out.println(\"stops:\\t\" + stops);\n\t\t// System.out.println(\"time stamps:\\t\" + tstops);\n\t\treturn new Obs(stops, tstops);\n\n\t}",
"public void highlightTransportLine(AnchorPane anchor_pane_map, ArrayList<Street> streets_list, ArrayList<Line> all_streets_lines)\r\n {\r\n Line line1 = null;\r\n for (Street s : streets_list) {\r\n if (this.getStreetsMap().get(0).equals(s)) // highlight first street of line\r\n {\r\n int begin_stop_x = this.getStopsMap().get(0).getCoordinate().getX();\r\n int begin_stop_y = this.getStopsMap().get(0).getCoordinate().getY();\r\n\r\n Coordinate begin_street_1 = s.getCoordinates().get(0);\r\n Coordinate begin_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate second_street_1 = this.getStreetsMap().get(1).getCoordinates().get(0);\r\n Coordinate second_street_2 = this.getStreetsMap().get(1).getCoordinates().get(2);\r\n\r\n if ((begin_street_1.getX() == second_street_1.getX() && begin_street_1.getY() == second_street_1.getY()) || (begin_street_1.getX() == second_street_2.getX() && begin_street_1.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_1.getX(), begin_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((begin_street_2.getX() == second_street_1.getX() && begin_street_2.getY() == second_street_1.getY()) || (begin_street_2.getX() == second_street_2.getX() && begin_street_2.getY() == second_street_2.getY())) {\r\n line1 = new Line(begin_stop_x, begin_stop_y, begin_street_2.getX(), begin_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().get(this.getStreetsMap().size() - 1).equals(s)) // end street of line\r\n {\r\n int end_stop_x = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getX();\r\n int end_stop_y = this.getStopsMap().get(this.getStopsMap().size() - 1).getCoordinate().getY();\r\n\r\n Coordinate end_street_1 = s.getCoordinates().get(0);\r\n Coordinate end_street_2 = s.getCoordinates().get(2);\r\n\r\n Coordinate nexttolast_street_1 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(0);\r\n Coordinate nexttolast_street_2 = this.getStreetsMap().get(this.getStreetsMap().size() - 2).getCoordinates().get(2);\r\n\r\n if ((end_street_1.getX() == nexttolast_street_1.getX() && end_street_1.getY() == nexttolast_street_1.getY()) || (end_street_1.getX() == nexttolast_street_2.getX() && end_street_1.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_1.getX(), end_street_1.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n } else if ((end_street_2.getX() == nexttolast_street_1.getX() && end_street_2.getY() == nexttolast_street_1.getY()) || (end_street_2.getX() == nexttolast_street_2.getX() && end_street_2.getY() == nexttolast_street_2.getY())) {\r\n line1 = new Line(end_stop_x, end_stop_y, end_street_2.getX(), end_street_2.getY());\r\n line1.setStroke(this.getTransportLineColor());\r\n line1.setStrokeWidth(5);\r\n anchor_pane_map.getChildren().addAll(line1);\r\n }\r\n } else if (this.getStreetsMap().contains(s)) { // highlight whole street from line\r\n s.highlightStreet(anchor_pane_map, all_streets_lines, this.getTransportLineColor());\r\n }\r\n }\r\n }",
"public ArrayList<Integer> checkForLines() {\n ArrayList<Integer> fullRows = new ArrayList<Integer>();\n\n for (int row = 23; row > 3; row--) {\n if (isRowFull(row)) {\n fullRows.add(row);\n }\n }\n\n return fullRows;\n }",
"@Override\n\tpublic List<Station> geStationByFrom(String fromStation) {\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tSystem.out.println(\"**********getRelevantStationList************\");\n\t\t// String url =new\n\t\t// String(environment.getProperty(Constant.TO_STATIONS))+fromStation;\n\t\tString url = \"http://localhost:8080/MTRWebWS/home/to/\" + fromStation;\n\n\t\tResponseEntity<Station[]> response = restTemplate.getForEntity(url, Station[].class);\n\n\t\tSystem.out.println(response.toString());\n\t\tSystem.out.println(response.getHeaders());\n\t\tSystem.out.println(response.getStatusCode());\n\n\t\t// if(response.getStatusCode()==200){\n\t\treturn Arrays.asList(response.getBody());\n\t\t// }else{\n\t\t// return null\n\t\t// }\n\n\t}",
"private Collection<LineItem> getIntersectingWaterways(final Atlas atlas, final LineItem line)\n {\n final PolyLine linePoly = line.asPolyLine();\n final Iterable<LineItem> intersectingWaterways = atlas.lineItemsIntersecting(line.bounds(),\n lineItem -> this.waterwayTagFilter.test(lineItem)\n && lineItem.asPolyLine().intersects(linePoly));\n final Set<LineItem> sameLayerWays = Iterables.stream(intersectingWaterways)\n .filter(potential -> LayerTag.areOnSameLayer(line, potential)\n && !this.waterwayConnects(line, potential))\n .collectToSet();\n sameLayerWays.removeIf(line::equals);\n return sameLayerWays;\n }",
"public static int findPath(int currentTime[],int tLeave[], int timeStation[][], int transferTime[][], int totalStations) {\n\t\tint numofLines = currentTime.length;\n\t\tif(numofLines != 2){\n\t\t\tSystem.err.println(\"Only two assembly line supported\");\n\t\t\treturn -1;\n\t\t}\n\t\t//Cost function array\n\t\tint f[][] = new int[numofLines][totalStations];\n\t\t//Station index back track array\n\t\tint i[][] = new int[numofLines][totalStations];\n\t\t\n\t\t//Final Cost and Final Station\n\t\tint finalCost = 0;\n\t\tint lastStation = 0;\n\t\t\n\t\t//Time for first station\n\t\tf[0][0] = currentTime[0]+timeStation[0][0];\n\t\tf[1][0] = currentTime[1]+timeStation[1][0];\n\t\t\n\t\t\n\t\tfor (int j = 1; j < totalStations; j++) {\n\t\t\t\n\t\t\t\n\t\t\tif((f[0][j-1] + timeStation[0][j]) <= (f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j])){\n\t\t\t\tf[0][j]= f[0][j-1]+ timeStation[0][j];\n\t\t\t\ti[0][j] = 0;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[0][j]= f[1][j-1]+ transferTime[1][j-1]+timeStation[0][j];\n\t\t\t\ti[0][j]=1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(f[1][j-1] + timeStation[1][j] <= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j]){\n\t\t\t\tf[1][j]= f[1][j-1]+ timeStation[1][j];\n\t\t\t\ti[1][j] = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tf[1][j]= f[0][j-1]+ transferTime[0][j-1]+timeStation[1][j];\n\t\t\t\ti[1][j] = 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((f[0][totalStations-1]+tLeave[0]) <= (f[1][totalStations-1]+tLeave[1] )){\n\t\t\tfinalCost = f[0][totalStations-1]+tLeave[0];\n\t\t\tlastStation = 0;\n\t\t}\n\t\telse{\n\t\t\tfinalCost = f[1][totalStations-1]+tLeave[1] ;\n\t\t\tlastStation = 1;\n\t\t}\t\n\t\n\t\tprintStation(lastStation,finalCost, i, totalStations);\n\t\treturn finalCost;\n\t}",
"public boolean linesIntersect() {\n\t\twhile (true) {\n\t\t\t// for loop for the asteroid's lines\n\t\t\tfor (int i = 0; i < NUM_LINES; i++) {\n\t\t\t\t// for loop for the ship's lines\n\t\t\t\tfor (int j = 0; j < ship.shipOutLine().length; j++) {\n\t\t\t\t\tint o1 = orientation(outLine[i].getStart(),\n\t\t\t\t\t\t\toutLine[i].getEnd(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getStart());\n\t\t\t\t\tint o2 = orientation(outLine[i].getStart(),\n\t\t\t\t\t\t\toutLine[i].getEnd(), ship.shipOutLine()[j].getEnd());\n\t\t\t\t\tint o3 = orientation(ship.shipOutLine()[j].getStart(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getEnd(),\n\t\t\t\t\t\t\toutLine[i].getStart());\n\t\t\t\t\tint o4 = orientation(ship.shipOutLine()[j].getStart(),\n\t\t\t\t\t\t\tship.shipOutLine()[j].getEnd(), outLine[i].getEnd());\n\n\t\t\t\t\tif (o1 != o2 && o3 != o4) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public void extendedErrorCheck(int station) throws JposException {\r\n boolean[][] relevantconditions = new boolean[][]{\r\n new boolean[]{Data.JrnEmpty, Data.JrnCartridgeState == POSPrinterConst.PTR_CART_REMOVED, Data.JrnCartridgeState == POSPrinterConst.PTR_CART_EMPTY, Data.JrnCartridgeState == POSPrinterConst.PTR_CART_CLEANING },\r\n new boolean[]{Data.RecEmpty, Data.RecCartridgeState == POSPrinterConst.PTR_CART_REMOVED, Data.RecCartridgeState == POSPrinterConst.PTR_CART_EMPTY, Data.RecCartridgeState == POSPrinterConst.PTR_CART_CLEANING },\r\n new boolean[]{Data.SlpEmpty, Data.SlpCartridgeState == POSPrinterConst.PTR_CART_REMOVED, Data.SlpCartridgeState == POSPrinterConst.PTR_CART_EMPTY, Data.SlpCartridgeState == POSPrinterConst.PTR_CART_CLEANING }\r\n };\r\n int[][] exterrors = new int[][]{\r\n new int[]{POSPrinterConst.JPOS_EPTR_JRN_EMPTY, POSPrinterConst.JPOS_EPTR_JRN_CARTRIDGE_REMOVED, POSPrinterConst.JPOS_EPTR_JRN_CARTRIDGE_EMPTY, POSPrinterConst.JPOS_EPTR_JRN_HEAD_CLEANING},\r\n new int[]{POSPrinterConst.JPOS_EPTR_REC_EMPTY, POSPrinterConst.JPOS_EPTR_REC_CARTRIDGE_REMOVED, POSPrinterConst.JPOS_EPTR_REC_CARTRIDGE_EMPTY, POSPrinterConst.JPOS_EPTR_REC_HEAD_CLEANING},\r\n new int[]{POSPrinterConst.JPOS_EPTR_SLP_EMPTY, POSPrinterConst.JPOS_EPTR_SLP_CARTRIDGE_REMOVED, POSPrinterConst.JPOS_EPTR_SLP_CARTRIDGE_EMPTY, POSPrinterConst.JPOS_EPTR_SLP_HEAD_CLEANING},\r\n };\r\n String[] errortexts = { \"Paper empty\", \"Cartridge removed\", \"Cartridge empty\", \"Head cleaning\" };\r\n Device.check(Data.PowerNotify == JposConst.JPOS_PN_ENABLED && Data.PowerState != JposConst.JPOS_PS_ONLINE, JposConst.JPOS_E_FAILURE, \"POSPrinter not reachable\");\r\n Device.checkext(Data.CoverOpen, POSPrinterConst.JPOS_EPTR_COVER_OPEN, \"Cover open\");\r\n for (int j = 0; j < relevantconditions.length; j++) {\r\n if (station == SingleStations[j]) {\r\n for (int k = 0; k < relevantconditions[j].length; k++) {\r\n Device.checkext(relevantconditions[j][k], exterrors[j][k], errortexts[k]);\r\n }\r\n }\r\n }\r\n }",
"public String getFromStation();",
"public boolean hasStation(String station) {\n if(this.station.equals(station)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean inLineOfSight(){\n\t\t\n\t\tboolean keepGoing=true;\n\t\t\n\t\tfor (int i=0; i<this._movingTrainers.size(); i++){\n\t\t\tthis._LOSTrainer=i;\n\t\t\tkeepGoing=true;\n\t\t\t//within their line of sight\n\t\t\tif(this._movingTrainers.get(i)!=null && !this._movingTrainers.get(i).isDefeated()){\n\t\t\t\tfor (int j=0; j<this._movingTrainers.get(i).getLOS(); j++){\n\t\t\t\t\tif(keepGoing){\n\t\t\t\t\t\tint tx=this._movingTrainers.get(i).getXIndex();\n\t\t\t\t\t\tint ty=this._movingTrainers.get(i).getYIndex();\n\t\t\t\t\t\tint jx=0;\n\t\t\t\t\t\tint jy=0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//facing the right way\n\t\t\t\t\t\tswitch(this._movingTrainers.get(i).getDirection()){\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\tjx=0;\n\t\t\t\t\t\t\t\tjy=1*j;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tjx=0;\n\t\t\t\t\t\t\t\tjy=-1*j;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tjx=1*j;\n\t\t\t\t\t\t\t\tjy=0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\tjx=-1*j;\n\t\t\t\t\t\t\t\tjy=0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//What's in the way? if nothing and they see the player, return true.\n\t\t\t\t\t\tif((tx+jx)>=0 && (ty+jy)>=0){\n\t\t\t\t\t\t\tchar next= this._room._roomGrid[tx + jx][ty + jy];\n\t\t\t\t\t\t\tif(tx+jx==xObs && ty+jy==yObs){\n\t\t\t\t\t\t\t\tthis._interruptedTrainer=this._LOSTrainer;\n\t\t\t\t\t\t\t\tTrainer interrupted = this._movingTrainers.get(this._interruptedTrainer);\n\t\t\t\t\t\t\t\t//_busy=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//These two statements are for moving trainers who can interrupt. \n\t\t\t\t\t\t\t\tif(!interrupted.isStationary() && _gbs.npctick!=0){\n\t\t\t\t\t\t\t\t\treturn false;\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\twhile(!interrupted.isStationary() && !this._approachTimer.isRunning()){\n\t\t\t\t\t\t\t\t\tinterrupted.setAvoidMethod(\"freeze\");\n\t\t\t\t\t\t\t\t\tinterrupted.setStationary(true);\n\t\t\t\t\t\t\t\t\tSysOut.print(\"Frozen\");\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\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(interrupted.getXIndex()>this.xObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(xObs+1==interrupted.getXIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs+1, yObs);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getXIndex()<this.xObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(xObs-1==interrupted.getXIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs-1, yObs);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getYIndex()>this.yObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(yObs+1==interrupted.getYIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs, yObs+1);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getYIndex()<this.yObs){\n\t\t\t\t\t\t\t\t\tinterrupted.clearDestinations();\n\t\t\t\t\t\t\t\t\tif(yObs-1==interrupted.getYIndex() && _tooCloseTrigger){\n\t\t\t\t\t\t\t\t\t\t_tooCloseWait=true;\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t_tooCloseTrigger=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tinterrupted.addDest(xObs, yObs-1);\n\t\t\t\t\t\t\t\t\tinterrupted.setFirstDest();\n\t\t\t\t\t\t\t\t\tinterrupted.setPause(false);\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////SysOut.print(\"HE SEES YOU WHEN YOU'RE SLEEPING: \"+ _interruptedTrainer);\n\t\t\t\t\t\t\t\t//End the loop, return true.\n\t\t\t\t\t\t\t\tif(interrupted.getLOS()==0 || !interrupted.isStationary()){\n\t\t\t\t\t\t\t\t\tthis._paintAlert=false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (interrupted.getLOS()>0){\n\t\t\t\t\t\t\t\t\tthis._paintAlert=true;\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\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\tif(!this._approachTimer.isRunning()){\n\t\t\t\t\t\t\t\t\tthis._seenByNPC=true;\n\t\t\t\t\t\t\t\t\tif(interrupted.getGender() == 'M' && interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.TRAINER_APPROACH_M);\n\t\t\t\t\t\t\t\t\telse if(interrupted.getGender() == 'F'&& interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.TRAINER_APPROACH_F);\n\t\t\t\t\t\t\t\t\telse if(interrupted.getGender() == 'R'&& interrupted.getBelt()!=null)\n\t\t\t\t\t\t\t\t\t\tM2.playBG(M2.RIVAL_MUSIC);\n\t\t\t\t\t\t\t\t\tthis._approachTimer.start();\n\t\t\t\t\t\t\t\t\tthis._tooCloseTrigger=true;\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\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if((next==SURF && !_gbs.getSurf() && !this._movingTrainers.get(this._LOSTrainer).canSurf())|| (next==SURF && _gbs.getSurf() && !this._movingTrainers.get(this._LOSTrainer).canSurf()) || (next==SURF && !_gbs.getSurf() && this._movingTrainers.get(this._LOSTrainer).canSurf()) || (next==NO && j!=0) || next==CUT){\n\t\t\t\t\t\t\t\t////SysOut.print(\"Something is in the way: \"+ _interruptedTrainer);\n\t\t\t\t\t\t\t\t//Stop this iteration, move on.\n\t\t\t\t\t\t\t\tkeepGoing = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int k=0; k<this._movingTrainers.size(); k++){\n\t\t\t\t\t\t\t\tif(tx+jx==this._movingTrainers.get(k).getXIndex() && ty+jy==this._movingTrainers.get(k).getYIndex() && j>0){\n\t\t\t\t\t\t\t\t\t////SysOut.print(\"Another trainer is in the way:\" + _interruptedTrainer);\n\t\t\t\t\t\t\t\t\t//Stop this iteration, move on.\n\t\t\t\t\t\t\t\t\tif(this._movingTrainers.get(k).isDefeated() && this._movingTrainers.get(k).getVanishing()){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tkeepGoing = false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\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}\n\t\t////SysOut.print(\"They don't see you.\");\n\t\treturn false;\n\t}",
"private void checkStationPresent(int station) throws JposException {\r\n Device.checkMember(station, SingleStations, JposConst.JPOS_E_ILLEGAL, \"Invalid print station: \" + station);\r\n Device.check(station == POSPrinterConst.PTR_S_JOURNAL && !Data.CapJrnPresent, JposConst.JPOS_E_ILLEGAL, \"No journal\");\r\n Device.check(station == POSPrinterConst.PTR_S_RECEIPT && !Data.CapRecPresent, JposConst.JPOS_E_ILLEGAL, \"No receipt\");\r\n Device.check(station == POSPrinterConst.PTR_S_SLIP && !Data.CapSlpPresent, JposConst.JPOS_E_ILLEGAL, \"No slip\");\r\n }",
"public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}",
"public Obs findStops_trips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY)\n\t\t\tthrows ParseException {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\t/**\n\t\t * Stops sets and time stamps for these stops\n\t\t */\n\t\tString stops = towers[0];\n\t\tString tstops = tstamps[0];\n\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\t/**\n\t\t\t\t * if the time exceeds timing threshold, then check the distance\n\t\t\t\t * between towers. If this distance less than the distance\n\t\t\t\t * threshold, then previous tower is the end of the current\n\t\t\t\t * trip.\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\tcal.setTime(sTime);\n\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tcal.setTime(eTime);\n\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t// if (buffer.size() >= trip_length) {\n\t\t\t\t\tif (!stops.isEmpty()) {\n\t\t\t\t\t\tstops += CLM;\n\t\t\t\t\t\ttstops += CLM;\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * Add start and end of the trips to the stop sequences\n\t\t\t\t\t */\n\t\t\t\t\tstops += buffer.get(buffer.size() - 1);\n\t\t\t\t\ttstops += tbuffer.get(tbuffer.size() - 1);\n\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\t// else {\n\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t/**\n\t\t\t\t * Reset maximum distances\n\t\t\t\t */\n\t\t\t\tmax_distance = 0;\n\t\t\t\t// }\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\t// if (buffer.size() >= trip_length) {\n\t\t\tif (!stops.isEmpty()) {\n\t\t\t\tstops += CLM;\n\t\t\t\ttstops += CLM;\n\t\t\t}\n\t\t\t/**\n\t\t\t * Add start and end of the trips to the stop sequences\n\t\t\t */\n\t\t\tstops += buffer.get(buffer.size() - 1);\n\t\t\ttstops += tbuffer.get(tbuffer.size() - 1);\n\n\t\t\t// }\n\t\t}\n\n\t\t// System.out.println(\"stops:\\t\" + stops);\n\t\t// System.out.println(\"time stamps:\\t\" + tstops);\n\t\treturn new Obs(stops, tstops);\n\n\t}",
"public abstract boolean passes(String line);",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static List getDestStationList(int station_id, boolean onlyOpenOhds) {\n\t\tSession sess = null;\n\t\ttry {\n\t\t\tString query = \"select log.destStationCode from com.bagnet.nettracer.tracing.db.OHD_Log log where \"\n\t\t\t\t\t+ \"log.destStationCode = :station_id\";\n\t\t\tif (onlyOpenOhds) {\n\t\t\t\tquery += \" and log.log_status = :log_status\";\n\t\t\t\tquery += \" and (log.ohd.status.status_ID = :ohd_status1 or log.ohd.status.status_ID = :ohd_status2)\";\n\t\t\t}\n\t\t\tsess = HibernateWrapper.getSession().openSession();\n\t\t\tQuery q = sess.createQuery(query);\n\t\t\tq.setInteger(\"station_id\", station_id);\n\t\t\t\n\t\t\tif (onlyOpenOhds) {\n\t\t\t\tq.setInteger(\"log_status\", TracingConstants.LOG_NOT_RECEIVED);\n\t\t\t\tq.setInteger(\"ohd_status1\", TracingConstants.OHD_STATUS_MATCH_IN_TRANSIT);\n\t\t\t\tq.setInteger(\"ohd_status2\", TracingConstants.OHD_STATUS_IN_TRANSIT);\n\t\t\t}\n\t\t\t\n\t\t\treturn q.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (sess != null)\n\t\t\t\t\tsess.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public int selectForwardLine() {\n int bestLine = 0;\n for (int i = 0; i < forwardLines.length; i++) {\n double averageStamina = getForwardAverageStamina(i);\n System.out.println(forwardLines[i][1] + \" avg line Stamina (Line:\" + (i+1) + \") :\" + averageStamina);\n if (averageStamina > getForwardAverageStamina(bestLine)) {\n bestLine = i;\n }\n }\n return bestLine;\n }",
"public String[] obtainStops() {\n\n String[] stopsNone = { \"No stops found\" };\n String[] stopsArbutus = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Hilltop Cir. & Hilltop Rd.\", \"Hilltop Cir. & Walker Ave.\", \"Hilltop Cir. & Center Rd.\", \"Poplar Ave. & Stadium Lot\", \"TRC @ Linden Ave\", \"Westland Blvd. & Circle Dr.\", \"Westland Blvd. & Courtney Rd.\", \"Maiden Choice La. & Westland Blvd\", \"Maiden Choice La. & Warren Tree\", \"Maiden Choice La. & Wilkens Ave\", \"Maiden Choice La. & Grouse Ct\", \"Maiden Choice La. & Symmington Aven.\"};\n String[] stopsArundel = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"BWI Marc Station\", \"Arundel Mills Mall Visitor Entrace #5\", \"BWI Marc Station\", \"Administration Dr. Bus Shelter\", \"Hilltop Circle & Hilltop Rd.\" };\n String[] stopsCatonsville = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Rolling Rd @YMCA\", \"Rolling Rd @Valley Rd (CCBC)\", \"Catonsville High @Bloomsbury Ave\", \"Mellor Ave & Bloomsbury Ave\" };\n String[] stopsDowntownA = { \"Commons Dr. & Park Rd\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Greyhound Station @ Haines\",\"MLK Blvd & Pratt St (UMB)\", \"Green St & Fayette St\", \"Green St & Lombard St (UMB)\" };\n\n if ( this.longName.toLowerCase().contains(\"Arbutus\".toLowerCase()) ) {\n return stopsArbutus;\n }\n if ( this.longName.contains(\"Arundel\") ) {\n return stopsArundel;\n }\n if ( this.longName.contains(\"Catonsville\") ) {\n return stopsCatonsville;\n }\n if ( this.longName.contains(\"Downtown\") ) {\n return stopsDowntownA;\n }\n\n return stopsNone;\n\n }",
"IRegion getLineInformation(int line) throws BadLocationException;",
"ArrayList<TTC> generateSegments() {\n if ((START_STATION instanceof Station) && (endStation instanceof Station)) {\n ArrayList<TTC> route = TTC.SUBWAY_LIST.get(NUMBER);\n if (route.contains(START_STATION) && route.contains(endStation)) {\n return generateSegmentsHelper(route);\n } else {\n return new ArrayList<>();\n }\n } else {\n ArrayList<TTC> route = TTC.BUS_MAP.get((START_STATION).getNUMBER());\n if (route.contains(START_STATION) && route.contains(endStation)) {\n return generateSegmentsHelper(route);\n } else {\n return new ArrayList<>();\n }\n }\n }",
"public void displayAvailableSeatsInSpecificFlight(int flight_id) {\n\n\t\tArrayList<Seat> listOfSeats = fetchSeatDatabaseContentToList(); // prepare listOfSeats ArrayList for use by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// fetching content from database\n\n\t\tfor (int i = 0; i < listOfSeats.size(); i++) {\n\n\t\t\tif ((listOfSeats.get(i).getFlight().getFlightId() == flight_id) && listOfSeats.get(i).isSeatAvailable()) {\n\t\t\t\tSystem.out.println(listOfSeats.get(i));\n\t\t\t}\n\t\t}\n\t}",
"public Obs findtrips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY) {\n\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\n\t\tboolean marks[] = new boolean[towers.length];\n\t\t/**\n\t\t * Buffers: <\\n buffer holds sequence of observations that did not meet\n\t\t * buffer clearance criterias.> <\\n tbuffer holds time stamps values\n\t\t * corresponding to those in the buffer.>\n\t\t */\n\t\tArrayList<String> buffer = new ArrayList<>();\n\t\tArrayList<String> tbuffer = new ArrayList<>();\n\n\t\tdouble max_distance = 0;\n\t\tint time_diff = 0;\n\t\tfor (int i = 0; i < towers.length; i++) {\n\t\t\tVertex a = towersXY.get(Integer.parseInt(towers[i]));\n\t\t\tfor (int j = 0; j < buffer.size(); j++) {\n\t\t\t\tVertex b = towersXY.get(Integer.parseInt(buffer.get(j)));\n\t\t\t\t// System.out.println(\"b\"+Integer.parseInt(buffer.get(j)));\n\t\t\t\tdouble tmp_distance = eculidean(a.getX(), b.getX(), a.getY(), b.getY());\n\t\t\t\tif (tmp_distance > max_distance) {\n\t\t\t\t\tmax_distance = tmp_distance;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbuffer.add(towers[i]);\n\t\t\ttbuffer.add(tstamps[i]);\n\n\t\t\tif (max_distance > dist_th) {\n\n\t\t\t\ttry {\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tjava.util.Date sTime = formatter.parse(tbuffer.get(0));\n\t\t\t\t\tjava.util.Date eTime = formatter.parse(tbuffer.get(tbuffer.size() - 1));\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\ttime_diff = Math.abs((ehour - hour)) * HOUR + (eminute - minute);\n\n\t\t\t\t\tif (time_diff > time_th) {\n\t\t\t\t\t\tmarks[i] = true;\n\n\t\t\t\t\t}\n\t\t\t\t\t// else {\n\t\t\t\t\tbuffer = new ArrayList<>();\n\t\t\t\t\ttbuffer = new ArrayList<>();\n\t\t\t\t\t/**\n\t\t\t\t\t * Reset maximum distances\n\t\t\t\t\t */\n\t\t\t\t\tmax_distance = 0;\n\t\t\t\t\t// }\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\tif (!buffer.isEmpty()) {\n\t\t\tmarks[marks.length - 1] = true;\n\t\t}\n\n\t\t/**\n\t\t * User trips buffers.\n\t\t */\n\t\tString trips = towers[0];\n\t\tString tstrips = tstamps[0];\n\n\t\tfor (int i = 1; i < marks.length; i++) {\n\t\t\tboolean mark = marks[i];\n\t\t\ttrips += CLM + towers[i];\n\t\t\ttstrips += CLM + tstamps[i];\n\n\t\t\t/**\n\t\t\t * The end of the previous trip is the start of the new trip.\n\t\t\t */\n\t\t\tif (mark && i != marks.length - 1) {\n\t\t\t\ttrips += RLM + towers[i];\n\t\t\t\ttstrips += RLM + tstamps[i];\n\t\t\t}\n\n\t\t}\n\t\treturn new Obs(trips, tstrips);\n\n\t}",
"void format11(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 11 record per substation\n code11Count++;\n if (code11Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 11 record in substation\");\n } // if (code11Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f7.3 cadmium µgm / gram sedpol1\n //04 f8.3 lead µgm / gram sedpol1\n //05 f8.3 copper µgm / gram sedpol1\n //06 f8.3 zinc µgm / gram sedpol1\n //07 f8.4 mercury µgm / gram sedpol1\n //08 f8.3 nickel µgm / gram sedpol1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: sedpol1 = \" + sedpol1);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.3 cadmium µgm / litre watpol1\n //04 f8.3 lead µgm / litre watpol1\n //05 f8.3 copper µgm / litre watpol1\n //06 f8.3 zinc µgm / litre watpol1\n //07 f8.4 mercury µgm / litre watpol1\n //08 f8.3 nickel µgm / litre watpol1\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: watpol1 = \" + watpol1);\n\n } // if (dataType == SEDIMENT)\n\n }",
"private boolean checkLines(){\n\n for (int[] line : TwoPlayersActivity.lines) {\n\n if (field.get(line[0]).equals(field.get(line[1])) &&\n field.get(line[0]).equals(field.get(line[2])) &&\n !field.get(line[0]).getValue().equals(Cell.Value.NONE)){\n for (int index: line) {\n imageList.get(index).setBackgroundColor(Color\n .parseColor(TwoPlayersActivity.CELL_WIN_COLOR));\n }\n return true;\n }\n }\n return false;\n }",
"private int findLine(int row, String[][] serverCells) {\n\t\tfor (int i = 1; i < serverCells.length; i++) {\n\t\t\tif (Integer.parseInt(serverCells[i][0]) == row) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"List<Tour> getTourSchedule(String line);",
"void loadStation() {\n\n // only do this if the station does not exist\n if (!stationExists) {\n\n station.setStatusCode(35); // open & unknown\n if (!\"\".equals(passkey)) { // ub02\n station.setPasskey(passkey); // ub02\n } // if (!\"\".equals(passkey)) // ub02\n\n if (dbg3) System.out.println(\"<br>loadStation: put station = \" + station);\n if (dbg4) System.out.println(\"<br>loadStation: put station = \" + station);\n try {\n station.put();\n } catch(Exception e) {\n System.err.println(\"loadStation: put station = \" + station);\n System.err.println(\"loadStation: put sql = \" + station.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"loadStation: sql = \" + station.getInsStr());\n\n //stationCount++;\n\n if (!\"\".equals(sfriGrid.getGridNo(\"\"))) {\n try {\n sfriGrid.put();\n } catch(Exception e) {\n System.err.println(\"loadStation: put sfriGrid = \" + sfriGrid);\n System.err.println(\"loadStation: put sql = \" + sfriGrid.getInsStr());\n e.printStackTrace();\n } // try-catch\n if (dbg3) System.out.println(\"<br>loadStation: put sfriGrid = \" + sfriGrid);\n } // if (!\"\".equals(sfriGrid.getGridNo(\"\")))\n\n weatherIsLoaded = false;\n\n } // if (!stationExists)\n\n }",
"List<Vehicle> getLineVehicles(String line);",
"private Obs findTrips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY, int dist_th,\n\t\t\tint time_th) {\n\t\t/**\n\t\t * Marks array contain index of the towers that represent the starting\n\t\t * observation of a new trip.\n\t\t */\n\t\tboolean[] marks = new boolean[tstamps.length];\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\t/**\n\t\t * add 0 as the start of the first tower in this seq.\n\t\t */\n\t\t// int mIndex = 0;\n\t\t// marks[mIndex++] = 0;\n\n\t\tint current = 0;\n\t\tfor (int i = 1; i < tstamps.length; i++) {\n\t\t\ttry {\n\t\t\t\tString tstamp = tstamps[i];\n\n\t\t\t\t/**\n\t\t\t\t * if the time exceeds timing threshold, then check the distance\n\t\t\t\t * between towers. If this distance less than the distance\n\t\t\t\t * threshold, then previous tower is the end of the current\n\t\t\t\t * trip.\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tDate sTime = formatter.parse(tstamps[current]);\n\t\t\t\tDate eTime = formatter.parse(tstamp);\n\t\t\t\tcal.setTime(sTime);\n\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tcal.setTime(eTime);\n\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tint diff = (ehour - hour) * HOUR + (eminute - minute);\n\t\t\t\t/**\n\t\t\t\t * check time difference with time threshold whatever the\n\t\t\t\t * distance between the starting tower\n\t\t\t\t */\n\t\t\t\tif (diff > time_th) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Check distance, if it distance less than distance\n\t\t\t\t\t * threshold mark the current tower as the start of a new\n\t\t\t\t\t * trip.\n\t\t\t\t\t */\n\t\t\t\t\tVertex sTower = towersXY.get(Integer.parseInt(towers[i - 1]));\n\t\t\t\t\tVertex tower = towersXY.get(Integer.parseInt(towers[i]));\n\n\t\t\t\t\tif (eculidean(sTower.getX(), tower.getX(), sTower.getY(), tower.getY()) < dist_th) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Update the trip sequences\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmarks[i] = true;\n\t\t\t\t\t\tcurrent = i;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (ParseException ex) {\n\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * construct observations and time stamps\n\t\t */\n\t\tString time = \"\";\n\t\tString obs = \"\";\n\t\t// time += tstamps[0];\n\t\t// obs += towers[0];\n\t\tfor (int i = 0; i < marks.length; i++) {\n\t\t\tif (marks[i]) {\n\n\t\t\t\ttime += RLM + tstamps[i];\n\t\t\t\tobs += RLM + towers[i];\n\t\t\t} else {\n\t\t\t\t// if (towers[i].equals(towers[i - 1])) {\n\t\t\t\t// System.out.println(towers[i] + \"\\t=\\t\" + towers[i - 1]);\n\t\t\t\t// continue;\n\t\t\t\t// }\n\t\t\t\t/**\n\t\t\t\t * Add comma separators\n\t\t\t\t */\n\t\t\t\tif (!time.isEmpty()) {\n\t\t\t\t\ttime += CLM;\n\t\t\t\t\tobs += CLM;\n\t\t\t\t}\n\t\t\t\ttime += tstamps[i];\n\t\t\t\tobs += towers[i];\n\t\t\t}\n\n\t\t}\n\t\treturn new Obs(obs, time);\n\t}",
"void format12(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 12 record per substation\n code12Count++;\n if (code12Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 12 record in substation\");\n } // if (code12Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"12\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f10.3 iron µgm / gram sedpol1\n //04 f9.3 chromium µgm / gram sedpol1\n //05 f8.3 manganese µgm / gram sedpol1\n //06 f8.3 cobalt µgm / gram sedpol1\n //07 f8.3 selenium µgm / gram sedpol1\n //08 f8.3 arsenic µgm / gram sedpol1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol1.setIron(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setChromium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setManganese(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setCobalt(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setSelenium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setArsenic(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format12: sedpol1 = \" + sedpol1);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"12\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f10.3 iron µgm / litre watpol1\n //04 f9.3 chromium µgm / litre watpol1\n //05 f8.3 manganese µgm / litre watpol1\n //06 f8.3 cobalt µgm / litre watpol1\n //07 f8.3 selenium µgm / litre watpol1\n //08 f8.3 arsenic µgm / litre watpol1\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol1.setIron(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setChromium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setManganese(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setCobalt(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setSelenium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setArsenic(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format12: watpol1 = \" + watpol1);\n\n } // if (dataType == SEDIMENT)\n\n }",
"public List<Station> stationsOf(String ville) {\n List<Station> listStations = new ArrayList<Station>();\n int j;\n String[] Array;\n for (List<String> listOfList : listOfLists) {\n\n if (listOfList.get(1).equals(\"ville:\" + ville.toLowerCase())) {\n j = 0;\n Station station = new Station();\n\n for (String x : listOfList) {\n Array = listOfList.get(j).split(\":\");\n\n switch (Array[0]) {\n case \"adresse\":\n station.setAdresse(Array[1]);\n break;\n case \"Gazole\":\n station.setGazole(Array[1]);\n break;\n case \"SP95\":\n station.setSP95(Array[1]);\n break;\n case \"SP98\":\n station.setSP98(Array[1]);\n break;\n case \"E10\":\n station.setE10(Array[1]);\n break;\n case \"E85\":\n station.setE85(Array[1]);\n break;\n case \"GPLc\":\n station.setGPLc(Array[1]);\n break;\n }\n ++j;\n }\n listStations.add(station);\n }\n }\n return listStations;\n }",
"public ArrayList<Coordinate> getAffectedPointsTraffic(ArrayList<Line> affected_lines)\r\n {\r\n ArrayList<Coordinate> new_affected_points = new ArrayList<Coordinate>();\r\n\r\n for (Street s : this.getStreetsMap()) {\r\n for (Line l : affected_lines) {\r\n if (s.begin().getX() == l.getStartX() && s.begin().getY() == l.getStartY() && s.end().getX() == l.getEndX() && s.end().getY() == l.getEndY()) {\r\n System.out.println(\"Street of line is affected with traffic now\");\r\n\r\n for (int i = 0; i < this.transportLinePath().size(); i++) {\r\n if (this.transportLinePath().get(i).isBetweenTwoCoordinates(s.begin(), s.end()) || (this.transportLinePath().get(i).getX() == s.begin().getX() && this.transportLinePath().get(i).getY() == s.begin().getY()) || (this.transportLinePath().get(i).getX() == s.end().getX() && this.transportLinePath().get(i).getY() == s.end().getY())) {\r\n System.out.println(\"Affected points: \" + this.transportLinePath().get(i).getX() + \", \" + this.transportLinePath().get(i).getY());\r\n new_affected_points.add(this.transportLinePath().get(i));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return new_affected_points;\r\n }",
"List<Stop> getStopsPerLine(String line);",
"public void loadDataForStation(NDBCStation station) {\n\t\tif (station != null) {\n\t\t\tif (station.getLastUserUpdate().before(\n\t\t\t\t\tstation.getLastOnlineUpdate())) {\n\n\t\t\t\tDiveSiteOnlineDatabaseLink diveSiteOnlineDatabase = new DiveSiteOnlineDatabaseLink(\n\t\t\t\t\t\tgetActivity());\n\t\t\t\tdiveSiteOnlineDatabase\n\t\t\t\t\t\t.setDiveSiteOnlineLoaderListener(new DiveSiteOnlineDatabaseLink.OnlineDiveDataListener() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onOnlineDiveDataRetrievedComplete(\n\t\t\t\t\t\t\t\t\tArrayList<Object> resultList,\n\t\t\t\t\t\t\t\t\tString message, Boolean isError) {\n\t\t\t\t\t\t\t\t// Replace existing station with updated one\n\t\t\t\t\t\t\t\tif (resultList.size() > 0) {\n\t\t\t\t\t\t\t\t\tNDBCStation updatedNDBCStation = (NDBCStation) resultList\n\t\t\t\t\t\t\t\t\t\t\t.get(0);\n\t\t\t\t\t\t\t\t\tObject[] ndbcStations = mVisibleNDBCStationMarkers\n\t\t\t\t\t\t\t\t\t\t\t.keySet().toArray();\n\t\t\t\t\t\t\t\t\tfor (int i = 0; i < ndbcStations.length; i++) {\n\t\t\t\t\t\t\t\t\t\tif (((NDBCStation) ndbcStations[i])\n\t\t\t\t\t\t\t\t\t\t\t\t.getStationId() == updatedNDBCStation\n\t\t\t\t\t\t\t\t\t\t\t\t.getStationId()) {\n\t\t\t\t\t\t\t\t\t\t\tNDBCStation existingNDBCStation = (NDBCStation) ndbcStations[i];\n\t\t\t\t\t\t\t\t\t\t\tMarker existingMarker = mVisibleNDBCStationMarkers\n\t\t\t\t\t\t\t\t\t\t\t\t\t.get(existingNDBCStation);\n\n\t\t\t\t\t\t\t\t\t\t\tmVisibleNDBCStationMarkers\n\t\t\t\t\t\t\t\t\t\t\t\t\t.remove(existingNDBCStation);\n\t\t\t\t\t\t\t\t\t\t\tmVisibleNDBCStationMarkers.put(\n\t\t\t\t\t\t\t\t\t\t\t\t\tupdatedNDBCStation,\n\t\t\t\t\t\t\t\t\t\t\t\t\texistingMarker);\n\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tshowDataForStation(updatedNDBCStation);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tgetActivity()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tmessage, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onOnlineDiveDataProgress(Object result) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onOnlineDiveDataPostBackground(\n\t\t\t\t\t\t\t\t\tArrayList<Object> resultList, String message) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\tdiveSiteOnlineDatabase.updateNDBCDataForStation(station, \"1\");\n\t\t\t} else {\n\t\t\t\tshowDataForStation(station);\n\t\t\t}\n\t\t}\n\t}",
"public Boolean checkCapture(ArrayList<Point> points){\n int length = points.size();\n\n for (int i = 1; i < length; i++) {\n Point lineA = points.get(i);\n\n for (int j = i + 1; j < length; j++) {\n Point lineB = points.get(j);\n\n //Check if one of the lines goes through the monster by using its size\n boolean left = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX,mY,mX,mY+monsterHeight);\n boolean right = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX + monsterWidth,mY, mX+monsterWidth,mY+monsterHeight);\n boolean top = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY, mX+monsterWidth,mY);\n boolean bottom = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY+monsterHeight, mX+monsterWidth,mY+monsterHeight);\n\n //If any are true then its captured\n if(left || right || top || bottom){\n return true;\n }\n }\n }\n return false;\n }",
"public void checkLines() {\n int cont2 = 0;\n int cont3, cont4;\n int casillasVacias;\n int vInicial, vFinal;\n\n for(cont3=20; cont3>0; cont3--) {\n vInicial = cont3*12 + 1;\n vFinal = vInicial + 10;\n casillasVacias = 10;\n\n //Bucle para todas las casillas de una fila\n for(cont4=vInicial; cont4<vFinal; cont4++) {\n if(colMatrix[cont4]) casillasVacias--;\n }\n\n if(casillasVacias == 0) {\n completeLines[cont2] = cont3;\n cont2++;\n }\n }\n removeLines();\n }",
"@Override\n public boolean contains(Line l) {\n int maxLineX = Math.max(l.p1.x, l.p2.x);\n int minLineX = Math.min(l.p1.x, l.p2.x);\n int maxLineY = Math.max(l.p1.y, l.p2.y);\n int minLineY = Math.min(l.p1.y, l.p2.y);\n\n double[] lineEq = calculateLineEquation(l.p1, l.p2);\n double leftIntersectionX = xIntersection(lineEq, topLeftCorner.y);\n // the line intersects the left side of the square within bounds\n if (topLeftCorner.x <= leftIntersectionX && leftIntersectionX <= bottomRightCorner.x\n && minLineX <= leftIntersectionX && leftIntersectionX <= maxLineX) {\n return true;\n }\n\n double rightIntersectionX = xIntersection(lineEq, bottomRightCorner.y);\n // the line intersects the right side of the square within bounds\n if (topLeftCorner.x <= rightIntersectionX && rightIntersectionX <= bottomRightCorner.x\n && minLineX <= rightIntersectionX && rightIntersectionX <= maxLineX) {\n return true;\n }\n\n double topIntersectionY = yIntersection(lineEq, topLeftCorner.x);\n // the line intersects the top side of the square within bounds\n if (topLeftCorner.y <= topIntersectionY && topIntersectionY <= bottomRightCorner.y\n && minLineY <= topIntersectionY && topIntersectionY <= maxLineY) {\n return true;\n }\n\n double bottomIntersectionY = yIntersection(lineEq, bottomRightCorner.x);\n // the line intersects the bottom side of the square within bounds\n if (topLeftCorner.y <= bottomIntersectionY && bottomIntersectionY <= bottomRightCorner.y\n && minLineY <= bottomIntersectionY && bottomIntersectionY <= maxLineY) {\n return true;\n }\n\n return false;\n\n }",
"@Override\n protected boolean validater(String[] line) {\n if (line.length != 9) {\n errorCounter(0);\n return false;\n }\n\n changeNulls(line);\n\n if (!isAirlineValid(line[airline])) {\n errorCounter(1);\n return false;\n }\n\n if (!isAirlineIDValid(line[airlineID])) {\n errorCounter(2);\n return false;\n }\n\n if (!isAirportValid(line[sourceAirport])) {\n errorCounter(3);\n return false;\n }\n\n if (!isAirportIDValid(line[sourceAirportID])) {\n errorCounter(4);\n return false;\n }\n\n if (!isAirportValid(line[destinationAirport])) {\n errorCounter(5);\n return false;\n }\n\n if (!isAirportIDValid(line[destinationAirportID])) {\n errorCounter(6);\n return false;\n }\n\n if (!isCodeshareValid(line[codeshare])) {\n errorCounter(7);\n return false;\n }\n\n if (!isStopsValid(line[stops])) {\n errorCounter(8);\n return false;\n }\n\n if (!isEquipmentValid(line[equipment])) {\n errorCounter(9);\n return false;\n }\n\n return true;\n }",
"org.landxml.schema.landXML11.Station xgetStation();",
"public HashSet<String> getTrainsWithFinishedRoutes() {\n\t\tHashSet<String> finishedTrains = new HashSet<String>();\n\t\tfor (Train t : trains) {\n\t\t\tif (t.currentBlock == t.destination) {\n\t\t\t\tif (t.distanceTraveledOnBlock == ((DefaultBlock)blockData.get(t.currentBlock)).blockLength/2) { // it is at the station\n\t\t\t\t\tif ((t.remainingTravelTime == 0) && (t.currSpeed == 0)) {\n\t\t\t\t\t\tfinishedTrains.add(t.trainName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (finishedTrains.size() > 0) {\n\t\t\treturn finishedTrains;\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n boolean isSameTransitTrip(TransitNode transitNode) {\n if (transitNode instanceof SubwayStation) {\n return this.startLocation.getLine().equals(((SubwayStation) transitNode).getLine());\n }\n return false;\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic List<TrainList> Search(Map<String,Object> map) {\n\t\tList<Map<String, Object>> reList=new ArrayList<Map<String,Object>>();//返回的结果List\n\t\t\n\t\tList<Map<String, Object>> ByStartStation=new ArrayList<>();//定义经过起始站的车次List\n\t\tList<Map<String, Object>> ByEndStation=new ArrayList<>();//定义经过终点站的车次List\n\t\tList<Map<String, Object>> ByStartEndStation=new ArrayList<>();//定义经过起始站&&终点站的车次List\n\t\t\n\t\tList<TrainList> reList2= new ArrayList<>();//返回\n\t\tMap<String, Object> SeachFinally =new HashMap<>();\n\t\tSeachFinally.put(\"StartStation\", map.get(\"StartStation\"));\n\t\tConnectionSQL();\n\t\ttry {\n\t\t\treList=mapper.SearchStartStation(map);\n\t\t\tfor(int i=0;i<reList.size();i++){\n\t\t\t\tMap<String, Object> map2=(Map) reList.get(i);\n\t\t\t\tByStartStation.add(map2);\n\t\t\t\tSystem.out.print(map2.get(\"key\")+\"第\"+map2.get(\"value\")+\"\t\");//获取经过起始站的车次\n\t\t\t}\n\t\t\treList.clear();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"经过终点站车次\");\n\t\t\treList=mapper.SearchEndStation(map);\n\t\t\tfor(int i=0;i<reList.size();i++){\n\t\t\t\tMap<String, Object> map2=(Map)reList.get(i);\n\t\t\t\tByEndStation.add(map2);\n\t\t\t\tSystem.out.print(map2.get(\"key\")+\"第\"+map2.get(\"value\")+\"\t\");//获取经过终点站的车次\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/*if(ByStartStation.size()>ByEndStation.size()){//如果经过起始站的车次比经过终点站的车次多则交换,使得双重循环次数减少\n\t\t\tList<Map<String, Object>> cg=new ArrayList<>();\n\t\t\tcg=ByEndStation;\n\t\t\tByEndStation=ByStartStation;\n\t\t\tByStartStation=cg;\n\t\t}*/\n\t\t\n\t\tSystem.out.println();\n\t\tfor(int i=0;i<ByStartStation.size();i++){\n\t\t\tString ByST=ByStartStation.get(i).get(\"key\").toString();//获取第i个经过起始站的车次\n\t\t\tint ByStartnum=Integer.parseInt(ByStartStation.get(i).get(\"value\").toString());//获取第i个经过起始站的车次的站序(起始车站的站序<终点车站的站序)\n\t\t\tfor(int j=0;j<ByEndStation.size();j++){\n\t\t\t\tString ByET=ByEndStation.get(j).get(\"key\").toString();//获取第j个经过站点站的车次\n\t\t\t\tint ByEndnum=Integer.parseInt(ByEndStation.get(j).get(\"value\").toString());//获取第j个经过终点站的车次的站序(起始车站的站序<终点车站的站序)\n\t\t\t\tif(ByST.equals(ByET) && ByStartnum<ByEndnum){\t//得到最终车次并加入ByStartEndStation\n\t\t\t\t\tByStartEndStation.add(ByStartStation.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<ByStartEndStation.size();i++){\t\t\t\t//打印输出最终得到结果\n\t\t\tMap<String, Object> map2=(Map)ByStartEndStation.get(i);\n\t\t\tSystem.out.println(map2.entrySet());\n\t\t\tSeachFinally.put(\"TrainName\", map2.get(\"key\"));//添加车次去查找\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\treList2.addAll(mapper.reList(SeachFinally));\n//\t\t\t\t\treList2= mapper.reList(SeachFinally);\n//\t\t\t\t\tfor (Iterator iterator = reList2.iterator(); iterator.hasNext();) {\n//\t\t\t\t\t\tTrainList trainList = (TrainList) iterator.next();\n//\t\t\t\t\t\tSystem.out.println(trainList.toString());\n//\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(reList2.get(0));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tsession.close();\n\t\t\t\t}\n\t\t\t\tSeachFinally.remove(\"TrainName\");//查到后删除已近查出来的车次\n\t\t\t}\n\t\t}\n\t\tsession.close();\n\t\treturn reList2;\n\t}",
"private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }",
"public boolean match(String line){\n return SocketThrdServer.table.containsKey(line);\n }",
"public Obs filter(Obs obs, int time_th, int L) {\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\tString seq = obs.getSeq();\n\t\tString stamps = obs.getTimeStamp();\n\n\t\tString fseq = \"\";\n\t\tString fstamps = \"\";\n\n\t\tString[] towerSubseqs = new String[] { seq };\n\t\tString[] stampSubseqs = new String[] { stamps };\n\t\tif (seq.contains(RLM)) {\n\t\t\ttowerSubseqs = seq.split(RLM);\n\t\t\tstampSubseqs = stamps.split(RLM);\n\t\t}\n\n\t\tfor (int i = 0; i < towerSubseqs.length; i++) {\n\n\t\t\tString[] towers = towerSubseqs[i].trim().split(CLM);\n\t\t\tString[] tstamps = stampSubseqs[i].trim().split(CLM);\n\n\t\t\t// System.out.println(towers.length + \"\\t\" +\n\t\t\t// Arrays.toString(towers));\n\t\t\t/**\n\t\t\t * If the trip length less than specific length ignore it.\n\t\t\t */\n\t\t\tif (towers.length < L) {\n\t\t\t\t// System.out.println(\"towers.length <= L\");\n\t\t\t\ttowerSubseqs[i] = \"-\";\n\t\t\t\tstampSubseqs[i] = \"-\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean[] marks = new boolean[towers.length];\n\n\t\t\tfor (int j = 1; j < towers.length; j++) {\n\t\t\t\ttry {\n\n\t\t\t\t\tif (!towers[j - 1].equals(towers[j])) {\n\t\t\t\t\t\t// System.out.println(\"! \" + towers[j - 1] + \" equals( \"\n\t\t\t\t\t\t// + towers[j] + \" )\");\n\t\t\t\t\t\tmarks[j] = true;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * if the time exceeds timing threshold, then check the\n\t\t\t\t\t * distance between towers. If this distance less than the\n\t\t\t\t\t * distance threshold, then previous tower is the end of the\n\t\t\t\t\t * current trip.\n\t\t\t\t\t *\n\t\t\t\t\t */\n\t\t\t\t\tDate sTime = formatter.parse(tstamps[j - 1]);\n\t\t\t\t\tDate eTime = formatter.parse(tstamps[j]);\n\t\t\t\t\tcal.setTime(sTime);\n\t\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tcal.setTime(eTime);\n\t\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\t\tint diff = (ehour - hour) * HOUR + (eminute - minute);\n\t\t\t\t\t/**\n\t\t\t\t\t * check time difference with time threshold whatever the\n\t\t\t\t\t * distance between the starting tower\n\t\t\t\t\t */\n\t\t\t\t\tif (diff < time_th) {\n\t\t\t\t\t\t// System.out.println(\"diff < time_th\");\n\t\t\t\t\t\tmarks[j] = false;\n\t\t\t\t\t}\n\t\t\t\t} catch (ParseException ex) {\n\t\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/**\n\t\t\t * construct sequences from towers: <\\n If the length of the trinp\n\t\t\t * after removing the repeated values less than L ignore it else\n\t\t\t * construct a trip from the non-removed observations.>\n\t\t\t */\n\t\t\t// System.out.println(\"length\\t\" + length);\n\t\t\t// if (length <= L) {\n\t\t\t// System.out.println(\"length <= L\\t\" + length);\n\t\t\t// towerSubseqs[i] = \"-\";\n\t\t\t// stampSubseqs[i] = \"-\";\n\t\t\t// } else {\n\n\t\t\tString tmpObs = \"\";\n\t\t\tString tmpTime = \"\";\n\n\t\t\tfor (int j = 0; j < marks.length; j++) {\n\t\t\t\tboolean mark = marks[j];\n\t\t\t\tif (mark) {\n\t\t\t\t\tif (!tmpObs.isEmpty()) {\n\t\t\t\t\t\ttmpObs += CLM;\n\t\t\t\t\t\ttmpTime += CLM;\n\t\t\t\t\t}\n\t\t\t\t\ttmpObs += towers[j];\n\t\t\t\t\ttmpTime += tstamps[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// System.out.println(\"last \\t\" + tmpObs.split(CLM).length + \"\\t\" +\n\t\t\t// Arrays.toString(tmpObs.split(CLM)));\n\t\t\tif (tmpObs.split(CLM).length > L) {\n\t\t\t\ttowerSubseqs[i] = tmpObs;\n\t\t\t\tstampSubseqs[i] = tmpTime;\n\t\t\t}\n\n\t\t\t// }\n\t\t}\n\t\t/**\n\t\t * Construct trips\n\t\t */\n\t\tfor (int i = 0; i < towerSubseqs.length; i++) {\n\t\t\tif (!towerSubseqs[i].equals(\"-\")) {\n\t\t\t\tif (!fseq.isEmpty()) {\n\t\t\t\t\tfseq += RLM;\n\t\t\t\t\tfstamps += RLM;\n\t\t\t\t}\n\n\t\t\t\tfseq += towerSubseqs[i];\n\t\t\t\tfstamps += stampSubseqs[i];\n\t\t\t}\n\t\t}\n\n\t\treturn new Obs(fseq, fstamps);\n\t}",
"@Test\n\tpublic void circleLeastStationTest() {\n\t\tList<String> newTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"1\");\n\t\tnewTrain.add(\"4\");\n\t\tList<TimeBetweenStop> timeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\tTimeBetweenStop timeBetweenStop = new TimeBetweenStop(\"1\", \"4\", 20);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"B\", timeBetweenStops);\n\t\t\n\t\tList<String> answer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"3\");\n\t\tanswer.add(\"4\");\n\t\tTrip trip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(9, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, least time\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"1\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"1\", \"4\", 8);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"C\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(8, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, more stop but even less time\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"2\");\n\t\tnewTrain.add(\"5\");\n\t\tnewTrain.add(\"6\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"2\", \"5\", 2);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"5\", \"6\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"6\", \"4\", 2);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"D\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"5\");\n\t\tanswer.add(\"6\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(7, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\n\t\t//Add a new train, less time than above\n\t\tnewTrain = new ArrayList<String>();\n\t\tnewTrain.add(\"7\");\n\t\tnewTrain.add(\"2\");\n\t\tnewTrain.add(\"3\");\n\t\tnewTrain.add(\"4\");\n\t\ttimeBetweenStops = new ArrayList<TimeBetweenStop>();\n\t\ttimeBetweenStop = new TimeBetweenStop(\"7\", \"2\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"2\", \"3\", 3);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\ttimeBetweenStop = new TimeBetweenStop(\"3\", \"4\", 1);\n\t\ttimeBetweenStops.add(timeBetweenStop);\n\t\tsubwaySystem.addTrainLine(newTrain, \"E\", timeBetweenStops);\n\n\t\tanswer = new ArrayList<String>();\n\t\tanswer.add(\"1\");\n\t\tanswer.add(\"2\");\n\t\tanswer.add(\"3\");\n\t\tanswer.add(\"4\");\n\t\ttrip = subwaySystem.takeTrain(\"1\", \"4\");\n\t\tAssert.assertTrue(trip.isTripFound());\n\t\tAssert.assertEquals(6, trip.getDuration());\n\t\tAssert.assertTrue(TestHelper.checkAnswer(answer, trip.getStops()));\n\t}",
"public List<String> getNeighbors(String stationId) {\r\n\t\tList<String> res = new ArrayList<>();\r\n\t\tres.add(stationId);\r\n\t\t\r\n\t\tfor (int j = 1; j < edges.size(); j++) {\r\n\t\t\tString source = mapBuilder.getSubwayGraph().getEdgeSource(edges.get(j));\r\n\t\t\tString target = mapBuilder.getSubwayGraph().getEdgeTarget(edges.get(j));\r\n\t\t\t\r\n\t\t\tif(source.equals(stationId)) {\r\n\t\t\t\tres.add(target);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\t\r\n\t}",
"private boolean scanLine()\r\n\t{\r\n\t\tboolean isLine=true;\r\n\t\t\r\n\t\t//Implement Filter here.\r\n\t\t\r\n\t\treturn isLine;\r\n\t}",
"public static ArrayList<MapLocation> getLineBetweenPoints(MapLocation loc1, MapLocation loc2){\n int dx = loc2.getColumn() - loc1.getColumn();\n int dy = loc2.getRow() - loc1.getRow();\n double angle = Math.toDegrees(Math.atan2(dy, dx));\n if(angle < 0){\n angle += 360;\n }\n int oct = MapLocation.getOctant(angle);\n MapLocation locOct = MapLocation.switchToOctantZeroFrom(oct, new MapLocation(dy, dx));\n ArrayList<MapLocation> lineOct = MappingController.bresenham(new MapLocation(0,0), locOct);\n ArrayList<MapLocation> line = new ArrayList<MapLocation>();\n for(MapLocation loc : lineOct){\n line.add(MapLocation.sum(loc1, MapLocation.switchFromOctantZeroTo(oct, loc)));\n }\n return line;\n }",
"public Station[] getPathStations(Position startPos, Position targetPos)\r\n {\r\n assert startPos != null;\r\n assert targetPos != null;\r\n assert startPos.column() < metro.numberOfColumns;\r\n assert startPos.line() < metro.numberOfLines;\r\n assert targetPos.column() < metro.numberOfColumns;\r\n assert targetPos.line() < metro.numberOfLines;\r\n\r\n Station[] stations = new Station[2];\r\n\r\n // get the station near to the target.\r\n Station getOffStation = null;\r\n Station getOnStation = null;\r\n Track tmpTrack = null;\r\n double dist = Double.MAX_VALUE;\r\n double distToFirst = Double.MAX_VALUE;\r\n\r\n for (Track track : tracks)\r\n {\r\n LinkedList<Station> stationList = track.getStations();\r\n\r\n for (Station station : stationList)\r\n {\r\n double tmpDist = distance(station.getLocation(), targetPos);\r\n if (tmpDist < dist)\r\n {\r\n dist = tmpDist;\r\n getOffStation = station;\r\n tmpTrack = track;\r\n }\r\n }\r\n }\r\n\r\n // get the fist station to get on\r\n LinkedList<Station> stationList = tmpTrack.getStations();\r\n\r\n for (Station station : stationList)\r\n {\r\n double tmpDist = distance(station.getLocation(), startPos);\r\n if (tmpDist < distToFirst)\r\n {\r\n distToFirst = tmpDist;\r\n getOnStation = station;\r\n }\r\n }\r\n\r\n stations[0] = getOnStation;\r\n stations[1] = getOffStation;\r\n\r\n return stations;\r\n }",
"public boolean onStairs(){\n\t\tint yp = 0; int xp = 0;\n\t\tint ys = 1; int xs = 1;\n\t\tfor(int i = 0; i < this.position.length; i ++){//looks though arrays to gather position\n\t\t\tfor(int p = 0 ; p < this.position.length; p++){\n\t\t\t\tif(this.position[i][p] == 1 && this.Stairs[i][p] == 1){\n\t\t\t\t\typ=i; xp=p;\n\t\t\t\t\tys=i; xs=p;\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\tif(yp==ys && xp==xs){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;//if they are not in the same location, return false\n\t}",
"void getAllLines(Vector<Integer> lineIDs,Vector<Integer> lineDepIDs, Vector<String> lineCodes, String empresa);",
"public int checkLines() {\n\t\tint completedLines = 0;\n\t\tfor(int row = 0; row < ROW_COUNT; row++) {\n\t\t\tif(checkLine(row)) {\n\t\t\t\tcompletedLines++;\n\t\t\t}\n\t\t}\n\t\treturn completedLines;\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static List getHoldingStationList(int station_id, boolean onlyOpenOhds) {\n\t\tSession sess = null;\n\t\ttry {\n\t\t\tString query = \"select ohd.OHD_ID from com.bagnet.nettracer.tracing.db.OHD ohd where \"\n\t\t\t\t\t+ \"ohd.holdingStation.station_ID = :station_id\";\n\t\t\t// Search for only open incidents for a station\n\t\t\tif (onlyOpenOhds) {\n\t\t\t\tquery = query + \" and ohd.status.status_ID <> :status_ID\";\n\t\t\t}\n\t\t\t\n\t\t\tsess = HibernateWrapper.getSession().openSession();\n\t\t\tQuery q = sess.createQuery(query);\n\t\t\tq.setInteger(\"station_id\", station_id);\n\t\t\t\n\t\t\tif (onlyOpenOhds) {\n\t\t\t\tq.setInteger(\"status_ID\", TracingConstants.OHD_STATUS_CLOSED);\n\t\t\t}\n\t\t\t\n\t\t\treturn q.list();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (sess != null)\n\t\t\t\t\tsess.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"default List<PendingAttestation> get_matching_source_attestations(BeaconState state, EpochNumber epoch) {\n assertTrue(epoch.equals(get_current_epoch(state)) || epoch.equals(get_previous_epoch(state)));\n return epoch.equals(get_current_epoch(state)) ?\n state.getCurrentEpochAttestations().listCopy() : state.getPreviousEpochAttestations().listCopy();\n }",
"public void loadMap(Maps map) throws FileNotFoundException{\n ArrayList<Station> stat; \n stat = new ArrayList<>();\n \n try {\n String hodnoty; //do premennej hodnoty budem nacitavat riadky z textaka\n int stanica_na_zapis = 1; //counter pre stanice\n \n //---------------------------------------- zaciatok nacitavania\n hodnoty = br.readLine(); //nacitam riadok z textaka\n int x,y; //x, y budu sluzit pre nacitane suradnice\n String nazov; \n String[] split; //split je pole stringov...tu rozdelim riadok na jednotlive hodnoty\n split = hodnoty.split(\"\\\\s+\"); //delim podla medzery\n nazov = split[0]; //nazov stanice bude prvy string\n x = Integer.parseInt(split[1]); //nasleduje konverzia suradnic\n y = Integer.parseInt(split[2]);\n \n Station st = new Station(nazov,stanica_na_zapis,x,y); //vytvorim novu stanicu\n \n stat.add(st); //a pridam do zoznamu stanic\n \n while(!\"\".equals(hodnoty = br.readLine())){ //toto robim, az kym nie som na prazdnom riadku\n stanica_na_zapis++;\n split = hodnoty.split(\"\\\\s+\");\n nazov = split[0];\n x = Integer.parseInt(split[1]);\n y = Integer.parseInt(split[2]);\n st = new Station(nazov,stanica_na_zapis,x,y); \n stat.add(st);\n }\n } catch (IOException ex) {\n Logger.getLogger(Maps.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n stations_loaded = stat.size(); \n map.setStations(stat); //nakoniec ukladam nahrany zoznam stanic\n }",
"private Set<Line> openLines(Square[][] board) {\n Set<Line> lines = new HashSet<Line>();\n for (int row = 0; row < Util.N; row++) {\n for (int col = 0; col < Util.N; col++) {\n Set<Line> sqLines = board[row][col].openLines();\n lines.addAll(sqLines);\n }\n }\n return lines;\n }",
"double getStation();",
"void checkTwoStations(int stations, int[] stationIndex, int[] station) throws JposException {\r\n switch (stations) {\r\n case POSPrinterConst.PTR_S_JOURNAL_RECEIPT:\r\n case POSPrinterConst.PTR_TWO_RECEIPT_JOURNAL:\r\n Device.check(!Data.CapConcurrentJrnRec, JposConst.JPOS_E_ILLEGAL, \"No concurrent printing on journal and receipt\");\r\n stationIndex[0] = getStationIndex(station[0] = POSPrinterConst.PTR_S_JOURNAL);\r\n stationIndex[1] = getStationIndex(station[1] = POSPrinterConst.PTR_S_RECEIPT);\r\n break;\r\n case POSPrinterConst.PTR_S_JOURNAL_SLIP:\r\n case POSPrinterConst.PTR_TWO_SLIP_JOURNAL:\r\n Device.check(!Data.CapConcurrentJrnSlp, JposConst.JPOS_E_ILLEGAL, \"No concurrent printing on journal and slip\");\r\n stationIndex[0] = getStationIndex(station[0] = POSPrinterConst.PTR_S_JOURNAL);\r\n stationIndex[1] = getStationIndex(station[1] = POSPrinterConst.PTR_S_SLIP);\r\n break;\r\n case POSPrinterConst.PTR_S_RECEIPT_SLIP:\r\n case POSPrinterConst.PTR_TWO_SLIP_RECEIPT:\r\n Device.check(!Data.CapConcurrentRecSlp, JposConst.JPOS_E_ILLEGAL, \"No concurrent printing on receipt and slip\");\r\n stationIndex[0] = getStationIndex(station[0] = POSPrinterConst.PTR_S_SLIP);\r\n stationIndex[1] = getStationIndex(station[1] = POSPrinterConst.PTR_S_RECEIPT);\r\n break;\r\n default:\r\n throw new JposException(JposConst.JPOS_E_ILLEGAL, \"Invalid print stations: \" + stations);\r\n }\r\n Device.check(SidewaysCommand[station[0]] != null || SidewaysCommand[station[1]] != null, JposConst.JPOS_E_ILLEGAL, \"No support for printing to two stations when one station is in sideways print mode\");\r\n Device.check(PagemodeCommand[station[0]] != null || PagemodeCommand[station[1]] != null, JposConst.JPOS_E_ILLEGAL, \"No support for printing to two stations when one station is in page mode\");\r\n Device.check(TransactionCommand[station[0]] != null || TransactionCommand[station[1]] != null, JposConst.JPOS_E_ILLEGAL, \"No support for printing to two stations when one station is in transaction print mode\");\r\n }",
"public boolean canAccessBeamline(String bl)\n\t{\n\t\tfor (int i = 0; i < availableBeamlines.size(); ++i) {\n\t\t\tif (bl.equals(availableBeamlines.elementAt(i)))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private ArrayList<Location> getLocationsWithin(Location loc, int n)\n {\n ArrayList<Location> locs = new ArrayList<>();\n if (loc==null||!loc.isValid()||n<=0)\n return locs;\n int thisRow = loc.getRow();\n int thisCol = loc.getCol();\n for (int row=thisRow-n;row<=thisRow+n;row++)\n {\n for (int col=thisCol-n;col<=thisCol+n;col++)\n {\n Location temp = new Location(row,col);\n if (temp.isValid())\n locs.add(temp);\n }\n }\n return locs;\n }",
"public StationSet getStation()\n {\n StationSet result = new StationSet();\n \n for (Train obj : this)\n {\n result.with(obj.getStation());\n }\n \n return result;\n }",
"public ArrayList<Station> queryAreaStations(int areaId) throws SQLException {\n\t\tArrayList<Station> stations = new ArrayList<Station>();\n\t\t\n\t\t// query string for all stations of an area\n\t\tString strStatement = \"select stations.\" + COLUMN_ID + \", stations.\" + COLUMN_NAME +\n\t\t\t\", stations.\" + COLUMN_ABBREAVIATION + \", stations.\" + COLUMN_LATITUDE +\n\t\t\t\" , stations.\" + COLUMN_LONGITUDE + \" from \" + mDbName + \".\" + TABLE_AREA + \" as area, \" +\n\t\t\t\" (\tselect distinct stations.\" + COLUMN_ID + \", stations.\" + COLUMN_NAME +\n\t\t\t\", stations.\" + COLUMN_ABBREAVIATION + \", stations.\" + COLUMN_LATITUDE +\n\t\t\t\" , stations.\" + COLUMN_LONGITUDE + \" from \" + mDbName + \".\" + TABLE_AREA_HAS_ROUTES + \" as ahr, \" + \n\t\t\t\" (\tselect stations.\" + COLUMN_ID + \", stations.\" + COLUMN_NAME +\n\t\t\t\", stations.\" + COLUMN_ABBREAVIATION + \", stations.\" + COLUMN_LATITUDE +\n\t\t\t\" , stations.\" + COLUMN_LONGITUDE + \" from \" + mDbName + \".\" + TABLE_ROUTE + \" as route, \" + \n\t\t\t\" (\tselect distinct station.\" + COLUMN_ID + \", station.\" + COLUMN_NAME +\n\t\t\t\", station.\" + COLUMN_ABBREAVIATION + \", station.\" + COLUMN_LATITUDE +\n\t\t\t\" , station.\" + COLUMN_LONGITUDE + \" from \" + mDbName + \".\" + TABLE_ROUTE_HAS_STATIONS + \" as rhs, \" +\n\t\t\tmDbName + \".\" + TABLE_STATION + \" as station ) as stations \" +\n\t\t\t\") as stations ) as stations where area.\" + COLUMN_ID + \"=\" + areaId;\n//\t\tmController.log(strStatement);\n\t\tif (mMysqlConnection == null) {\n\t\t\tmMysqlConnection = DriverManager\n\t\t\t\t\t.getConnection(getConnectionURI());\n\t\t}\n\t\t\t\n\t\tmStatement = mMysqlConnection.createStatement();\n\t\tmResultSet = mStatement.executeQuery(strStatement);\n\t\t\n\t\t// for each result set found, create a new Station instance and store the related information \n\t\t// of the station and add each to the stations list\n\t\twhile (mResultSet.next()) {\n\t\t\tStation station = new Station();\n\t\t\tstation.setId(mResultSet.getInt(COLUMN_ID));\n\t\t\tstation.setName(mResultSet.getString(COLUMN_NAME));\n\t\t\tstation.setAbbreviation(mResultSet.getString(COLUMN_ABBREAVIATION));\n\t\t\tstation.setGeoPoint(mResultSet.getInt(COLUMN_LATITUDE), mResultSet.getInt(COLUMN_LONGITUDE));\n\t\t\t\n\t\t\tstations.add(station);\n\t\t}\n\n\t\tLOGGER.info(\"Read \" + stations.size() + \" stations from DB\");\n\t\treturn stations;\n\t}",
"void format03(String line, int lineCount) {\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // There must be data records after each code 03 record, therefore\n // this record must not be preceded by a code 03 record.\n if (prevCode == 3) {\n outputError((lineCount-1) + \" - Fatal - \" +\n \"No data for station: \" + stationId);\n } // if (prevCode == 3)\n\n //01 a2 format code always '03' n/a\n //02 a12 stnid station id: composed of as following: station\n // 1-3: institute id\n // 4-8: 1st 5 of expedition name ??\n // 9-12: station number\n //03 a10 stnnam station number station\n //04 i8 date yyyymmdd, e.g. 19900201 station\n //06 i3 latdeg latitude degrees (negative for north) station\n //07 f6.3 latmin latitude minutes (with decimal seconds) station\n //08 i4 londeg longitude degrees (negative for west) station\n //09 f6.3 lonmin longitude minutes (with decimal seconds) station\n //10 f7.2 stndep station depth station\n //11 a1 up indicator = 'D' for down, = 'U' for up (def = 'D') n/a\n //12 a8 grid_no for sfri only - grid number sfri_grid\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n station.setSurveyId(survey.getSurveyId());\n if (t.hasMoreTokens()) station.setStationId(t.nextToken());\n if (t.hasMoreTokens()) station.setStnnam(t.nextToken());\n if (t.hasMoreTokens()) {\n String temp = t.nextToken();\n startDate = temp.substring(0,4) + \"-\" + temp.substring(4,6) +\n \"-\" + temp.substring(6);\n station.setDateStart(startDate + \" 00:00:00.0\");\n if (dbg) System.out.println(\"<br>format03: timeZone = \" +\n timeZone + \", startDate = \" + station.getDateStart());\n // convert to UTC?\n /*\n if (\"sast\".equals(timeZone)) {\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(station.getDateStart());\n calDate.add(java.util.Calendar.HOUR, -2);\n //station.setDateStart(new Timestamp(calDate.getTime().getTime()));\n //Timestamp dateTimeMin2 = new Timestamp(calDate.getTime().getTime());\n java.text.SimpleDateFormat formatter =\n new java.text.SimpleDateFormat (\"yyyy-MM-dd\");\n station.setDateStart(formatter.format(calDate.getTime()) + \" 00:00:00.0\");\n } // if ('sast'.equals(timeZone))\n */\n if (dbg4) System.out.println(\"<br>format03: timeZone = \" +\n timeZone + \", startDate = \" + station.getDateStart());\n station.setDateEnd(station.getDateStart());\n\n } // if (t.hasMoreTokens())\n\n /* ub03\n float degree = 0f; float minute= 0f;\n if (t.hasMoreTokens()) degree = toFloat(t.nextToken(), 1f);\n if (t.hasMoreTokens()) minute = toFloat(t.nextToken(), 60f);\n station.setLatitude(degree + minute);\n */\n float latitude = 0f; //ub03\n if (t.hasMoreTokens()) latitude = toFloat(t.nextToken(), 1f); //ub03\n station.setLatitude(latitude); //ub03\n if ((latitude > 90f) || (latitude < -90f)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Latitude invalid ( > 90 or < -90) : \" +\n latitude + \" : \" + station.getStationId(\"\"));\n } // if ((latitude > 90f) || (latitude < -90f))\n\n\n //sign = line.substring(46,47);\n //temp = toFloat(line.substring(47,50), 1f) +\n // toFloat(line.substring(50,55), 60000f);\n //station.setLongitude((\"-\".equals(sign) ? -temp : temp));\n /* ub03\n if (t.hasMoreTokens()) degree = toFloat(t.nextToken(), 1f);\n if (t.hasMoreTokens()) minute = toFloat(t.nextToken(), 60f);\n station.setLongitude(degree + minute);\n */\n float longitude = 0f; //ub03\n if (t.hasMoreTokens()) longitude = toFloat(t.nextToken(), 1f); //ub03\n station.setLongitude(longitude); //ub03\n if ((longitude > 180f) || (longitude < -180f)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Longitude invalid ( > 180 or < -180) : \" +\n longitude + \" : \" + station.getStationId(\"\"));\n } // if ((longitude > 180f) || (longitude < -180f))\n\n if (t.hasMoreTokens()) station.setStndep(toFloat(t.nextToken(), 1f));\n\n if (t.hasMoreTokens()) upIndicator = t.nextToken().trim().toUpperCase();\n\n sfriGrid.setSurveyId(survey.getSurveyId());\n sfriGrid.setStationId(station.getStationId());\n if (t.hasMoreTokens()) sfriGrid.setGridNo(toString(t.nextToken()));\n\n // the first three letters of the station Id must be the institute Id\n// ub10\n// take out because of profiling floats - station id starts with D\n// if (!institute.equals(station.getStationId(\"\").substring(0,3))) {\n// if (dbg) System.out.println(\"<br>institute = \" + institute);\n// outputError(lineCount + \" - Fatal - \" +\n// \"Station Id does not start with institute Id \" + institute +\n// \": \" + station.getStationId(\"\"));\n// } // if (!institute.equals(station.getStationId().substring(0,3)))\n\n stationId = station.getStationId(\"\");\n\n // update the minimum and maximum dates\n if (station.getDateStart().before(dateMin)) {\n dateMin = station.getDateStart();\n } // if (station.getDateStart().before(dateMin))\n if (station.getDateEnd().after(dateMax)) {\n dateMax = station.getDateEnd();\n } // if (station.getDateStart().before(dateMin))\n\n // update the minimum and maximum latitudes\n if (station.getLatitude() < latitudeMin) {\n latitudeMin = station.getLatitude();\n } // if (station.getLatitude() < latitudeMin)\n if (station.getLatitude() > latitudeMax) {\n latitudeMax = station.getLatitude();\n } // if (station.getLatitude() < latitudeMin)\n\n // update the minimum and maximum longitudes\n if (station.getLongitude() < longitudeMin) {\n longitudeMin = station.getLongitude();\n } // if (station.getLongitude() < LongitudeMin)\n if (station.getLongitude() > longitudeMax) {\n longitudeMax = station.getLongitude();\n } // if (station.getLongitude() < LongitudeMin)\n\n // update the station counter\n stationCount++;\n if (dbg) System.out.println(\"\");\n if (dbg) System.out.println(\"<br>format03: station = \" + station);\n if (dbg) System.out.println(\"<br>format03: sfriGrid = \" + sfriGrid);\n if (dbg) System.out.println(\"<br>format03: stationCount = \" + stationCount);\n\n }",
"public void showEmptySeats(){\n System.out.println(\"The following seats are empty: \");\n for (PlaneSeat seat:seat){\n if (! seat.isOccupied()){\n System.out.println(\"SeatID \" + seat.getSeatID());\n }\n }\n }",
"private void findLaneLines(int[] pixels, int row, int leftStartingX, int rightStartingX) {\n if (row > getCameraHeight() * LOOK_DIST) {\n Point lastLeftPoint = leftLine.getLeftPoint(pixels, row, getScreenWidth(), leftStartingX);\n Point lastRightPoint = rightLine.getRightPoint(pixels, row, getScreenWidth(), rightStartingX, getCameraWidth());\n leftLine.getLanePoints().add(lastLeftPoint);\n rightLine.getLanePoints().add(lastRightPoint);\n\n // If no lane was found, search from the last startingX\n if (lastLeftPoint.isEmpty() && lastRightPoint.isEmpty()) {\n findLaneLines(pixels, row - 1, leftStartingX, rightStartingX);\n\n // If Only the right lane was found, right starts from last starting X. Left starts from last startingX\n } else if (lastLeftPoint.isEmpty()) {\n int startSearchX = lastRightPoint.getX() - SEARCH_OFFSET;\n findLaneLines(pixels, row - 1, startSearchX, startSearchX);\n\n // If Only the left lane was found, left starts from last starting X. Right starts from last startingX\n } else if (lastRightPoint.isEmpty()) {\n int startSearchX = lastLeftPoint.getX() + SEARCH_OFFSET;\n findLaneLines(pixels, row - 1, startSearchX, startSearchX);\n\n // If Both lanes are found start search from last X + or - 100.\n } else {\n findLaneLines(pixels, row - 1, lastLeftPoint.getX() + SEARCH_OFFSET,\n lastRightPoint.getX() - SEARCH_OFFSET);\n }\n }\n }",
"public List<Seat> findMatch(int numOfPassengers, List<Passenger> passengerList) throws Exception{\n\t\tPassenger seats[][] = getSeats();\n\t\tList<Seat> seatList = new ArrayList<>();\n\t\t//Finds seating for 3 passengers\n\t\tif(numOfPassengers == 3) {\n\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\tif (seats[i][0] == null &&\n\t\t\t\t\t\tseats[i][1] == null &&\n\t\t\t\t\t\tseats[i][2] == null) {\n\t\t\t\t\tseatList.add(new Seat(i, 0));\n\t\t\t\t\tseatList.add(new Seat(i, 1));\n\t\t\t\t\tseatList.add(new Seat(i, 2));\n\n\t\t\t\t\treturn seatList;\n\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 1] == null &&\n\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 2] == null &&\n\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 3] == null) {\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 1));\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 3));\n\n\t\t\t\t\treturn seatList;\n\t\t\t\t}\n\n\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(numOfPassengers == 2) {\n\t\t\tboolean noOneWantsWindow = false;\n\t\t\tif(!passengerList.get(0).getSeatingPreference().equals(SeatingPreferences.WINDOW) &&\n\t\t\t\t\t!passengerList.get(0).getSeatingPreference().equals(SeatingPreferences.WINDOW)) {\n\t\t\t\tnoOneWantsWindow = true;\n\t\t\t}\n\t\t\t//Finds seating for passengers who don't want to sit near a window\n\t\t\tif(noOneWantsWindow) {\n\t\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\t\tif (seats[i][1] == null &&\n\t\t\t\t\t\t\tseats[i][2] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, 1));\n\t\t\t\t\t\tseatList.add(new Seat(i, 2));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 2] == null &&\n\t\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 3] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 3));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tfor (int i = 0; i < MAX_ROWS_ECON; i++) {\n\t\t\t\t\tif (seats[i][0] == null &&\n\t\t\t\t\t\t\tseats[i][1] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, 0));\n\t\t\t\t\t\tseatList.add(new Seat(i, 1));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t} else if (seats[i][MAX_COLS_ECON - 1] == null &&\n\t\t\t\t\t\t\tseats[i][MAX_COLS_ECON - 2] == null) {\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 1));\n\t\t\t\t\t\tseatList.add(new Seat(i, MAX_COLS_ECON - 2));\n\n\t\t\t\t\t\treturn seatList;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(i == MAX_ROWS_ECON - 1) {\n\t\t\t\t\t\tthrow new Exception(\"No Seats Found!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"boolean hasOriginFlightLeg();",
"private void chkSTMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from fg_stmst\";\n\t\t\tM_strSQLQRY += \" where st_CMPCD = '\"+cl_dat.M_strCMPCD_pbst+\"' and st_wrhtp = '\"+strWRHTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_prdtp = '\"+strPRDTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_lotno = '\"+strLOTNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_rclno = '\"+strRCLNO+\"'\";\n\t\t\tM_strSQLQRY += \" and st_pkgtp = '\"+strPKGTP+\"'\";\n\t\t\tM_strSQLQRY += \" and st_mnlcd = '\"+strMNLCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdSTMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in FG_STMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t}\n\t\tcatch(Exception L_EX)\n\t\t{\n\t\t\tsetMSG(L_EX,\"chkSTMST\");\n\t\t}\n\t}",
"public LinkedList<Station> getStations() {\n return stations;\n }",
"public static ArrayList<String> checkWaitlist(boolean byRoom, int seats, Date date){\r\n con = DBConnection.getConnection();\r\n ArrayList<String> open = new ArrayList<>();\r\n\r\n if(byRoom){\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where SEATS <= ?\");\r\n retrieve.setInt(1, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n while(res.next()){\r\n if(open.indexOf(res.getString(2)) >= 0){\r\n continue;\r\n }\r\n open.add(res.getString(1));\r\n open.add(res.getString(2));\r\n open.add(res.getString(3));\r\n }\r\n return open;\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n } else {\r\n try{\r\n PreparedStatement retrieve = con.prepareStatement(\"SELECT * from Waitlist where Date = ? and SEATS <= ?\"\r\n + \"ORDER by Timestamp\");\r\n retrieve.setDate(1, date);\r\n retrieve.setInt(2, seats);\r\n ResultSet res = retrieve.executeQuery();\r\n \r\n if(res.next()){\r\n open.add(res.getString(1));\r\n open.add(res.getString(3));\r\n }\r\n }catch(SQLException e){\r\n e.printStackTrace();\r\n }\r\n return open;\r\n }\r\n }",
"@Test\r\n void getStations() {\r\n List<Station> stations = model.getStations();\r\n assertNotNull(stations);\r\n assertEquals(124, stations.size());\r\n assertEquals(stations.get(0).getName(), \"OakGrove\");\r\n assertEquals(stations.get(52).getName(), \"Prudential\");\r\n assertEquals(stations.get(123).getName(), \"Braintree\");\r\n }",
"public ArrayList<Line> getLines() {\n return currentLocation.getLines();\n }",
"@Test\n public void StuckInLine() {\n\n int[] line = {2,5,3,4,5};\n int position = 2;\n Assert.assertEquals(12,Computation.getNeededTickets(line,position));\n\n int[] line2 = {5,5,2,3};\n position = 3;\n Assert.assertEquals(11,Computation.getNeededTickets(line2,position));\n\n int[] line3 = {1,1,1,1};\n position = 0;\n Assert.assertEquals(1,Computation.getNeededTickets(line3,position));\n\n\n }",
"public static boolean hasNextLine() {\n return sc.hasNext();\n }"
] | [
"0.6130806",
"0.5967725",
"0.5839506",
"0.57434535",
"0.5702162",
"0.5689609",
"0.56007093",
"0.5594874",
"0.5552436",
"0.55259496",
"0.5502064",
"0.5492379",
"0.5490873",
"0.54723084",
"0.54708576",
"0.5467694",
"0.5421695",
"0.53837836",
"0.5369791",
"0.5366063",
"0.52961177",
"0.5256684",
"0.52449465",
"0.5240215",
"0.52395844",
"0.51884526",
"0.51682055",
"0.5138802",
"0.51342803",
"0.5130213",
"0.5127784",
"0.51055086",
"0.5092771",
"0.509216",
"0.5050762",
"0.504893",
"0.5046816",
"0.49933895",
"0.49733165",
"0.49720928",
"0.4958588",
"0.49554318",
"0.49225098",
"0.49220267",
"0.49205866",
"0.49099067",
"0.49081767",
"0.49071205",
"0.49059293",
"0.48953545",
"0.489314",
"0.48811808",
"0.48790643",
"0.48669255",
"0.48552975",
"0.484779",
"0.48381194",
"0.4836729",
"0.48296002",
"0.48161417",
"0.48133054",
"0.47991857",
"0.47838777",
"0.4766206",
"0.47428226",
"0.47350854",
"0.47338378",
"0.47317326",
"0.4710892",
"0.47021225",
"0.47005653",
"0.4699883",
"0.46961063",
"0.46956006",
"0.4695324",
"0.46934003",
"0.4688128",
"0.46855026",
"0.46778077",
"0.46726617",
"0.46686602",
"0.4667152",
"0.46657726",
"0.4665723",
"0.4657228",
"0.4655337",
"0.46475288",
"0.46294862",
"0.46252322",
"0.4619161",
"0.46091953",
"0.46009874",
"0.46008983",
"0.45997524",
"0.4592917",
"0.45912564",
"0.4590261",
"0.45897782",
"0.45870984",
"0.45847017"
] | 0.774594 | 0 |
Search through all lines and return the station by giving the code | public Station getStationByCode(int code)
{
for(Line l: line)
{
if(l.getStationByCode(code) != null)
{
return l.getStationByCode(code);
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<Line> inLine(Station s)\r\n\t{\r\n\t\tArrayList<Line> returnList = new ArrayList<>();\r\n\t\t\r\n\t\tfor(Line l: line)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif(l.stationExists(s))\r\n\t\t\t{\r\n\t\t\t\treturnList.add(l);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn returnList;\r\n\t}",
"private void searchCode() {\n }",
"private String findLine(String line, String search){\n List<String> lines = line.lines().collect(Collectors.toList());\n for (String l: lines) {\n if(l.contains(search)){\n return l;\n }\n }\n return \"\";\n }",
"@Override\r\n\tpublic List<Aircraft> findAircraftByType(String typeCode) {\r\n\t\t/*\r\n\t\t * We will need to read through our arrayList and return only \r\n\t\t * the Aircrafts with the specified starting pos.\r\n\t\t * Initializing a new array for output.\r\n\t\t */\r\n\t\t\r\n\t\tList<Aircraft> output = new ArrayList<Aircraft>();\r\n\t\tfor(Aircraft x : airCrafts)\r\n\t\t{\r\n\t\t\tif(x.getTypeCode().equals(typeCode))\r\n\t\t\t\toutput.add(x);\r\n\t\t}\r\n\t\treturn output;\r\n\t}",
"@Override\r\n\tpublic Aircraft findAircraftByTailCode(String tailCode) {\r\n\t\t/*\r\n\t\t * We will need to read through our arrayList and return only \r\n\t\t * the Aircraft with the specified tailcode.\r\n\t\t */\r\n\t\tfor(Aircraft x : airCrafts)\r\n\t\t{\r\n\t\t\tif(x.getTailCode().equals(tailCode))\r\n\t\t\t\treturn x;\r\n\t\t}\r\n\t\treturn null;\t\r\n\t}",
"public String getFromStation();",
"public static HashMap<String,String> findByCode(String code)\n\t{\n\t\tHashMap<String,String> result=new HashMap<String,String>();\n\t\tfor(String[] temp:Data.MainBoard)\n\t\t{\n\t\t\tif(temp[0].equals(code))\n\t\t\t{\n\t\t\t\tresult.put(\"code\", temp[0]);\n\t\t\t\tresult.put(\"name\", temp[1]);\n\t\t\t\tresult.put(\"region\", temp[2]);\n\t\t\t\tresult.put(\"industry\", temp[3]);\n\t\t\t\tresult.put(\"board\", \"main\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tfor(String[] temp:Data.SMEBoard)\n\t\t{\n\t\t\tif(temp[0].equals(code))\n\t\t\t{\n\t\t\t\tresult.put(\"code\", temp[0]);\n\t\t\t\tresult.put(\"name\", temp[1]);\n\t\t\t\tresult.put(\"region\", temp[2]);\n\t\t\t\tresult.put(\"industry\", temp[3]);\n\t\t\t\tresult.put(\"board\", \"sme\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tfor(String[] temp:Data.ChiNextBoard)\n\t\t{\n\t\t\tif(temp[0].equals(code))\n\t\t\t{\n\t\t\t\tresult.put(\"code\", temp[0]);\n\t\t\t\tresult.put(\"name\", temp[1]);\n\t\t\t\tresult.put(\"region\", temp[2]);\n\t\t\t\tresult.put(\"industry\", temp[3]);\n\t\t\t\tresult.put(\"board\", \"chinext\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}",
"LocationModel findLocation(final String code);",
"public void searchSnowTam(final int airportIndex){\n Airport airport = AirportList.getInstance().getAirportList().get(airportIndex);\n Response.Listener<JSONArray> responseListener = new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n String code = \"\";\n Boolean isSnowTamExisting = false;\n for(int i = 0; i<response.length(); i++){\n try{\n code = response.getJSONObject(i).getString(\"all\");\n if(code.contains(\"SNOWTAM\")){\n isSnowTamExisting = true;\n break;\n }\n }catch (JSONException e){\n Log.d(DebugTag, \"onErrorResponse: \" + e.getMessage());\n }\n }\n\n Airport airport = AirportList.getInstance().getAirportList().get(airportIndex);\n SnowTam snowtam;\n if(isSnowTamExisting){\n Log.d(DebugTag, \"Coded: \" + code);\n snowtam = new SnowTam(code);\n snowtam.decodeSnowTam(airport.getLocation(), context);\n Log.d(DebugTag, \"Decoded: \\n\" + snowtam.getDecodedSnowTam());\n }\n else{\n snowtam = new SnowTam(context.getString(R.string.no_snowtam));\n }\n airport.setSnowtam(snowtam);\n dialog.hide();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.d(DebugTag, \"onErrorResponse: \\n\" + error.getMessage());\n }\n };\n\n\n AirportSnowTamRetrieving.getInstance().RetrieveInformation(airport.getIcaoCode(),this, responseListener, errorListener);\n }",
"void format11(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 11 record per substation\n code11Count++;\n if (code11Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 11 record in substation\");\n } // if (code11Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f7.3 cadmium µgm / gram sedpol1\n //04 f8.3 lead µgm / gram sedpol1\n //05 f8.3 copper µgm / gram sedpol1\n //06 f8.3 zinc µgm / gram sedpol1\n //07 f8.4 mercury µgm / gram sedpol1\n //08 f8.3 nickel µgm / gram sedpol1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: sedpol1 = \" + sedpol1);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"11\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.3 cadmium µgm / litre watpol1\n //04 f8.3 lead µgm / litre watpol1\n //05 f8.3 copper µgm / litre watpol1\n //06 f8.3 zinc µgm / litre watpol1\n //07 f8.4 mercury µgm / litre watpol1\n //08 f8.3 nickel µgm / litre watpol1\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol1.setCadmium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setLead(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setCopper(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setZinc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setMercury(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setNickel(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format11: watpol1 = \" + watpol1);\n\n } // if (dataType == SEDIMENT)\n\n }",
"public String lookupCodon( String codon )\n {\n // capitalize and replace U's with T's because the code tables are in terms of T's\n codon = codon.toUpperCase();\n codon = codon.replace('U','T');\n\n\n\n String letter = \"\";\n String outputStr = \"\";\n\n if (code.equals(\"Standard\"))\n {\n for (int i = 0; i < stdTranCodeAA.length(); i++)\n {\n\n letter = String.valueOf(stdTranCodeAA.charAt(i)); // takes one char as a string\n\n if ( stdTranCode[i].equals( codon ) )\n {\n for (int j = 0; j < stdTranCodeStart.length; j++)\n {\n if ( stdTranCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Drosophila Mitochondrial\"))\n {\n for (int i = 0; i < drosMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(drosMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( drosMitoCode[i].equals( codon ) )\n {\n if ( ( letter.equals(\"I\") ) || ( letter.equals(\"M\") ) )\n {\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n \n else if (code.equals(\"Vertebrate Mitochondrial\"))\n {\n for (int i = 0; i < vertMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(vertMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( vertMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < vertMitoCodeStart.length; j++)\n {\n if ( vertMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Yeast Mitochondrial\"))\n {\n for (int i = 0; i < yeastMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(yeastMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( yeastMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < yeastMitoCodeStart.length; j++)\n {\n if ( yeastMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Mold Protozoan Coelenterate Mycoplasma Mitochondrial\"))\n {\n for (int i = 0; i < moldProtoMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(moldProtoMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( moldProtoMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < moldProtoMitoCodeStart.length; j++)\n {\n if ( moldProtoMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Invertebrate Mitochondrial\"))\n {\n for (int i = 0; i < invertMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(invertMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( invertMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < invertMitoCodeStart.length; j++)\n {\n if ( invertMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Ciliate Dasycladacean Hexamita Nuclear\"))\n {\n for (int i = 0; i < cilDasHexNucCodeAA.length(); i++)\n {\n\n letter = String.valueOf(cilDasHexNucCodeAA.charAt(i)); // takes one char as a string\n\n if ( cilDasHexNucCode[i].equals( codon ) )\n {\n for (int j = 0; j < cilDasHexNucCodeStart.length; j++)\n {\n if ( cilDasHexNucCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Echinoderm Mitochondrial\"))\n {\n for (int i = 0; i < echinoMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(echinoMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( echinoMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < echinoMitoCodeStart.length; j++)\n {\n if ( echinoMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Euplotid Nuclear\"))\n {\n for (int i = 0; i < euplotidNucCodeAA.length(); i++)\n {\n\n letter = String.valueOf(euplotidNucCodeAA.charAt(i)); // takes one char as a string\n\n if ( euplotidNucCode[i].equals( codon ) )\n {\n if ( letter.equals(\"M\") )\n {\n return (\"<B><FONT COLOR=red>M</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Bacterial\"))\n {\n for (int i = 0; i < bacterialTranCodeAA.length(); i++)\n {\n\n letter = String.valueOf(bacterialTranCodeAA.charAt(i)); // takes one char as a string\n\n if ( bacterialTranCode[i].equals( codon ) )\n {\n for (int j = 0; j < bacterialTranCodeStart.length; j++)\n {\n if ( bacterialTranCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Alternative Yeast Nuclear\"))\n {\n for (int i = 0; i < altYeastCodeAA.length(); i++)\n {\n\n letter = String.valueOf(altYeastCodeAA.charAt(i)); // takes one char as a string\n\n if ( altYeastCode[i].equals( codon ) )\n {\n for (int j = 0; j < altYeastCodeStart.length; j++)\n {\n if ( altYeastCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Ascidian Mitochondrial\"))\n {\n for (int i = 0; i < ascidianMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(ascidianMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( ascidianMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < ascidianMitoCodeStart.length; j++)\n {\n if ( ascidianMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else if (code.equals(\"Flatworm Mitochondrial\"))\n {\n for (int i = 0; i < flatMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(flatMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( flatMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < flatMitoCodeStart.length; j++)\n {\n if ( flatMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n else // (code.equals(\"Blepharisma Mitochondrial\"))\n {\n for (int i = 0; i < blephMitoCodeAA.length(); i++)\n {\n\n letter = String.valueOf(blephMitoCodeAA.charAt(i)); // takes one char as a string\n\n if ( blephMitoCode[i].equals( codon ) )\n {\n for (int j = 0; j < blephMitoCodeStart.length; j++)\n {\n if ( blephMitoCodeStart[j].equals( codon ) )\n return (\"<B><FONT COLOR=red>\" + letter + \"</FONT></B>\"); // colors the start AA red\n }\n if (letter.equals(\"*\"))\n {\n if (stopFormat.length() > 0)\n return (\"<B><FONT COLOR=blue>\" + String.valueOf(stopFormat.charAt(0)) + \"</FONT></B>\");\n else\n return (\"<B><FONT COLOR=blue>*</B></FONT>\");\n }\n return letter; // found letter and it is not from a stop or start codon\n }\n else\n continue; // not found so continue searching\n }\n\n }\n\n unknownStatus = 1; // encountered an unknown codon so print this in legend\n\n return \"<FONT COLOR=#ff6633><B>u</B></FONT>\"; // unknown codon\n\n\n }",
"private int getLine ( String toSearch , int elsegmento )\r\n\t{\r\n\t\tfor ( int i = 0 ; i < cont[elsegmento] ; i++ )\r\n\t\t{\r\n\t\t\tStringTokenizer st = new StringTokenizer ( segmento[elsegmento][i],\":\" );\r\n\t\t\tif ( st.countTokens() > 1 )\r\n\t\t\t{\r\n\t\t\t\tString label = st.nextToken().trim();\r\n\t\t\t\tif ( label.equalsIgnoreCase(toSearch) ) return i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"List<MasterZipcode> getByPatternCode(String patternCode);",
"public void search() {\n boolean validate = true;\n code = \"\";\n Node<Product> p = null;\n System.out.print(\"Product code to search: \");\n while (validate) {\n code = s.nextLine();\n if (Validation.validateString(code)) {\n p = tree.search(code);\n validate = false;\n } else {\n System.err.println(\"Code must be required!\");\n System.err.print(\"Enter product code again: \");\n\n }\n }\n if (p != null) {\n System.out.println(\"Information of product code \" + p.info.getCode());\n tree.visit(p);\n } else {\n System.err.println(\"The product code \" + code + \" is not exist!\");\n }\n }",
"gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Loc getLoc();",
"public static Location getLocationByAirportCode(String airportCode){\n\ttry (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(\"SELECT * from Location \"\n + \"WHERE AirportCode = '\" + airportCode + \"'\")){\n \n while (resultSet.next()) {\n \tLocation location = new Location();\n \tlocation.setCity(resultSet.getString(\"City\"));\n \tlocation.setAirportCode(resultSet.getString(\"AirportCode\"));\n \treturn location;\n }\n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n return null;\n }",
"public String getFromStationName();",
"void format12(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 12 record per substation\n code12Count++;\n if (code12Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 12 record in substation\");\n } // if (code12Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"12\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f10.3 iron µgm / gram sedpol1\n //04 f9.3 chromium µgm / gram sedpol1\n //05 f8.3 manganese µgm / gram sedpol1\n //06 f8.3 cobalt µgm / gram sedpol1\n //07 f8.3 selenium µgm / gram sedpol1\n //08 f8.3 arsenic µgm / gram sedpol1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol1.setIron(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setChromium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setManganese(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setCobalt(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setSelenium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol1.setArsenic(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format12: sedpol1 = \" + sedpol1);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"12\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f10.3 iron µgm / litre watpol1\n //04 f9.3 chromium µgm / litre watpol1\n //05 f8.3 manganese µgm / litre watpol1\n //06 f8.3 cobalt µgm / litre watpol1\n //07 f8.3 selenium µgm / litre watpol1\n //08 f8.3 arsenic µgm / litre watpol1\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol1.setIron(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setChromium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setManganese(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setCobalt(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setSelenium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol1.setArsenic(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format12: watpol1 = \" + watpol1);\n\n } // if (dataType == SEDIMENT)\n\n }",
"void format09(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 09 record per substation\n code09Count++;\n if (code09Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 09 record in substation\");\n } // if (code09Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"09\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f10.3 calcium µgm / gram sedchem2\n //04 f8.2 magnesium µgm / gram sedchem2\n //05 f7.3 sulphide(SO3) µgm / gram sedchem2\n //06 f8.3 potassium µgm / gram sedchem2\n //07 f8.2 sodium µgm / gram sedchem2\n //08 f9.3 strontium µgm / gram sedchem2\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedchem2.setCalcium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setMagnesium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setSo3(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setPotassium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setSodium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem2.setStrontium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format09: sedchem2 = \" + sedchem2);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"09\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.3 suspendedSolids mgm / litre watchem2\n //04 f10.3 calcium µgm / litre watchem2\n //05 f7.4 sulphate(SO4) gm / litre watchem2\n //06 f8.3 potassium µgm / litre watchem2\n //07 f8.2 magnesium µgm / litre watchem2\n //08 f8.2 sodium µgm / litre watchem2\n //09 f9.3 strontium µgm / litre watchem2\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watchem2.setSussol(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setCalcium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setSo4(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setPotassium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setMagnesium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setSodium(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watchem2.setStrontium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format09: watchem2 = \" + watchem2);\n\n } // if (dataType == SEDIMENT)\n\n }",
"void format03(String line, int lineCount) {\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // There must be data records after each code 03 record, therefore\n // this record must not be preceded by a code 03 record.\n if (prevCode == 3) {\n outputError((lineCount-1) + \" - Fatal - \" +\n \"No data for station: \" + stationId);\n } // if (prevCode == 3)\n\n //01 a2 format code always '03' n/a\n //02 a12 stnid station id: composed of as following: station\n // 1-3: institute id\n // 4-8: 1st 5 of expedition name ??\n // 9-12: station number\n //03 a10 stnnam station number station\n //04 i8 date yyyymmdd, e.g. 19900201 station\n //06 i3 latdeg latitude degrees (negative for north) station\n //07 f6.3 latmin latitude minutes (with decimal seconds) station\n //08 i4 londeg longitude degrees (negative for west) station\n //09 f6.3 lonmin longitude minutes (with decimal seconds) station\n //10 f7.2 stndep station depth station\n //11 a1 up indicator = 'D' for down, = 'U' for up (def = 'D') n/a\n //12 a8 grid_no for sfri only - grid number sfri_grid\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n station.setSurveyId(survey.getSurveyId());\n if (t.hasMoreTokens()) station.setStationId(t.nextToken());\n if (t.hasMoreTokens()) station.setStnnam(t.nextToken());\n if (t.hasMoreTokens()) {\n String temp = t.nextToken();\n startDate = temp.substring(0,4) + \"-\" + temp.substring(4,6) +\n \"-\" + temp.substring(6);\n station.setDateStart(startDate + \" 00:00:00.0\");\n if (dbg) System.out.println(\"<br>format03: timeZone = \" +\n timeZone + \", startDate = \" + station.getDateStart());\n // convert to UTC?\n /*\n if (\"sast\".equals(timeZone)) {\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(station.getDateStart());\n calDate.add(java.util.Calendar.HOUR, -2);\n //station.setDateStart(new Timestamp(calDate.getTime().getTime()));\n //Timestamp dateTimeMin2 = new Timestamp(calDate.getTime().getTime());\n java.text.SimpleDateFormat formatter =\n new java.text.SimpleDateFormat (\"yyyy-MM-dd\");\n station.setDateStart(formatter.format(calDate.getTime()) + \" 00:00:00.0\");\n } // if ('sast'.equals(timeZone))\n */\n if (dbg4) System.out.println(\"<br>format03: timeZone = \" +\n timeZone + \", startDate = \" + station.getDateStart());\n station.setDateEnd(station.getDateStart());\n\n } // if (t.hasMoreTokens())\n\n /* ub03\n float degree = 0f; float minute= 0f;\n if (t.hasMoreTokens()) degree = toFloat(t.nextToken(), 1f);\n if (t.hasMoreTokens()) minute = toFloat(t.nextToken(), 60f);\n station.setLatitude(degree + minute);\n */\n float latitude = 0f; //ub03\n if (t.hasMoreTokens()) latitude = toFloat(t.nextToken(), 1f); //ub03\n station.setLatitude(latitude); //ub03\n if ((latitude > 90f) || (latitude < -90f)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Latitude invalid ( > 90 or < -90) : \" +\n latitude + \" : \" + station.getStationId(\"\"));\n } // if ((latitude > 90f) || (latitude < -90f))\n\n\n //sign = line.substring(46,47);\n //temp = toFloat(line.substring(47,50), 1f) +\n // toFloat(line.substring(50,55), 60000f);\n //station.setLongitude((\"-\".equals(sign) ? -temp : temp));\n /* ub03\n if (t.hasMoreTokens()) degree = toFloat(t.nextToken(), 1f);\n if (t.hasMoreTokens()) minute = toFloat(t.nextToken(), 60f);\n station.setLongitude(degree + minute);\n */\n float longitude = 0f; //ub03\n if (t.hasMoreTokens()) longitude = toFloat(t.nextToken(), 1f); //ub03\n station.setLongitude(longitude); //ub03\n if ((longitude > 180f) || (longitude < -180f)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Longitude invalid ( > 180 or < -180) : \" +\n longitude + \" : \" + station.getStationId(\"\"));\n } // if ((longitude > 180f) || (longitude < -180f))\n\n if (t.hasMoreTokens()) station.setStndep(toFloat(t.nextToken(), 1f));\n\n if (t.hasMoreTokens()) upIndicator = t.nextToken().trim().toUpperCase();\n\n sfriGrid.setSurveyId(survey.getSurveyId());\n sfriGrid.setStationId(station.getStationId());\n if (t.hasMoreTokens()) sfriGrid.setGridNo(toString(t.nextToken()));\n\n // the first three letters of the station Id must be the institute Id\n// ub10\n// take out because of profiling floats - station id starts with D\n// if (!institute.equals(station.getStationId(\"\").substring(0,3))) {\n// if (dbg) System.out.println(\"<br>institute = \" + institute);\n// outputError(lineCount + \" - Fatal - \" +\n// \"Station Id does not start with institute Id \" + institute +\n// \": \" + station.getStationId(\"\"));\n// } // if (!institute.equals(station.getStationId().substring(0,3)))\n\n stationId = station.getStationId(\"\");\n\n // update the minimum and maximum dates\n if (station.getDateStart().before(dateMin)) {\n dateMin = station.getDateStart();\n } // if (station.getDateStart().before(dateMin))\n if (station.getDateEnd().after(dateMax)) {\n dateMax = station.getDateEnd();\n } // if (station.getDateStart().before(dateMin))\n\n // update the minimum and maximum latitudes\n if (station.getLatitude() < latitudeMin) {\n latitudeMin = station.getLatitude();\n } // if (station.getLatitude() < latitudeMin)\n if (station.getLatitude() > latitudeMax) {\n latitudeMax = station.getLatitude();\n } // if (station.getLatitude() < latitudeMin)\n\n // update the minimum and maximum longitudes\n if (station.getLongitude() < longitudeMin) {\n longitudeMin = station.getLongitude();\n } // if (station.getLongitude() < LongitudeMin)\n if (station.getLongitude() > longitudeMax) {\n longitudeMax = station.getLongitude();\n } // if (station.getLongitude() < LongitudeMin)\n\n // update the station counter\n stationCount++;\n if (dbg) System.out.println(\"\");\n if (dbg) System.out.println(\"<br>format03: station = \" + station);\n if (dbg) System.out.println(\"<br>format03: sfriGrid = \" + sfriGrid);\n if (dbg) System.out.println(\"<br>format03: stationCount = \" + stationCount);\n\n }",
"public String getFindCode() {\r\n return findCode;\r\n }",
"@Override\n protected String getStationId(String filename) {\n Matcher matcher = stationIdPattern.matcher(filename);\n if (matcher.matches()) {\n return matcher.group(1);\n }\n return null;\n }",
"IRegion getLineInformation(int line) throws BadLocationException;",
"public ArrayList<Station> searchTrainTimes ( String stationName,int deparH, String befAft) {\r\n ArrayList<Station> result = new ArrayList<>();\r\n \r\n Station station;\r\n String s_name;\r\n int hh;\r\n int mm;\r\n \r\n AdditionalTestData();\r\n \r\n Iterator<Station> iterator = stationList.iterator();\r\n \r\n // record start time\r\n long sTime = System.currentTimeMillis();\r\n while (iterator.hasNext()) {\r\n \r\n station = iterator.next();\r\n s_name = station.getStationName();\r\n hh = station.getDepartureHour();\r\n mm = station.getDepartureMinute();\r\n \r\n System.out.println(\"Searching..........: \" + stationName + \"----\" + deparH);\r\n \r\n if( befAft.compareTo( \"After\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh >= deparH )\r\n result.add(station);\r\n }\r\n \r\n if( befAft.compareTo( \"Before\" ) == 0) {\r\n if( s_name.compareTo( stationName ) == 0 && hh <= deparH)\r\n result.add(station);\r\n }\r\n }\r\n \r\n long eTime = System.currentTimeMillis();\r\n \r\n long timeNeeded = eTime - sTime;\r\n System.out.println(\"Time needed:\" + timeNeeded);\r\n \r\n return result; \r\n }",
"public AirlineInfoResponse retrieveAirlineInfo(String airlineCode);",
"int format04(String line, int lineCount) {\n\n // local variables\n String splDattim = \"\";\n String tmpStationId = \"\";\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // code 04 must be preceded by a code 03 or another code 04\n if ((prevCode != 3) && (prevCode != 4)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Code 04 not preceded by code 03\");\n } // if (!\"03\".equals(prevCode))\n\n // get the data off the data line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n int subCode = 0;\n if (t.hasMoreTokens()) subCode = toInteger(t.nextToken());\n if (t.hasMoreTokens()) tmpStationId = toString(t.nextToken());\n // station Id must match that of previous station record\n checkStationId(lineCount, tmpStationId);\n\n switch (subCode) {\n\n //01 a2 format code always \"04\" n/a\n //02 a1 format subCode Always '1' n/a\n //03 a12 stnid station id: composed as for format 03 weather\n //04 a5 subdes substation descriptor e.g. CTD, XBT watphy\n //05 i6 spltim hhmmss UCT, e.g. 142134 watphy\n //06 f6.1 atmosph_pres in mBars weather\n //07 a5 cloud weather\n //08 f4.1 drybulb in deg C weather\n //09 f4.1 surface temp in deg C weather\n //10 a10 nav_equip_type weather\n case 1: if (t.hasMoreTokens())\n subdes = toString(t.nextToken().toUpperCase());\n switch (dataType) { // - moved to loadData\n case CURRENTS: currents.setSubdes(subdes); break;\n case SEDIMENT: sedphy.setSubdes(subdes); break;\n case WATER: watphy.setSubdes(subdes); break;\n case WATERWOD: watphy.setSubdes(subdes); break;\n } // switch (dataType)\n if (t.hasMoreTokens()) splDattim = toString(t.nextToken());\n if (t.hasMoreTokens())\n weather.setAtmosphPres(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setCloud(toString(t.nextToken()));\n if (t.hasMoreTokens()) weather.setDrybulb(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setSurfaceTmp(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setNavEquipType(toString(t.nextToken()));\n break;\n //01 a2 format code always '04' n/a\n //02 a1 format subCode Always '2' n/a\n //03 a12 stnid station id: composed as for format 03 weather\n //04 i3 swell dir in degrees TN weather\n //05 i2 swell height in m weather\n //06 i2 swell period in s weather\n //07 i2 transparency coded weather\n //08 a2 visibility code coded weather\n //09 i2 water colour coded weather\n //10 f4.1 wetbulb in deg C weather\n //11 i3 wind direction in degrees TN weather\n //12 f4.1 wind speed in m/s weather\n //13 a2 weather code weather\n case 2: if (t.hasMoreTokens()) weather.setSwellDir(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) weather.setSwellHeight(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setSwellPeriod(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) weather.setTransparency(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) weather.setVisCode(toString(t.nextToken()));\n if (t.hasMoreTokens()) weather.setWaterColor(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) weather.setWetbulb(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setWindDir(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) weather.setWindSpeed(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) weather.setWeatherCode(toString(t.nextToken()));\n break;\n } // switch (subCode)\n\n\n // time is on record with subCode = 1\n if ((subCode == 1) && !\"\".equals(splDattim)) {\n String seconds = \"00\";\n if (splDattim.length() == 6) {\n seconds = splDattim.substring(4);\n } // if (splDattim.length() == 6)\n startDateTime = startDate + \" \" + splDattim.substring(0,2) +\n \":\" + splDattim.substring(2,4) + \":\" + seconds + \".0\";\n if (dbg) System.out.println(\"<br>format04: startDateTime = \" + startDateTime);\n checkForValidDate(startDateTime);\n\n // convert to UTC?\n if (\"sast\".equals(timeZone)) {\n GregorianCalendar calDate = new GregorianCalendar();\n calDate.setTime(Timestamp.valueOf(startDateTime));\n calDate.add(Calendar.HOUR, -2);\n SimpleDateFormat formatter =\n new SimpleDateFormat (\"yyyy-MM-dd HH:mm:ss.s\");\n startDateTime = formatter.format(calDate.getTime());\n } // if ('sast'.equals(timeZone))\n if (dbg4) System.out.println(\"<br>format04: startDateTime = \" + startDateTime);\n //watphy.setSpldattim(startDateTime); //- moved to loadData\n switch (dataType) {\n case CURRENTS: currents.setSpldattim(startDateTime); break;\n case SEDIMENT: sedphy.setSpldattim(startDateTime); break;\n case WATER: watphy.setSpldattim(startDateTime); break;\n case WATERWOD: watphy.setSpldattim(startDateTime); break;\n } // switch (dataType)\n } // if ((subCode == 1) && !\"\".equals(splDattim))\n\n if (dbg) System.out.println(\"<br>format04: weather = \" + weather);\n if (dbg) {\n System.out.print(\"<br>format04: \");\n switch (dataType) {\n case CURRENTS: System.out.println(\"currents = \" + currents); break;\n case SEDIMENT: System.out.println(\"sedphy = \" + sedphy); break;\n case WATER: System.out.println(\"watphy = \" + watphy); break;\n case WATERWOD: System.out.println(\"watphy = \" + watphy); break;\n } // switch (dataType)\n } // if (dbg)\n\n return subCode;\n\n }",
"@Override\n\tpublic List<Station> geStationByFrom(String fromStation) {\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tSystem.out.println(\"**********getRelevantStationList************\");\n\t\t// String url =new\n\t\t// String(environment.getProperty(Constant.TO_STATIONS))+fromStation;\n\t\tString url = \"http://localhost:8080/MTRWebWS/home/to/\" + fromStation;\n\n\t\tResponseEntity<Station[]> response = restTemplate.getForEntity(url, Station[].class);\n\n\t\tSystem.out.println(response.toString());\n\t\tSystem.out.println(response.getHeaders());\n\t\tSystem.out.println(response.getStatusCode());\n\n\t\t// if(response.getStatusCode()==200){\n\t\treturn Arrays.asList(response.getBody());\n\t\t// }else{\n\t\t// return null\n\t\t// }\n\n\t}",
"void format08(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n int subCode = 0;\n if (dataType == WATERWOD) {\n if (t.hasMoreTokens()) subCode = toInteger(t.nextToken());\n switch (subCode) {\n case 1: if (t.hasMoreTokens()) watProfQC.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) t.nextToken(); // is no profile kjn quality flag\n if (t.hasMoreTokens()) t.nextToken(); // is no profile nh3 quality flag\n if (t.hasMoreTokens()) t.nextToken(); // is no profile oxa quality flag\n if (t.hasMoreTokens()) //set profile ph quality flag\n watProfQC.setPh((toInteger(t.nextToken())));\n break;\n } // switch (subCode)\n } // if (dataType = WATERWOD)\n\n // there can only be one code 08 record per substation\n if (subCode != 1) code08Count++;\n if (code08Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 08 record in substation\");\n } // if (code08Count > 1)\n\n //01 a2 format code always \"08\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f7.2 kjn µgm atom / litre = µM watchem1\n //04 f6.2 nh3 µgm atom / litre = µM watchem1\n //05 f7.3 oxa mgm / litre watchem1\n //07 f5.2 ph watchem1\n\n // subCode = 1 - ignore\n // subCode = 0 (WATER) or subCode = 2 (WATERWOD)\n if (subCode != 1) {\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n\n if (t.hasMoreTokens()) watchem1.setKjn(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile kjn quality flag\n\n if (t.hasMoreTokens()) watchem1.setNh3(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile nh3 quality flag\n\n if (t.hasMoreTokens()) watchem1.setOxa(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile oxa quality flag\n\n if (t.hasMoreTokens()) watchem1.setPh(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) // set ph quality flag\n watQC.setPh((toInteger(t.nextToken())));\n } // if (subCode != 1)\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format08: watchem1 = \" + watchem1);\n\n }",
"public IStationCodeTable getStationCodeTable();",
"private Vector <BusStopInfo> findStopInfo(BusStopInterface busStop)\r\n {\r\n Vector <BusStopInfo> result = new Vector<BusStopInfo>();\r\n Awtobus checking = null;\r\n for(int i=0; i < lines.size(); i++)\r\n {\r\n checking = lines.get(i);\r\n int length = checking.busLine.getNumberOfBusStops();\r\n for(int j=0; j<length; j++)\r\n {\r\n if(busStop == checking.busLine.getBusStop(j))\r\n {\r\n result.add(new BusStopInfo(checking, j));\r\n }\r\n }\r\n }\r\n return result;\r\n }",
"java.lang.String getTransitAirportCode();",
"java.lang.String getArrivalAirportCode();",
"List<Vehicle> getLineVehicles(String line);",
"public static String findTeam(Scanner input, int searchId) {\nwhile (input.hasNextLine()) {\nString line = input.nextLine();\n\nScanner lineScan = new Scanner(line).useDelimiter(\"\\t\");\n\nint id = lineScan.nextInt();\n\nif (id == searchId) {\n\nreturn line; // we found them!\n\n}\n\n}\n\nreturn \"\"; \n\n}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getStrByCode(String tab, String codevalue) {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tinit();\r\n\t\t}\r\n\t\tList list = (List) allcode.get(tab.toUpperCase());\r\n\t\tString result = \"\";\r\n\t\tCode code = new Code();\r\n\t\tif (codevalue == null)\r\n\t\t\treturn \"\";\r\n\t\telse\r\n\t\t\tcodevalue = codevalue.trim();\r\n\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tcode = (Code) list.get(i);\r\n\t\t\tString dm = code.getCode();\r\n\t\t\tif (dm.equals(codevalue)) {\r\n\t\t\t\tresult = code.getDescription();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\r\n\t}",
"void format07(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n int subCode = 0;\n if (dataType == WATERWOD) {\n if (t.hasMoreTokens()) subCode = toInteger(t.nextToken());\n switch (subCode) {\n case 1: if (t.hasMoreTokens()) watProfQC.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) //set profile DIC quality flag\n watProfQC.setDic((toInteger(t.nextToken())));\n if (t.hasMoreTokens()) t.nextToken(); // is no profile DOC quality flag\n if (t.hasMoreTokens()) t.nextToken(); // is no profile fluoride quality flag\n if (t.hasMoreTokens()) t.nextToken(); // is no profile iodene quality flag\n if (t.hasMoreTokens()) t.nextToken(); // is no profile iodate quality flag\n break;\n } // switch (subCode)\n } // if (dataType = WATERWOD)\n\n // there can only be one code 07 record per substation\n if (subCode != 1) code07Count++;\n if (code07Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 07 record in substation\");\n } // if (code07Count > 1)\n\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"07\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 f7.3 toc µgm / gram sedchem1\n //04 f8.3 fluoride µgm / gram sedchem1\n //05 f7.2 kjn µgm / gram sedchem1\n //06 f7.3 oxa µgm / gram sedchem1\n //07 f7.3 ptot µgm / gram sedchem1\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedchem1.setToc(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem1.setFluoride(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem1.setKjn(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem1.setOxa(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedchem1.setPtot(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format07: sedchem1 = \" + sedchem1);\n\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n\n //01 a2 format code always \"07\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 f10.3 DIC µgm / litre watchem1\n //04 f7.2 DOC mgm / litre watchem1\n //05 f8.3 fluoride µgm / litre watchem1\n //06 f7.2 iodene µgm atom / litre = µM watchem1\n //07 f7.3 iodate µgm atom / litre = µM watchem1\n\n // subCode = 1 - ignore\n // subCode = 0 (WATER) or subCode = 2 (WATERWOD)\n if (subCode != 1) {\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n\n if (t.hasMoreTokens()) watchem1.setDic(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) // set DIC quality flag\n watQC.setDic((toInteger(t.nextToken())));\n\n if (t.hasMoreTokens()) watchem1.setDoc(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile DOC quality flag\n\n if (t.hasMoreTokens()) watchem1.setFluoride(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile fluoride quality flag\n\n if (t.hasMoreTokens()) watchem1.setIodene(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile iodene quality flag\n\n if (t.hasMoreTokens()) watchem1.setIodate(toFloat(t.nextToken(), 1f));\n if ((dataType == WATERWOD) && (t.hasMoreTokens())) t.nextToken(); // is no profile iodate quality flag\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format07: watchem1 = \" + watchem1);\n\n } // if (subCode != 1)\n\n } // if (dataType == SEDIMENT)\n\n }",
"public Items[] findWhereCodeEquals(String code) throws ItemsDaoException;",
"void format13(String line, int lineCount) {\n\n // is this the first record in the file?\n checkFirstRecord(code, lineCount);\n\n // there can only be one code 13 record per substation\n code13Count++;\n if (code13Count > 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"More than 1 code 13 record in substation\");\n } // if (code13Count > 1)\n\n // get the data off the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n\n if (dataType == SEDIMENT) {\n\n //01 a2 format code always \"13\" n/a\n //02 a12 stnid station id: composed as for format 03 sedphy\n //03 i5 aluminium µgm / gram sedpol2\n //04 f8.3 antimony µgm / gram sedpol2\n //05 f4.1 bismuth µgm / gram sedpol2\n //06 f4.1 molybdenum µgm / gram sedpol2\n //07 f8.3 silver µgm / gram sedpol2\n //08 i4 titanium µgm / gram sedpol2\n //09 f5.2 vanadium µgm / gram sedpol2\n\n if (t.hasMoreTokens()) sedphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) sedpol2.setAluminium(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) sedpol2.setAntimony(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol2.setBismuth(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol2.setMolybdenum(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol2.setSilver(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) sedpol2.setTitanium(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) sedpol2.setVanadium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, sedphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format13: sedpol2 = \" + sedpol2);\n\n } else if (dataType == WATER) {\n\n //01 a2 format code always \"13\" n/a\n //02 a12 stnid station id: composed as for format 03 watphy\n //03 i5 aluminium µgm / litre watpol2\n //04 f8.3 antimony µgm / litre watpol2\n //05 f4.1 bismuth µgm / litre watpol2\n //06 f4.1 molybdenum µgm / litre watpol2\n //07 f8.3 silver µgm / litre watpol2\n //08 i4 titanium µgm / litre watpol2\n //08 f5.2 vanadium µgm / litre watpol2\n\n if (t.hasMoreTokens()) watphy.setStationId(toString(t.nextToken()));\n if (t.hasMoreTokens()) watpol2.setAluminium(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) watpol2.setAntimony(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol2.setBismuth(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol2.setMolybdenum(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol2.setSilver(toFloat(t.nextToken(), 1f));\n if (t.hasMoreTokens()) watpol2.setTitanium(toInteger(t.nextToken()));\n if (t.hasMoreTokens()) watpol2.setVanadium(toFloat(t.nextToken(), 1f));\n\n // station Id must match that of previous station record\n checkStationId(lineCount, watphy.getStationId(\"\"));\n\n if (dbg) System.out.println(\"format13: watpol2 = \" + watpol2);\n\n } // if (dataType == SEDIMENT)\n\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic List<TrainList> Search(Map<String,Object> map) {\n\t\tList<Map<String, Object>> reList=new ArrayList<Map<String,Object>>();//返回的结果List\n\t\t\n\t\tList<Map<String, Object>> ByStartStation=new ArrayList<>();//定义经过起始站的车次List\n\t\tList<Map<String, Object>> ByEndStation=new ArrayList<>();//定义经过终点站的车次List\n\t\tList<Map<String, Object>> ByStartEndStation=new ArrayList<>();//定义经过起始站&&终点站的车次List\n\t\t\n\t\tList<TrainList> reList2= new ArrayList<>();//返回\n\t\tMap<String, Object> SeachFinally =new HashMap<>();\n\t\tSeachFinally.put(\"StartStation\", map.get(\"StartStation\"));\n\t\tConnectionSQL();\n\t\ttry {\n\t\t\treList=mapper.SearchStartStation(map);\n\t\t\tfor(int i=0;i<reList.size();i++){\n\t\t\t\tMap<String, Object> map2=(Map) reList.get(i);\n\t\t\t\tByStartStation.add(map2);\n\t\t\t\tSystem.out.print(map2.get(\"key\")+\"第\"+map2.get(\"value\")+\"\t\");//获取经过起始站的车次\n\t\t\t}\n\t\t\treList.clear();\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"经过终点站车次\");\n\t\t\treList=mapper.SearchEndStation(map);\n\t\t\tfor(int i=0;i<reList.size();i++){\n\t\t\t\tMap<String, Object> map2=(Map)reList.get(i);\n\t\t\t\tByEndStation.add(map2);\n\t\t\t\tSystem.out.print(map2.get(\"key\")+\"第\"+map2.get(\"value\")+\"\t\");//获取经过终点站的车次\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/*if(ByStartStation.size()>ByEndStation.size()){//如果经过起始站的车次比经过终点站的车次多则交换,使得双重循环次数减少\n\t\t\tList<Map<String, Object>> cg=new ArrayList<>();\n\t\t\tcg=ByEndStation;\n\t\t\tByEndStation=ByStartStation;\n\t\t\tByStartStation=cg;\n\t\t}*/\n\t\t\n\t\tSystem.out.println();\n\t\tfor(int i=0;i<ByStartStation.size();i++){\n\t\t\tString ByST=ByStartStation.get(i).get(\"key\").toString();//获取第i个经过起始站的车次\n\t\t\tint ByStartnum=Integer.parseInt(ByStartStation.get(i).get(\"value\").toString());//获取第i个经过起始站的车次的站序(起始车站的站序<终点车站的站序)\n\t\t\tfor(int j=0;j<ByEndStation.size();j++){\n\t\t\t\tString ByET=ByEndStation.get(j).get(\"key\").toString();//获取第j个经过站点站的车次\n\t\t\t\tint ByEndnum=Integer.parseInt(ByEndStation.get(j).get(\"value\").toString());//获取第j个经过终点站的车次的站序(起始车站的站序<终点车站的站序)\n\t\t\t\tif(ByST.equals(ByET) && ByStartnum<ByEndnum){\t//得到最终车次并加入ByStartEndStation\n\t\t\t\t\tByStartEndStation.add(ByStartStation.get(i));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<ByStartEndStation.size();i++){\t\t\t\t//打印输出最终得到结果\n\t\t\tMap<String, Object> map2=(Map)ByStartEndStation.get(i);\n\t\t\tSystem.out.println(map2.entrySet());\n\t\t\tSeachFinally.put(\"TrainName\", map2.get(\"key\"));//添加车次去查找\n\t\t\t{\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\treList2.addAll(mapper.reList(SeachFinally));\n//\t\t\t\t\treList2= mapper.reList(SeachFinally);\n//\t\t\t\t\tfor (Iterator iterator = reList2.iterator(); iterator.hasNext();) {\n//\t\t\t\t\t\tTrainList trainList = (TrainList) iterator.next();\n//\t\t\t\t\t\tSystem.out.println(trainList.toString());\n//\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(reList2.get(0));\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tsession.close();\n\t\t\t\t}\n\t\t\t\tSeachFinally.remove(\"TrainName\");//查到后删除已近查出来的车次\n\t\t\t}\n\t\t}\n\t\tsession.close();\n\t\treturn reList2;\n\t}",
"private List<WeatherStation> getWeatherStations(){\n List<WeatherStation> weatherStations = new ArrayList<>();\n List<String> weatherStationList = new ArrayList<>();\n weatherStationList.add(Constants.STATION_CODE_ADELAIDE);\n weatherStationList.add(Constants.STATION_CODE_BRISBANE);\n weatherStationList.add(Constants.STATION_CODE_CAIRNS);\n weatherStationList.add(Constants.STATION_CODE_CANBERRA);\n weatherStationList.add(Constants.STATION_CODE_DARWIN);\n weatherStationList.add(Constants.STATION_CODE_GOLD_COAST);\n weatherStationList.add(Constants.STATION_CODE_HOBART);\n weatherStationList.add(Constants.STATION_CODE_MELBOURNE);\n weatherStationList.add(Constants.STATION_CODE_PERTH);\n weatherStationList.add(Constants.STATION_CODE_SYDNEY);\n\n for(String weatherStationCode : weatherStationList){\n weatherStations.add(WeatherStationFactory.getWeatherStation(weatherStationCode));\n }\n return weatherStations;\n }",
"public static JSONArray getStation(String search){\n\t\tJSONArray entry = JSON.getJArray(radioStationsMap, search);\n\t\t//TODO: we could add some fancy fuzzy search here too ...\n\t\treturn entry;\n\t}",
"List<Tour> getTourSchedule(String line);",
"@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"void findInGoods(String str) {\n Iterator<Map.Entry<SportEquipment, Integer>> i = goods.entrySet().iterator();\n int count = 1;\n boolean flag = false; //indicates whether sequences were found or not\n\n while (i.hasNext()) {\n\n Map.Entry<SportEquipment, Integer> pair = i.next();\n SportEquipment seq = pair.getKey();\n String category = seq.getCategory().toString();\n String name = seq.getTitle();\n if (category.contains(str.toUpperCase()) || name.contains(str.toLowerCase())) {\n System.out.println(Integer.toString(count) + Strings.DROP + category + Strings.SEPARATOR2 +\n name + Strings.CURRENCY + seq.getPrice() + Strings.SEPARATOR + pair.getValue());\n flag = true;\n }\n count++;\n }\n if (!flag) System.out.println(Strings.ITEM_IS_NOT_FOUND);\n\n }",
"@Override\n @Transactional(readOnly = true)\n public Region searchByCode(String inseeCode) {\n log.debug(\"Request to get Region by insee code: {}\", inseeCode);\n List<Region> list = null;\n if(list != null && list.size() > 0)\n return list.get(0);\n else\n return null;\n }",
"public int findItem(int code) {\n\t\tfor(int i = 0; i < last; ++i)\n\t\t\tif(code == list[i].getCode())\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}",
"private Map<String, String> findMetadata(InputStream table, String itemCode) throws IOException {\n\t\t\tfinal BufferedReader br = new BufferedReader(new InputStreamReader(table));\n\t\t\tfinal List<String> columnNames = Arrays.asList(br.readLine().split(\"\\t\"));\n\t\t\tfinal int codeIndex = columnNames.indexOf(CODE_COLUMN);\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\tString[] values = line.split(\"\\t\");\n\t\t\t\tif(values[codeIndex].equals(itemCode)) {\n\t\t\t\t\tfinal Map<String, String> metadata = new HashMap<String, String>();\n\t\t\t\t\tfor(int i = 0; i < columnNames.size(); ++i) {\n\t\t\t\t\t\tmetadata.put(columnNames.get(i), values[i]);\n\t\t\t\t\t}\n\t\t\t\t\treturn metadata;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"public ArrayList<Coordinate> transportLinePath()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<Coordinate> line_coordinates = new ArrayList<Coordinate>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates.add(stop.getCoordinate());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates.add(s.getCoordinates().get(1));\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street1);\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates.add(this_street2);\r\n }\r\n\r\n }\r\n\r\n line_coordinates.add(getStopsMap().get(getStopsMap().size()-1).getCoordinate());\r\n return line_coordinates;\r\n }",
"public Station getStationByPos(int x, int y)\r\n\t{\r\n\t\t\r\n\t\tfor(Line l : line)\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\t\t\t\r\n\t\t\tfor(int j = 0 ; j < l.getNumberOfStation() ; j++)\r\n\t\t\t{\r\n\t\t\t\tStation tmp = l.returnStation(i);\r\n\t\t\t\t\r\n\t\t\t\tif(Math.abs(tmp.getPosX() - x) < 5 && Math.abs(tmp.getPosY() - y) < 5)\r\n\t\t\t\t{\r\n\t\t\t\t\treturn tmp;\r\n\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}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"@Test\r\n void findRouteSameLine() {\r\n List<Station> route = model.findRoute(1, 20);\r\n assertNotNull(route);\r\n assertEquals(6, route.size());\r\n assertEquals(\"OakGrove\", route.get(0).getName());\r\n assertEquals(\"NorthStation\", route.get(5).getName());\r\n }",
"@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public String[] obtainStops() {\n\n String[] stopsNone = { \"No stops found\" };\n String[] stopsArbutus = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Hilltop Cir. & Hilltop Rd.\", \"Hilltop Cir. & Walker Ave.\", \"Hilltop Cir. & Center Rd.\", \"Poplar Ave. & Stadium Lot\", \"TRC @ Linden Ave\", \"Westland Blvd. & Circle Dr.\", \"Westland Blvd. & Courtney Rd.\", \"Maiden Choice La. & Westland Blvd\", \"Maiden Choice La. & Warren Tree\", \"Maiden Choice La. & Wilkens Ave\", \"Maiden Choice La. & Grouse Ct\", \"Maiden Choice La. & Symmington Aven.\"};\n String[] stopsArundel = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"BWI Marc Station\", \"Arundel Mills Mall Visitor Entrace #5\", \"BWI Marc Station\", \"Administration Dr. Bus Shelter\", \"Hilltop Circle & Hilltop Rd.\" };\n String[] stopsCatonsville = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Rolling Rd @YMCA\", \"Rolling Rd @Valley Rd (CCBC)\", \"Catonsville High @Bloomsbury Ave\", \"Mellor Ave & Bloomsbury Ave\" };\n String[] stopsDowntownA = { \"Commons Dr. & Park Rd\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Greyhound Station @ Haines\",\"MLK Blvd & Pratt St (UMB)\", \"Green St & Fayette St\", \"Green St & Lombard St (UMB)\" };\n\n if ( this.longName.toLowerCase().contains(\"Arbutus\".toLowerCase()) ) {\n return stopsArbutus;\n }\n if ( this.longName.contains(\"Arundel\") ) {\n return stopsArundel;\n }\n if ( this.longName.contains(\"Catonsville\") ) {\n return stopsCatonsville;\n }\n if ( this.longName.contains(\"Downtown\") ) {\n return stopsDowntownA;\n }\n\n return stopsNone;\n\n }",
"public String getFlightCode(int mCode)\r\n\t {\t\r\n\t\t return MRs[mCode].getFlightCode();\r\n\t }",
"public abstract Map<Integer, Station> getStations(boolean includeSilent);",
"void getExistingStationDetails(MrnStation tStation, int i) {\n // find out the existing station details for the report\n // check if also within a date-time range\n\n Timestamp tmpSpldattim = null;\n if (dataType == CURRENTS) {\n tmpSpldattim = currents.getSpldattim();\n } else if (dataType == SEDIMENT) {\n tmpSpldattim = sedphy.getSpldattim();\n } else if ((dataType == WATER) || (dataType == WATERWOD)) {\n tmpSpldattim = watphy.getSpldattim();\n } // if (dataType == CURRENTS)\n\n // find the date range for this station\n java.util.GregorianCalendar calDate = new java.util.GregorianCalendar();\n calDate.setTime(tmpSpldattim); //Timestamp.valueOf(startDateTime));\n\n calDate.add(java.util.Calendar.MINUTE, -timeRangeVal);\n Timestamp dateTimeMinTs = new Timestamp(calDate.getTime().getTime());\n\n calDate.add(java.util.Calendar.MINUTE, timeRangeVal*2);\n Timestamp dateTimeMaxTs = new Timestamp(calDate.getTime().getTime());\n\n if (dbg) System.out.println(\"<br><br>getExistingStationDetails: \" +\n \"dateTimeMinTs = \" + dateTimeMinTs);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"dateTimeMaxTs = \" + dateTimeMaxTs);\n\n //if (dbg) System.out.println(\"<br>checkStationExists: in loop: \" +\n // \"tStation[i] = \" + tStation[i]);\n\n String where = \"STATION_ID='\" + tStation.getStationId() + \"'\";\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"data where = \" + where);\n String order = \"SUBDES\";\n\n String prevSubdes = \"\";\n int k = 0;\n\n //\n // are there any currents records for this station\n //------------------------------------------------\n tCurrents = new MrnCurrents().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents.length = \" + tCurrents.length);\n\n for (int j = 0; j < tCurrents.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSpldattim() = \" +\n tCurrents[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tCurrents[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n tCurrents[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) &&\n// tCurrents[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tCurrents[j].getSpldattim(\"\");\n currentsRecordCountArray[i]++;\n\n if (dataType == CURRENTS) {\n dataExists = true;\n\n // get the min and max depth\n if (tCurrents[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tCurrents[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tCurrents[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", currents.getSubdes() = \" + currents.getSubdes(\"\"));\n //if (tCurrents[j].getSubdes(\"\").equals(subdes)) {\n if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tCurrents[j].getSubdes(\"\").equals(currents.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tCurrents[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tCurrents[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tCurrents[j].getSubdes() = \" +\n tCurrents[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tCurrents[j].getSubdes(\"\");\n\n } // if (dataType == CURRENTS)\n\n } // if (dateTimeMinTs.before(tCurrents[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tCurrents.length; j++)\n\n //\n // are there any sedphy records for this station\n //------------------------------------------------\n tSedphy = new MrnSedphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy.length = \" + tSedphy.length);\n\n for (int j = 0; j < tSedphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSpldattim() = \" + tSedphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tSedphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n tSedphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) &&\n// tSedphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tSedphy[j].getSpldattim(\"\");\n sedphyRecordCountArray[i]++;\n\n if (dataType == SEDIMENT) {\n dataExists = true;\n\n // get the min and max depth\n if (tSedphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n if (tSedphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tSedphy[j].getSpldep();\n } // if (tSedphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", sedphy.getSubdes() = \" + sedphy.getSubdes(\"\"));\n //if (tSedphy[j].getSubdes(\"\").equals(subdes)) {\n if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tSedphy[j].getSubdes(\"\").equals(sedphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tSedphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tSedphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tSedphy[j].getSubdes() = \" +\n tSedphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tSedphy[j].getSubdes(\"\");\n\n } // if (dataType == SEDIMENT)\n\n } // if (dateTimeMinTs.before(tSedphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tSedphy.length; j++)\n\n //\n // are there any watphy records for this station\n //------------------------------------------------\n tWatphy = new MrnWatphy().get(\"*\", where, order);\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy.length = \" + tWatphy.length);\n\n for (int j = 0; j < tWatphy.length; j++) {\n\n if (dbg) System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSpldattim() = \" + tWatphy[j].getSpldattim());\n\n // only found if station_id's the same or also within date-time range\n if (tWatphy[j].getStationId().equals(station.getStationId()) ||\n (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n tWatphy[j].getSpldattim().before(dateTimeMaxTs))) {\n// if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) &&\n// tWatphy[j].getSpldattim().before(dateTimeMaxTs)) {\n\n stationExists = true;\n stationExistsArray[i] = true;\n spldattimArray[i] = tWatphy[j].getSpldattim(\"\");\n watphyRecordCountArray[i]++;\n\n if ((dataType == WATER) || (dataType == WATERWOD)) {\n dataExists = true;\n\n // get the min and max depth\n if (tWatphy[j].getSpldep() < loadedDepthMin[i]) {\n loadedDepthMin[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n if (tWatphy[j].getSpldep() > loadedDepthMax[i]) {\n loadedDepthMax[i] = tWatphy[j].getSpldep();\n } // if (tWaphy.getSpldep() < depthMin)\n\n // is it the same subdes ?\n if (dbg) System.out.println(\n \"<br>getExistingStationDetails: subdes = \" + subdes +\n \", watphy.getSubdes() = \" + watphy.getSubdes(\"\"));\n //if (tWatphy[j].getSubdes(\"\").equals(subdes)) {\n if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))) {\n subdesCount[i]++;\n } // if (tWatphy[j].getSubdes(\"\").equals(watphy.getSubdes(\"\"))\n\n if (!prevSubdes.equals(tWatphy[j].getSubdes(\"\"))) {\n subdesArray[i][k] = tWatphy[j].getSubdes(\"\");\n if (\"\".equals(subdesArray[i][k])) subdesArray[i][k] = \"none\";\n if (dbg) {\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"k = \" + k);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"prevSubdes = \" + prevSubdes);\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"tWatphy[j].getSubdes() = \" +\n tWatphy[j].getSubdes(\"\"));\n System.out.println(\"<br>getExistingStationDetails: \" +\n \"subdesArray[i][k] = \" + subdesArray[i][k]);\n } // if (dbg)\n k++;\n } // if (!prevSubdes.equals(subdesArray[i][k])\n\n prevSubdes = tWatphy[j].getSubdes(\"\");\n\n } // if ((dataType == WATER) || (dataType == WATERWOD))\n\n } // if (dateTimeMinTs.before(tWatphy[j].getSpldattim()) ...\n\n } // for (int j = 0; j < tWatphy.length; j++)\n\n }",
"private int findStopCodon(String sequentie,int start){\n\t for(int i = start; i+3<sequentie.length();i+=3){\n\t if(sequentie.substring(i,i+3).contains(\"TAG\")||sequentie.substring(i,i+3).contains(\"TAA\")||sequentie.substring(i,i+3).contains(\"TGA\")){\n\t return i+3;\n\t }\n\t }\n\t return -1;\n }",
"private void findServices(ArrayList<String> readLine) {\n\t\tArrayList<String> services = new ArrayList<String>();\n\t\tfor (String read: readLine){\n\t\t\tif(read.contains(\"open\")){\n\t\t\t\tString [] nmapService = read.split(\" \");\n\t\t\t\tservices.add(nmapService[nmapService.length-1]);\n\t\t\t}\n\t\t}\n\t\tthis.setResult(services);\n\t}",
"public void searchFlights();",
"String getMapCode();",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic String getCodeByStr(String tab, String strvalue) {\n\t\tif (allcode.isEmpty()) {\r\n\t\t\tinit();\r\n\t\t}\r\n\r\n\t\tList list = (List) allcode.get(tab.toUpperCase());\r\n\t\tString result = \"\";\r\n\t\tCode code = new Code();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tcode = (Code) list.get(i);\r\n\t\t\tString mc = code.getDescription();\r\n\t\t\tif (mc.equals(strvalue)) {\r\n\t\t\t\tresult = code.getCode();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic ArrayList<DetailCodeBean> findDetailCodeList(String code) {\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findDetailCodeList 시작 \"); }\n\t\t\n\t\tArrayList<DetailCodeBean> detailCodeList = null;\n\t\ttry{\n\t\tdetailCodeList = detailCodeDAO.selectDetailCodeList(code);\n\t\t}catch(Exception e){\n\t\t\tlogger.fatal(e.getMessage());\n\t\t\tthrow e; \n\t\t}\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : findDetailCodeList 종료 \"); }\n\t\treturn detailCodeList;\n\t}",
"public LearningResultHasActivity[] findWhereProgramCodeEquals(String programCode) throws LearningResultHasActivityDaoException;",
"public ArrayList<String> transportLinePathIDs()\r\n {\r\n Coordinate next_street1 = null;\r\n Coordinate next_street2 = null;\r\n Street next_street = null;\r\n ArrayList<String> line_coordinates_ids = new ArrayList<String>();\r\n\r\n for (int i = 0; i < getStreetsMap().size(); i++)\r\n {\r\n Street s = getStreetsMap().get(i);\r\n Coordinate this_street1 = s.getCoordinates().get(0);\r\n Coordinate this_street2 = s.getCoordinates().get(2);\r\n\r\n if (i + 1 < getStreetsMap().size())\r\n {\r\n next_street = getStreetsMap().get(i+1);\r\n next_street1 = next_street.getCoordinates().get(0);\r\n next_street2 = next_street.getCoordinates().get(2);\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n\r\n for (Stop stop : getStopsMap())\r\n {\r\n if (stop.getStreet().equals(s))\r\n {\r\n line_coordinates_ids.add(stop.getId());\r\n }\r\n }\r\n\r\n if (s.getCoordinates().get(1) != null)\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n\r\n //11\r\n if (this_street1.getX() == next_street1.getX() && this_street1.getY() == next_street1.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n //12\r\n else if (this_street1.getX() == next_street2.getX() && this_street1.getY() == next_street2.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n // 21\r\n else if (this_street2.getX() == next_street1.getX() && this_street2.getY() == next_street1.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n //22\r\n else if (this_street2.getX() == next_street2.getX() && this_street2.getY() == next_street2.getY())\r\n {\r\n line_coordinates_ids.add(s.getId());\r\n }\r\n }\r\n\r\n line_coordinates_ids.add(getStopsMap().get(getStopsMap().size()-1).getId());\r\n return line_coordinates_ids;\r\n }",
"@Test\r\n void findRouteDifferentLine() {\r\n List<Station> route = model.findRoute(9, 60);\r\n assertNotNull(route);\r\n assertEquals(10, route.size());\r\n assertEquals(\"SuffolkDowns\", route.get(0).getName());\r\n assertEquals(\"Broadway\", route.get(9).getName());\r\n }",
"public static Map<String, List<String>> getStationNameToCodeMap() {\n\n\t\tif (stationNameToCodeMapCache.size() > 0)\n\t\t\treturn stationNameToCodeMapCache;\n\t\ttry {\n\t\t\tList<StationMap> stationMaps = buildStationMap();\n\t\t\tMap<String, List<String>> stationNameToCode = new HashMap<>();\n\t\t\tfor (int i = 0; i < stationMaps.size(); i++) {\n\t\t\t\tif (stationNameToCode.containsKey(stationMaps.get(i).getStationName().toLowerCase().trim())) {\n\t\t\t\t\tList<String> list = stationNameToCode.get(stationMaps.get(i).getStationName().toLowerCase().trim());\n\t\t\t\t\tlist.add(stationMaps.get(i).getStationCode());\n\t\t\t\t} else {\n\t\t\t\t\tList<String> list = new ArrayList<>();\n\t\t\t\t\tlist.add(stationMaps.get(i).getStationCode());\n\t\t\t\t\tstationNameToCode.put(stationMaps.get(i).getStationName().toLowerCase().trim(), list);\n\t\t\t\t}\n\t\t\t}\n\t\t\tstationNameToCodeMapCache = stationNameToCode;\n\t\t} catch (UrbanRailNetworkException e) {\n\t\t}\n\t\treturn stationNameToCodeMapCache;\n\t}",
"public ArrayList<String> getNodeRouteList(String code);",
"java.lang.String getCode();",
"java.lang.String getCode();",
"private static int search(String item, ListArrayBasedGeneric<Runway> runwayList)\r\n\t{\r\n\t\tint size = runwayList.size();\r\n\t\tString itemFromList = \"\";\r\n\r\n\t\tfor(int i = 0; i < size; i++)\r\n\t\t{\r\n\t\t\titemFromList = runwayList.get(i).getRunwayName();\r\n\r\n\t\t\tif(itemFromList.compareToIgnoreCase(item) == 0)\r\n\t\t\t{\r\n\t\t\t\treturn i;\r\n\t\t\t} // END IF\r\n\t\t} // END FOR\r\n\r\n\t\treturn -1;\r\n\t}",
"public static Service retrieve(String code) {\n \treturn find.ref(code); \n }",
"public Nationality findByCode(String code) {\r\n EntityManager entityManager = getEntityManager(); \r\n \r\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\r\n CriteriaQuery<Nationality> criteria = criteriaBuilder.createQuery(Nationality.class);\r\n Root<Nationality> root = criteria.from(Nationality.class);\r\n criteria.select(root);\r\n criteria.where(\r\n criteriaBuilder.equal(root.get(Nationality_.code), code)\r\n );\r\n \r\n return getSingleResult(entityManager.createQuery(criteria));\r\n }",
"void getAllLines(Vector<Integer> lineIDs,Vector<Integer> lineDepIDs, Vector<String> lineCodes, String empresa);",
"@GetMapping(\"/code/{code}\")\n @ApiOperation(value = \"Search StudyClasses by code\")\n public StudyClassDTO findByCode(\n @ApiParam(value = \"The StudyClass code\") @PathVariable String code) throws ResourceNotFoundException {\n Optional<StudyClassDTO> optionalStudyClassDto = studyClassService.findByCode(code);\n if (!optionalStudyClassDto.isPresent()) {\n throw new ResourceNotFoundException(String.format(\"StudyClass with code %s don't exists\", code));\n }\n\n return optionalStudyClassDto.get();\n }",
"public void searchByState() {\n System.out.println(\"enter a name of state to fetch person data fro state :--\");\n String state = scanner.next();\n\n Iterator it = list.iterator();\n while (it.hasNext()) {\n Contact person = (Contact) it.next();\n if (state.equals(person.getState())) {\n List stream = list.stream().filter(n -> n.getCity().contains(state)).collect(Collectors.toList());\n System.out.println(stream);\n }\n }\n }",
"public String getSourceLine (int line);",
"int clientSourceStationID(final int index);",
"@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tint wkid = map.getSpatialReference().getID();\n\n\t\t\t\t\t\t\tLocator locator = Locator\n\t\t\t\t\t\t\t\t\t.createOnlineLocator(floorInfo\n\t\t\t\t\t\t\t\t\t\t\t.getLocatorServerPath());\n\t\t\t\t\t\t\t// Create suggestion parameter\n\t\t\t\t\t\t\tLocatorFindParameters params = new LocatorFindParameters(\n\t\t\t\t\t\t\t\t\taddress);\n\n\t\t\t\t\t\t\t// ArrayList<String> outFields = new\n\t\t\t\t\t\t\t// ArrayList<String>();\n\t\t\t\t\t\t\t// outFields.add(\"*\");\n\t\t\t\t\t\t\t// params.setOutFields(outFields);\n\t\t\t\t\t\t\t// Set the location to be used for proximity based\n\t\t\t\t\t\t\t// suggestion\n\t\t\t\t\t\t\t// params.setLocation(map.getCenter(),map.getSpatialReference());\n\t\t\t\t\t\t\t// Set the radial search distance in meters\n\t\t\t\t\t\t\t// params.setDistance(50000.0);\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlocatorResults = locator.find(params);\n\t\t\t\t\t\t\t\t// HashMap<String, String> params = new\n\t\t\t\t\t\t\t\t// HashMap<String,\n\t\t\t\t\t\t\t\t// String>();\n\t\t\t\t\t\t\t\t// params.put(\"货架编号\", address);\n\t\t\t\t\t\t\t\t// locatorResults = locator.geocode(params,\n\t\t\t\t\t\t\t\t// null,\n\t\t\t\t\t\t\t\t// map.getSpatialReference());\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 出错:\"\n\t\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (locatorResults != null\n\t\t\t\t\t\t\t\t\t&& locatorResults.size() > 0) {\n\t\t\t\t\t\t\t\t// Add the first result to the map and zoom to\n\t\t\t\t\t\t\t\t// it\n\t\t\t\t\t\t\t\tfor (LocatorGeocodeResult result : locatorResults) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"查找:\" + address + \" 结果:\"\n\t\t\t\t\t\t\t\t\t\t\t+ result.getAddress());\n\n\t\t\t\t\t\t\t\t\tif (result.getAddress() != null\n\t\t\t\t\t\t\t\t\t\t\t&& address.equals(result\n\t\t\t\t\t\t\t\t\t\t\t\t\t.getAddress())) {\n\n\t\t\t\t\t\t\t\t\t\tfloorInfo.getShelfList().add(result);\n\t\t\t\t\t\t\t\t\t\t// shelfList.add(result);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsearchTime++;\n\t\t\t\t\t\t\tSystem.out.println(\"已查找次数:\" + searchTime);\n\t\t\t\t\t\t\tif (searchTime >= mSearchCount) {\n\t\t\t\t\t\t\t\tmHandler.post(mMarkAndRoute);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}",
"public IAstRlsSourceFile findRlsFile(int langCode);",
"public static Map<String, StationMap> getStationCodeToStationMap() {\n\t\tif (stationCodeToStationMapCache.size() > 0)\n\t\t\treturn stationCodeToStationMapCache;\n\t\ttry {\n\t\t\tList<StationMap> stationMaps = buildStationMap();\n\t\t\tfor (StationMap stationMap : stationMaps) {\n\t\t\t\tstationCodeToStationMapCache.put(stationMap.getStationCode(), stationMap);\n\t\t\t}\n\t\t} catch (UrbanRailNetworkException e) {\n\t\t}\n\t\treturn stationCodeToStationMapCache;\n\n\t}",
"static String segmentsCode(Source code, Set<String> relevant){\n final UnitLocation unit = locateUnit(code, relevant);\n\n if(Objects.isNull(unit)) // returns nothing\n return \"\";\n\n final SegmentationGraph graph = generateSegmentationGraph(unit);\n final List<Location> whiteList = graph.relevantSet(unit).stream()\n .collect(Collectors.toList());\n\n final SourceSelection selection = new SourceSelection(whiteList);\n\n return selection.toCode();\n }",
"private ngtXMLHandler getCodePosition( String usid, ngtXMLHandler contentXML) throws boRuntimeException\n {\n ngtXMLHandler nxml = null;\n if(usid == null || usid.equals(\"-1\") || usid.equals(\"0\"))\n {//caso não seja passado nenhum usid \n String ct_sid = null;\n ngtXMLHandler ct_child = contentXML;\n while(ct_sid == null && ct_child != null && ct_child.getNode() != null)\n { \n ct_sid = ct_child.getAttribute(\"sid\");\n ct_child.goFirstChild();\n }\n //vamos tentar a definição do procedimento que tenha o sid do que foi passado. Comum na chamada de procedimentos\n if(ct_sid != null)\n {\n try{\n Node n_nxml = getActualXml().getDocument().selectSingleNode(\"//defProcedure/descendant::*[@sid='\"+ct_sid+\"']\");\n if(n_nxml == null)\n {\n nxml = new ngtXMLHandler(getActualXml().getDocument().getDocumentElement());\n }\n else\n {\n nxml = new ngtXMLHandler(n_nxml);\n while(nxml != null && nxml.getNode() != null && !nxml.getNodeName().equals(\"program\"))\n {\n nxml.goParentNode(); \n }\n }\n }catch(Exception e){nxml = new ngtXMLHandler(getActualXml().getDocument().getDocumentElement());}\n }\n else\n {\n nxml = new ngtXMLHandler(getActualXml().getDocument().getDocumentElement());\n }\n \n nxml.goChildNode(\"program\");\n nxml.goChildNode(\"code\"); \n }\n else\n {\n nxml = getNode(usid); \n if(nxml == null)\n {\n nxml = getCodePosition(null,contentXML);\n }\n } \n return nxml;\n }",
"public String getStationNames(String parameterKey) throws IOException, JSONException {\n\n JSONObject stationsObject = readJsonFromUrl(metObsAPI + \"/version/latest/parameter/\" + parameterKey + \".json\");\n JSONArray stationsArray = stationsObject.getJSONArray(\"station\");\n String stationId = null;\n for (int i = 0; i < stationsArray.length(); i++) {\n String stationName = stationsArray.getJSONObject(i).getString(\"name\");\n stationId = stationsArray.getJSONObject(i).getString(\"key\");\n System.out.println(\"StationId \" + stationId + \": \" + stationName);\n }\n\n return stationId;\n }",
"public String findTransfer(Line otherLine) {\n String output = \"\";\n for (String similarStop : otherLine.getLine().split(\" \")) {\n if (this.line.contains(similarStop)) {\n output = similarStop;\n }\n }\n return output;\n }",
"@Transactional(readOnly = true)\n\tpublic List<SystemCode> getSystemCodeByCode(String code) {\n\t\treturn dao.getSystemCodeByCode(code);\n\t}",
"StadiumModel getStadiumForCode(String code);",
"@Override\n\tpublic List<FxzfLane> getByStation(String station) {\n\t\treturn selectList(\"getByStation\", station);\n\t}",
"public VirtualWeatherStation(String postalCode) {\n\t\tString pc = postalCode;\n\t\tif (pc == null || pc.length() != 5) pc = \"28038\";\n\t\tforecastQuery = \"http://www.aemet.es/xml/municipios/localidad_\"+pc+\".xml\";\n\n\t\tgetForecastInFollowingDays();\n\t}",
"public Event getEventFromCode(String code) {\r\n // Gets the events collection and creates a query string for the event code\r\n MongoCollection<Document> events = mongoDB.getCollection(\"Events\");\r\n Document query = new Document(\"eventCode\", code);\r\n\r\n // Loops over events found matching the id, returning the first one\r\n for (Event event : events.find(query, Event.class)) {\r\n return event;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"private Location findAndEnableBreak(final SwfInfo swf, final SourceFile file, final int line) throws NotConnectedException,\n InProgressException {\n if (swf == null) {\n return breakEnableRequest(file.getId(), line);\n }\n\n for (final SourceFile similarFile : getSimilarSourceFilesInSwf(swf, file)) {\n final Location location = breakEnableRequest(similarFile.getId(), line);\n if (location != null) {\n return location;\n }\n }\n\n return null;\n }",
"public void searchLine(String line) {\n int currentState = 0;\n for (int i = 0; i < line.length(); i++) {\n //work through the line to be checked character by character\n boolean match = false;\n //Get the current state and push it to the stack\n deque.push(get(currentState));\n\n //Get the current state from the stack\n FSMNode state = (FSMNode) deque.pop();\n\n //if the state is null a match has been found (all states traversed)\n if (state == null) {\n System.out.println(line);\n return;\n }\n \n // Handle . operator\n if(state.ch.contains(\".\")){ \n currentState = state.nextState1;\n deque.push(get(currentState));\n state = (FSMNode) deque.pop();\n }\n // Handle non special operators\n if (!isSpecial(state.ch)) {\n if (state.ch.charAt(0) == line.charAt(i)) {\n match = true;\n deque.put(get(state.nextState1)); \n }\n } else {\n // Handle branch states\n deque.push(get(state.nextState1));\n deque.push(get(state.nextState2)); \n }\n\n if (match) {\n // If a match is found move to the next character and state\n currentState = state.nextState1;\n if (i == line.length() - 1 && get(currentState) == null) {\n // If this is the last character in the string, check if the state list has been exhausted\n // if so this is a match \n System.out.println(line);\n return;\n }\n } else {\n // If character was not a match reset current state and move to the next character in the string\n currentState = 0;\n }\n }\n\n }",
"private ObStation getStationInfo(String icao) {\n ObStation station = null;\n ObStationDao dao = new ObStationDao();\n if (dao != null) {\n try {\n station = dao.queryByIcao(icao);\n } catch (Exception e) {\n statusHandler.handle(Priority.ERROR, icao\n + \" -Could not create datauri in getStationInfo() \", e);\n }\n }\n\n return station;\n }",
"public void searchByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.next();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(\"Result: \"+i.getFirstName()));\n }",
"static RobotProgramNode parseFile(File code){\r\n\tScanner scan = null;\r\n\ttry {\r\n\t scan = new Scanner(code);\r\n\r\n\t // the only time tokens can be next to each other is\r\n\t // when one of them is one of (){},;\r\n\t scan.useDelimiter(\"\\\\s+|(?=[{}(),;])|(?<=[{}(),;])\");\r\n\r\n\t RobotProgramNode n = parseProgram(scan); // You need to implement this!!!\r\n\r\n\t scan.close();\r\n\t return n;\r\n\t} catch (FileNotFoundException e) {\r\n\t System.out.println(\"Robot program source file not found\");\r\n\t} catch (ParserFailureException e) {\r\n\t System.out.println(\"Parser error:\");\r\n\t System.out.println(e.getMessage());\r\n\t scan.close();\r\n\t}\r\n\treturn null;\r\n }",
"private void populateDestStationCodes() {\n\t\ttry {\n\t\t\tString stationCode = handler.getStationCode();\n\t\t\tStationsDTO[] station = null;\n\t\t\tif (stationCode != null) {\n\t\t\t\tstation = handler.getAllAssociatedStations();\n\t\t\t}\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoStation.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}"
] | [
"0.61200625",
"0.6050811",
"0.59849894",
"0.5772472",
"0.5742908",
"0.56614554",
"0.5618986",
"0.55984986",
"0.5531159",
"0.5491235",
"0.5487273",
"0.54733735",
"0.54214865",
"0.5408651",
"0.53810525",
"0.53426766",
"0.5298371",
"0.5296353",
"0.527717",
"0.5245395",
"0.5243092",
"0.5217728",
"0.52118766",
"0.5198022",
"0.5189734",
"0.5189148",
"0.51883185",
"0.5183512",
"0.51541173",
"0.51464605",
"0.5138685",
"0.5135708",
"0.5130771",
"0.5128109",
"0.51153445",
"0.51101995",
"0.5109609",
"0.50918806",
"0.50848377",
"0.5074817",
"0.5070149",
"0.5062173",
"0.5045089",
"0.50404733",
"0.50210726",
"0.5015603",
"0.5005403",
"0.4999242",
"0.4999242",
"0.4999242",
"0.4999242",
"0.4999242",
"0.4990888",
"0.4990137",
"0.4988493",
"0.49796933",
"0.49689272",
"0.49669614",
"0.49649394",
"0.49614617",
"0.49552497",
"0.49546665",
"0.493809",
"0.4934984",
"0.4932858",
"0.49124447",
"0.48956582",
"0.48937234",
"0.48909456",
"0.48869845",
"0.4884402",
"0.48788044",
"0.48788044",
"0.4876898",
"0.48737255",
"0.48732322",
"0.4872224",
"0.4862122",
"0.48603603",
"0.4857334",
"0.48521706",
"0.48371023",
"0.48327997",
"0.4829667",
"0.48291177",
"0.48275042",
"0.4820243",
"0.4819215",
"0.48172694",
"0.48107386",
"0.48014328",
"0.47951087",
"0.47867522",
"0.4783477",
"0.47765008",
"0.47726467",
"0.47660834",
"0.47651085",
"0.47592652",
"0.4758537"
] | 0.7433296 | 0 |
The method used in GUI, give the x and y position and return the station | public Station getStationByPos(int x, int y)
{
for(Line l : line)
{
int i = 0;
for(int j = 0 ; j < l.getNumberOfStation() ; j++)
{
Station tmp = l.returnStation(i);
if(Math.abs(tmp.getPosX() - x) < 5 && Math.abs(tmp.getPosY() - y) < 5)
{
return tmp;
}
i++;
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"double getStation();",
"org.landxml.schema.landXML11.Station xgetStation();",
"double getXPosition();",
"public void updateXLoc();",
"public Point getLocation();",
"public String get_station_location () {\n if (!this.on) {\n return null;\n }\n\n return this.stationLocation;\n }",
"public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }",
"@Override\n\tpublic Point getLocation() {\n\t\treturn new Point(x,y);\n\t}",
"String getPosX();",
"public Coordinate getLocation();",
"public Vector getLocation();",
"public Station(){\n\t\tthis.Name = \"\";\n\t\tthis.x_location = 0;\n\t\tthis.y_location = 0;\n\t\tthis.capacity = 0;\n\t\tthis.ambulances = null;\n\t\tthis.location = (\"(\" + x_location + \", \" + y_location + \")\");\n\n\t}",
"public String getFromStation();",
"public Point getRobotLocation();",
"Square getCurrentPosition();",
"public int getXCoordinate ()\n {\n return xCoordinate;\n }",
"void setStation(double station);",
"private void updateStationPositions() {\n //stations going east\n if(layout == Layout.square) {\n for (int i = 0; i < numStations; i++) {\n northbound.get(i).setPosition(i+1,2*numStations+1);\n eastbound.get(i).setPosition(0,numStations+(i+1));\n southbound.get(i).setPosition(numStations+1+i,0);\n westbound.get(i).setPosition(numStations*2+1,1+i);\n }\n }else{\n for (int i = 0; i < numStations; i++) {\n eastbound.get(i).setPosition(i,2*numStations+i);\n northbound.get(i).setPosition(numStations+i,3*numStations+i);\n southbound.get(i).setPosition(2*numStations+i,i);\n westbound.get(i).setPosition(3*numStations+i,numStations+i);\n }\n }\n\n }",
"Point getPosition();",
"Point getPosition();",
"public void updateYLoc();",
"String getPosY();",
"public int getX(){ return xPosition; }",
"public void updateStationPositions() {\r\n \t\tObject key;\r\n \t\tObject[] cells = graph.getDescendants(graph.getRoots());\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tJmtCell jcell = (JmtCell) cell;\r\n \t\t\t\tkey = ((CellComponent) jcell.getUserObject()).getKey();\r\n \t\t\t\t// Sets cell coordinate into data structure\r\n \t\t\t\tmodel.setStationPosition(key, new JMTPoint(getCellCoordinates(jcell), !jcell.isLeftInputCell()));\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"public Coordinate getPosition();",
"public Point getLocation ( )\r\n\t{\r\n\t\treturn new Point ( currentCol, currentRow );\r\n\t}",
"double getPositionX();",
"double getPositionX();",
"double getPositionX();",
"IntPoint getLocation();",
"private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }",
"public String getToStation();",
"public int getXPos();",
"public float getX() { return xCoordinate;}",
"public abstract Positionable findPositionForWindow(int y, int x);",
"public int getX() { return loc.x; }",
"public Point getLocation() { return loc; }",
"void xsetStation(org.landxml.schema.landXML11.Station station);",
"public Point getPosition();",
"public int get_X_Coordinate()\n {\n return currentBallX;\n }",
"int getX_coordinate(){\n return x_coordinate;\n }",
"public int getX()\r\n {\r\n return xLoc;\r\n }",
"public double getStartX()\n {\n return startxcoord; \n }",
"public int getLocationX() {\r\n\t\treturn x;\r\n\t}",
"public int getStationIdx() {\n return stationIdx;\n }",
"public int getX() { return position.x; }",
"public String getStation() {\n return stationName;\n }",
"public final double getX() { return location.getX(); }",
"public double getX_location() {\n return x_location;\n }",
"@Override\n public Point2D getMouseLocation() {\n if (PlatformAdapter.getOs() == PlatformAdapter.OS.UNIX &&\n !JavaVersionAdapter.currentVersion().isJava11Compatible()) {\n return waitForAsyncFx(RETRIEVAL_TIMEOUT_IN_MILLIS,\n () -> new Point2D(((Double) getRobot().getClass().getMethod(\"getMouseX\").invoke(\n getRobot())).intValue() / JavaVersionAdapter.getScreenScaleX(),\n ((Double) getRobot().getClass().getMethod(\"getMouseY\").invoke(\n getRobot())).intValue() / JavaVersionAdapter.getScreenScaleY()));\n }\n else {\n return waitForAsyncFx(RETRIEVAL_TIMEOUT_IN_MILLIS, () -> new Point2D(\n ((Double) getRobot().getClass().getMethod(\"getMouseX\").invoke(glassRobot)).intValue(),\n ((Double) getRobot().getClass().getMethod(\"getMouseY\").invoke(glassRobot)).intValue()));\n }\n }",
"public int getLocY ()\n {\n return locY;\n }",
"public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }",
"@Override\n public Location getDisplayedLocation() {\n this.displayedLocation = new Location((int)pane.getHvalue(), (int)pane.getVvalue(), curFloor, \"Unknown\");\n return displayedLocation;\n }",
"Position getPosition();",
"Position getPosition();",
"public int getX(){\n\t\treturn this.x_location;\n\t}",
"public XYPoint getSnakeHeadStartLocation();",
"public Point getLocationDialog(){\n try{\n return new Point( (int)this.getLocationOnScreen().getX() +(this.getWidth() /3), (int)this.getLocationOnScreen().getY()+this.menuBarData.getHeight());\n }catch(IllegalComponentStateException e){\n return new Point(100,100);\n }\n }",
"double getYPosition();",
"public void getCoordinates(){\n\t\t\n\t\t // check if GPS enabled\n GPSTracker gpsTracker = new GPSTracker(this);\n \n if (gpsTracker.canGetLocation())\n {\n latitude = gpsTracker.latitude;\n\n longitude = gpsTracker.longitude;\n }\n else\n {\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gpsTracker.showSettingsAlert();\n }\n\t}",
"public String get_station_name () {\n if (!this.on) {\n return null;\n }\n\n return this.stationName;\n }",
"public int getLocationX( )\n\t{\n\t\treturn locationX;\n\t}",
"public Point.Double getPosition(){\r\n return new Point.Double(x, y);\r\n }",
"@Override \n public Vector getLocation() {\n return this.getR();\n }",
"private boolean isStation(SensorEvent e) {\n for (int[] p : STATION_POSITIONS) {\n if (atSensor(e, p[0], p[1])) {\n return true;\n }\n }\n return false;\n }",
"public Point getLocation() {\r\n\t\treturn this.center;\r\n\t}",
"public void updatePositionValue(){\n m_X.setSelectedSensorPosition(this.getFusedPosition());\n }",
"public int getStartStation() {\n\t\treturn startStation;\n\t}",
"@Override\n\tpublic Point getLocation() {\n\t\treturn position;\n\t}",
"Point getCenter();",
"Point getCenter();",
"public void projectResponsePosition()\n {\n int width = Agar.GRID_SIZE.width;\n int height = Agar.GRID_SIZE.height;\n int nx, ny, sx, sy, wx, wy, ex, ey;\n\n nx = x;\n ny = ((y + 1) % height);\n wx = x - 1;\n if (wx < 0) { wx += width; }\n wy = y;\n ex = ((x + 1) % width);\n ey = y;\n sx = x;\n sy = y - 1;\n if (sy < 0) { sy += height; }\n switch (response)\n {\n case NORTHWEST:\n x2 = wx;\n y2 = ny;\n break;\n\n case NORTH:\n x2 = nx;\n y2 = ny;\n break;\n\n case NORTHEAST:\n x2 = ex;\n y2 = ny;\n break;\n\n case WEST:\n x2 = wx;\n y2 = wy;\n break;\n\n case STAY:\n x2 = x;\n y2 = y;\n break;\n\n case EAST:\n x2 = ex;\n y2 = ey;\n break;\n\n case SOUTHWEST:\n x2 = wx;\n y2 = sy;\n break;\n\n case SOUTH:\n x2 = sx;\n y2 = sy;\n break;\n\n case SOUTHEAST:\n x2 = ex;\n y2 = sy;\n break;\n }\n }",
"org.landxml.schema.landXML11.Station xgetStaStart();",
"public GridLocation getLocation();",
"double getMapPositionX();",
"double getStartX();",
"public int getY() { return loc.y; }",
"public Point getXyLocation() {\n return playerxy;\n }",
"protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}",
"void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }",
"public void adjLocation(double l){this.PlayerLocation;}",
"public int getLocX() {\n return locX;\n }",
"public Point2D getLocation();",
"public Point getLocation() {\n return pos;\n }",
"godot.wire.Wire.Vector2 getPosition();",
"private int get_x() {\n return center_x;\n }",
"public int getLocX() {\n return locX;\n }",
"public int getX()\r\n {\r\n return xCoord;\r\n }",
"public double getXPos(){\n return xPos;\n }",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"private void formMousePressed(java.awt.event.MouseEvent evt) {\n xx=evt.getX();\n xy=evt.getY();\n \n }",
"private void setupStationEndPoint(int stationNumber) {\n switch (stationNumber) {\n case 1:\n this.stationX = 60;\n this.stationY = 60;\n this.angle = new Angle(90 + Map.LOADING_STATION_ANGLE / 2);\n break;\n case 2:\n this.stationX = 70;\n this.stationY = 60;\n this.angle = new Angle(90 + Map.LOADING_STATION_ANGLE / 2);\n break;\n case 3:\n break;\n case 4:\n break;\n }\n }",
"public int getLocation()\r\n {\n }",
"void saveCurrentStation();",
"private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\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\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\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\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}",
"public Vector2F getScreenLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}",
"public Monster(int x,int y){\n\tposition[0] = x; //x position\n\tposition[1] = y; //y position\n }",
"public String getLocationString() {\n return getCenter().toString();\n }",
"int getX() {\n return xPos;\n }",
"public String getLocationString(){\n return \"(\" + x + \", \" + y + \")\";\n }"
] | [
"0.67110056",
"0.6380758",
"0.6224452",
"0.6223676",
"0.61967057",
"0.6180356",
"0.6140353",
"0.610724",
"0.6103516",
"0.6018441",
"0.6011598",
"0.6011311",
"0.5979536",
"0.5957167",
"0.5952272",
"0.5928711",
"0.59225005",
"0.5915243",
"0.59055555",
"0.59055555",
"0.59007716",
"0.5884318",
"0.58387613",
"0.58350873",
"0.58267874",
"0.58165336",
"0.58151126",
"0.58151126",
"0.58151126",
"0.58028394",
"0.579558",
"0.5792094",
"0.57919264",
"0.5785453",
"0.57677317",
"0.57645804",
"0.5763981",
"0.5756327",
"0.5748607",
"0.5743059",
"0.5716505",
"0.5703615",
"0.5700936",
"0.56927097",
"0.5688364",
"0.56866765",
"0.5685941",
"0.5664124",
"0.5649662",
"0.56493604",
"0.56482255",
"0.56449914",
"0.5643762",
"0.563097",
"0.563097",
"0.5630275",
"0.56283057",
"0.56272626",
"0.56192434",
"0.5589806",
"0.5585496",
"0.55815303",
"0.5576595",
"0.5573035",
"0.55683553",
"0.5554704",
"0.5549419",
"0.5546853",
"0.5537687",
"0.5537288",
"0.5537288",
"0.55243325",
"0.55238444",
"0.55224884",
"0.55175805",
"0.55169135",
"0.55162555",
"0.55102515",
"0.55084133",
"0.5503174",
"0.55011314",
"0.5499131",
"0.54972106",
"0.5495199",
"0.54920274",
"0.54899466",
"0.5472355",
"0.54666924",
"0.54650515",
"0.54594153",
"0.54594153",
"0.54540515",
"0.54477173",
"0.5441011",
"0.54392266",
"0.54390526",
"0.5438334",
"0.54376227",
"0.54362434",
"0.54267365"
] | 0.6761158 | 0 |
Create an entity for this test. This is a static method, as tests for other entities might also need it, if they test an entity which requires the current entity. | public static RegistreNaissance createEntity(EntityManager em) {
RegistreNaissance registreNaissance = new RegistreNaissance()
.numero(DEFAULT_NUMERO)
.anneeRegistre(DEFAULT_ANNEE_REGISTRE);
// Add required entity
Extrait extrait = ExtraitResourceIntTest.createEntity(em);
em.persist(extrait);
em.flush();
registreNaissance.setExtrait(extrait);
return registreNaissance;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Entity createEntity();",
"T createEntity();",
"protected abstract ENTITY createEntity();",
"void create(E entity);",
"void create(T entity);",
"E create(E entity);",
"E create(E entity);",
"TestEntity buildEntity () {\n TestEntity testEntity = new TestEntity();\n testEntity.setName(\"Test name\");\n testEntity.setCheck(true);\n testEntity.setDateCreated(new Date(System.currentTimeMillis()));\n testEntity.setDescription(\"description\");\n\n Specialization specialization = new Specialization();\n specialization.setName(\"Frontend\");\n specialization.setLevel(\"Senior\");\n specialization.setYears(10);\n\n testEntity.setSpecialization(specialization);\n\n return testEntity;\n }",
"protected abstract EntityBase createEntity() throws Exception;",
"public static TestEntity createEntity(EntityManager em) {\n TestEntity testEntity = new TestEntity();\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n testEntity.setUserOneToMany(user);\n return testEntity;\n }",
"void create(T entity) throws Exception;",
"@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }",
"protected T createSimulatedExistingEntity() {\n final T entity = createNewEntity();\n entity.setId(IDUtil.randomPositiveLong());\n\n when(getDAO().findOne(entity.getId())).thenReturn(entity);\n return entity;\n }",
"public Entity newEntity() { return newMyEntity(); }",
"public Entity newEntity() { return newMyEntity(); }",
"public static TranshipTube createEntity(EntityManager em) {\n TranshipTube transhipTube = new TranshipTube()\n .status(DEFAULT_STATUS)\n .memo(DEFAULT_MEMO)\n .columnsInTube(DEFAULT_COLUMNS_IN_TUBE)\n .rowsInTube(DEFAULT_ROWS_IN_TUBE);\n // Add required entity\n TranshipBox transhipBox = TranshipBoxResourceIntTest.createEntity(em);\n em.persist(transhipBox);\n em.flush();\n transhipTube.setTranshipBox(transhipBox);\n // Add required entity\n FrozenTube frozenTube = FrozenTubeResourceIntTest.createEntity(em);\n em.persist(frozenTube);\n em.flush();\n transhipTube.setFrozenTube(frozenTube);\n return transhipTube;\n }",
"public static Student createEntity(EntityManager em) {\n Student student = new Student()\n .firstName(DEFAULT_FIRST_NAME)\n .middleName(DEFAULT_MIDDLE_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .studentRegNumber(DEFAULT_STUDENT_REG_NUMBER)\n .dateOfBirth(DEFAULT_DATE_OF_BIRTH)\n .regDocType(DEFAULT_REG_DOC_TYPE)\n .registrationDocumentNumber(DEFAULT_REGISTRATION_DOCUMENT_NUMBER)\n .gender(DEFAULT_GENDER)\n .nationality(DEFAULT_NATIONALITY)\n .dateJoined(DEFAULT_DATE_JOINED)\n .deleted(DEFAULT_DELETED)\n .wxtJwtPq55wd(DEFAULT_WXT_JWT_PQ_55_WD);\n // Add required entity\n NextOfKin nextOfKin;\n if (TestUtil.findAll(em, NextOfKin.class).isEmpty()) {\n nextOfKin = NextOfKinResourceIT.createEntity(em);\n em.persist(nextOfKin);\n em.flush();\n } else {\n nextOfKin = TestUtil.findAll(em, NextOfKin.class).get(0);\n }\n student.getRelatives().add(nextOfKin);\n return student;\n }",
"@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }",
"public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT)\n .dateRetour(DEFAULT_DATE_RETOUR);\n // Add required entity\n Usager usager = UsagerResourceIntTest.createEntity(em);\n em.persist(usager);\n em.flush();\n emprunt.setUsager(usager);\n // Add required entity\n Exemplaire exemplaire = ExemplaireResourceIntTest.createEntity(em);\n em.persist(exemplaire);\n em.flush();\n emprunt.setExemplaire(exemplaire);\n return emprunt;\n }",
"public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }",
"@Override\n public EntityResponse createEntity(String entitySetName, OEntity entity) {\n return super.createEntity(entitySetName, entity);\n }",
"ID create(T entity);",
"public static MotherBed createEntity(EntityManager em) {\n MotherBed motherBed = new MotherBed()\n .value(DEFAULT_VALUE)\n .status(DEFAULT_STATUS);\n // Add required entity\n Nursery nursery = NurseryResourceIntTest.createEntity(em);\n em.persist(nursery);\n em.flush();\n motherBed.setNursery(nursery);\n return motherBed;\n }",
"private FailingEntity createFailingEntity() {\n FailingEntity entity = app.createAndManageChild(EntitySpec.create(FailingEntity.class)\n .configure(FailingEntity.FAIL_ON_START, true));\n return entity;\n }",
"@Override\n public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity) {\n return super.createEntity(entitySetName, entityKey, navProp, entity);\n }",
"public <T extends Entity> T createEntity(EntitySpec<T> spec) {\n Map<String,Entity> entitiesByEntityId = MutableMap.of();\n Map<String,EntitySpec<?>> specsByEntityId = MutableMap.of();\n \n T entity = createEntityAndDescendantsUninitialized(spec, entitiesByEntityId, specsByEntityId);\n initEntityAndDescendants(entity.getId(), entitiesByEntityId, specsByEntityId);\n return entity;\n }",
"public static Prestamo createEntity(EntityManager em) {\n Prestamo prestamo = new Prestamo().observaciones(DEFAULT_OBSERVACIONES).fechaFin(DEFAULT_FECHA_FIN);\n // Add required entity\n Libro libro;\n if (TestUtil.findAll(em, Libro.class).isEmpty()) {\n libro = LibroResourceIT.createEntity(em);\n em.persist(libro);\n em.flush();\n } else {\n libro = TestUtil.findAll(em, Libro.class).get(0);\n }\n prestamo.setLibro(libro);\n // Add required entity\n Persona persona;\n if (TestUtil.findAll(em, Persona.class).isEmpty()) {\n persona = PersonaResourceIT.createEntity(em);\n em.persist(persona);\n em.flush();\n } else {\n persona = TestUtil.findAll(em, Persona.class).get(0);\n }\n prestamo.setPersona(persona);\n // Add required entity\n User user = UserResourceIT.createEntity(em);\n em.persist(user);\n em.flush();\n prestamo.setUser(user);\n return prestamo;\n }",
"default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }",
"public static Rentee createEntity(EntityManager em) {\n Rentee rentee = new Rentee();\n rentee = new Rentee()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .email(DEFAULT_EMAIL)\n .phoneNumber(DEFAULT_PHONE_NUMBER)\n .password(DEFAULT_PASSWORD);\n return rentee;\n }",
"public static Pocket createEntity(EntityManager em) {\n Pocket pocket = new Pocket()\n .key(DEFAULT_KEY)\n .label(DEFAULT_LABEL)\n .startDateTime(DEFAULT_START_DATE_TIME)\n .endDateTime(DEFAULT_END_DATE_TIME)\n .amount(DEFAULT_AMOUNT)\n .reserved(DEFAULT_RESERVED);\n // Add required entity\n Balance balance = BalanceResourceIntTest.createEntity(em);\n em.persist(balance);\n em.flush();\n pocket.setBalance(balance);\n return pocket;\n }",
"public static ItemSubstitution createEntity(EntityManager em) {\n ItemSubstitution itemSubstitution = new ItemSubstitution()\n .timestamp(DEFAULT_TIMESTAMP)\n .type(DEFAULT_TYPE)\n .substituteType(DEFAULT_SUBSTITUTE_TYPE)\n .substituteNo(DEFAULT_SUBSTITUTE_NO)\n .description(DEFAULT_DESCRIPTION)\n .isInterchangeable(DEFAULT_IS_INTERCHANGEABLE)\n .relationsLevel(DEFAULT_RELATIONS_LEVEL)\n .isCheckedToOriginal(DEFAULT_IS_CHECKED_TO_ORIGINAL)\n .origCheckDate(DEFAULT_ORIG_CHECK_DATE);\n // Add required entity\n Item item;\n if (TestUtil.findAll(em, Item.class).isEmpty()) {\n item = ItemResourceIT.createEntity(em);\n em.persist(item);\n em.flush();\n } else {\n item = TestUtil.findAll(em, Item.class).get(0);\n }\n itemSubstitution.getItems().add(item);\n return itemSubstitution;\n }",
"E create(E entity, RequestContext context)\n throws TechnicalException, ConflictException;",
"public static A createEntity(EntityManager em) {\n A a = new A();\n return a;\n }",
"public static Edge createEntity(EntityManager em) {\n Edge edge = new Edge()\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Stone from = StoneResourceIntTest.createEntity(em);\n em.persist(from);\n em.flush();\n edge.setFrom(from);\n // Add required entity\n Stone to = StoneResourceIntTest.createEntity(em);\n em.persist(to);\n em.flush();\n edge.setTo(to);\n return edge;\n }",
"public static QuizQuestion createEntity(EntityManager em) {\n QuizQuestion quizQuestion = new QuizQuestion()\n .text(DEFAULT_TEXT)\n .description(DEFAULT_DESCRIPTION);\n // Add required entity\n Quiz quiz;\n if (TestUtil.findAll(em, Quiz.class).isEmpty()) {\n quiz = QuizResourceIT.createEntity(em);\n em.persist(quiz);\n em.flush();\n } else {\n quiz = TestUtil.findAll(em, Quiz.class).get(0);\n }\n quizQuestion.setQuiz(quiz);\n return quizQuestion;\n }",
"public static Partida createEntity(EntityManager em) {\n Partida partida = new Partida()\n .dataPartida(DEFAULT_DATA_PARTIDA);\n return partida;\n }",
"public T create(T entity) {\n\t \tgetEntityManager().getTransaction().begin();\n\t getEntityManager().persist(entity);\n\t getEntityManager().getTransaction().commit();\n\t getEntityManager().close();\n\t return entity;\n\t }",
"public static Emprunt createEntity(EntityManager em) {\n Emprunt emprunt = new Emprunt()\n .dateEmprunt(DEFAULT_DATE_EMPRUNT);\n return emprunt;\n }",
"public static SitAndGo createEntity(EntityManager em) {\n SitAndGo sitAndGo = new SitAndGo()\n .format(DEFAULT_FORMAT)\n .buyIn(DEFAULT_BUY_IN)\n .ranking(DEFAULT_RANKING)\n .profit(DEFAULT_PROFIT)\n .bounty(DEFAULT_BOUNTY);\n return sitAndGo;\n }",
"public static Exercise createEntity(EntityManager em) {\n Exercise exercise = new Exercise()\n .minutes(DEFAULT_MINUTES);\n return exercise;\n }",
"@Override\n\tpublic Entity createEntity() {\n\t\tEntity entity = new Entity(LINKS_ENTITY_KIND);\n\t\tentity.setProperty(id_property, ID);\n\t\tentity.setProperty(url_property, url);\n\t\tentity.setProperty(CategoryID_property, CategoryID);\n\t\tentity.setProperty(note_property, note);\n\t\tentity.setProperty(createdOn_property, createdOn);\n\t\tentity.setProperty(updatedOn_property, updatedOn);\t\t\t\n\t\treturn entity;\n\t}",
"public static House createEntity(EntityManager em) {\n House house = new House()\n .houseName(DEFAULT_HOUSE_NAME)\n .houseNo(DEFAULT_HOUSE_NO)\n .address(DEFAULT_ADDRESS)\n .houseToFloorNo(DEFAULT_HOUSE_TO_FLOOR_NO)\n .ownToFloorNo(DEFAULT_OWN_TO_FLOOR_NO)\n .lat(DEFAULT_LAT)\n .lon(DEFAULT_LON)\n .createdate(DEFAULT_CREATEDATE)\n .createBy(DEFAULT_CREATE_BY)\n .updateDate(DEFAULT_UPDATE_DATE)\n .updateBy(DEFAULT_UPDATE_BY)\n .image(DEFAULT_IMAGE)\n .imageContentType(DEFAULT_IMAGE_CONTENT_TYPE);\n // Add required entity\n Country country = CountryResourceIntTest.createEntity(em);\n em.persist(country);\n em.flush();\n house.setCountry(country);\n // Add required entity\n State state = StateResourceIntTest.createEntity(em);\n em.persist(state);\n em.flush();\n house.setState(state);\n // Add required entity\n City city = CityResourceIntTest.createEntity(em);\n em.persist(city);\n em.flush();\n house.setCity(city);\n // Add required entity\n Profile profile = ProfileResourceIntTest.createEntity(em);\n em.persist(profile);\n em.flush();\n house.setProfile(profile);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n house.setUser(user);\n return house;\n }",
"public static CourtType createEntity(EntityManager em) {\n CourtType courtType = new CourtType()\n .type(DEFAULT_TYPE);\n return courtType;\n }",
"public static Ailment createEntity(EntityManager em) {\n Ailment ailment = new Ailment()\n .name(DEFAULT_NAME)\n .symptoms(DEFAULT_SYMPTOMS)\n .treatments(DEFAULT_TREATMENTS);\n return ailment;\n }",
"@Override\r\n public void createNewEntity(String entityName) {\n\r\n }",
"public static Articulo createEntity(EntityManager em) {\n Articulo articulo = new Articulo()\n .titulo(DEFAULT_TITULO)\n .contenido(DEFAULT_CONTENIDO)\n .fechaCreacion(DEFAULT_FECHA_CREACION);\n return articulo;\n }",
"void create(Student entity);",
"public static TipoLocal createEntity(EntityManager em) {\n TipoLocal tipoLocal = new TipoLocal()\n .tipo(DEFAULT_TIPO);\n return tipoLocal;\n }",
"public static Testtable2 createEntity(EntityManager em) {\n Testtable2 testtable2 = new Testtable2();\n testtable2.setColumn2(DEFAULT_COLUMN_2);\n return testtable2;\n }",
"@Override\n\tprotected CoreEntity createNewEntity() {\n\t\treturn null;\n\t}",
"public static OrderItem createEntity(EntityManager em) {\n OrderItem orderItem = new OrderItem().quantity(DEFAULT_QUANTITY).totalPrice(DEFAULT_TOTAL_PRICE).status(DEFAULT_STATUS);\n return orderItem;\n }",
"public static Arrete createEntity(EntityManager em) {\n Arrete arrete = new Arrete()\n .intituleArrete(DEFAULT_INTITULE_ARRETE)\n .numeroArrete(DEFAULT_NUMERO_ARRETE)\n .dateSignature(DEFAULT_DATE_SIGNATURE)\n .nombreAgrement(DEFAULT_NOMBRE_AGREMENT);\n return arrete;\n }",
"public static Tenant createEntity() {\n return new Tenant();\n }",
"public static MyOrders createEntity(EntityManager em) {\n MyOrders myOrders = new MyOrders();\n return myOrders;\n }",
"public static Enseigner createEntity(EntityManager em) {\n Enseigner enseigner = new Enseigner().dateDebut(DEFAULT_DATE_DEBUT).dateFin(DEFAULT_DATE_FIN);\n return enseigner;\n }",
"@Test\n public void eventEntityConstructionTest() {\n\n Event event = new EventEntity();\n\n assertThat(event).isNotNull();\n\n }",
"public static EnteteVente createEntity(EntityManager em) {\n EnteteVente enteteVente = new EnteteVente()\n .enteteVenteType(DEFAULT_ENTETE_VENTE_TYPE)\n .enteteVenteTotalHT(DEFAULT_ENTETE_VENTE_TOTAL_HT)\n .enteteVenteTotalTTC(DEFAULT_ENTETE_VENTE_TOTAL_TTC)\n .enteteVenteDateCreation(DEFAULT_ENTETE_VENTE_DATE_CREATION);\n return enteteVente;\n }",
"public void createNewObject(Representation entity) throws ResourceException {\r\n\t\tT entry = createObjectFromHeaders(null, entity);\r\n\t\texecuteUpdate(entity, entry, createUpdateObject(entry));\r\n\r\n\t}",
"public static Organizer createEntity(EntityManager em) {\n Organizer organizer = new Organizer()\n .name(DEFAULT_NAME)\n .description(DEFAULT_DESCRIPTION)\n .facebook(DEFAULT_FACEBOOK)\n .twitter(DEFAULT_TWITTER);\n // Add required entity\n User user = UserResourceIntTest.createEntity(em);\n em.persist(user);\n em.flush();\n organizer.setUser(user);\n return organizer;\n }",
"public static Note createEntity(EntityManager em) {\n Note note = new Note().content(DEFAULT_CONTENT).title(DEFAULT_TITLE).xpos(DEFAULT_XPOS).ypos(DEFAULT_YPOS);\n return note;\n }",
"public static FillingGapsTestItem createEntity(EntityManager em) {\n FillingGapsTestItem fillingGapsTestItem = new FillingGapsTestItem()\n .question(DEFAULT_QUESTION);\n return fillingGapsTestItem;\n }",
"public Entity build();",
"@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}",
"public abstract boolean create(T entity) throws ServiceException;",
"public static Acheteur createEntity(EntityManager em) {\n Acheteur acheteur = new Acheteur()\n .typeClient(DEFAULT_TYPE_CLIENT)\n .nom(DEFAULT_NOM)\n .prenom(DEFAULT_PRENOM)\n .tel(DEFAULT_TEL)\n .cnib(DEFAULT_CNIB)\n .email(DEFAULT_EMAIL)\n .adresse(DEFAULT_ADRESSE)\n .numroBanquaire(DEFAULT_NUMRO_BANQUAIRE)\n .deleted(DEFAULT_DELETED);\n return acheteur;\n }",
"public static RoomGenericProduct createEntity(EntityManager em) {\n RoomGenericProduct roomGenericProduct = new RoomGenericProduct()\n .quantity(DEFAULT_QUANTITY)\n .quantityUnit(DEFAULT_QUANTITY_UNIT);\n return roomGenericProduct;\n }",
"public static TypeOeuvre createEntity(EntityManager em) {\n TypeOeuvre typeOeuvre = new TypeOeuvre()\n .intitule(DEFAULT_INTITULE);\n return typeOeuvre;\n }",
"public static Reservation createEntity(EntityManager em) {\n Reservation reservation = ReservationTest.buildReservationTest(1L);\n //reservation.setUser(User.builder().email(\"adfad\").name(\"\").build());\n return reservation;\n }",
"@Test\n public void testNewEntity() throws Exception {\n\n }",
"public static Model createEntity(EntityManager em) {\n\t\tModel model = new Model().name(DEFAULT_NAME).type(DEFAULT_TYPE).algorithm(DEFAULT_ALGORITHM)\n\t\t\t\t.status(DEFAULT_STATUS).owner(DEFAULT_OWNER).performanceMetrics(DEFAULT_PERFORMANCE_METRICS)\n\t\t\t\t.modelLocation(DEFAULT_MODEL_LOCATION).featureSignificance(DEFAULT_FEATURE_SIGNIFICANCE)\n\t\t\t\t.builderConfig(DEFAULT_BUILDER_CONFIG).createdDate(DEFAULT_CREATED_DATE)\n\t\t\t\t.deployedDate(DEFAULT_DEPLOYED_DATE).trainingDataset(DEFAULT_TRAINING_DATASET)\n .library(DEFAULT_LIBRARY).project(DEFAULT_PROJECT).version(DEFAULT_VERSION);\n\t\treturn model;\n\t}",
"public static ProcessExecution createEntity(EntityManager em) {\n ProcessExecution processExecution = new ProcessExecution()\n .execution(DEFAULT_EXECUTION);\n return processExecution;\n }",
"public static Paiement createEntity(EntityManager em) {\n Paiement paiement = new Paiement()\n .dateTransation(DEFAULT_DATE_TRANSATION)\n .montantTTC(DEFAULT_MONTANT_TTC);\n return paiement;\n }",
"public static Article createEntity(EntityManager em) {\n Article article = new Article()\n .name(DEFAULT_NAME)\n .content(DEFAULT_CONTENT)\n .creationDate(DEFAULT_CREATION_DATE)\n .modificationDate(DEFAULT_MODIFICATION_DATE);\n return article;\n }",
"T makePersistent(T entity);",
"void buildFromEntity(E entity);",
"public static XepLoai createEntity(EntityManager em) {\n XepLoai xepLoai = new XepLoai()\n .tenXepLoai(DEFAULT_TEN_XEP_LOAI);\n return xepLoai;\n }",
"public static Lot createEntity(EntityManager em) {\n Lot lot = new Lot()\n .createdAt(DEFAULT_CREATED_AT)\n .updatedAt(DEFAULT_UPDATED_AT)\n .qte(DEFAULT_QTE)\n .qtUg(DEFAULT_QT_UG)\n .num(DEFAULT_NUM)\n .dateFabrication(DEFAULT_DATE_FABRICATION)\n .peremption(DEFAULT_PEREMPTION)\n .peremptionstatus(DEFAULT_PEREMPTIONSTATUS);\n return lot;\n }",
"private MetaEntityImpl createMetaEntity(Class<?> entityType) {\n String className = entityType.getSimpleName();\n MetaEntityImpl managedEntity = new MetaEntityImpl();\n managedEntity.setEntityType(entityType);\n managedEntity.setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setName(className);\n ((MetaTableImpl) managedEntity.getTable()).setKeySpace(environment.getConfiguration().getKeySpace());\n return managedEntity;\n }",
"public static EmployeeCars createEntity(EntityManager em) {\n EmployeeCars employeeCars = new EmployeeCars()\n .previousReading(DEFAULT_PREVIOUS_READING)\n .currentReading(DEFAULT_CURRENT_READING)\n .workingDays(DEFAULT_WORKING_DAYS)\n .updateDate(DEFAULT_UPDATE_DATE);\n // Add required entity\n Employee employee = EmployeeResourceIT.createEntity(em);\n em.persist(employee);\n em.flush();\n employeeCars.setEmployee(employee);\n // Add required entity\n Car car = CarResourceIT.createEntity(em);\n em.persist(car);\n em.flush();\n employeeCars.setCar(car);\n return employeeCars;\n }",
"public TransporteTerrestreEntity createTransporte(TransporteTerrestreEntity transporteEntity) throws BusinessLogicException {\n LOGGER.log(Level.INFO, \"Inicia proceso de creación del transporte\");\n super.createTransporte(transporteEntity);\n\n \n persistence.create(transporteEntity);\n LOGGER.log(Level.INFO, \"Termina proceso de creación del transporte\");\n return transporteEntity;\n }",
"public static TaskComment createEntity(EntityManager em) {\n TaskComment taskComment = new TaskComment()\n .value(DEFAULT_VALUE);\n // Add required entity\n Task newTask = TaskResourceIT.createEntity(em);\n Task task = TestUtil.findAll(em, Task.class).stream()\n .filter(x -> x.getId().equals(newTask.getId()))\n .findAny().orElse(null);\n if (task == null) {\n task = newTask;\n em.persist(task);\n em.flush();\n }\n taskComment.setTask(task);\n return taskComment;\n }",
"public static Personel createEntity(EntityManager em) {\n Personel personel = new Personel()\n .fistname(DEFAULT_FISTNAME)\n .lastname(DEFAULT_LASTNAME)\n .sexe(DEFAULT_SEXE);\n return personel;\n }",
"public static Territorio createEntity(EntityManager em) {\n Territorio territorio = new Territorio().nome(DEFAULT_NOME);\n return territorio;\n }",
"public static Ordre createEntity(EntityManager em) {\n Ordre ordre = new Ordre()\n .name(DEFAULT_NAME)\n .status(DEFAULT_STATUS)\n .price(DEFAULT_PRICE)\n .creationDate(DEFAULT_CREATION_DATE);\n return ordre;\n }",
"@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }",
"public static Poen createEntity(EntityManager em) {\n Poen poen = new Poen()\n .tip(DEFAULT_TIP);\n return poen;\n }",
"public static Expediente createEntity(EntityManager em) {\n Expediente expediente = new Expediente()\n .horarioEntrada(DEFAULT_HORARIO_ENTRADA)\n .horarioSaida(DEFAULT_HORARIO_SAIDA)\n .diaSemana(DEFAULT_DIA_SEMANA);\n return expediente;\n }",
"public static Unidade createEntity(EntityManager em) {\n Unidade unidade = new Unidade()\n .descricao(DEFAULT_DESCRICAO)\n .sigla(DEFAULT_SIGLA)\n .situacao(DEFAULT_SITUACAO)\n .controleDeEstoque(DEFAULT_CONTROLE_DE_ESTOQUE)\n .idAlmoxarifado(DEFAULT_ID_ALMOXARIFADO)\n .andar(DEFAULT_ANDAR)\n .capacidade(DEFAULT_CAPACIDADE)\n .horarioInicio(DEFAULT_HORARIO_INICIO)\n .horarioFim(DEFAULT_HORARIO_FIM)\n .localExame(DEFAULT_LOCAL_EXAME)\n .rotinaDeFuncionamento(DEFAULT_ROTINA_DE_FUNCIONAMENTO)\n .anexoDocumento(DEFAULT_ANEXO_DOCUMENTO)\n .setor(DEFAULT_SETOR)\n .idCentroDeAtividade(DEFAULT_ID_CENTRO_DE_ATIVIDADE)\n .idChefia(DEFAULT_ID_CHEFIA);\n // Add required entity\n TipoUnidade tipoUnidade;\n if (TestUtil.findAll(em, TipoUnidade.class).isEmpty()) {\n tipoUnidade = TipoUnidadeResourceIT.createEntity(em);\n em.persist(tipoUnidade);\n em.flush();\n } else {\n tipoUnidade = TestUtil.findAll(em, TipoUnidade.class).get(0);\n }\n unidade.setTipoUnidade(tipoUnidade);\n return unidade;\n }",
"public void spawnEntity(AEntityB_Existing entity){\r\n\t\tBuilderEntityExisting builder = new BuilderEntityExisting(entity.world.world);\r\n\t\tbuilder.loadedFromSavedNBT = true;\r\n\t\tbuilder.setPositionAndRotation(entity.position.x, entity.position.y, entity.position.z, (float) -entity.angles.y, (float) entity.angles.x);\r\n\t\tbuilder.entity = entity;\r\n\t\tworld.spawnEntity(builder);\r\n }",
"public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }",
"private void createTestData() {\n StoreEntity store = new StoreEntity();\n store.setStoreName(DEFAULT_STORE_NAME);\n store.setPecEmail(DEFAULT_PEC);\n store.setPhone(DEFAULT_PHONE);\n store.setImagePath(DEFAULT_IMAGE_PATH);\n store.setDefaultPassCode(STORE_DEFAULT_PASS_CODE);\n store.setStoreCap(DEFAULT_STORE_CAP);\n store.setCustomersInside(DEFAULT_CUSTOMERS_INSIDE);\n store.setAddress(new AddressEntity());\n\n // Create users for store.\n UserEntity manager = new UserEntity();\n manager.setUsercode(USER_CODE_MANAGER);\n manager.setRole(UserRole.MANAGER);\n\n UserEntity employee = new UserEntity();\n employee.setUsercode(USER_CODE_EMPLOYEE);\n employee.setRole(UserRole.EMPLOYEE);\n\n store.addUser(manager);\n store.addUser(employee);\n\n // Create a new ticket.\n TicketEntity ticket = new TicketEntity();\n ticket.setPassCode(INIT_PASS_CODE);\n ticket.setCustomerId(INIT_CUSTOMER_ID);\n ticket.setDate(new Date(new java.util.Date().getTime()));\n\n ticket.setArrivalTime(new Time(new java.util.Date().getTime()));\n ticket.setPassStatus(PassStatus.VALID);\n ticket.setQueueNumber(INIT_TICKET_QUEUE_NUMBER);\n store.addTicket(ticket);\n\n // Persist data.\n em.getTransaction().begin();\n\n em.persist(store);\n em.flush();\n\n // Saving ID generated from SQL after the persist.\n LAST_TICKET_ID = ticket.getTicketId();\n LAST_STORE_ID = store.getStoreId();\n LAST_MANAGER_ID = manager.getUserId();\n LAST_EMPLOYEE_ID = employee.getUserId();\n\n em.getTransaction().commit();\n }",
"@Test\n public void testNewEntity_0args() {\n // newEntity() is not implemented!\n }",
"public Camp newEntity() { return new Camp(); }",
"public static NoteMaster createEntity(EntityManager em) {\n NoteMaster noteMaster = new NoteMaster()\n .semestre(DEFAULT_SEMESTRE)\n .noteCC1(DEFAULT_NOTE_CC_1)\n .noteCC2(DEFAULT_NOTE_CC_2)\n .noteFinal(DEFAULT_NOTE_FINAL)\n .date(DEFAULT_DATE);\n return noteMaster;\n }",
"T create() throws PersistException;",
"private EntityDef createEntityDef(Class<?> entityClass)\n {\n\t\tif (entityClass.isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass.SingleTableSuperclass(entityClass);\n } else if (entityClass.getSuperclass().isAnnotationPresent(InheritanceSingleTable.class)) {\n return new SingleTableSubclass(entityClass);\n } else {\n return new EntityDef(entityClass);\n }\n\t}",
"public static Restaurant createEntity(EntityManager em) {\n Restaurant restaurant = new Restaurant()\n .restaurantName(DEFAULT_RESTAURANT_NAME)\n .deliveryPrice(DEFAULT_DELIVERY_PRICE)\n .restaurantAddress(DEFAULT_RESTAURANT_ADDRESS)\n .restaurantCity(DEFAULT_RESTAURANT_CITY);\n return restaurant;\n }",
"@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}",
"public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }",
"public static Produit createEntity(EntityManager em) {\n Produit produit = new Produit()\n .designation(DEFAULT_DESIGNATION)\n .soldeInit(DEFAULT_SOLDE_INIT)\n .prixAchat(DEFAULT_PRIX_ACHAT)\n .prixVente(DEFAULT_PRIX_VENTE)\n .quantiteDispo(DEFAULT_QUANTITE_DISPO)\n .quantiteInit(DEFAULT_QUANTITE_INIT)\n .seuilReaprov(DEFAULT_SEUIL_REAPROV)\n .reference(DEFAULT_REFERENCE);\n return produit;\n }",
"public void constructEntity (EntityBuilder entityBuilder, Position position){\n entityBuilder.createEntity();\n entityBuilder.buildPosition(position);\n entityBuilder.buildName();\n entityBuilder.buildPosition();\n entityBuilder.buildContComp();\n entityBuilder.buildPhysComp(length, width);\n entityBuilder.buildGraphComp(length, width);\n }"
] | [
"0.7722704",
"0.75043625",
"0.7488018",
"0.73615193",
"0.7313557",
"0.71551895",
"0.71551895",
"0.715222",
"0.71504104",
"0.7077861",
"0.7015717",
"0.68047553",
"0.6752499",
"0.6740017",
"0.6740017",
"0.671227",
"0.6681439",
"0.6665812",
"0.6641303",
"0.6624968",
"0.6624293",
"0.66053206",
"0.6588202",
"0.65747416",
"0.65736103",
"0.65665525",
"0.6552231",
"0.65309554",
"0.65309054",
"0.6481532",
"0.64206153",
"0.6386312",
"0.63763803",
"0.6368714",
"0.6315061",
"0.62986875",
"0.6292589",
"0.6260014",
"0.62470967",
"0.6244042",
"0.6240087",
"0.6218695",
"0.6210466",
"0.61829776",
"0.6181196",
"0.6176219",
"0.6169428",
"0.61648893",
"0.61622405",
"0.6158986",
"0.61561865",
"0.61519444",
"0.6143897",
"0.61377037",
"0.61365503",
"0.613026",
"0.61257356",
"0.6120562",
"0.61074567",
"0.6106862",
"0.6104037",
"0.60931784",
"0.60917795",
"0.6079897",
"0.60752755",
"0.6070218",
"0.6068736",
"0.6066789",
"0.6063868",
"0.6059521",
"0.6052776",
"0.6042436",
"0.60386777",
"0.6030963",
"0.60279655",
"0.6024187",
"0.6022138",
"0.60206735",
"0.6015441",
"0.60149723",
"0.60136974",
"0.6003858",
"0.60034084",
"0.6003318",
"0.59997255",
"0.5996344",
"0.59957683",
"0.5982216",
"0.59779274",
"0.59745353",
"0.5973785",
"0.5966561",
"0.5963873",
"0.59636146",
"0.59516346",
"0.5946312",
"0.5944971",
"0.59425825",
"0.5939356",
"0.59316355",
"0.59315526"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.