query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
This method was generated by MyBatis Generator. This method sets the value of the database column TB_PAY_REPARTITION.CR_TIME
public void setCR_TIME(Date CR_TIME) { this.CR_TIME = CR_TIME; }
[ "public void setCR_TIME(Date CR_TIME) {\n\t\tthis.CR_TIME = CR_TIME;\n\t}", "public void setCrtime(Date crtime) {\r\n\t\tthis.crtime = crtime;\r\n\t}", "public Date getCR_TIME() {\n return CR_TIME;\n }", "public Date getCR_TIME() {\n\t\treturn CR_TIME;\n\t}", "public void setCrtTime(Date crtTime) {\n this.crtTime = crtTime;\n }", "public void setCrttime(Date crttime) {\n this.crttime = crttime;\n }", "public void setCrtTime(Integer crtTime) {\n this.crtTime = crtTime;\n }", "public Date getCrtime() {\r\n\t\treturn crtime;\r\n\t}", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "Row setPrecedingSystemTime(Row row);", "public void setRecTime(Date recTime) {\n this.recTime = recTime;\n }", "public void setRptrecvtime(Date rptrecvtime) {\n this.rptrecvtime = rptrecvtime;\n }", "private void updateInsertPoolerTime()\n {\n \t String lastUpdateTime = (CDSOUtils.getConfigurtionPropertyUpdatable()).get(FILTER_DATE_TIME);\n \t Date localTime = new Date(); \n \t DateFormat converter = new SimpleDateFormat(DATE_FORMAT_WITH_TIMEZONE , Locale.US);\n \t \n //getting GMT timezone, e.g. UTC\n converter.setTimeZone(TimeZone.getTimeZone(TIMEZONE));\n \n logger.info(\"local time : \" + localTime);;\n logger.info(\"time in GMT :(Janrain Last time stamp) \" + converter.format(localTime));\n try {\n CDSOUtils.updateConfigurtionProperty(\"lastpoolingDateTime\",converter.format(localTime));\n \n //update last to last update time \n \n \n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_WITHOUT_TIMEZONE);\n \t Date lstToLastUpdateDate = new Date();\n \t \n \tlstToLastUpdateDate = sdf.parse(lastUpdateTime);\n\t\t java.sql.Timestamp timestamp = new java.sql.Timestamp(lstToLastUpdateDate.getTime());\n \t CDSOUtils.updateConfigurtionProperty(FILTER_DATE_TIME_OF_LAST_RUN,JanrainServiceHepler.presentTimeStmp);\n\t\t} catch (ParseException e) {\n\t\t\tlogger.error(\"updateInsertPoolerTime :\"+e);\n\t\t}\n\t\t\n \t \n \t \n }", "void setTime(int parameterIndex, java.sql.Time x, Calendar cal) throws SQLException;", "void setLogicalStartTimeMSecs(long logicalStartTimeMSecs);", "public void updateLecture_Time(Class c) {\n\t\tSqlSession sqlSession = MyBatisUtil.getSqlSessionFactory()\n\t\t\t\t.openSession();\n\t\ttry {\n\t\t\tClassMapper classMapper = sqlSession.getMapper(ClassMapper.class);\n\t\t\tclassMapper.updateLecture_Time(c);\n\t\t\tsqlSession.commit();\n\t\t} finally {\n\t\t\tsqlSession.close();\n\t\t}\n\t}", "public java.sql.Timestamp getRTime();", "public void setcTime(Date cTime) {\r\n this.cTime = cTime;\r\n }", "void setRecurrenceTimeZoneCode(int recurrenceTimeZoneCode);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form FrameLogon
public FrameLogon() { initComponents(); LoadINI(); this.jPasswordField1.requestFocus(); this.setTitle(keyarch.VERSION_BANNER); }
[ "protected void createFrame() {\n MyInternalFrame frame = new MyInternalFrame();\n frame.setVisible(true); //necessary as of 1.3\n desktop.add(frame);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {}\n }", "public CreateAccFrame() {\n initComponents();\n }", "public NewJFrame() {\n Connect();\n initComponents();\n }", "Frame createFrame();", "public NewUserFrame() {\n initComponents();\n }", "public void createFrame() {\r\n System.out.println(\"Framing: Adding the log walls.\");\r\n }", "abstract public Frame newFrame(Label name, BoolList formals);", "public FrameForm() {\n initComponents();\n }", "private void createInternalFrame() {\n \n \t\tmainCircuitFrame = new CircuitPanel(\"Beispielschaltung.circuit\");\n \t\tmainCircuitFrame.setVisible(true);\n \t\tdesktop.add(mainCircuitFrame);\n \t\ttry {\n \t\t\tmainCircuitFrame.setSelected(true);\n \t\t\tmainCircuitFrame.setMaximum(true);\n \t\t} catch (PropertyVetoException e) {\n \t\t\tLOG.warn(\"Error encountered while selecting internal frame.\");\n \t\t}\n \t}", "FORM createFORM();", "protected MainFrame newFrame() {\n return new MainFrame(\"New Window\");\n }", "public FframeForm() {\n initComponents();\n }", "public void addNewFlight () {\n final JFrame saFrame = new JFrame ();\n saFrame.setBackground (new java.awt.Color (255, 255, 255));\n saFrame.setSize (321, 360);\n saFrame.setLocationRelativeTo (null);\n saFrame.setType (java.awt.Window.Type.UTILITY);\n saFrame.setTitle (Reference.PROG_NAME\n + \" - Create Flight | Version: \"\n + Reference.VERSION_NUMBER);\n saFrame.setLayout (null);\n saFrame.addWindowListener (new java.awt.event.WindowAdapter () {\n @Override\n public void windowClosing (java.awt.event.WindowEvent evt) {\n ScotiaAirline.windowClosing (evt);\n }\n });\n //Set image title \n JLabel saTitle = new JLabel (new ImageIcon (getClass ().\n getResource (\"/adminmenu.png\")), SwingConstants.CENTER);\n saTitle.setBounds (0, 0, 278, 85);\n saFrame.add (saTitle);\n //Create Flight\n JButton createFlightBtn = new JButton (\"Create Flight\");\n //showSeatPlanBtn.setEnabled(false);\n saFrame.getContentPane ().\n add (createFlightBtn);\n createFlightBtn.setBounds (120, 280, 162, 34);\n //Clear Button\n JButton clearBtn = new JButton (\"Clear Entry\");\n saFrame.getContentPane ().\n add (clearBtn);\n clearBtn.setBounds (90, 240, 100, 34);\n //Back Button\n JButton backBtn = new JButton (\"Back\");\n saFrame.getContentPane ().\n add (backBtn);\n backBtn.setBounds (10, 280, 100, 34);\n JLabel flightID = new JLabel (\"Flight Number \");\n flightID.setBounds (10, 110, 90, 30);\n flightID.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (flightID);\n final JTextField txtFlightID = new JTextField (10);\n txtFlightID.setBounds (100, 110, 60, 30);\n saFrame.getContentPane ().\n add (txtFlightID);\n JLabel dateLabel = new JLabel (\"Date\");\n dateLabel.setBounds (165, 110, 90, 30);\n dateLabel.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (dateLabel);\n final JXDatePicker txtDatePick = new JXDatePicker ();\n txtDatePick.setBounds (200, 110, 105, 30);\n txtDatePick.setFont (new java.awt.Font (\"Tahoma\", 0, 10));\n txtDatePick.setFormats (new String[] {\"dd-MM-yyyy\"});\n saFrame.getContentPane ().\n add (txtDatePick);\n JLabel departure = new JLabel (\"Departure \");\n departure.setBounds (10, 150, 90, 30);\n departure.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (departure);\n final JTextField txtDeparture = new JTextField (10);\n txtDeparture.setBounds (80, 150, 60, 30);\n saFrame.getContentPane ().\n add (txtDeparture);\n JLabel arrival = new JLabel (\"Arrival: \");\n arrival.setBounds (150, 150, 90, 30);\n arrival.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (arrival);\n final JTextField txtArrival = new JTextField (10);\n txtArrival.setBounds (200, 150, 60, 30);\n saFrame.getContentPane ().\n add (txtArrival);\n JLabel rows = new JLabel (\"Rows: \");\n rows.setBounds (150, 190, 90, 30);\n rows.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (rows);\n final JTextField txtRows = new JTextField (10);\n txtRows.setBounds (200, 190, 60, 30);\n saFrame.getContentPane ().\n add (txtRows);\n JLabel columns = new JLabel (\"Columns: \");\n columns.setBounds (10, 190, 90, 30);\n columns.setFont (new java.awt.Font (\"Tahoma\", 0, 14));\n saFrame.getContentPane ().\n add (columns);\n final JTextField txtColumns = new JTextField (10);\n txtColumns.setBounds (80, 190, 60, 30);\n saFrame.getContentPane ().\n add (txtColumns);\n saFrame.setVisible (true);\n////////////////////Event Handlers/////////////////// \n backBtn.addActionListener (( ActionEvent e ) -> {\n saFrame.setVisible (false);\n saFrame.dispose ();\n adminMenu ();\n });\n clearBtn.addActionListener (( ActionEvent e ) -> {\n saFrame.setVisible (false);\n saFrame.dispose ();\n addNewFlight ();\n });\n //submits the entered flight details\n createFlightBtn.addActionListener (( ActionEvent e ) -> {\n String flightNo = txtFlightID.getText ();\n String departure1 = txtDeparture.getText ();\n String arrival1 = txtArrival.getText ();\n int rows1 = Integer.parseInt (txtRows.getText ());\n int columns1 = Integer.parseInt (txtColumns.getText ());\n DateFormat dateFormat = new SimpleDateFormat (\"yyyy-MM-dd\");\n txtDatePick.setFormats (dateFormat);\n DateFormat sysDate = new SimpleDateFormat (\"yyyy-MM-dd\");\n String date_to_store = sysDate.format (txtDatePick.getDate ());\n Flight newFlight = new Flight (flightNo, departure1, arrival1, rows1, columns1, date_to_store);\n try {\n newFlight.addFlightToDB ();\n } catch (AWTException | MalformedURLException | ParseException | NumberFormatException ex) {\n LogHelper.fatal (ex);\n LogHelper.fatal (\"Number Format\");\n }\n scotiaAirline.addFlight (newFlight);\n saFrame.setVisible (false);\n saFrame.dispose ();\n mainMenu ();\n try {\n //display added flight\n NotificationHandler.notify (\"Flight Added\", \"Flight: '\"\n + flightNo\n + \"' Added Successfully\");\n } catch (AWTException | MalformedURLException ex) {\n try {\n NotificationHandler.\n notify (\"FLIGHT ERROR\", \"Flight Failed to add, See Log\");\n } catch (AWTException | MalformedURLException | NumberFormatException ex1) {\n LogHelper.fatal (ex);\n }\n LogHelper.fatal (ex);\n }\n });\n }", "public void createFrame() {\n\t\tsuper.createFrame();\n\t\tSystem.out.println(\"log walls.\");\n\t}", "FRAME createFRAME();", "public FramePrincipal() {\n initComponents();\n }", "public AuthFrame() {\n initComponents();\n }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public RegistrationFrame() {\n initComponents();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the current input data factory, responsible for handling objectFactory input data.
@Override public IInputDataFactory getInputDataFactory() { if (this.inputDataFactory == null) { this.inputDataFactory = getObjectFactory().getNamedObject("inputDataFactory", IInputDataFactory.class); if (this.inputDataFactory == null) { log.debug("Falling back to non application context based instantiation."); this.inputDataFactory = getObjectFactory().instantiate(InputDataFactory.class); } } return this.inputDataFactory; }
[ "public static IInputFactory getInputFactory() {\n\n return m_InputFactory;\n\n }", "public OWLDataFactory getFactory() {\n\t\treturn factory;\n\t}", "public ObjectFactory getObjectFactory();", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "public OBStoreFactory getFactory();", "public static ObjectFactory factory()\n {\n return factory;\n }", "public Factory getFactory()\r\n {\r\n if( m_factory != null ) return m_factory;\r\n m_factory = FactoryHelper.narrow( m_primary );\r\n return m_factory;\r\n }", "TransformFactory getFactory();", "public static DataFactory getDataFactory(ConnectionFactory connection)\n\t{\n\t\tif (INSTANCE == null)\n\t\t{\n\t\t\tsynchronized (DataFactory.class)\n\t\t\t{\n\t\t\t\tif (INSTANCE == null)\n\t\t\t\t{\n\t\t\t\t\tif (connection.getSelectedType() == conn_type.SPRING)\n\t\t\t\t\t{\n\t\t\t\t\t\tINSTANCE = new SpringDataFactory(connection);\n\t\t\t\t\t} else if (connection.getSelectedType() == conn_type.JEDIS)\n\t\t\t\t\t{\n\t\t\t\t\t\tINSTANCE = new RedisDataFactory(connection);\n\t\t\t\t\t} else if (connection.getSelectedType() == conn_type.JEDISPOOL)\n\t\t\t\t\t{\n\t\t\t\t\t\tINSTANCE = new PooledRedisDataFactory(connection);\n\t\t\t\t\t} else if (connection.getSelectedType() == conn_type.JEDISPIPELINED)\n\t\t\t\t\t{\n\t\t\t\t\t\tINSTANCE = new PipelinedPooledRedisDataFactory(connection);\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tINSTANCE = new PooledRedisDataFactory(connection);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn INSTANCE;\n\t}", "public Object getCurrentFactory() {\n if (mlibFactory != null && isMediaLibPreferred) {\n return mlibFactory;\n }\n return factory;\n }", "private static TokenizerFactory getFactory() {\n TokenizerFactory factory = IndoEuropeanTokenizerFactory.INSTANCE;\n // Convert everything to ASCII and remove symbols we're not interested in.\n factory = new NormalizationTokenizerFactory(factory);\n // Lower case everything.\n factory = new LowerCaseTokenizerFactory(factory);\n\n return factory;\n }", "public Factory getFactory() {\n return factory;\n }", "protected abstract InputReader<I> createInputReader(Context context);", "public abstract ProductFactory getFactory();", "public static OutputFactory getOutputFactory() {\n\n return m_OutputFactory;\n\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate static XmlEntityObjectFactory getFactory() {\n\t\tif (factory == null) {\n\t\t\tfactory = new XmlEntityObjectFactory();\n\t\t\ttry {\n\t\t\t\tClass<IXmlEntityResolverLoader> loaderClass = (Class<IXmlEntityResolverLoader>) Class\n\t\t\t\t\t\t.forName(defaulEntityResolverLoaderClassName);\n\t\t\t\tIXmlEntityResolverLoader loader;\n\t\t\t\tloader = loaderClass.newInstance();\n\t\t\t\tloader.loadTo(factory);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new UnexpectedRuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\treturn factory;\n\t}", "public static void setInputFactory(final IInputFactory inputFactory) {\n\n m_InputFactory = inputFactory;\n\n }", "public static XMLInputFactory newXMLInputFactory() {\n final XMLInputFactory xif = XMLInputFactory.newInstance();\n xif.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);\n xif.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);\n xif.setProperty(XMLInputFactory.IS_VALIDATING, false);\n xif.setProperty(XMLInputFactory.SUPPORT_DTD, false);\n return xif;\n }", "protected abstract InputStream getInputStreamForBeanFactory() throws IOException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates the volume option in DB. If the option with given key already exists for the volume, it will be updated, else inserted.
private void updateOptionInDb(final GlusterVolumeOptionEntity option) { // update the option value if it exists, else add it GlusterVolumeOptionEntity existingOption = getGlusterVolume().getOption(option.getKey()); if (existingOption != null) { getGlusterOptionDao().updateVolumeOption(existingOption.getId(), option.getValue()); } else { getGlusterOptionDao().save(option); } }
[ "public void addOption(OptionKey key, Option opt);", "@Override\n\tpublic int updateDBOptionPrice(Automobile tempAuto, String optionname, String option, float newprice) {\n\t\tProperties props = new Properties();\n\t\tint res=1;\t\n\t\ttry {\n\t\t\tConnection connection = getConnection();\n\t\t\tStatement statement = (Statement) connection.createStatement();\n\t\t\tString query = \"Select Id from Options where Option_Name like '\"+option+\"';\";\n\t\t\tResultSet rs = statement.executeQuery(query);\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\tint opId =0;\n\t\t\twhile (rs.next()){\n\t\t\t\topId = rs.getInt(1);\n\t\t\t}\n\t\t\n\t\t\tString fileName = \"Options.dat\";\n\t\t\tFileInputStream in = new FileInputStream(fileName);\n\t\t\tprops.load(in);\n\t\t\tquery = props.getProperty(\"UPDATEOPTIONPRICE\");\n\t\t\tPreparedStatement preparedStmt = connection.prepareStatement(query);\n\t\t\tpreparedStmt.setFloat (1, newprice);\n\t\t\tpreparedStmt.setString (2,option);\n\t\t\tpreparedStmt.execute();\n\t }catch (SQLException | ClassNotFoundException | IOException e) {\n\t\t\tres=0;\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "@Update(\"update js_plat_user_coin_volume set lock_volume=#{lockVolume} where user_id=#{userId} and coin_symbol =#{coinSymbol} and update_date<=#{updateDate}\")\n long updateOnlyLockVolumeBySymbol(@Param(\"userId\") String userId, @Param(\"coinSymbol\") String coin_symbol, @Param(\"lockVolume\") BigDecimal lockVolume, @Param(\"updateDate\") Timestamp updateDate);", "private void updateOptions()\r\n {\r\n try\r\n {\r\n // Set the parameters for the update PreparedStatement to the values\r\n // retrieved from the Game Options screen:\r\n optionsUpdateStatement.setString(1, String.valueOf(crosshairComboBox.getSelectedItem()));\r\n optionsUpdateStatement.setInt(2, strengthSlider.getValue());\r\n optionsUpdateStatement.setBoolean(3, animateWaterCheckBox.isSelected());\r\n\r\n // Update the database:\r\n optionsUpdateStatement.executeUpdate();\r\n }\r\n catch (Exception ex)\r\n {\r\n ex.printStackTrace(System.err);\r\n }\r\n }", "public void dbUpdateAutoOptionPrice(String autoName, String opsetName, String optName,\n\t\t\tfloat optPrice) throws IOException {\n\t\tAutomobile auto = autoList.get(autoName);\n\t\tif (auto != null) {\n\t\t\tnew DatabaseIO().updateAutoOptionPrice(autoName, opsetName, optName, optPrice);\n\t\t}else{\n\t\t\tSystem.out.println(\"Error \" + autoName + \" does not exist in the system!\");\n\t\t}\n\t}", "public void updateOption(DataModel model);", "@Update(\"update js_plat_user_coin_volume set volume=#{volume} ,lock_volume =#{lockVolume} where user_id=#{userId} and coin_id =#{coinId} and update_date<=#{update_date}\")\n long updateVolumeAndLockVolumeByCoinId(@Param(\"userId\") String userId, @Param(\"coinId\") String coinId, @Param(\"volume\") BigDecimal volume, @Param(\"lockVolume\") BigDecimal lockVolume, @Param(\"update_date\") Timestamp updateDate);", "public synchronized void UpdateAOption(String Model_Name, String Option_Set_Name ,\n\t\t\t\t\t\t\t\t\t\t\tString Option_Name,float New_Price)\n\t{\n try{\n\t\tif(Model_Name.equalsIgnoreCase(Model))\n\t\t{\n\t\t\tint k=Search_List(Option_Set_Name.toUpperCase(Locale.getDefault()));\n\t\t\tif( k>=0)\n\t\t\t\topset.get(k).Update_Option_Price(Option_Name, New_Price);\n\t\t}\n }\n\t\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\t\tSystem.out.print(\"The index you are looking for is invalid\\n\");\n\t}\n\t}", "int updateByPrimaryKeySelective(WeibarPriceTimeSettingInfo record);", "public void updateOptionPrice(String modelName, String optionName, String option, float newPrice){\n\t\tAutomobile auto= autoSet.readModel(modelName);\n\t\tauto.updateOptionPrice(optionName, option, newPrice);\n\t}", "public boolean putConfigVariableInSDB(String key)\n\t{\n\t\tObject value = config.get(key);\n\t\tif (value != null)\n\t\t{\n\t\t\tClass<?> type = value.getClass();\n\n\t\t\tboolean constant = Character.isUpperCase(key.codePointAt(0));\n\n\t\t\tif (type == Double.class)\n\t\t\t{\n\t\t\t\tSmartDashboard.putNumber(key, (double) value);\n\t\t\t}\n\t\t\telse if (type == Integer.class)\n\t\t\t{\n\t\t\t\tSmartDashboard.putNumber(key, (int) value);\n\t\t\t}\n\t\t\telse if (type == Boolean.class)\n\t\t\t{\n\t\t\t\tSmartDashboard.putBoolean(key, (boolean) value);\n\t\t\t}\n\n\t\t\tif (!constant)\n\t\t\t{\n\t\t\t\tvariablesInSDB.put(key, type);\n\t\t\t\tlogger.info(\"Added to SDB \" + key + \" of type \" + type + \"and allows for its modification\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlogger.info(\"Added to SDB \" + key + \" of type \" + type + \"BUT DOES NOT ALLOW for its modification\");\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "int updateByPrimaryKeySelective(GoodsTimePrice record);", "public void updateStockTradeRecord(int stockTrdId, double volume)\n\t\t\tthrows StockTradeDaoException, DaoOperationNotSupportedException;", "@Update(\"update js_plat_user_coin_volume set out_lock_volume=#{outLockVolume} where user_id=#{userId} and coin_symbol =#{coinSymbol} and update_date<=#{updateDate}\")\n long updateOnlyOutLockVolumeBySymbol(@Param(\"userId\") String userId, @Param(\"coinSymbol\") String coin_symbol, @Param(\"outLockVolume\") BigDecimal outLockVolume, @Param(\"updateDate\") Timestamp updateDate);", "public void updateOptionPrice(Automobile myAuto, String optionSet, String\n\t\t\toption, float newPrice) {\n\t\ttry {\n\t\t\t//get the correct option_id\n\t\t\tmyRs = myStmt.executeQuery(\"SELECT * FROM models WHERE name='\" + myAuto.getName() +\"'\");\n\t\t\tmyRs.next();\n\t\t\tint model_id = myRs.getInt(\"model_id\");\n\t\t\t\n\t\t\tmyRs = myStmt.executeQuery(\"SELECT * FROM optionsets WHERE name='\" + optionSet +\"'\");\n\t\t\tmyRs.next();\n\t\t\tint opset_id = myRs.getInt(\"opset_id\");\n\t\t\t\n\t\t\tString command = \"SELECT * FROM relations \"\n\t\t\t\t\t+ \"WHERE model_id=\" + model_id\n\t\t\t\t\t+ \" and opset_id=\" + opset_id;\n\t\t\tmyRs = myStmt.executeQuery(command);\n\t\t\tmyRs.next();\n\t\t\tint option_id = myRs.getInt(\"option_id\");\n\n\t\t\t//update option price by querying with option_id\n\t\t\tcommand = \"UPDATE options\"\n\t\t\t\t\t+ \" SET price=\" + newPrice\n\t\t\t\t\t+ \" WHERE option_id=\" + option_id;\n\t\t\tmyStmt.executeUpdate(command);\n\t\t\t\n\t\t}catch (Exception exc) {\n\t\t\texc.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void updateOptionPrice(String modelname, String optionsetname,\n\t String option, float newprice) {\n\ttry {\n\t // load driver\n\t Class.forName(\"com.mysql.jdbc.Driver\");\n\t // get connection\n\t String url = URL + SCHEM;\n\t Connection conn = DriverManager.getConnection(url, USER, PSWD);\n\t // create statement\n\t Statement stat = conn.createStatement();\n\t // create and execute query\n\t query = command.getProperty(\"Select_autoid\");\n\t query = query.replace(\"%autoname\", modelname);\n\t ResultSet rs = stat.executeQuery(query);\n\t Integer autoid = null;\n\t if (rs.next()) {\n\t\tautoid = rs.getInt(\"AutoID\");\n\t }\n\t rs.close();\n\t query = command.getProperty(\"Select_optsetid\");\n\t query = query.replace(\"%optsetname\", optionsetname);\n\t query = query.replace(\"%autoid\", autoid.toString());\n\t rs = stat.executeQuery(query);\n\t Integer optsetid = null;\n\t if (rs.next()) {\n\t\toptsetid = rs.getInt(\"optsetID\");\n\t }\n\t rs.close();\n\t query = command.getProperty(\"Update_optprice\");\n\t Float newp = newprice;\n\t query = query.replace(\"%newprice\", newp.toString());\n\t query = query.replace(\"%optsetid\", optsetid.toString());\n\t query = query.replace(\"%optname\", option);\n\n\t System.out.println(query);\n\t stat.execute(query);\n\t // close\n\t stat.close();\n\t conn.close();\n\n\t} catch (SQLException e) {\n\t e.printStackTrace();\n\t System.out.println(\"No such database!\");\n\t return;\n\t} catch (java.lang.Exception ex) {\n\t ex.printStackTrace();\n\t}\n }", "@Update(\"update js_plat_user_coin_volume set volume=#{volume} ,out_lock_volume =#{outLockVolume} where user_id=#{userId} and coin_id =#{coinId} and update_date<=#{update_date}\")\n long updateVolumeAndOutLockVolumeByCoinId(@Param(\"userId\") String userId, @Param(\"coinId\") String coinId, @Param(\"volume\") BigDecimal volume, @Param(\"outLockVolume\") BigDecimal outLockVolume, @Param(\"update_date\") Timestamp updateDate);", "public void update (String key_val, String val)\n {\n }", "public void updateOptionPrice(String ModelName, String Optionname,\n\t\t\tString Option, float newprice) {\n\t\tAutomobile auto = automobileList.get(ModelName);\n\t\ttry {\n\t\t\tif (auto != null) {\n\t\t\t\tauto.updateOptionPrice(Optionname, Option, newprice);\n\t\t\t\tautomobileList.put(ModelName, auto);\n\t\t\t} else {\n\t\t\t\tthrow new AutoException(ExceptionErrorCode.CarModelNotFoundException);\n\t\t\t}\n\t\t} catch (AutoException ae) {\n\t\t\tSystem.out.println(\"Error -- \" + ae.toString());\n\t\t}\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column FreeHost_CDN_analog.vpsname
public void setVpsname(String vpsname) { this.vpsname = vpsname == null ? null : vpsname.trim(); }
[ "public String getVpsname() {\r\n return vpsname;\r\n }", "public Builder setPvname(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n pvname_ = value;\n onChanged();\n return this;\n }", "void setVarName(String vname) {\n this.vname = vname;\n }", "public void setSVC_ANAME(String sVC_ANAME) {\r\n\tSVC_ANAME = sVC_ANAME;\r\n}", "public void setNameSP(String nameSP) {\n this.nameSP = nameSP;\n }", "public String getVpsapiname() {\r\n return vpsapiname;\r\n }", "public void setNameSrvAddr(String nameSrvAddr) {\n this.nameSrvAddr = nameSrvAddr;\n }", "public String getVpscomname() {\r\n return vpscomname;\r\n }", "java.lang.String getPvname();", "public void setVpscomname(String vpscomname) {\r\n this.vpscomname = vpscomname == null ? null : vpscomname.trim();\r\n }", "public void setPCName(String name)\n { \n PCName = name;\n }", "public void setDvsName(java.lang.String dvsName) {\n\t\tthis.dvsName = dvsName;\n\t}", "public void setVpsapiname(String vpsapiname) {\r\n this.vpsapiname = vpsapiname == null ? null : vpsapiname.trim();\r\n }", "public java.lang.String getPvname() {\n java.lang.Object ref = pvname_;\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 pvname_ = s;\n }\n return s;\n }\n }", "void setMcaPV(String mcaPV);", "public void setDriverName(String newDriverName) {\n if (newDriverName != null) {\n driverName = newDriverName;\n } else \n if(newDriverName == null){\n driverName = \"\";\n }\n System.out.println(\"Driver name updated to \" + driverName + \" successfully!\");\n }", "public void setRPSvalue(String playerName, String RPSvalue){\n\n mVars = Vars.getInstance();\n mPlayer = new Player(playerName, mVars.getStatus(), RPSvalue, mVars.getReady(),mVars.getLatitude(),mVars.getLongitude());\n mFirebaseDatabase = FirebaseDatabase.getInstance();\n mDatabaseReference = mFirebaseDatabase.getReference();\n mDatabaseReference.child(\"Games\").child(mVars.getGameID()).child(\"Players\").child(mVars.getPlayerID()).setValue(mPlayer);\n }", "public void setProcName(String procName) {\n this.procName = procName == null ? null : procName.trim();\n }", "public void setName(Name v) {\n this.name = v;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind parameters and create the XML request for add agent.
public void submitAddAgent (){ }
[ "private AddAgentResponse addAgent(AddAgentRequest request) {\n\t\tRemoteNode commander = this.createRemoteNode(request.getCommander());\n\t\tthis.setCommander(commander);\n\t\tAddAgentResponse response = new AddAgentResponse();\n\t\tresponse.setErrorCode(ActionErrorCode.SUCCESS);\n\t\treturn response;\n\t}", "public void addAgent(Agent agent);", "ISarlAgentBuilder addSarlAgent(String name);", "public void clickAddAgent() throws Exception {\n\t\twaitForElement.waitForElement(locators.clickAddAgent);\n\t\twdriver.findElement(By.xpath(locators.clickAddAgent)).click();\n\t}", "@Override\n public RegisterAgentResult registerAgent(RegisterAgentRequest request) {\n request = beforeClientExecution(request);\n return executeRegisterAgent(request);\n }", "public void addAgent() {\n\t\tthis.currentAgentsNumber++;\n\t}", "private void createAdRequest(){\n builder.tagForChildDirectedTreatment(true);\n adRequest = builder.build();\n }", "void addAgentToDepartment(Long agentId, Long departmentId);", "Agent createAgent();", "public void addAgent(Agent agent) {\n agent.setEnabled(true);\n agents.add(agent);\n rootNode.attachChild(agent.getSpatial());\n }", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest addNewEvSORequest();", "public void register() \n{\n\tamsclient.register(this.agentid);\n}", "public String createAgent() {\n\t\tscriptUtils.goTo(testUrl); // You need to open BASE_URL to set cookies.\n\t\tscriptUtils.goTo(testUrl + \"/log-in\");\n\t\t// Login as admin\n\t\tscriptUtils.fillInTextField(\"userName\", context.getAdminCredentials().getUserName());\n\t\tscriptUtils.fillInTextField(\"j_security_check_j_password\", context.getAdminCredentials().getPassword());\n\t\tscriptUtils.click(\"j_security_check_0\");\n\t\t// Open \"ADD AGENT\" page to fill form\n\t\tscriptUtils.click(By.linkText(\"MK3-SUPPORT\"));\n\t\tscriptUtils.click(By.linkText(\"ADD AGENT\"));\n\t\tString uniqueEmailAccountName = uniqueEmailAddressGenerator.generateUniqueEmailAddress();\n\t\tSystem.out.println(\"E-mail:\" + uniqueEmailAccountName);\n\t\tscriptUtils.fillInTextField(\"addNewSupportUser_firstname\", \"Test\");\n\t\tscriptUtils.fillInTextField(\"addNewSupportUser_lastname\", \"Agent\");\n\t\tcontext.driver.findElement(By.id(\"addNewSupportUser_emailAddress\")).clear();\n\t\tscriptUtils.fillInTextField(\"addNewSupportUser_emailAddress\", uniqueEmailAccountName);\n\t\tscriptUtils.click(\"addNewSupportUser__addAgent\");\n\n\t\t// XPath of div with password\n\t\tString result = context.driver.findElement(By.xpath(\"//html/body/table/tbody/tr[2]/td[2]/div[2]/div/div/ul/li/span\")).getText();\n\t\t// Extracting password from text\n\t\tString agentPassword = result.substring(result.lastIndexOf(\" \") + 1);\n\t\tSystem.out.println(\"Password: \" + agentPassword);\n\n\t\tscriptUtils.click(By.linkText(\"LOG OUT\"));\n\t\tscriptUtils.click(By.linkText(\"Login\"));\n\t\t// Login as new agent\n\t\tscriptUtils.fillInTextField(\"userName\", uniqueEmailAccountName);\n\t\tscriptUtils.fillInTextField(\"j_security_check_j_password\", agentPassword);\n\t\tscriptUtils.click(\"j_security_check_0\");\n\t\treturn \"\";\n\t}", "public void addAgent(Agent agent) {\n this.agents.add(agent);\n }", "public void prepareAgent(Agent agent) {\n\t\t\t\tRole userRole = new Role();\n\t\t\t\tuserRole.role = Roles.AGENT;\n\t\t\t\tuserRole.user = agent.user;\n\t\t\t\tagent.user.roles.add(userRole);\n\t\t\t\tEbean.save(userRole);\n\t\t\t\tLOG.info(\"Adding role as an agent\");\n\t\t\t\tuserDao.save(agent.user);\n\t\t\t\tagent.form.status = FormStatus.PAID;\n\t\t}", "public void startAgent(String agName);", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public void editTransactionAgent(Agent agent);", "public void createIntenalAgent() {\n\t\tdriver.switchTo().defaultContent();\n\t\tdriver.switchTo().frame(\"agent_main\");\n\t\tsaveBtn.click();\n\t\tdriver.switchTo().defaultContent();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new CurrencyConversion. It's a default Constructor, which sets the class variables to null.
public CurrencyConversion() { currency1 = null; currency2 = null; conversionFactor = null; }
[ "public CurrencyConversion() {\n }", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "public Currency(){\n\n }", "public CurrencyFormatter() {\n \n }", "public Currency() {\n name = \"EUR\";\n symbol = \"€\";\n parityToEur = 1;\n }", "public CurrencyBean() {\n currencyAmount = 0.0d;\n currencyType = Currencies.DOLLAR;\n }", "public CurrencyControl()\r\n {\r\n customerBalance = 0.00;\r\n machineBalance = 50.00;\r\n }", "private CurrencyValidator() {\n\n }", "private Converter() {\n // Nothing.\n }", "public Money() {\n dollars = 0;\n cents = 0;\n }", "public CurrencyRates() {\n this(DSL.name(\"currency_rates\"), null);\n }", "public CelsiusConverter()\n {\n super();\n }", "public Money() {\n }", "public Converter() {\n this(DEFAULT_PROJECT_KEY);\n }", "public currencyExchange() {\n initComponents();\n }", "public RXN2CMLConverter() {\r\n this(\"\");\r\n }", "public IfcCurrencyEnum(){}", "public FPCurrency(CurrencyData currency) {\n if (currency == null)\n throw new NullPointerException(\"currency must be non-null\");\n this.currency = currency;\n this.zero = FixedPointSelector.getZeroForScale(currency.getDefaultFractionDigits());\n }", "private Currency(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the qDS elements.
List<QualityDataSetDTO> getQDSElements(String measureId, String verision);
[ "public List<QueryResultsDataObj> getQueryResultsDataObjs()\n {\n return qrdos;\n }", "public AbstractElement[] getElements() {\r\n\t\tenter();\r\n\t\ttry {\r\n\t\t\treturn application.getElements();\r\n\t\t} finally {\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "public DSDataSet<Q> getDataSet();", "public ScheduleElement[] getElements() {\r\n CTBBean [] beans = this.getBeans();\r\n ScheduleElement[] result = new ScheduleElement[beans.length];\r\n for(int i=0;i<beans.length;i++)\r\n result[i] = (ScheduleElement) beans[i];\r\n return result;\r\n\t}", "public List<QueryResultsContainerIFace> getQueryResultsContainers()\n {\n return qrcs;\n }", "private Object[] elements() {\n return elements.toArray();\n }", "public List<Element> getElements() {\n return elements;\n }", "public List<List<Double>> getQTable() {\n return qTable;\n }", "public List<PageElement> getElements();", "public List<Expression> getElements() {\n\t\treturn elements;\n\t}", "public XmlMagRecord[] getElements ( CatalogStar star )\r\n\t\tthrows IOException\r\n\t{\r\n\t\tFolder db_folder = createDBFolder(star);\r\n\t\treturn getElements(db_folder);\r\n\t}", "public Query [] getQueries () {\n return queries;\n }", "remote.RemoteStorage.Query getQueries(int index);", "public QueueElementIF[] dequeue_all() {\n\t\tif (selset.size() == 0)\n\t\t\treturn null;\n\n\t\tif ((ready_size == 0) || (ready_offset == ready_size)) {\n\t\t\tdoPoll(0);\n\t\t}\n\t\tif (ready_size == 0)\n\t\t\treturn null;\n\t\tSelectQueueElement ret[] = new SelectQueueElement[ready_size - ready_offset];\n\t\tfor (int i = 0; i < ret.length; i++) {\n\t\t\tret[i] = new SelectQueueElement(ready[ready_offset++]);\n\t\t}\n\t\treturn ret;\n\t}", "public List<String> getElements() {\n return this.elements;\n }", "public Field[] getFields() {\n if (dSet.isEmpty()) \n throw new RuntimeException(\"No Elements available.\");\n \n java.util.Iterator it = dSet.iterator();\n DataElement element = (DataElement) it.next();\n \n if (element.isEmpty()) \n throw new RuntimeException(\"No Fields available.\");\n \n return element.getFields();\n }", "QueryDataSet retrieveQueryDataSet();", "public BigDecimal getQs() {\n\t\treturn qs;\n\t}", "public List<String> getElements();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validate an inventory title. throws IllegalArgumentException If the title exceed 32 characters.
public static void validateTitle(String title) { if(title.length() > 32) throw new IllegalArgumentException("Title length must be lower than 32 characters."); }
[ "public void testInvalidTitle() {\n\t\tassertFalse(Item.isTitleValid(\"pop1corn\"));\n\t\tSystem.out.println(\"Title failure. Invalid characters encountered. testInvalidTitle()\\n\");\n\t\t\n\t}", "private void checkTitle() {\n\t\tif (title == null) {\n\t\t\tinvalidArgs.add(MESSAGE_INVALID_TITLE);\n\t\t}\n\t}", "public void validateTitle(String title){\n boolean isValid = title != null && !title.isEmpty();\n setTitleValid(isValid);\n }", "public void testInvalidTitleEmpty() {\n\t\tassertFalse(Item.isTitleValid(\"\"));\n\t\tSystem.out.println(\"Title failure. No title entered. testInvalidTitleEmpty()\\n\");\n\t\t\n\t}", "public static String validateJobTitle(String title) {\n if (isEmpty(title)) {\n return \"Title cannot be empty\";\n } else if (title.trim().length() > 45) {\n return \"Title cannot be more than 45 characters\";\n } else {\n return null;\n }\n }", "public static boolean checkTitle(String title) {\r\n\t\tboolean result = false;\r\n\t\tif (check(title) && title.matches(CommandParameter.REG_EXP_TITLE)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static void validateInventory(SimpleInventory inventory) {\n\n InventoryValidator.validateId(inventory.getId());\n InventoryValidator.validateTitle(inventory.getTitle());\n InventoryValidator.validateSize(inventory.getSort(), inventory.getSize());\n }", "@Test\n void isIllegalKeywordArgumentExceptionThrownWhenNameLengthLessThanMinLengthTest() {\n try {\n keyword = new Keyword (\"\", LocalDateTime.now(), card);\n } catch (IllegalKeywordArgumentException e) {\n Assertions.assertEquals(\"Invalid name\", e.getMessage());\n }\n }", "public void validateTitle()\r\n\t{\r\n\t\tString titleDisplayed = this.heading.getText();\r\n\t\tassertEquals(titleDisplayed, \"Dashboard\");\r\n\t\tSystem.out.println(\"Value is asserted\");\r\n\t\t\t}", "public long\n validateHeapSize\n (\n Long size,\n String title\n ) \n throws IllegalConfigException\n {\n if(size == null) \n throw new IllegalConfigException\n\t(\"No value was specified for the \" + title + \"!\");\n \n if(size < 67108864L) \n throw new IllegalConfigException\n\t(\"The \" + title + \" cannot be less than 32M!\");\n \n return size;\n }", "public static boolean isValidJobTitle(String jobTitle) {\n return isValidAlphaNumericWord(jobTitle);\n }", "@Test\n public void testFieldNameExceedingLimit() {\n Exception thrown =\n assertThrows(\n IllegalArgumentException.class,\n () -> PivotSchemaExtract.validateFieldName(Strings.repeat(\"A\", 150)));\n\n assertThat(thrown).hasMessageThat().contains(\"cannot exceed 128 characters.\");\n }", "@Test\n public void enforcedTitleAndDescriptionLength() {\n logon(\"AutoTest\", \"automated\");\n\n // Start with a title and description less than 150 chars.\n String itemName = context.getFullName(FIFTY_CHARS);\n assertTrue(itemName.length() < 150);\n\n WizardPageTab wizard =\n new ContributePage(context).load().openWizard(GENERIC_TESTING_COLLECTION);\n wizard.editbox(1, itemName);\n wizard.editbox(2, itemName);\n SummaryPage summary = wizard.save().publish();\n assertEquals(summary.getItemTitle(), itemName);\n assertEquals(summary.getItemDescription(), itemName);\n\n // Now make them longer than 150 chars.\n itemName += FIFTY_CHARS + FIFTY_CHARS;\n assertTrue(itemName.length() > 150);\n\n wizard = summary.edit();\n wizard.editbox(1, itemName);\n wizard.editbox(2, itemName);\n summary = wizard.saveNoConfirm();\n\n // Expected name is the first 150 characters and an ellipsis char.\n String expectedName = itemName.substring(0, 150) + \"\\u2026\";\n assertEquals(summary.getItemTitle(), expectedName);\n assertEquals(summary.getItemDescription(), expectedName);\n\n logout();\n }", "public void assertTitle(final String title);", "public static void validateCartTitle() {\n\t\tString exp_Title2 = \"The product has been added to your shopping cart\";\n\t\tWebElement msg2 = driver.findElement(By.xpath(\"//*[@class='content']\"));\n\t\tString text2 = msg2.getText();\n\t\tAssert.assertEquals(text2, exp_Title2);\n\t}", "public void\n validateHeapSize\n (\n long size, \n String title\n )\n throws IllegalConfigException\n {\n if(size < 0) \n throw new IllegalConfigException\n\t(\"The \" + title + \" heap size (\" + size + \") cannot be negative!\");\n\n if(size < 2097152) \n throw new IllegalConfigException\n\t(\"The \" + title + \" heap size (\" + size + \") must be at least (2M)!\");\n \n if((size % 1024L) != 0) \n throw new IllegalConfigException\n\t(\"The \" + title + \" heap size (\" + size + \") must be a multiple of (1024)!\");\n }", "@RobotKeyword\n @ArgumentNames({ \"title\" })\n public void titleShouldNotBe(String title) {\n String actual = getTitle();\n if (actual.equals(title)) {\n throw new FailureException(\n String.format(\"Title should not have been '%s', but was '%s'\", title, actual));\n }\n }", "private static Boolean isValidTitle(String title) {\n\t\tif(Util.isNullOrEmpty(title)) {\n\t\t\treturn Boolean.FALSE;\n\t\t}\n\t\t\n\t\tfor(String ignoredTitle : ignoredTitles) {\n\t\t\tif(title.toLowerCase().contains(ignoredTitle.toLowerCase())) {\n\t\t\t\treturn Boolean.FALSE;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Boolean.TRUE;\n\t}", "public void illegalDataFieldsCheck(int intSID, String strName, String strTitle) throws IllegalArgumentException{\r\n String exceptionMessage = \"\";\r\n if (strName.equals(\"\")) {\r\n exceptionMessage += \"Name Can't Be Blank \\n\";\r\n }\r\n\r\n if (strTitle.equals(\"\")) {\r\n exceptionMessage += \"Title Can't Be Blank \\n\";\r\n }\r\n\r\n if (intSID == 0) {\r\n exceptionMessage += \"SID Can't Be 0 \\n\";\r\n }\r\n\r\n if (!exceptionMessage.equals(\"\")) {\r\n throw new IllegalArgumentException(exceptionMessage);\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set whether an this resolver should autogenerate data encryption credentials.
public void setAutoGenerateDataEncryptionCredential(final boolean flag) { autoGenerateDataEncryptionCredential = flag; }
[ "public boolean isAutoGenerateDataEncryptionCredential() {\n return autoGenerateDataEncryptionCredential;\n }", "public void setEncrypt(Boolean Encrypt) {\n this.Encrypt = Encrypt;\n }", "public abstract void setEncryptMode();", "final public boolean requiresEncryption()\r\n {\r\n return requires_ENC;\r\n }", "public void setEncrypt(boolean isEncrypt)\n\t{\n\t\tthis.isEncrypt = isEncrypt;\n\t}", "public boolean needsPasswordEncryption() {\r\n return needsPasswordEncryption;\r\n }", "public void setClientAuthEnabled(Boolean val) throws InvalidAttributeValueException, MBeanException;", "public void setProtection(boolean value);", "private static boolean encryptionOn() {\r\n\t\treturn compositeConfiguration.containsKey(Key.PRIVATE_KEY.getValue());\r\n\t}", "Boolean encryptOptions();", "boolean getIsEncrypt();", "public void setEncryptionDescriptor(String descriptor) {\n encrypted = descriptor;\n }", "boolean getEncrypt();", "public void setNeedClientAuth(boolean flag)\n {\n needClientAuth = flag;\n }", "final public boolean requiresAuthentication()\r\n {\r\n return requires_AUT;\r\n }", "public void setWantClientAuth(boolean flag)\n {\n wantClientAuth = flag;\n }", "final void setAuthentication(boolean required)\r\n {\r\n requires_AUT = required;\r\n }", "void setEncryptionMethod(Encryptor encryptor);", "public boolean isSrpAuthSettable() {\r\n return srpAuthSettable;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Used to get the Road that connects 2 given cities
public n2009108991_Estrada getRoad(int x,int y){ /**Origin city*/ n2009108991_Cidade origem= getCity(x); /**Destination city*/ n2009108991_Cidade destino= getCity(y); /**Auxiliary road allows to travel the list*/ n2009108991_Estrada aux= listaEstradas.get(0); for(int i =0;i<listaEstradas.size();i++){ aux = listaEstradas.get(i); // caution the next line used both origin and destination for verification, because the road can connect city A to B, but roads are double sided, so at the same time it connects B to A if (aux.getOrigem().getNome().equals(origem.getNome()) && aux.getDestino().getNome().equals(destino.getNome()) || aux.getOrigem().getNome().equals(destino.getNome()) && aux.getDestino().getNome().equals(origem.getNome()) ) return aux; } return aux; }
[ "@Override\r\n public String getRoad(String town1, String town2) {\r\n return graph.getEdge(new Town(town1), new Town(town2)).getName();\r\n\r\n }", "@Override\r\n\tpublic String getRoad(String town1, String town2) \r\n\t{\r\n\t\tTown t = new Town(town1);\r\n\t\tTown t2 = new Town(town2);\r\n\t\treturn graph.getEdge(t, t2).getName();\r\n\t}", "@Override\n public Rout getByCities(String city1, String city2) throws PersistenceException {\n logger.debug(\"Rout \" + city1 + \" - \" + city2);\n return routDAO.getByCities(city1, city2);\n }", "private int getRelatedPathCost(City city1, City city2) {\n for (Path path : paths) {\n if (path.getSoureCity() == city1 && path.getDestinationCity() == city2)\n return path.getCost();\n }\n\n throw new RuntimeException(\"May be the cities are not directly linked\");\n }", "List<String> getConnectedCities(String city);", "public Road(Place A, Place B)\n\t{\n\t\tEmpire roadEmpire = Empire.getInstance();\n\t\t\n\t\tint intXA, intYA, intXB, intYB;\n\t\tdouble xA, yA, xB, yB;\n\t\t\n\t\tintXA = A.getXPosition();\n\t\tintYA = A.getYPosition();\n\t\tintXB = B.getXPosition();\n\t\tintYB = B.getYPosition();\n\t\t\n\t\txA = (double) intXA;\n\t\tyA = (double) intYA;\n\t\txB = (double) intXB;\n\t\tyB = (double) intYB;\n\t\t\n\t\taPoint = new Point((int) xA, (int) yA);\n\t\tbPoint = new Point((int) xB, (int) yB);\n\t\t\n\t\taName = A.getName();\n\t\tbName = B.getName();\n\t\t\n\t\tlength = Math.sqrt((((xA-xB)*(xA-xB) + (yA - yB)*(yA - yB))));\n\t\tkFactor = (yB - yA)/(xB-xA);\n\t\t\n\t\troad.add(new Point(intXA, intYA));\n\t\t\n\t\tString keyA = String.valueOf(intXA) + \"-\" + String.valueOf(intYA);\n\t\tif(!roadEmpire.POINTS.containsKey(keyA));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXA,intYA);\n\t\t\troadEmpire.POINTS.put(keyA, m);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif((xA == xB) && (yA == yB))\n\t\t{\n\t\t\tdirection = Direction.NONE;\n\t\t}\n\t\telse if(xA == xB)\n\t\t{\n\t\t\tif(yB > yA)\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t}\t\t\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x = (int) xA;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tif(yB > yA)\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ty = ((int)yA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse if(yA == yB)\n\t\t{\n\t\t\tif(xB > xA)\n\t\t\t{\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y = (int)yA;\n\t\t\t\t\n\t\t\t\tif(xB > xA)\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) + i;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = ((int)xA) - i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point(x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_EAST;\n\t\t\t}\n\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t{\t\n\t\t\t\tdirection = Direction.NORTH_EAST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.SOUTH_WEST;\n\t\t\t}\n\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t{\n\t\t\t\tdirection = Direction.NORTH_WEST;\n\t\t\t}\n\t\t\t\t\n\t\t\tfor (int i=1; i<(int)length; i++)\n\t\t\t{\n\t\t\t\tint x;\n\t\t\t\tint y;\n\t\t\t\t\n\t\t\t\tdouble c = (double) i;\n\t\t\t\tdouble a = c/(Math.sqrt((kFactor*kFactor + 1.0))); \n\t\t\t\tdouble b = Math.abs(a*kFactor);\n\t\t\t\t\n\t\t\t\tif((xB > xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB > xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA + a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB > yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA + b);\n\t\t\t\t}\n\t\t\t\telse if((xB < xA) && (yB < yA))\n\t\t\t\t{\n\t\t\t\t\tx = (int)(xA - a);\n\t\t\t\t\ty = (int)(yA - b);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tx = 100;\n\t\t\t\t\ty = 100;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troad.add(new Point (x,y));\n\t\t\t\t\n\t\t\t\tString key = String.valueOf(x) + \"-\" + String.valueOf(y);\n\t\t\t\tif(!roadEmpire.POINTS.containsKey(key));\n\t\t\t\t{\n\t\t\t\t\tMapPoint m = new MapPoint(x,y);\n\t\t\t\t\troadEmpire.POINTS.put(key, m);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\n\t\t}\n\t\t\n\t\troad.add(new Point(intXB, intYB));\n\t\t\n\t\tString keyB = String.valueOf(intXB) + \"-\" + String.valueOf(intYB);\n\t\tif(!roadEmpire.POINTS.containsKey(keyB));\n\t\t{\n\t\t\tMapPoint m = new MapPoint(intXB,intYB);\n\t\t\troadEmpire.POINTS.put(keyB, m);\n\t\t}\n\t}", "@Override\r\n public boolean containsRoadConnection(String town1, String town2) {\r\n return graph.containsEdge(new Town(town1),new Town(town2));\r\n }", "List<ConnectingFlights> getPossibleRoutes(int loc_start_id, int loc_end_id);", "private void establishConnectionsBidirectionally(Map<String,List<String>> cityRouteMap, String source, String destination) {\n if(cityRouteMap.containsKey(source)) {\n List<String> citiesReachable = cityRouteMap.get(source);\n citiesReachable.add(destination);\n } else {\n List<String> citiesReachable = new ArrayList<>();\n citiesReachable.add(destination);\n cityRouteMap.put(source, citiesReachable);\n }\n }", "@Override\n public ConnectionDTO findNearestRouteToCity(String origin, String destination) {\n\n log.info(\"Searching connections\");\n\n List<Object> resultSet = new ArrayList<>();\n cityRepository.findByIncomingAndOutgoing(origin, destination).forEach(resultSet::add);\n\n List<ConnectionDTO> connectionsDTOS = new ArrayList<>();\n resultSet.stream().forEach(resultNode -> {\n connectionsDTOS.add(fillReturnObject((List<Map<Object,Object>>)resultNode));\n });\n\n Collections.sort(connectionsDTOS);\n\n return !connectionsDTOS.isEmpty() ? connectionsDTOS.get(0) : new ConnectionDTO();\n\n }", "@Override\r\n public ArrayList<String> getPath(String town1, String town2) {\r\n return graph.shortestPath(new Town(town1),new Town(town2));\r\n }", "public HashSet<Path> getStreetsPath(Coordinate start, Coordinate end) {\n Node startStreetNode = coordToNode(start);\n Node endStreetNode = coordToNode(end);\n startStreetNode.end = endStreetNode;\n endStreetNode.end = endStreetNode;\n HashSet<Node> nodes = initNodes(startStreetNode, endStreetNode);\n if(nodes == null) {\n System.out.println(\"MapData: getStreetPath - nodes are null\");\n return null;\n }\n ArrayList<Node> path = getPath(startStreetNode, endStreetNode);\n if(path == null) {\n System.out.println(\"MapData: getStreetPath - path are null\");\n return null;\n }\n System.out.println(\"MapData: path - \" + path);\n HashSet<Path> streetPath = new HashSet<>();\n for(int i = 0; i < path.size()-1; i++) {\n ArrayList<Coordinate> coord = new ArrayList<>();\n Node n0 = path.get(i);\n Node n1 = path.get(i+1);\n coord.add(n0.c);\n coord.add(n1.c);\n Path s = new Path(\"PATH_\"+n0.s0.name+n0.s1.name+\"_\"+n1.s0.name+n1.s1.name,coord);\n streetPath.add(s);\n }\n ArrayList<Coordinate> coordStart = new ArrayList<>();\n coordStart.add(start);\n coordStart.add(startStreetNode.c);\n Path first = new Path(\"PATH_start_\"+startStreetNode.s0.name,coordStart);\n ArrayList<Coordinate> coordEnd = new ArrayList<>();\n coordEnd.add(endStreetNode.c);\n coordEnd.add(end);\n Path last = new Path(\"PATH_end_\"+endStreetNode.s0.name,coordEnd);\n streetPath.add(first);\n streetPath.add(last);\n return streetPath;\n }", "public RoadInterface getConnectedRoad (Direction dir) {\n if (dirOne == dir) {\n return (interOne);\n } else if (dirTwo == dir) {\n return (interTwo);\n } else {\n return (null);\n }\n }", "@Override\r\n\tpublic ArrayList<String> getPath(String town1, String town2)\r\n\t{\r\n\t\tTown t = new Town(town1);\r\n\t\tTown t2 = new Town(town2);\r\n\t\t\r\n\t\tArrayList<String> list = graph.shortestPath(t, t2);\r\n\t\treturn list;\r\n\t}", "public void roadList(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(i + \" \" + roads.get(i).start.getCityName() + \", \" + roads.get(i).end.getCityName());\n }\n }", "private List<TileToEdgeAssociation> findAdjacentConnectedCityTile(TileToEdgeAssociation tileToEdgeAssociation){\n\t\tTile tile = tileToEdgeAssociation.getTile();\n\t\tList<Edge> passingEdgeListIn = tileToEdgeAssociation.getAssociatedEdges();\n\t\tList<TileToEdgeAssociation> out = new ArrayList<>();\n\n\t\tif(passingEdgeListIn.contains(Edge.CENTER)){\n\t\t\treturn findAdjacentConnectedCityTile(new TileToEdgeAssociation(tile, List.of(Edge.NORTH,Edge.EAST,Edge.SOUTH,Edge.WEST)));\n\t\t}\n\n\t\tfor(Edge edge:passingEdgeListIn){\n\t\t\tif(tile.getEdgeSegment(edge)!=EdgeSegment.CITY_CONNECT){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTile adjE = getTileInDirection(tile, edge);\n\t\t\tif(adjE==null){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tList<Edge> adjEPathList = new ArrayList<>();\n\t\t\tif(adjE.getEdgeSegment(Edge.CENTER)!=EdgeSegment.CITY &&\n\t\t\t\t\tadjE.getEdgeSegment(Edge.CENTER)!=EdgeSegment.CITY_GUARDED){\n\t\t\t\tadjEPathList.add(edge.getOppositeEdge());\n\t\t\t}else{\n\t\t\t\tadjEPathList = adjE.findCityConnect();\n\t\t\t}\n\t\t\tout.add(new TileToEdgeAssociation(adjE, adjEPathList));\n\t\t}\n\t\treturn out;\n\t}", "public static List<Object> getMidLocationBetweenTwoLocation(final String sourceAddress, final String destinationAddress, final String API_KEY) {\n\n\n final List<String> list = new ArrayList<>();\n final List<Object> midPointList = new ArrayList<>();\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n\n URL url = new URL(\"https://maps.googleapis.com/maps/api/directions/json?\" + \"origin=\" + sourceAddress + \"&destination=\" + destinationAddress + \"&key=\" + API_KEY);\n HttpHandler handler = new HttpHandler();\n String jsonStr = handler.makeServiceCall(String.valueOf(url));\n\n if (jsonStr != null) {\n\n JSONObject jsonObject = new JSONObject(jsonStr);\n JSONArray jsonArray = jsonObject.getJSONArray(\"routes\");\n\n System.out.println(\"response:\" + jsonArray);\n\n if (jsonArray != null && jsonArray.length() > 0) {\n JSONArray legsObject = jsonArray.getJSONObject(2).getJSONArray(\"legs\");\n if (legsObject != null) {\n JSONArray stepsArray = legsObject.getJSONObject(6).getJSONArray(\"steps\");\n if (stepsArray != null && stepsArray.length() > 0) {\n for (int i = 0; i < stepsArray.length(); i++) {\n JSONObject object = stepsArray.getJSONObject(i);\n\n if (object.has(\"end_location\")) {\n JSONObject end_locationObject = object.getJSONObject(\"end_location\");\n double lat = end_locationObject.getDouble(\"lat\");\n double lng = end_locationObject.getDouble(\"lng\");\n\n URL lat_lng_url = new URL(\"https://maps.googleapis.com/maps/api/geocode/json?\" + \"latlng=\" + lat + \",\" + lng + \"&key=\" + API_KEY);\n\n JSONObject latlngObject = new JSONObject(String.valueOf(lat_lng_url));\n\n JSONArray latlngArray = latlngObject.getJSONArray(\"results\");\n\n if (latlngArray != null && latlngArray.length() > 0) {\n JSONObject addressObj = latlngArray.getJSONObject(1);\n String formatted_address = addressObj.getString(\"formatted_address\");\n list.add(formatted_address);\n }\n }\n }\n midPointList.addAll(list);\n }\n }\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return midPointList;\n }", "public LinkedList<String> newFlights(){\r\n\t\t\r\n\t\tLinkedList<Network> listOfNetwork = this.getNetworks();\r\n\t\tLinkedList<String> pairsOfCities = new LinkedList<String>();\r\n\t\t\r\n\t\tfor(int i = 0; i < listOfNetwork.size()-1; i++){\r\n\t\t\t\r\n\t\t\tLinkedList<String> pairs = new LinkedList<String>();\r\n\t\t\t\r\n\t\t\tNetwork subNetOne = listOfNetwork.get(i);\r\n\t\t\tNetwork subNetTwo = listOfNetwork.get(i+1);\r\n\t\t\tString cityOne = subNetOne.getListOfName().getFirst();\r\n\t\t\tString cityTwo = subNetTwo.getListOfName().getFirst();\r\n\t\t\t\r\n\t\t\tpairs.add(cityOne);\r\n\t\t\tpairs.add(cityTwo);\r\n\t\t\t\r\n\t\t\tpairsOfCities.addAll(pairs);\r\n\t\t}\r\n\t\t\r\n\t\treturn pairsOfCities;\r\n\t}", "public static City buildMapFromNewYork(){\n City bangorME = new City(\"Bangor, ME\");\n \n City portlandME = new City(\"Portland, ME\");\n connect(portlandME, bangorME, 118);\n \n City portsmouthNH = new City(\"Portsmouth, NH\");\n connect(portsmouthNH, portlandME, 55);\n \n City burlingtonVT = new City(\"Burlington, VT\");\n connect(burlingtonVT, portsmouthNH, 190);\n connect(burlingtonVT, portlandME, 259);\n \n City bostonMA = new City(\"Boston, MA\");\n connect(bostonMA, portsmouthNH, 60);\n \n City providenceRI = new City(\"Providence, RI\");\n connect(providenceRI, bostonMA, 53);\n \n City worcesterMA = new City(\"Worcester, MA\");\n connect(worcesterMA, bostonMA, 49);\n connect(worcesterMA, portsmouthNH, 83);\n connect(worcesterMA, providenceRI, 44);\n \n City albanyNY = new City(\"Albany, NY\");\n connect(albanyNY, burlingtonVT, 177);\n connect(albanyNY, worcesterMA, 128);\n \n City newHavenCT = new City(\"New Haven, CT\");\n connect(newHavenCT, worcesterMA, 97);\n connect(newHavenCT, providenceRI, 100);\n \n City newYorkNY = new City(\"New York, NY\");\n connect(newYorkNY, newHavenCT, 79);\n connect(newYorkNY, albanyNY, 141);\n \n City buffaloNY = new City(\"Buffalo, NY\");\n connect(buffaloNY, albanyNY, 266);\n \n City philadelphiaPA = new City(\"Philadelphia, PA\");\n connect(philadelphiaPA, newYorkNY, 98);\n \n City washingtonDC = new City(\"Washington, DC\");\n connect(washingtonDC, philadelphiaPA, 145);\n \n City pittsburghPA = new City(\"Pittsburgh, PA\");\n connect(pittsburghPA, washingtonDC, 240);\n connect(pittsburghPA, philadelphiaPA, 288);\n connect(pittsburghPA, buffaloNY, 200);\n \n City clevelandOH = new City(\"Cleveland, OH\");\n connect(clevelandOH, pittsburghPA, 133);\n connect(clevelandOH, buffaloNY, 183);\n \n City richmondVA = new City(\"Richmond, VA\");\n connect(richmondVA, washingtonDC, 105);\n \n City charlestonWV = new City(\"Charleston, WV\");\n connect(charlestonWV, pittsburghPA, 213);\n connect(charlestonWV, washingtonDC, 343);\n connect(charlestonWV, richmondVA, 297);\n \n City charlotteNC = new City(\"Charlotte, NC\");\n connect(charlotteNC, richmondVA, 260);\n connect(charlotteNC, charlestonWV, 254);\n \n City atlantaGA = new City(\"Atlanta, GA\");\n connect(atlantaGA, charlotteNC, 229);\n \n City jacksonvilleFL = new City(\"Jacksonville, FL\");\n connect(jacksonvilleFL, atlantaGA, 300);\n connect(jacksonvilleFL, charlotteNC, 337);\n \n City miamiFL = new City(\"Miami, FL\");\n connect(miamiFL, jacksonvilleFL, 308);\n \n City tampaFL = new City(\"Tampa, FL\");\n connect(tampaFL, miamiFL, 251);\n connect(tampaFL, jacksonvilleFL, 187);\n \n City newOrleansLA = new City(\"New Orleans, LA\");\n connect(newOrleansLA, jacksonvilleFL, 473);\n connect(newOrleansLA, tampaFL, 563);\n connect(newOrleansLA, atlantaGA, 410);\n \n City nashvilleTN = new City(\"Nashville, TN\");\n connect(nashvilleTN, charlotteNC, 390);\n connect(nashvilleTN, atlantaGA, 226);\n connect(nashvilleTN, charlestonWV, 350);\n \n City memphisTN = new City(\"Memphis, TN\");\n connect(memphisTN, nashvilleTN, 191);\n connect(memphisTN, newOrleansLA, 347);\n connect(memphisTN, atlantaGA, 346);\n \n City detroitMI = new City(\"Detroit, MI\");\n connect(detroitMI, clevelandOH, 164);\n \n City indianapolisIN = new City(\"Indianapolis, IN\");\n connect(indianapolisIN, nashvilleTN, 264);\n connect(indianapolisIN, pittsburghPA, 339);\n connect(indianapolisIN, clevelandOH, 294);\n connect(indianapolisIN, detroitMI, 265);\n connect(indianapolisIN, charlestonWV, 299);\n \n City chicagoIL = new City(\"Chicago, IL\");\n connect(chicagoIL, detroitMI, 265);\n connect(chicagoIL, indianapolisIN, 177);\n \n City milwaukeeWI = new City(\"Milwaukee, WI\");\n connect(milwaukeeWI, chicagoIL, 89);\n \n City minneapolisMN = new City(\"Minneapolis, MN\");\n connect(minneapolisMN, milwaukeeWI, 300);\n \n City fargoND = new City(\"Fargo, ND\");\n connect(fargoND, minneapolisMN, 213);\n \n City siouxFallsSD = new City(\"Sioux Falls, SD\");\n connect(siouxFallsSD, fargoND, 214);\n connect(siouxFallsSD, minneapolisMN, 230);\n connect(siouxFallsSD, milwaukeeWI, 443);\n \n City omahaNE = new City(\"Omaha, NE\");\n connect(omahaNE, siouxFallsSD, 164);\n \n City desMoinesIA = new City(\"Des Moines, IA\");\n connect(desMoinesIA, omahaNE, 124);\n connect(desMoinesIA, chicagoIL, 306);\n connect(desMoinesIA, minneapolisMN, 221);\n \n City stLouisMO = new City(\"St. Louis, MO\");\n connect(stLouisMO, chicagoIL, 286);\n connect(stLouisMO, indianapolisIN, 235);\n connect(stLouisMO, nashvilleTN, 281);\n connect(stLouisMO, memphisTN, 256);\n \n City kansasCityMO = new City(\"Kansas City, MO\");\n connect(kansasCityMO, omahaNE, 168);\n connect(kansasCityMO, desMoinesIA, 176);\n connect(kansasCityMO, stLouisMO, 226);\n \n City oklahomaCityOK = new City(\"Oklahoma City, OK\");\n connect(oklahomaCityOK, kansasCityMO, 312);\n connect(oklahomaCityOK, stLouisMO, 449);\n connect(oklahomaCityOK, memphisTN, 416);\n \n City dallasTX = new City(\"Dallas, TX\");\n connect(dallasTX, oklahomaCityOK, 189);\n connect(dallasTX, memphisTN, 408);\n connect(dallasTX, newOrleansLA, 455);\n \n City houstonTX = new City(\"Houston, TX\");\n connect(houstonTX, dallasTX, 214);\n connect(houstonTX, newOrleansLA, 313);\n \n City sanAntonioTX = new City(\"San Antonio, TX\");\n connect(sanAntonioTX, dallasTX, 246);\n connect(sanAntonioTX, houstonTX, 182);\n \n City elPasoTX = new City(\"El Paso, TX\");\n connect(elPasoTX, dallasTX, 552);\n connect(elPasoTX, sanAntonioTX, 473);\n \n City albuquerqueNM = new City(\"Albuquerque, NM\");\n connect(albuquerqueNM, elPasoTX, 234);\n connect(albuquerqueNM, oklahomaCityOK, 482);\n \n City denverCO = new City(\"Denver, CO\");\n connect(denverCO, albuquerqueNM, 392);\n connect(denverCO, kansasCityMO, 528);\n connect(denverCO, omahaNE, 466);\n \n City billingsMT = new City(\"Billings, MT\");\n connect(billingsMT, denverCO, 485);\n connect(billingsMT, siouxFallsSD, 597);\n connect(billingsMT, fargoND, 529);\n \n City butteMT = new City(\"Butte, MT\");\n connect(butteMT, billingsMT, 211);\n \n City saltLakeCityUT = new City(\"Salt Lake City, UT\");\n connect(saltLakeCityUT, butteMT, 366);\n connect(saltLakeCityUT, denverCO, 480);\n \n City phoenixAZ = new City(\"Phoenix, AZ\");\n connect(phoenixAZ, elPasoTX, 379);\n connect(phoenixAZ, albuquerqueNM, 397);\n \n City lasVegasNV = new City(\"Las Vegas, NV\");\n connect(lasVegasNV, saltLakeCityUT, 369);\n connect(lasVegasNV, albuquerqueNM, 514);\n connect(lasVegasNV, phoenixAZ, 294);\n \n City losAngelesCA = new City(\"Los Angeles, CA\");\n connect(losAngelesCA, lasVegasNV, 263);\n connect(losAngelesCA, phoenixAZ, 350);\n \n City sanDiegoCA = new City(\"San Diego, CA\");\n connect(sanDiegoCA, losAngelesCA, 116);\n connect(sanDiegoCA, phoenixAZ, 335);\n connect(sanDiegoCA, lasVegasNV, 311);\n \n City montereyCA = new City(\"Monterey, CA\");\n connect(montereyCA, losAngelesCA, 319);\n \n City sanFranciscoCA = new City(\"San Francisco, CA\");\n connect(sanFranciscoCA, montereyCA, 114);\n connect(sanFranciscoCA, losAngelesCA, 358);\n \n City sacramentoCA = new City(\"Sacramento, CA\");\n connect(sacramentoCA, sanFranciscoCA, 84);\n connect(sacramentoCA, saltLakeCityUT, 585);\n \n City boiseID = new City(\"Boise, ID\");\n connect(boiseID, butteMT, 393);\n connect(boiseID, saltLakeCityUT, 301);\n \n City portlandOR = new City(\"Portland, OR\");\n connect(portlandOR, sacramentoCA, 538);\n connect(portlandOR, boiseID, 407);\n \n City seattleWA = new City(\"Seattle, WA\");\n connect(seattleWA, portlandOR, 175);\n connect(seattleWA, butteMT, 544);\n connect(seattleWA, boiseID, 472);\n \n //change this return city to start wherever you want\n return newYorkNY;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string apkVersName = 16;
public java.lang.String getApkVersName() { java.lang.Object ref = apkVersName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { apkVersName_ = s; } return s; } }
[ "java.lang.String getApkVersName();", "int getApkVers();", "public java.lang.String getApkVersName() {\r\n java.lang.Object ref = apkVersName_;\r\n if (!(ref instanceof java.lang.String)) {\r\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\r\n .toStringUtf8();\r\n apkVersName_ = s;\r\n return s;\r\n } else {\r\n return (java.lang.String) ref;\r\n }\r\n }", "public int getApkVers() {\r\n return apkVers_;\r\n }", "java.lang.String getAppVersion();", "int getAppver();", "public com.google.protobuf.ByteString\r\n getApkVersNameBytes() {\r\n java.lang.Object ref = apkVersName_;\r\n if (ref instanceof String) {\r\n com.google.protobuf.ByteString b = \r\n com.google.protobuf.ByteString.copyFromUtf8(\r\n (java.lang.String) ref);\r\n apkVersName_ = b;\r\n return b;\r\n } else {\r\n return (com.google.protobuf.ByteString) ref;\r\n }\r\n }", "String checkAppVersion();", "java.lang.String getAndroidversion();", "public int getApkVers() {\r\n return apkVers_;\r\n }", "int getAppVersionCode();", "private static String loadVersionString()\n {\n return \"1.0b9\";\n\n /*Package pkg = Package.getPackage(\"de.hunsicker.jalopy\");\n\n\n if (pkg == null)\n {\n throw new RuntimeException(\n \"could not find package de.hunsicker.jalopy\");\n }\n\n String version = pkg.getImplementationVersion();\n\n if (version == null)\n {\n throw new RuntimeException(\n \"no implementation version string found in package manifest\");\n }\n\n return version;*/\n }", "public String getAdapterBuildVersion();", "java.lang.String getVerName();", "java.lang.String getApplicationVersion();", "int getVer();", "String getVersion( String version );", "java.lang.String getProductVersion();", "public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create a JTS Polygon from GisFeature
private static Polygon createPolygon(GisFeature feature) { GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory(); List<GISCoordinate> featureCoordinates = feature.getCoordinates(); Coordinate[] coordinates = new Coordinate[featureCoordinates.size()]; int i = 0; for(GISCoordinate featureCoordinate:featureCoordinates) { coordinates[i] = new Coordinate(featureCoordinate.getX(), featureCoordinate.getY()); i++; } Polygon polygon = geometryFactory.createPolygon(coordinates); return polygon; }
[ "public static Geometry ST_Polygonize(Geometry geometry) {\n Polygonizer polygonizer = new Polygonizer(true);\n polygonizer.add(geometry);\n return polygonizer.getGeometry();\n }", "public static com.vividsolutions.jts.geom.Polygon toJTS(final EnvelopeType gmlEnvelope)\n throws NoSuchAuthorityCodeException, FactoryException {\n final String crsName = gmlEnvelope.getSrsName();\n if (crsName == null) {\n throw new IllegalArgumentException(\"An operator BBOX must specified a CRS (coordinate Reference system) for the envelope.\");\n }\n\n final List<Double> lmin = gmlEnvelope.getLowerCorner().getValue();\n final double[] min = new double[lmin.size()];\n for (int i = 0; i < min.length; i++) {\n min[i] = lmin.get(i);\n }\n\n final List<Double> lmax = gmlEnvelope.getUpperCorner().getValue();\n final double[] max = new double[lmax.size()];\n for (int i = 0; i < min.length; i++) {\n max[i] = lmax.get(i);\n }\n\n final LinearRing ring = GF.createLinearRing(new Coordinate[]{\n new Coordinate(min[0], min[1]),\n new Coordinate(min[0], max[1]),\n new Coordinate(max[0], max[1]),\n new Coordinate(max[0], min[1]),\n new Coordinate(min[0], min[1])\n });\n final com.vividsolutions.jts.geom.Polygon polygon = GF.createPolygon(ring, new LinearRing[0]);\n final CoordinateReferenceSystem crs = CRS.decode(crsName, true);\n final int srid = SRIDGenerator.toSRID(crs, Version.V1);\n polygon.setSRID(srid);\n\n return polygon;\n }", "Polygon createPolygon();", "public static List<SimpleFeature> createPolygontFeatures() throws SchemaException,\n IllegalAttributeException {\n \tSimpleFeatureType polygonsType = createType(FTYPE_POLYGONS);\n\n GeometryFactory gfac = new GeometryFactory();\n\n List<SimpleFeature> features = new ArrayList<SimpleFeature>();\n\n int featureCount = 0;\n for( double westBoundLong = -180; westBoundLong < 180; westBoundLong += 30 ) {\n for( double southBoundLat = -90; southBoundLat < 90; southBoundLat += 30 ) {\n Coordinate[] coords = new Coordinate[5];\n coords[0] = new Coordinate(westBoundLong, southBoundLat);\n coords[1] = new Coordinate(westBoundLong, southBoundLat + 30);\n coords[2] = new Coordinate(westBoundLong + 30, southBoundLat + 30);\n coords[3] = new Coordinate(westBoundLong + 30, southBoundLat);\n coords[4] = new Coordinate(westBoundLong, southBoundLat);\n\n LinearRing shell = gfac.createLinearRing(coords);\n Polygon polygon = gfac.createPolygon(shell, null);\n featureCount++;\n SimpleFeature feature = feature(polygonsType, polygon, featureCount);\n features.add(feature);\n }\n }\n\n return features;\n }", "IPolygon createPolygon(IPoint point, IPoint point2);", "com.ndk.echart.Echart.EChart_GeoPolygon getPolygon();", "private List<SimpleFeature> createFeatureExample_9(final int angle, final double x, final double y) throws Exception{\n \n\n List<SimpleFeature> featureList = new ArrayList<SimpleFeature>(4);\n\n final String wkt1 = \"POLYGON ((-77.14285714285712 52.19999999999999, -50.91428571428568 51.685714285714276, -50.91428571428568 25.97142857142856, -25.19999999999999 25.457142857142856, -25.19999999999999 51.171428571428564, 52.457142857142884 51.171428571428564, 51.94285714285718 25.97142857142856, 77.65714285714287 25.457142857142856, 77.1428571428572 51.171428571428564, 102.85714285714292 51.171428571428564, 103.3714285714286 -77.39999999999999, -76.6285714285714 -77.91428571428573, -77.14285714285712 52.19999999999999), (-49.88571428571427 -39.34285714285714, -49.88571428571427 -64.54285714285713, -25.19999999999999 -64.54285714285713, -25.19999999999999 -38.828571428571436, -34.97142857142856 -38.828571428571436, -49.88571428571427 -39.34285714285714), (51.94285714285718 -39.34285714285714, 51.94285714285718 -65.57142857142857, 77.65714285714287 -64.54285714285713, 77.1428571428572 -38.3142857142857, 51.94285714285718 -39.34285714285714))\"; //$NON-NLS-1$\n featureList.add(createFeature(rotatePolygon(wkt1,angle, x, y)));\n \n final String wkt2 = \"POLYGON ((-50.91428571428568 25.97142857142856, -50.91428571428568 51.685714285714276, -50.91428571428568 76.88571428571427, 77.65714285714287 76.88571428571427, 77.65714285714287 51.171428571428564, 77.1428571428572 51.171428571428564, 77.65714285714287 25.457142857142856, 51.94285714285718 25.97142857142856, 52.457142857142884 51.171428571428564, -25.19999999999999 51.171428571428564, -25.19999999999999 25.86857142857142, -50.91428571428568 25.97142857142856)))POLYGON ((-50.91428571428568 25.97142857142856, -50.91428571428568 51.685714285714276, -50.91428571428568 76.88571428571427, 77.65714285714287 76.88571428571427, 77.65714285714287 51.171428571428564, 77.1428571428572 51.171428571428564, 77.65714285714287 25.457142857142856, 51.94285714285718 25.97142857142856, 52.457142857142884 51.171428571428564, -25.19999999999999 51.171428571428564, -25.19999999999999 25.86857142857142, -50.91428571428568 25.97142857142856)))\"; //$NON-NLS-1$\n featureList.add(createFeature(rotatePolygon(wkt2,angle, x, y)));\n\n final String wkt3 =\"POLYGON ((77.65714285714287 -64.54285714285713, 51.94285714285718 -65.57142857142857, 51.94285714285718 -39.34285714285714, 77.1428571428572 -38.3142857142857, 77.65714285714287 -64.54285714285713))\"; //$NON-NLS-1$\n featureList.add(createFeature(rotatePolygon(wkt3,angle, x, y)));\n \n final String wkt4 = \"POLYGON ((-49.88571428571427 -64.54285714285713, -49.88571428571427 -39.34285714285714, -25.19999999999999 -38.828571428571436, -25.19999999999999 -64.54285714285713, -49.88571428571427 -64.54285714285713))\"; //$NON-NLS-1$\n featureList.add(createFeature(rotatePolygon(wkt4, angle, x, y)));\n \n return featureList; \n }", "private String jta_polygon(String s) {\n\t\ts = s.trim();\n\t\ts = s.replace(\"POLYGON((\", \"\");\n\t\ts = s.replace(\"))\", \"\");\n\t\ts = s.replaceAll(\",\", \"@\");\n\t\ts = s.replaceAll(\" \", \",\");\n\t\treturn s;\n\t}", "protocol.Message.Fence.Shape.Polygon getPolygon();", "private void createWaterbodyPolygonVector(File file) {\r\n\t\tif (file == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//use 8 for hydrography layer, 7 for dsm2 layer.\r\n\t\tint featureNameIndex = 8;\r\n\r\n\t\tFileDataStore store = null;\r\n\t\ttry {\r\n\t\t\tstore = FileDataStoreFinder.getDataStore(file);\r\n\t\t\tSimpleFeatureSource featureSource = store.getFeatureSource();\r\n\r\n\t\t\t// Create a map content and add our shapefile to it\r\n\t\t\tMapContent map = new MapContent();\r\n\t\t\tmap.setTitle(\"Quickstart\");\r\n\r\n\t\t\tStyle style = SLD.createSimpleStyle(featureSource.getSchema());\r\n\t\t\tLayer layer = new FeatureLayer(featureSource, style);\r\n\t\t\tFeatureSource layerFeatureSource = layer.getFeatureSource();\r\n\t\t\tFeatureCollection layerFeatureCollection = layerFeatureSource.getFeatures();\r\n\t\t\tFeatureIterator<SimpleFeatureImpl> layerFeatureIterator = layerFeatureCollection.features();\r\n\t\t\tint featureIndex = 0;\r\n\t\t\twhile(layerFeatureIterator.hasNext()) {\r\n\t\t\t\tSimpleFeatureImpl simpleFeatureImpl = layerFeatureIterator.next();\r\n\t\t\t\t//\t \tFeatureId id = simpleFeatureImpl.getIdentifier();\r\n\t\t\t\t//\t \tFeatureType ft = simpleFeatureImpl.getType();\r\n\t\t\t\t_polygonShapefileFeatureType = simpleFeatureImpl.getType();\r\n\t\t\t\t//\t \tSystem.out.println(\"feature id, type=\"+id+\",\"+ft);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif(simpleFeatureImpl.getAttribute(0) instanceof Polygon) {\r\n\t\t\t\t\t\tSystem.out.println(\"It's a polygon, not a multipolygon.\");\r\n\t\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tMultiPolygon multiPolygon = (MultiPolygon) simpleFeatureImpl.getAttribute(0);\r\n\t\t\t\t\tString featureName = (String) simpleFeatureImpl.getAttribute(featureNameIndex);\r\n\t\t\t\t\tfeatureName+=\"_\"+featureIndex;\r\n\t\t\t\t\tSystem.out.println(\"FeatureName = \"+featureName);\r\n\t\t\t\t\tlong objectID = (long) simpleFeatureImpl.getAttribute(1);\r\n\t\t\t\t\t//add each polygon in the multipolygon, one at a time (break the MultiPolygon into Polygon objects)\r\n\t\t\t\t\tint numPolygons = multiPolygon.getNumGeometries();\r\n\t\t\t\t\t//\t \t\tif(numPolygons>1) {\r\n\t\t\t\t\t//\t \t\t\tSystem.out.println(\"polygon \" + objectID + \":\" + featureName + \" has \" + numPolygons + \"polygons\");\r\n\t\t\t\t\t//\t \t\t}\r\n\t\t\t\t\tfor(int i=0; i<numPolygons; i++) {\r\n\t\t\t\t\t\tPolygon polygon = (Polygon) multiPolygon.getGeometryN(i);\r\n\t\t\t\t\t\t_allWaterbodyPolygonNames.addElement(featureName);\r\n\t\t\t\t\t\t_allWaterbodyPolygons.addElement(polygon);\r\n\t\t\t\t\t\t_allWaterbodyPolygonObjectIDs.addElement(objectID);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(ClassCastException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"createWaterbodyPolygonVector: Class cast exception caught:\" + e1.toString());\r\n\t\t\t\t\tSystem.out.println(\"Exiting\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tfeatureIndex++;\r\n\t\t\t}\r\n\t\t\t//\t System.out.println(\"num polygons found:\"+_allWaterbodyPolygons.size());\r\n\t\t}catch(IOException e) {\r\n\t\t\tSystem.out.println(\"IOException caught!!!\");\r\n\t\t}finally {\r\n\t\t\tstore.dispose();\r\n\t\t}\r\n\t\t//\r\n\t\t// System.out.println(\"added \"+_allWaterbodyPolygonNames.size()+\" values to vectors\");\r\n\t\t// System.exit(0);\r\n\t}", "private static GisFeature createGisFeature(Geometry finalPoint, String gisGeometryType, Properties properties) {\n String source = \"MERGE\";\n String destination = \"MERGE\";\n String timestamp = \"MERGE\";\n String createLat = \"MERGE\";\n String createLon = \"MERGE\";\n String geometryType = gisGeometryType;\n\n Coordinate[] coordinates = finalPoint.getCoordinates();\n List<GISCoordinate> gisCoordinates = new ArrayList<GISCoordinate>();\n for(Coordinate coordinate:coordinates) {\n gisCoordinates.add(new GISCoordinate(coordinate.x, coordinate.y, \"EPSG:4326\"));\n }\n\n return new GisFeature(source, timestamp, destination, createLat, createLon,\n geometryType, gisCoordinates, properties);\n }", "public PolygonParser(GeometryFactory geometryFactory)\n {\n super(geometryFactory);\n }", "org.isotc211.x2005.gss.GMObjectPropertyType insertNewPolygon(int i);", "void appendPolygon(Polygon polygon);", "public Polygon getTestPolygon() {\n WKTReader reader = new WKTReader();\n try {\n Polygon polygon = (Polygon) reader.read(TEST_POLYGON_WKT);\n polygon.setSRID(getTestSrid());\n return polygon;\n } catch (ParseException e) {\n throw new RuntimeException(e);\n }\n }", "protocol.Message.Fence.Shape.PolygonOrBuilder getPolygonOrBuilder();", "public Polygon getPolygon(){\n\t\treturn myPolygon;\n\t}", "public DynamicPolygonStyle2D(SimpleFeature f, PolygonSymbolizer sym) {\r\n feature = f;\r\n ps = sym;\r\n }", "public Polygon CreatePolygon(double[] sides) throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers an event to the registry Note: To register more than one event to a value use the name of the value and append a '.' and a name for the event. This name must be unique for the value.
public void register(String key, Event event) { KeyItem k = index.getKey(key); if(k==null){ index.addKey(key); k = index.getKey(key); } registry.put(k, event); }
[ "public void Add_event_value(String v)\n {\n\n event_value = new String(v);\t\n }", "void register(String name, K key, V value);", "public void setEventName(String value) {\n setAttributeInternal(EVENTNAME, value);\n }", "public void setEventName(String name);", "private void registerEvent(Event e) {\n\t\teventsQueue.add(e);\n\t}", "public boolean registerEvent(final Node node, final EventType eventType, final String value) {\n\t\tfinal var lastEvent = repository.findFirstByNodeAndTypeOrderByIdDesc(node, eventType);\n\n\t\t// Register event if it is a discovered node, or a status change\n\t\tif (lastEvent == null || !value.equals(lastEvent.getValue())) {\n\t\t\tfinal var newEvent = new Event();\n\t\t\tnewEvent.setNode(node);\n\t\t\tsaveEvent(newEvent, eventType, value);\n\t\t\treturn true;\n\t\t}\n\n\t\t// No change, no persisted event\n\t\treturn false;\n\t}", "public boolean registerEvent(final Subscription subscription, final EventType eventType, final String value) {\n\t\tfinal var lastEvent = repository.findFirstBySubscriptionAndTypeOrderByIdDesc(subscription, eventType);\n\t\tif (lastEvent == null || !value.equals(lastEvent.getValue())) {\n\t\t\tfinal var newEvent = new Event();\n\t\t\tnewEvent.setSubscription(subscription);\n\t\t\tsaveEvent(newEvent, eventType, value);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "ISarlEventBuilder addSarlEvent(String name);", "void setEventFieldValue(String val);", "public void register(VirtualNode value, String... args);", "protected abstract void regEvent(boolean regEvent);", "public static void putEvent(String key, Class<?> value) {\n eventMap.put(key, value);\n }", "public void addToEvents(final SessionContext ctx, final SapEvent value)\n\t{\n\t\tEVENTSHANDLER.addValue( ctx, this, value );\n\t}", "void addEventId(UniqueIdentifier uid);", "public static void registerEvent(Object object, String dataMemberName, String eventName) {\n List<EventHandlerClosure> closures = registry.get(eventName);\n if (closures == null) {\n closures = new ArrayList<EventHandlerClosure>();\n registry.put(eventName, closures);\n }\n\n closures.add(new EventHandlerClosure(object, dataMemberName, eventName));\n }", "public static void registerEventHandler(Object event) {\n MinecraftForge.EVENT_BUS.register(event);\n }", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "public void registerStateSpecificEventHandler(Model model, String event, EventInitializer value, String stateName)\n {\n statesModel.registerStateSpecificEventHandler(model, event, value, stateName);\n }", "private void register(Path dir) throws IOException {\n \t// There is also another event constants ENTRY_MODIFY, ENTRY_DELETE\n WatchKey key = dir.register(watcher, ENTRY_CREATE);\n keys.put(key, dir);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new SummarySymmetryGroup with the params from the profile symmetry group and the new estimated value/stddev from value.
public static SummarySymmetryGroup create(ProfileSymmetryGroup psg, EmpiricalValue value) { return new SummarySymmetryGroup(psg.getCount(), psg.getRole(), psg.getID(), psg.getStrategy(), value.getValue(), value.getStandardDeviation()); }
[ "public static SummarySymmetryGroup create(ProfileSymmetryGroup psg, ObservationSymmetryGroup osg) {\n\t\tif (psg.getID() == osg.getID())\n\t\t\treturn new SummarySymmetryGroup(psg.getCount(), psg.getRole(), psg.getID(), \n\t\t\t\t\tpsg.getStrategy(), osg.getPayoff(), osg.getPayoffSD());\n\t\treturn null;\n\t}", "public void StandardDeviationPair(){\r\n\t\tAveragePair();\r\n\t\tif (count<=1|| Total<=0){\r\n\t\t\tSystem.out.println(\"The Standard Deviation of x and y is \"+0.0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tStandardDeviation=(float)Math.sqrt((Total2-Total*Total/count)/(count-1));\r\n\t\t\tStandardDeviationY=(float)Math.sqrt((TotalY2-TotalY*TotalY/count)/(count-1));\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void testStdDev() {\n\t\tStats stats;\n\n\t\tString descr = \"Incorrect stdDev!\";\n\t\t/* We'll only focus on count > 0\n\t\t * because count <= 0 gets tested in testNegativeCount\n\t\t * And we'll only focus on values seen > 0\n\t\t * because values seen <= 0 gets tested in testNegativeCount\n\t\t */\n\n\t\t// test count <= 1 and values seen = 1\n\t\tstats = getStats();\n\t\tstats.add(1.0, 1.0);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\tstats = getStats();\n\t\tstats.add(2.0, 0.5);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\tstats = getStats();\n\t\tstats.add(-10.0, 0.10986);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// first add then subtract\n\t\tstats = getStats();\n\t\taddWeightedStats(stats, 1.0, 1.0, 2.0, 2.0, 3.0, 1.0);\n\t\tsubtractWeightedStats(stats, 1.0, 1.0, 2.0, 2.0);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// first subtract then add\n\t\tstats = getStats();\n\t\tsubtractWeightedStats(stats, 1.0, 1.0, 2.0, 2.0);\n\t\taddWeightedStats(stats, 1.0, 1.0, 2.0, 2.0, 3.0, 1.0);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// test count <= 1 and values seen > 1\n\t\tstats = getStats();\n\t\taddWeightedStats(stats, 1.0, 0.1, 2.0, 0.2, 3.0, 0.3);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\tstats = getStats();\n\t\taddWeightedStats(stats, 1.0, 0.2, 2.0, 0.2, 3.0, 0.4);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// first add then subtract\n\t\tstats = getStats();\n\t\taddWeightedStats(stats, 1.0, 0.4, 2.0, 0.2, 3.0, 0.3, 4.0, 0.2);\n\t\tsubtractWeightedStats(stats, 2.0, 0.2, 4.0, 0.2);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// first subtract then add\n\t\tstats = getStats();\n\t\tsubtractWeightedStats(stats, 2.0, 0.2, 4.0, 0.2);\n\t\taddWeightedStats(stats, 1.0, 0.4, 2.0, 0.2, 3.0, 0.3, 4.0, 0.2);\n\t\tstats.calculateDerived();\n\t\tassertNaN(descr, stats.stdDev);\n\n\t\t// test count > 1 and values seen > 1\n\t\t// We won't test this case as it's tested in other testcases\n\n\t}", "void profileGroup( Group group, Profiler profiler );", "private void updateSummaryValues(SummaryValues sumValue) throws NbaDataAccessException {\n setSumValuesKeys(sumValue); //SPR2741\n copyPreviousSummaryValues(sumValue);\n nbaAcdb.updateSummaryValues(sumValue);\n }", "@Test\n public void testPaymentStandardDeviation() {\n\n List<Transaction> tempList = new ArrayList<>();\n Category category = new Category(\"Software Development\");\n Task task1 = new Task(\"4\", \"Mobile Application Development\", 60.0, 50.0, category);\n Task task2 = new Task(\"5\", \"Mobile Application Development\", 60.0, 50.0, category);\n Currency currency = new Currency(1.0);\n Payment payment = new Payment(1, 1, 3000.0, currency);\n Transaction transaction1 = new Transaction(104, payment, task1);\n Transaction transaction2 = new Transaction(104, payment, task2);\n tempList.add(transaction1);\n tempList.add(transaction2);\n\n System.out.println(\"paymentStandardDeviation\");\n Statistics instance = new Statistics();\n double expResult = 0.0;\n double result = instance.paymentStandardDeviation(tempList);\n assertEquals(expResult, result, 0.05);\n }", "@Secured({ \"GROUP_AGENT\" })\n Collection<ExpressionExperimentDetailsValueObject> generateSummaryObjects();", "@Test\n public void testProfileWithGroupBy() throws Exception {\n\n // setup\n setup(profileWithGroupBy);\n ProfileBuilderBolt bolt = createBolt();\n bolt.execute(tuple);\n bolt.execute(tuple);\n\n // execute - the tick tuple triggers a flush of the profile\n bolt.execute(mockTickTuple());\n\n // capture the ProfileMeasurement that should be emitted\n ArgumentCaptor<Values> arg = ArgumentCaptor.forClass(Values.class);\n verify(outputCollector, times(1)).emit(arg.capture());\n\n Values actual = arg.getValue();\n ProfileMeasurement measurement = (ProfileMeasurement) actual.get(0);\n\n // verify the groups\n assertThat(measurement.getGroups().size(), equalTo(2));\n assertThat(measurement.getGroups().get(0), equalTo(4.0));\n assertThat(measurement.getGroups().get(1), equalTo(8.0));\n }", "public void setSummary(java.lang.String value) {\n this.summary = value;\n }", "List<SinkBriefInfo> selectSummary(@Param(\"groupId\") String groupId,\n @Param(\"streamId\") String streamId);", "public abstract void setStdDeviation(double s);", "@DISPID(18)\n\t// = 0x12. The runtime will prefer the VTID if present\n\t@VTID(29)\n\t@ReturnValue(type = NativeType.Dispatch)\n\tcom4j.Com4jObject buildSummaryGraph(\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String xAxisField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String groupByField,\n\t\t\t@Optional @DefaultValue(\"\") java.lang.String sumOfField,\n\t\t\t@Optional @DefaultValue(\"0\") int maxCols,\n\t\t\t@Optional @MarshalAs(NativeType.VARIANT) java.lang.Object filter,\n\t\t\t@Optional @DefaultValue(\"0\") boolean forceRefresh,\n\t\t\t@Optional @DefaultValue(\"0\") boolean showFullPath);", "public void setTransactionSummary(TransactionSummaryType value) {\n this.transactionSummary = value;\n }", "public void setStdDev(double stdDev) {\n this.stdDev = stdDev;\n }", "public void SetStandardDev(double standard_dev);", "public PolicyGroupSummary() {\n }", "private MetricStats createMetricStats() {\n\t\tMetricStats stats = new MetricStats();\n\t\tstats.setMaximum(new Double(maximum));\n\t\tstats.setMinimum(new Double(minimum));\n\t\tstats.setSum(new Double(sum));\n\t\tstats.setCount(new Double(count));\n\t\treturn stats;\n\t}", "public static <V extends Object> StreamParameter<V, StreamAccessParams<V, StreamData>, StreamData> newSP(\n Application app, Direction direction, StdIOStream stream, String prefix, String name, V value, int hashCode,\n ParameterMonitor monitor) {\n StreamAccessParams<V, StreamData> sap;\n sap = StreamAccessParams.constructStreamAP(app, direction, value, hashCode);\n return new StreamParameter(sap, DataType.STREAM_T, direction, stream, prefix, name, monitor);\n }", "public AssetGroupSummary()\n {\n super();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set project current page
void setProjectCurrentPage(int position);
[ "int getProjectCurrentPage();", "public void setCurrentProject(Finalproject currentProject) {\n this.currentProject = currentProject;\n }", "void setCurrentPage(int index);", "Project getCurrentProject();", "synchronized void setCurrentProject(AbstractProject project) {\n this.currentProject = project;\n }", "public void UpdateCurrentPage() {\n Page currentPage = new Page(this.driver.getCurrentUrl(), this.driver.getTitle(), this.driver.getWindowHandle());\n \n if (!currentPage.equals(this.focusedPage)) {\n this.webPages.remove(this.focusedPage);\n this.focusedPage = currentPage;\n this.webPages.add(this.focusedPage);\n } else {\n System.out.println(\"Current page is up-to-date\");\n }\n }", "public void setCurrentPage(Integer currentPage) {\r\n\t\tthis.currentPage = currentPage;\r\n\t}", "void setCurrentPageIndex(\n int index);", "public int getCurrentPage();", "public void setCurrentPage(int currentPage) {\n\t\tthis.currentPage = currentPage;\n\t}", "private void changeActiveProject(Project p)\n\t{\n\t\tLog.d(LOGTAG,\"changeActiveProject called\");\n\t\tLoginSession.getInstance().setActiveProject(p);\n\t\tif(optionMenu != null)\n\t\t{\n\t\t\trefreshMenuState(optionMenu);\n\t\t}\n\t\tthis.setTitle(\"Selected Project: \"+p.getName());\n\t}", "public void setPageFirst()\n {\n setActivePage(1);\n }", "int getCurrentPage();", "public CreateIterationPage selectProject(){\n projectNameInput.click();\n projectSelectOption.click();\n return this;\n }", "public Finalproject getCurrentProject() {\n return currentProject;\n }", "public ProjectsPage() {\n\t\tthis.driver = DriverManager.getDriver();\n\t\tElementFactory.initElements(driver, this);\n\t\t// sets the name of the project to add, with a random integer ending for slight\n\t\t// ease on multiple test runs\n\t\tnameOfProject = \"testz2018\" + (int) Math.random() * 500;\n\t}", "public void setPage(View view){\n //page is always the great grand parent\n linearLayoutBody = (LinearLayout) view.getParent().getParent().getParent();\n currentPage = (TemplatePage) linearLayoutBody.getTag();\n }", "public void setProjectcurrent(String projectcurrent) {\n this.projectcurrent = projectcurrent == null ? null : projectcurrent.trim();\n }", "public int getRealCurrentPage();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Merge left with right; fills left, frees right
private BPTreePage merge(BPTreePage left, BPTreePage right, int dividingSlot) { if ( logging(log) ) { log(log, ">> merge(@%d): %s", dividingSlot, this); log(log, ">> left: %s", left); log(log, ">> right: %s", right); } // /==\ + key + /==\ ==> /====\ Record splitKey = records.get(dividingSlot); BPTreePage page = left.merge(right, splitKey); // Must release right (not done in merge) if ( logging(log) ) log(log, "-- merge: %s", page); left.write(); left.release(); right.free(); if ( page == right ) BPT.error("Returned page is not the left"); if ( BPT.CheckingNode ) { if ( isLeaf ) { // If two data blocks, then the split key is not included // (it's already there, with its value). // Size is N+N and max could be odd so N+N and N+N+1 are // possible. if ( left.getCount() + 1 != left.getMaxSize() && left.getCount() != left.getMaxSize() ) BPT.error("Inconsistent data node size: %d/%d", left.getCount(), left.getMaxSize()); } else if ( !left.isFull() ) { // If not two data blocks, the left side should now be full // (N+N+split) BPT.error("Inconsistent node size: %d/%d", left.getCount(), left.getMaxSize()); } } // Remove from parent (which is "this") shuffleDown(dividingSlot); this.write(); internalCheckNodeDeep(); if ( logging(log) ) { log(log, "<< merge: %s", this); log(log, "<< left: %s", left); } return left; }
[ "private static BPTreeNode merge(BPTreeNode left, Record splitKey, BPTreeNode right) {\n\n left.records.add(splitKey);\n\n // Copy over right to top of left.\n right.records.copyToTop(left.records);\n right.ptrs.copyToTop(left.ptrs);\n\n // Update count\n left.count = left.count + right.count + 1;\n left.internalCheckNode();\n\n right.records.clear();\n right.ptrs.clear();\n return left;\n }", "BinaryTreeNode<Byte> merge(BinaryTreeNode<Byte> left, BinaryTreeNode<Byte> right){\n BinaryTreeNode<Byte> merged = new BinaryTreeNode<Byte>(null,left,right); //item in node is null, left and right children are set\n return merged;\n }", "void merge();", "protected void mergeAndDelete() {\n var rightAdjacent = parent.keys[parentIndex + 1];\n merge(rightAdjacent, parent.vals[parentIndex]);\n\n // delete right adjacent value and keys\n System.arraycopy(parent.vals, parentIndex + 1, parent.vals, parentIndex, parent.vals.length - parentIndex - 1);\n System.arraycopy(parent.keys, parentIndex + 2, parent.keys, parentIndex + 1, parent.keys.length - parentIndex - 2);\n\n parent.size--;\n for (int i = parentIndex + 1; i < parent.size + 1; i++) {\n parent.keys[i].parentIndex = i;\n }\n }", "private static void merge(ArrayList<Integer> leftList, ArrayList<Integer> rightList, ArrayList<Integer> outList) {\n\n int leftIndex = 0;\n int rightIndex = 0;\n int outIndex = 0;\n\n while (leftIndex < leftList.size() && rightIndex < rightList.size()) {\n\n if (leftList.get(leftIndex).compareTo(rightList.get(rightIndex)) <= 0) {\n outList.set(outIndex, leftList.get(leftIndex));\n leftIndex++;\n } else {\n outList.set(outIndex, rightList.get(rightIndex));\n rightIndex++;\n }\n\n outIndex++;\n\n }\n\n if (leftIndex < leftList.size()) {\n copyRemainder(leftList, leftIndex, outList, outIndex);\n } else {\n copyRemainder(rightList, rightIndex, outList, outIndex);\n }\n\n }", "private void mergeRoom(ArrayList<Room> left, ArrayList<Room> right, ArrayList<Room> whole) {\n int leftIndex = 0;\n int rightIndex = 0;\n int wholeIndex = 0;\n\n // As long as neither the left nor the right ArrayList has\n // been used up, keep taking the smaller of left.get(leftIndex)\n // or right.get(rightIndex) and adding it at both.get(bothIndex).\n while (leftIndex < left.size() && rightIndex < right.size()) {\n if ((left.get(leftIndex).getRoomNumber1().compareTo(right.get(rightIndex).getRoomNumber1())) < 0) {\n whole.set(wholeIndex, left.get(leftIndex));\n leftIndex++;\n } else {\n whole.set(wholeIndex, right.get(rightIndex));\n rightIndex++;\n }\n wholeIndex++;\n }\n\n ArrayList<Room> rest;\n int restIndex;\n if (leftIndex >= left.size()) {\n // The left ArrayList has been use up...\n rest = right;\n restIndex = rightIndex;\n } else {\n // The right ArrayList has been used up...\n rest = left;\n restIndex = leftIndex;\n }\n\n // Copy the rest of whichever ArrayList (left or right) was not used up.\n for (int i = restIndex; i < rest.size(); i++) {\n whole.set(wholeIndex, rest.get(i));\n wholeIndex++;\n }\n }", "private void merge() {\n\t\t// Purge the merging pairs from low cost until we see a pair that\n\t\t// should not be purged, which should be the pair to merge\n\t\tlazyCleanup();\n\t\tMergePair mergePair = _mergePairTreeMap.firstEntry().getValue().get(0);\n\t\t\n\t\t// Merging the pair to form a new sub-tree\n\t\tTreeNode subTreeRoot = new TreeNode(getNewId(), mergePair.getX(), \n\t\t\t\tmergePair.getY(), mergePair.getTotalCap(), mergePair.getLeft(), mergePair.getRight());\n\t\t\n\t\t// Remove merged nodes and create a new node\n\t\t_subTreeNodes.remove(mergePair.getLeft().getId());\n\t\t_subTreeNodes.remove(mergePair.getRight().getId());\n\t\t_subTreeNodes.put(subTreeRoot.getId(), subTreeRoot);\n\t\t\n\t\t// Update tree with new possible pairs\n\t\tupdateCostMap(subTreeRoot);\n\t\t\n\t}", "void merge(HeapStruct heap);", "private static <T extends Comparable<? super T>> Tree<T> merge(Tree<T> h1,\tTree<T> h2) {\r\n\t\tif (h1 == null)\r\n\t\t\treturn h2;\r\n\t\tif (h2 == null)\r\n\t\t\treturn h1;\r\n\r\n\t\t// force heap1 to have smaller root\r\n\t\tif (h2.elem.compareTo(h1.elem) < 0) {\r\n\t\t\t// swap heap1 and heap2\r\n\t\t\tTree<T> tmp = h1;\r\n\t\t\th1 = h2;\r\n\t\t\th2 = tmp;\r\n\t\t}\r\n\r\n\t\t// keep merging along right spine\r\n\t\th1.right = merge(h1.right, h2);\r\n\t\t\r\n\t\tint wL = weight(h1.left);\r\n\t\tint wR = weight(h1.right);\r\n\t\th1.weight = wL + wR + 1; // set new weight\r\n\r\n\t\t// put always heavier heap on left side\r\n\t\tif (wL < wR) {\r\n\t\t\tTree<T> aux = h1.left;\r\n\t\t\th1.left = h1.right;\r\n\t\t\th1.right = aux;\r\n\t\t}\r\n\r\n\t\treturn h1;\r\n\t}", "public void merge(List<Integer> a, List<Integer> l, List<Integer> r, int left, int right) \n {\n \n int i = 0, j = 0, k = 0;\n while (i < left && j < right) \n {\n if (l.get(i) < r.get(j)) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n else \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }\n \n while (i < left) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n while (j < right) \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }", "public void swap() {\r\n\t\tbyte[] templeft = new byte[right.length];\r\n\t\tSystem.arraycopy(right, 0, templeft, 0, right.length);\r\n\t\tSystem.arraycopy(left, 0, right, 0, left.length);\r\n\t\tSystem.arraycopy(templeft, 0, left, 0, left.length);\r\n\r\n\t}", "private Node merge(Node left, Node right) {\r\n Node temp = new Node(0);\r\n Node curNode = temp;\r\n while (left != null && right != null) {//First it will check for the lowest among 2 nodes.\r\n if (left.val < right.val) {\r\n if (left.val % 2 == 0 && right.val % 2 != 0) {//if the highest value is odd then it will get pushed towards left or else at right\r\n curNode.next = right;\r\n right = right.next;\r\n } else {\r\n curNode.next = left;\r\n left = left.next;\r\n }\r\n\r\n } else {\r\n if (right.val % 2 == 0 && left.val % 2 != 0) {//if the highest value is odd then it will get pushed towards left or else at right\r\n curNode.next = left;\r\n left = left.next;\r\n } else {\r\n curNode.next = right;\r\n right = right.next;\r\n }\r\n\r\n }\r\n curNode = curNode.next;\r\n }\r\n //Left over value to be added to the end of the result node. Any one of the below IF cond will get passed.\r\n if (left != null) {\r\n curNode.next = left;\r\n left = left.next;\r\n }\r\n if (right != null) {\r\n curNode.next = right;\r\n right = right.next;\r\n }\r\n return temp.next;\r\n }", "private void merge(ListNode l1, ListNode l2) {\n\t\twhile (l1 != null) {\n ListNode l1_next = l1.next;\n ListNode l2_next = l2.next;\n l1.next = l2;\n \n if (l1_next == null)\n break;\n l2.next = l1_next;\n \n l1 = l1_next;\n l2 = l2_next;\n }\n\t}", "public AbstractMergingResourceIterator(ResourceIterator<? extends E> left,\n ResourceIterator<? extends E> right) {\n\n this.left = left;\n this.right = right;\n }", "private BufferedImage combine(BufferedImage leftHalf, BufferedImage rightHalf) {\n\t\tint newWidth = leftHalf.getWidth() * 2;\n\t\tint newHeight = leftHalf.getHeight();\n\t\tBufferedImage combinedImage = new BufferedImage(newWidth, newHeight, leftHalf.getColorModel().getTransparency());\n\t\tGraphics2D g = combinedImage.createGraphics();\n\t\tg.drawImage(leftHalf,0,0,null); // draw the leftHalf onto the combined image, starting at point (0,0)\n\t\tg.drawImage(rightHalf,leftHalf.getWidth(),0,null); // add the rightHalf to the combined image\n\t\tg.dispose();\n\t\treturn combinedImage;\n\t}", "public void combine(final DoubleList<T> source1,\n\t final DoubleList<T> source2) {\n\t\twhile(source1.front != null && source2.front != null) {\n\t\t\tthis.insert(-1,source1.removeFront());\n\t\t\tthis.insert(-1,source2.removeFront());\n\t\t}\n\t\t\n\t\twhile( source1.front != null) \n\t\t\tthis.insert(-1,source1.removeFront());\n\t\t\n\t\twhile( source2.front != null) \n\t\t\tthis.insert(-1,source2.removeFront());\n\t\t\n\t\treturn;\n }", "public void merge( Resource r )\n\t{\n\t\tr.transter(this, r.amount);\n\t\tr.recycle();\n\t}", "public void mergeOperations();", "@Override\n\tprotected void merge(HashSet<Value> source1, HashSet<Value> source2, HashSet<Value> dest) {\n\t\t// Set union\n\t\tdest.clear();\n\t\tdest.addAll(source1);\n\t\tdest.addAll(source2);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Original signature : int sd_journal_sendv(iovec, int) native declaration : /usr/include/systemd/sdjournal.h:54
public static int sd_journal_sendv(Pointer iov, int n) { return sd_journal_sendv(Pointer.getPeer(iov), n); }
[ "private native int mq_send(int mqdes, Pointer msg, long msgLen, int msgPrio);", "public static int sd_journal_sendv_with_location(Pointer<Byte > file, Pointer<Byte > line, Pointer<Byte > func, Pointer iov, int n) {\n\t\treturn sd_journal_sendv_with_location(Pointer.getPeer(file), Pointer.getPeer(line), Pointer.getPeer(func), Pointer.getPeer(iov), n);\n\t}", "public static int sd_journal_send(Pointer<Byte > format, Object... varArgs1) {\n\t\treturn sd_journal_send(Pointer.getPeer(format), varArgs1);\n\t}", "public static native int usrsctp_send(\n long ptr,\n byte[] data, int off, int len,\n boolean ordered,\n int sid,\n int ppid);", "public static native int send(int d_com, int test);", "public static int sd_journal_open(Pointer<Pointer<SystemdJournalLibrary.sd_journal > > ret, int flags) {\n\t\treturn sd_journal_open(Pointer.getPeer(ret), flags);\n\t}", "native static int writeDirect(long serial, ByteBuffer buffer, int length)\n\tthrows IllegalArgumentException, IOException;", "public static native byte[] ChannelMonitor_write(long obj);", "public static native byte[] ChannelMonitorUpdate_write(long obj);", "public static native long MessageSendEvent_send_funding_locked(byte[] node_id, long msg);", "public static native byte[] ChannelAnnouncement_write(long obj);", "private native static int shout_send(long shoutInstancePtr, byte[] data, int setDataLength);", "public native void sendGVTMessage();", "public static native long FilesystemPersister_as_Persist(long this_arg);", "public static native long MessageSendEvent_send_funding_signed(byte[] node_id, long msg);", "public static native byte[] UnsignedChannelAnnouncement_write(long obj);", "static native void RecServiceStatus(long pObject, String data);", "private native int triggerDMSessionN(String account, String genericAlertType, byte[] message);", "public static native byte[] ChannelManager_write(long obj);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a diagnostic error, typically from a standalone parser configuration.
public void error(Diagnostic diagnostic) { error(diagnostic.getMessage() + " in line " + diagnostic.getLine(), null, null, ErrorCodes.FROM_PARSER); }
[ "public void addError(IError error);", "public ListASTNode<N> addError( ErrorASTNode error );", "public void addDiagnostic(Diagnostic diagnostic) {\n if (diagnostic.getKind() == DiagnosticKind.ERROR) {\n hasErrors = true;\n }\n this.diagnostics.add(diagnostic);\n }", "private void addError(ParserRuleContext node, String message) {\n int line = node.getStart().getLine();\n int column = node.getStart().getCharPositionInLine();\n message = String.format(\"Line %d:%d - %s\", line, column, message);\n this.errors.add(message);\n }", "public void addError(String error)\n {\n errors.add(error);\n }", "public void addError(String id);", "public void addError(String error)\n\t{\n\t\terrorLog.add(error);\n\t}", "void lexicalError(String error) {\r\n\t\terrors.add(error);\r\n\t\tthis.lexError = true;\r\n\t}", "protected void addErrorInformation() throws DocumentException {\r\n if (getTsrErrorReport() != null) {\r\n Font font = FontFactory.getFont(FontFactory.HELVETICA, INT_12, Font.NORMAL, Color.BLACK);\r\n Font fontUnderline = FontFactory.getFont(FontFactory.HELVETICA, INT_12, Font.UNDERLINE, Color.BLACK);\r\n Paragraph paragraph = new Paragraph(TSRReportLabelText.ERROR_MSG, font);\r\n reportDocument.add(paragraph);\r\n\r\n Chunk listSymbol = new Chunk(\"\\u2022\", font);\r\n\r\n paragraph = new Paragraph(\"\", font);\r\n paragraph.setIndentationLeft(INT_10);\r\n com.lowagie.text.List textList = new com.lowagie.text.List(false, INT_10);\r\n textList.setListSymbol(listSymbol);\r\n textList.add(TSRReportLabelText.STUDY_ID + getTsrErrorReport().getStudyId());\r\n textList.add(TSRReportLabelText.STUDY_TITLE + getTsrErrorReport().getStudyTitle());\r\n paragraph.add(textList);\r\n reportDocument.add(paragraph);\r\n\r\n paragraph = new Paragraph(TSRReportLabelText.CONTACT_CTRP, font);\r\n reportDocument.add(paragraph);\r\n reportDocument.add(getLineBreak());\r\n\r\n paragraph = new Paragraph(TSRReportLabelText.ERROR_TYPE, fontUnderline);\r\n reportDocument.add(paragraph);\r\n paragraph = new Paragraph(getTsrErrorReport().getErrorType(), font);\r\n paragraph.setIndentationLeft(INT_10);\r\n reportDocument.add(paragraph);\r\n reportDocument.add(getLineBreak());\r\n\r\n paragraph = new Paragraph(TSRReportLabelText.ERROR_REASON, fontUnderline);\r\n reportDocument.add(paragraph);\r\n paragraph = new Paragraph(\"\", font);\r\n paragraph.setIndentationLeft(INT_10);\r\n textList = new com.lowagie.text.List(false, INT_10);\r\n textList.setListSymbol(listSymbol);\r\n for (String reason : getTsrErrorReport().getErrorReasons()) {\r\n textList.add(reason);\r\n }\r\n paragraph.add(textList);\r\n reportDocument.add(paragraph);\r\n }\r\n }", "protected void addError(AeExpressionValidationResult aResult, String aMessage, Object[] aArgs) {\r\n String msg = MessageFormat.format(aMessage, aArgs);\r\n aResult.addError(msg);\r\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors addNewErrors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().add_element_user(ERRORS$4);\r\n return target;\r\n }\r\n }", "public void addError(\n Context ctx, ShadowExceptionErrorKind error, String message, Type... errorTypes) {\n if (containsUnknown(errorTypes)) return; // Don't add error if it has an unknown type in it.\n\n if (ctx != null) errorList.add(error.getException(message, ctx));\n }", "private void addErrorMessage(ErrorMessage error) {\n if (error != null && !errors.contains(error)) {\n errors.add(error);\n final int l = error.getErrorLevel();\n if (l > level) {\n level = l;\n }\n }\n }", "public void addErrorPage(ErrorPage errorPage) {\n // Validate the input parameters\n if (errorPage == null) {\n throw new IllegalArgumentException\n (sm.getString(\"standardHost.errorPage.required\"));\n }\n\n // Add the specified error page to our internal collections\n synchronized (statusPages) {\n statusPages.put(errorPage.getErrorCode(), errorPage);\n }\n fireContainerEvent(\"addErrorPage\", errorPage);\n\n }", "org.hl7.fhir.DiagnosticReport addNewDiagnosticReport();", "public ListASTNode<N> insertError( int index, ErrorASTNode error );", "public void addErrorMessage(Throwable exception) {\n ArgCheck.isNotNull(exception, \"error\"); //$NON-NLS-1$\n\n \twhile (exception.getCause() != null) {\n \t\t//\n \t\t// Zero down to the root cause of the exception\n \t\t//\n \t\texception = exception.getCause();\n \t}\n\n \tString message = exception.getLocalizedMessage();\n \tif (exception.getClass().getName().equals(\"TeiidDdlParsingException\")) {\n \t try {\n \t Method posMethod = exception.getClass().getMethod(\"getPosition\");\n \t Object position = posMethod.invoke(exception);\n \t message = Messages.getString(Messages.IMPORTER.teiidParserException,\n \t exception.getMessage(),\n \t position.toString());\n \t } catch (Exception ex) {\n \t message = exception.getMessage();\n \t }\n \t}\n\n \terrorMessages.add(message);\n }", "void setERROR(java.lang.String error);", "private void error(String mesg){\n\t\tthis.errorMessage = \"Error in line \"+lineNumber+\" \"+mesg;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the subset of instances which have at least one deployment on a lower version than the given one, or which have no production deployments
public InstanceList onLowerVersionThan(Version version) { return matching(id -> instance(id).productionDeployments().isEmpty() || instance(id).productionDeployments().values().stream() .anyMatch(deployment -> deployment.version().isBefore(version))); }
[ "public InstanceList byIncreasingDeployedVersion() {\n return sortedBy(comparing(id -> instance(id).productionDeployments().values().stream()\n .map(Deployment::version)\n .min(naturalOrder())\n .orElse(Version.emptyVersion)));\n }", "public InstanceList withProductionDeployment() {\n return matching(id -> instance(id).productionDeployments().size() > 0);\n }", "public InstanceList startedFailingOn(Version version) {\n return matching(id -> ! instances.get(id).instanceJobs().get(id).firstFailing().on(version).isEmpty());\n }", "public InstanceList failingOn(Version version) {\n return matching(id -> ! instances.get(id).instanceJobs().get(id).failingHard()\n .lastCompleted().on(version).isEmpty());\n }", "public boolean isApplicationVersionDeployed(ApplicationVersion applicationVersion) {\n String[] topologyVersionsIds = applicationVersion.getTopologyVersions().values().stream().map(ApplicationTopologyVersion::getArchiveId)\n .toArray(String[]::new);\n Map<String, String[]> versionsFilter = MapUtil.newHashMap(new String[] { \"versionId\" }, new String[][] { topologyVersionsIds });\n return alienDAO.buildQuery(Deployment.class).setFilters(fromKeyValueCouples(versionsFilter, \"endDate\", null)).count() > 0;\n }", "public InstanceList deploying() {\n return matching(id -> instance(id).change().hasTargets());\n }", "List<Deployment> getListToDeploy();", "public InstanceList failingUpgrade() {\n return matching(id -> ! instances.get(id).instanceJobs().get(id).failingHard().not().failingApplicationChange().isEmpty());\n }", "int getMinInstances();", "public ResourcePack productionRequirements() {\n ResourcePack requirements = new ResourcePack();\n for(ProductionEntry prod : this.productions) {\n if (prod.isActive()) {\n requirements.add(prod.production.getRequired());\n }\n }\n return requirements;\n }", "public Set<Version> versionsIn(CloudName cloud) {\n return versions.keySet().stream()\n .filter(osVersion -> osVersion.cloud().equals(cloud))\n .map(OsVersion::version)\n .collect(Collectors.toUnmodifiableSet());\n }", "@Transactional\n public List<Advisory> getByVendorAndProductAndVersion(\n final String vendorName,\n final String productName,\n final String version,\n final Date startDate) {\n\n List<Advisory> advisories = getByVendorAndProduct(vendorName, productName, startDate);\n List<Advisory> pruned = new ArrayList<>();\n for (final Advisory advisory : advisories) {\n boolean skip = false;\n for (var configNode : advisory.getConfigNodes()) {\n if (skip) break;\n\n for (var configNodeCpe : configNode.getConfigNodeCpes()) {\n try {\n Cpe parsed = CpeParser.parse(configNodeCpe.getCpe23Uri());\n\n // some records have a AND + parentID relationship with OS or firmware, we are doing\n // partial match here\n if (!parsed.getVendor().equalsIgnoreCase(vendorName)\n || !parsed.getProduct().equalsIgnoreCase(productName)\n || !Boolean.TRUE.equals(configNodeCpe.getVulnerable())) {\n continue;\n }\n\n if (StringUtils.hasText(configNodeCpe.getVersionEndExcluding())) {\n if (VersionCompareUtil.compare(configNodeCpe.getVersionEndExcluding(), version)\n >= 0) {\n skip = true; // not a match, done processing\n break;\n } else {\n pruned.add(advisory);\n skip = true; // done processing, found vulnerable\n break;\n }\n } else {\n if (\"*\".equals(parsed.getVersion())) {\n pruned.add(advisory);\n skip = true; // done\n break;\n } else if (VersionCompareUtil.compare(parsed.getVersion(), version) >= 0) {\n pruned.add(advisory);\n skip = true; // done\n break;\n }\n\n }\n } catch (Exception e) {\n log.error(\"Unable to parse CPE23 URI: {}\", configNodeCpe.getCpe23Uri(), e);\n }\n }\n }\n }\n\n return pruned;\n }", "List<Deployment> getListToUndeploy();", "public Map<ZoneId, Deployment> productionDeployments() {\n return deployments.values().stream()\n .filter(deployment -> deployment.zone().environment() == Environment.prod)\n .collect(Collectors.toUnmodifiableMap(Deployment::zone, Function.identity()));\n }", "List<ClusterVersionDetails> availableClusterVersions();", "public boolean isApplicationTopologyVersionDeployed(ApplicationTopologyVersion applicationTopologyVersion) {\n return alienDAO.buildQuery(Deployment.class).setFilters(fromKeyValueCouples(\"versionId\", applicationTopologyVersion.getArchiveId(), \"endDate\", null))\n .count() > 0;\n }", "DeploymentsClient getDeployments();", "public List<PersistWorkflowDeployment> getAllWorkfloeDeployments();", "public String[] findDeployedApps() {\n\n return (getDeployer().findDeployedApps());\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use PredictionLog.newBuilder() to construct.
private PredictionLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private PredictLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLogOrBuilder getPredictLogOrBuilder();", "com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog getPredictLog();", "com.tencent.angel.serving.apis.prediction.PredictionLogProtos.ClassifyLog getClassifyLog();", "com.tencent.angel.serving.apis.prediction.PredictionLogProtos.ClassifyLogOrBuilder getClassifyLogOrBuilder();", "public Builder setPredictLog(com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog value) {\n if (predictLogBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n logType_ = value;\n onChanged();\n } else {\n predictLogBuilder_.setMessage(value);\n }\n logTypeCase_ = 6;\n return this;\n }", "public Prediction() {\n }", "private ClassifyLog(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public CreateReaderLogRequest(ApplicationPreferences applicationPreferences, ReaderLog readerLog) {\n super(applicationPreferences);\n this.readerLog = readerLog;\n }", "public com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLogOrBuilder getPredictLogOrBuilder() {\n if (logTypeCase_ == 6) {\n return (com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog) logType_;\n }\n return com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog.getDefaultInstance();\n }", "private LogRecord(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "com.tencent.angel.serving.apis.prediction.PredictionLogProtos.RegressLogOrBuilder getRegressLogOrBuilder();", "public com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog getPredictLog() {\n if (predictLogBuilder_ == null) {\n if (logTypeCase_ == 6) {\n return (com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog) logType_;\n }\n return com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog.getDefaultInstance();\n } else {\n if (logTypeCase_ == 6) {\n return predictLogBuilder_.getMessage();\n }\n return com.tencent.angel.serving.apis.prediction.PredictionLogProtos.PredictLog.getDefaultInstance();\n }\n }", "public Builder setClassifyLog(com.tencent.angel.serving.apis.prediction.PredictionLogProtos.ClassifyLog value) {\n if (classifyLogBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n logType_ = value;\n onChanged();\n } else {\n classifyLogBuilder_.setMessage(value);\n }\n logTypeCase_ = 2;\n return this;\n }", "public PredictorListener buildPredictor();", "public Log() {}", "private Log(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Log() {\n }", "public LogResumeRecord() {\n this(\"log_resume_record\", null);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the standard ID for this property which is defined as [CID]_[SSID]. This is commonly used in OpenHAB.
public String getStandardID() { return parentDevice.getSSID() + "_" + SSID; }
[ "public @Nullable String getSSID() {\n return mSSID;\n }", "public String getSSID() {\r\n\t\treturn SSID;\r\n\t}", "public String getSSID() {\n return SSID;\n }", "String getSecId();", "public Integer getSsid() {\n return ssid;\n }", "public java.lang.String getSSKeyId() {\n return SSKeyId;\n }", "int getPrimarySnId();", "java.lang.String getCompactId();", "public String getSsid() {\n\t\treturn prefs.getString(KEY_SSID, context.getResources().getString(R.string.ssid_default));\n\t}", "public String getSsid() {\r\n return this.ssid;\r\n }", "public String getLegacyId() {\n return (String)getAttributeInternal(LEGACYID);\n }", "public int getPrimarySnId() {\n return primarySnId_;\n }", "public static String getId () {\n return props.getProperty(\"aws.id\");\n }", "int getSnId();", "public String getScid() {\n return scid;\n }", "public int getPrimarySnId() {\n return primarySnId_;\n }", "public String getScId() {\n return scId;\n }", "public String getSecId() {\n Object ref = secId_;\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 if (bs.isValidUtf8()) {\n secId_ = s;\n }\n return s;\n }\n }", "int getAsicIdentifier();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__PartiturHandler__Group__6" $ANTLR start "rule__PartiturHandler__Group__6__Impl" InternalPartitur.g:1040:1: rule__PartiturHandler__Group__6__Impl : ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) ;
public final void rule__PartiturHandler__Group__6__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalPartitur.g:1044:1: ( ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) ) // InternalPartitur.g:1045:1: ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) { // InternalPartitur.g:1045:1: ( ( rule__PartiturHandler__ConditionsAssignment_6 ) ) // InternalPartitur.g:1046:2: ( rule__PartiturHandler__ConditionsAssignment_6 ) { before(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_6()); // InternalPartitur.g:1047:2: ( rule__PartiturHandler__ConditionsAssignment_6 ) // InternalPartitur.g:1047:3: rule__PartiturHandler__ConditionsAssignment_6 { pushFollow(FOLLOW_2); rule__PartiturHandler__ConditionsAssignment_6(); state._fsp--; } after(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_6()); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__PartiturHandler__Group_7__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1232:1: ( ( ( rule__PartiturHandler__ConditionsAssignment_7_1 ) ) )\n // InternalPartitur.g:1233:1: ( ( rule__PartiturHandler__ConditionsAssignment_7_1 ) )\n {\n // InternalPartitur.g:1233:1: ( ( rule__PartiturHandler__ConditionsAssignment_7_1 ) )\n // InternalPartitur.g:1234:2: ( rule__PartiturHandler__ConditionsAssignment_7_1 )\n {\n before(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_7_1()); \n // InternalPartitur.g:1235:2: ( rule__PartiturHandler__ConditionsAssignment_7_1 )\n // InternalPartitur.g:1235:3: rule__PartiturHandler__ConditionsAssignment_7_1\n {\n pushFollow(FOLLOW_2);\n rule__PartiturHandler__ConditionsAssignment_7_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartiturHandlerAccess().getConditionsAssignment_7_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturCondition__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1314:1: ( ( ( rule__PartiturCondition__ConditionFunctionAssignment_0 ) ) )\n // InternalPartitur.g:1315:1: ( ( rule__PartiturCondition__ConditionFunctionAssignment_0 ) )\n {\n // InternalPartitur.g:1315:1: ( ( rule__PartiturCondition__ConditionFunctionAssignment_0 ) )\n // InternalPartitur.g:1316:2: ( rule__PartiturCondition__ConditionFunctionAssignment_0 )\n {\n before(grammarAccess.getPartiturConditionAccess().getConditionFunctionAssignment_0()); \n // InternalPartitur.g:1317:2: ( rule__PartiturCondition__ConditionFunctionAssignment_0 )\n // InternalPartitur.g:1317:3: rule__PartiturCondition__ConditionFunctionAssignment_0\n {\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__ConditionFunctionAssignment_0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartiturConditionAccess().getConditionFunctionAssignment_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__Group__6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1032:1: ( rule__PartiturHandler__Group__6__Impl rule__PartiturHandler__Group__7 )\n // InternalPartitur.g:1033:2: rule__PartiturHandler__Group__6__Impl rule__PartiturHandler__Group__7\n {\n pushFollow(FOLLOW_14);\n rule__PartiturHandler__Group__6__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__PartiturHandler__Group__7();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturWorkflow__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:693:1: ( ( ( rule__PartiturWorkflow__HandlersAssignment_4 )* ) )\n // InternalPartitur.g:694:1: ( ( rule__PartiturWorkflow__HandlersAssignment_4 )* )\n {\n // InternalPartitur.g:694:1: ( ( rule__PartiturWorkflow__HandlersAssignment_4 )* )\n // InternalPartitur.g:695:2: ( rule__PartiturWorkflow__HandlersAssignment_4 )*\n {\n before(grammarAccess.getPartiturWorkflowAccess().getHandlersAssignment_4()); \n // InternalPartitur.g:696:2: ( rule__PartiturWorkflow__HandlersAssignment_4 )*\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==29) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // InternalPartitur.g:696:3: rule__PartiturWorkflow__HandlersAssignment_4\n \t {\n \t pushFollow(FOLLOW_7);\n \t rule__PartiturWorkflow__HandlersAssignment_4();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n\n after(grammarAccess.getPartiturWorkflowAccess().getHandlersAssignment_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturCondition__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1302:1: ( rule__PartiturCondition__Group__0__Impl rule__PartiturCondition__Group__1 )\n // InternalPartitur.g:1303:2: rule__PartiturCondition__Group__0__Impl rule__PartiturCondition__Group__1\n {\n pushFollow(FOLLOW_18);\n rule__PartiturCondition__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__ConditionsAssignment_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:2910:1: ( ( rulePartiturCondition ) )\n // InternalPartitur.g:2911:2: ( rulePartiturCondition )\n {\n // InternalPartitur.g:2911:2: ( rulePartiturCondition )\n // InternalPartitur.g:2912:3: rulePartiturCondition\n {\n before(grammarAccess.getPartiturHandlerAccess().getConditionsPartiturConditionParserRuleCall_6_0()); \n pushFollow(FOLLOW_2);\n rulePartiturCondition();\n\n state._fsp--;\n\n after(grammarAccess.getPartiturHandlerAccess().getConditionsPartiturConditionParserRuleCall_6_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__If__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:1356:1: ( ( ( rule__If__ConditionAssignment_1 ) ) )\n // InternalWhdsl.g:1357:1: ( ( rule__If__ConditionAssignment_1 ) )\n {\n // InternalWhdsl.g:1357:1: ( ( rule__If__ConditionAssignment_1 ) )\n // InternalWhdsl.g:1358:2: ( rule__If__ConditionAssignment_1 )\n {\n before(grammarAccess.getIfAccess().getConditionAssignment_1()); \n // InternalWhdsl.g:1359:2: ( rule__If__ConditionAssignment_1 )\n // InternalWhdsl.g:1359:3: rule__If__ConditionAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__If__ConditionAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIfAccess().getConditionAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturCondition__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1383:1: ( rule__PartiturCondition__Group__3__Impl )\n // InternalPartitur.g:1384:2: rule__PartiturCondition__Group__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__Group__3__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__For__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalWhdsl.g:1653:1: ( ( ( rule__For__ConditionAssignment_1 ) ) )\n // InternalWhdsl.g:1654:1: ( ( rule__For__ConditionAssignment_1 ) )\n {\n // InternalWhdsl.g:1654:1: ( ( rule__For__ConditionAssignment_1 ) )\n // InternalWhdsl.g:1655:2: ( rule__For__ConditionAssignment_1 )\n {\n before(grammarAccess.getForAccess().getConditionAssignment_1()); \n // InternalWhdsl.g:1656:2: ( rule__For__ConditionAssignment_1 )\n // InternalWhdsl.g:1656:3: rule__For__ConditionAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__For__ConditionAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getForAccess().getConditionAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:990:1: ( ( ( rule__PartiturHandler__EventAssignment_4 ) ) )\n // InternalPartitur.g:991:1: ( ( rule__PartiturHandler__EventAssignment_4 ) )\n {\n // InternalPartitur.g:991:1: ( ( rule__PartiturHandler__EventAssignment_4 ) )\n // InternalPartitur.g:992:2: ( rule__PartiturHandler__EventAssignment_4 )\n {\n before(grammarAccess.getPartiturHandlerAccess().getEventAssignment_4()); \n // InternalPartitur.g:993:2: ( rule__PartiturHandler__EventAssignment_4 )\n // InternalPartitur.g:993:3: rule__PartiturHandler__EventAssignment_4\n {\n pushFollow(FOLLOW_2);\n rule__PartiturHandler__EventAssignment_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartiturHandlerAccess().getEventAssignment_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__Group_7__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1221:1: ( rule__PartiturHandler__Group_7__1__Impl )\n // InternalPartitur.g:1222:2: rule__PartiturHandler__Group_7__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__PartiturHandler__Group_7__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__IfExp__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalOCLlite.g:8727:1: ( ( ( rule__IfExp__ConditionAssignment_1 ) ) )\n // InternalOCLlite.g:8728:1: ( ( rule__IfExp__ConditionAssignment_1 ) )\n {\n // InternalOCLlite.g:8728:1: ( ( rule__IfExp__ConditionAssignment_1 ) )\n // InternalOCLlite.g:8729:2: ( rule__IfExp__ConditionAssignment_1 )\n {\n before(grammarAccess.getIfExpAccess().getConditionAssignment_1()); \n // InternalOCLlite.g:8730:2: ( rule__IfExp__ConditionAssignment_1 )\n // InternalOCLlite.g:8730:3: rule__IfExp__ConditionAssignment_1\n {\n pushFollow(FOLLOW_2);\n rule__IfExp__ConditionAssignment_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getIfExpAccess().getConditionAssignment_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rulePartiturCondition() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:141:2: ( ( ( rule__PartiturCondition__Group__0 ) ) )\n // InternalPartitur.g:142:2: ( ( rule__PartiturCondition__Group__0 ) )\n {\n // InternalPartitur.g:142:2: ( ( rule__PartiturCondition__Group__0 ) )\n // InternalPartitur.g:143:3: ( rule__PartiturCondition__Group__0 )\n {\n before(grammarAccess.getPartiturConditionAccess().getGroup()); \n // InternalPartitur.g:144:3: ( rule__PartiturCondition__Group__0 )\n // InternalPartitur.g:144:4: rule__PartiturCondition__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartiturConditionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturCondition__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1329:1: ( rule__PartiturCondition__Group__1__Impl rule__PartiturCondition__Group__2 )\n // InternalPartitur.g:1330:2: rule__PartiturCondition__Group__1__Impl rule__PartiturCondition__Group__2\n {\n pushFollow(FOLLOW_19);\n rule__PartiturCondition__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturCondition__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1368:1: ( ( ( rule__PartiturCondition__ArgAssignment_2 ) ) )\n // InternalPartitur.g:1369:1: ( ( rule__PartiturCondition__ArgAssignment_2 ) )\n {\n // InternalPartitur.g:1369:1: ( ( rule__PartiturCondition__ArgAssignment_2 ) )\n // InternalPartitur.g:1370:2: ( rule__PartiturCondition__ArgAssignment_2 )\n {\n before(grammarAccess.getPartiturConditionAccess().getArgAssignment_2()); \n // InternalPartitur.g:1371:2: ( rule__PartiturCondition__ArgAssignment_2 )\n // InternalPartitur.g:1371:3: rule__PartiturCondition__ArgAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__PartiturCondition__ArgAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartiturConditionAccess().getArgAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ISR__Group__6__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:7011:1: ( ( ( rule__ISR__EndAssignment_6 ) ) )\n // InternalDsl.g:7012:1: ( ( rule__ISR__EndAssignment_6 ) )\n {\n // InternalDsl.g:7012:1: ( ( rule__ISR__EndAssignment_6 ) )\n // InternalDsl.g:7013:2: ( rule__ISR__EndAssignment_6 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getISRAccess().getEndAssignment_6()); \n }\n // InternalDsl.g:7014:2: ( rule__ISR__EndAssignment_6 )\n // InternalDsl.g:7014:3: rule__ISR__EndAssignment_6\n {\n pushFollow(FOLLOW_2);\n rule__ISR__EndAssignment_6();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getISRAccess().getEndAssignment_6()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ControlFlow__Group_6__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // InternalActivityDiagram.g:7059:1: ( ( ( rule__ControlFlow__GuardAssignment_6_1 ) ) )\n // InternalActivityDiagram.g:7060:1: ( ( rule__ControlFlow__GuardAssignment_6_1 ) )\n {\n // InternalActivityDiagram.g:7060:1: ( ( rule__ControlFlow__GuardAssignment_6_1 ) )\n // InternalActivityDiagram.g:7061:1: ( rule__ControlFlow__GuardAssignment_6_1 )\n {\n before(grammarAccess.getControlFlowAccess().getGuardAssignment_6_1()); \n // InternalActivityDiagram.g:7062:1: ( rule__ControlFlow__GuardAssignment_6_1 )\n // InternalActivityDiagram.g:7062:2: rule__ControlFlow__GuardAssignment_6_1\n {\n pushFollow(FollowSets000.FOLLOW_2);\n rule__ControlFlow__GuardAssignment_6_1();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getControlFlowAccess().getGuardAssignment_6_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__Group_7__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1194:1: ( rule__PartiturHandler__Group_7__0__Impl rule__PartiturHandler__Group_7__1 )\n // InternalPartitur.g:1195:2: rule__PartiturHandler__Group_7__0__Impl rule__PartiturHandler__Group_7__1\n {\n pushFollow(FOLLOW_13);\n rule__PartiturHandler__Group_7__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__PartiturHandler__Group_7__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__PartiturHandler__Group__7__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalPartitur.g:1071:1: ( ( ( rule__PartiturHandler__Group_7__0 )* ) )\n // InternalPartitur.g:1072:1: ( ( rule__PartiturHandler__Group_7__0 )* )\n {\n // InternalPartitur.g:1072:1: ( ( rule__PartiturHandler__Group_7__0 )* )\n // InternalPartitur.g:1073:2: ( rule__PartiturHandler__Group_7__0 )*\n {\n before(grammarAccess.getPartiturHandlerAccess().getGroup_7()); \n // InternalPartitur.g:1074:2: ( rule__PartiturHandler__Group_7__0 )*\n loop7:\n do {\n int alt7=2;\n int LA7_0 = input.LA(1);\n\n if ( (LA7_0==33) ) {\n alt7=1;\n }\n\n\n switch (alt7) {\n \tcase 1 :\n \t // InternalPartitur.g:1074:3: rule__PartiturHandler__Group_7__0\n \t {\n \t pushFollow(FOLLOW_15);\n \t rule__PartiturHandler__Group_7__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop7;\n }\n } while (true);\n\n after(grammarAccess.getPartiturHandlerAccess().getGroup_7()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
MARK: Segment Calculates the 2D shape created by the intersection of two given 2D segments.
public static Shape2D intersection(Segment2D segment1, Segment2D segment2) { // algorithm developed by Paul Bourke: // http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ // store segment endpoint component values, in world coords, for easy access Vector2D p1 = segment1.toWorld(segment1.getStart()); Vector2D p2 = segment1.toWorld(segment1.getEnd()); Vector2D p3 = segment2.toWorld(segment2.getStart()); Vector2D p4 = segment2.toWorld(segment2.getEnd()); double x1 = p1.getX(); double y1 = p1.getY(); double x2 = p2.getX(); double y2 = p2.getY(); double x3 = p3.getX(); double y3 = p3.getY(); double x4 = p4.getX(); double y4 = p4.getY(); // compute shared denominator double denom = (y4 - y3)*(x2 - x1) - (x4 - x3)*(y2 - y1); // compute determinate numerators double numA = (x4 - x3)*(y1 - y3) - (y4 - y3)*(x1 - x3); double numB = (x2 - x1)*(y1 - y3) - (y2 - y1)*(x1 - x3); // if determinate denom is 0, the segments are parallel boolean parallel = (denom == 0); // if segments not parallel, then the intersection is a single point if (!parallel) { // compute determinate values double detA = numA / denom; double detB = numB / denom; // if either determinate value is outside the range [0, 1], // then the segments do not intersect if (detA < 0 || detA > 1 || detB < 0 || detB > 1) throw new IntersectException("Given shapes do not intersect"); // at this point we know the segments intersect at a single point // create and return that point double x = x1 + detA*(x2 - x1); double y = y1 + detA*(y2 - y1); return new Point2D(x, y); } // at this point, we know that the given segments are parallel // if either numerator is not 0 segments are not coincidental // and thus do not intersect if (numA != 0 || numB != 0) throw new IntersectException("Given shapes do not intersect"); // coincidental at this point... check for endpoint containment // if the segments do intersect, then the two contained endpoints // will make the endpoints of the intersection segment Vector2D endpoint1 = null; Vector2D endpoint2 = null; // p3: if (LinAlg2D.contains(segment1, p3)) endpoint1 = p3; // p4: if (LinAlg2D.contains(segment1, p4)) { if (endpoint1 == null) endpoint1 = p4; else endpoint2 = p4; } // p1: if (LinAlg2D.contains(segment2, p1)) { if (endpoint1 == null) endpoint1 = p1; else endpoint2 = p1; } // p2: if (LinAlg2D.contains(segment2, p2)) { if (endpoint1 == null) endpoint1 = p2; else endpoint2 = p2; } // if no points are contained, the segments do not intersect if (endpoint1 == null || endpoint2 == null) throw new IntersectException("Given shapes do not intersect"); // if the two endpoints are the same, return a point if (endpoint1.equals(endpoint2)) return new Point2D(endpoint1); // create intersection segment and return return new Segment2D(endpoint1, endpoint2); }
[ "public static int[] intersects (int ax0, int ay0, int ax1, int ay1,\n \t\t\tint bx0, int by0, int bx1, int by1) {\n \t\n \tax0 <<= 16;\n \tay0 <<= 16;\n \tax1 <<= 16;\n \tay1 <<= 16;\n \t\n \tbx0 <<= 16;\n \tby0 <<= 16;\n \tbx1 <<= 16;\n \tby1 <<= 16;\n \t\n \tint adx = (ax1 - ax0);\n \tint ady = (ay1 - ay0);\n \tint bdx = (bx1 - bx0);\n \tint bdy = (by1 - by0);\n\n \tint xma;\n \tint xba;\n \tint xIntersect=ax0, yIntersect=ay0;\n \tint xmb;\n \tint xbb;\t\n \tint TWO = (2 << 16);\n\n \tif ((adx == 0) && (bdx == 0)) { // both vertical lines\n \t int dist = abs(divide((ax0+ax1)-(bx0+bx1), TWO));\n \t assert false; //TODO return (dist == 0);\n \t} else if (adx == 0) { // A vertical\n \t int xa = divide((ax0 + ax1), TWO);\n \t xmb = divide(bdy,bdx); // slope segment B\n \t xbb = by0 - multiply(bx0, xmb); // y intercept of segment B\n \t xIntersect = xa;\n \t yIntersect = (multiply(xmb,xIntersect)) + xbb;\n \t} else if ( bdx == 0) { // B vertical\n \t int xb = divide((bx0+bx1), TWO);\n \t xma = divide(ady,adx); // slope segment A\n \t xba = ay0 - (multiply(ax0,xma)); // y intercept of segment A\n \t xIntersect = xb;\n \t yIntersect = (multiply(xma,xIntersect)) + xba;\n \t} else {\n \t xma = divide(ady,adx); // slope segment A\n \t xba = ay0 - (multiply(ax0, xma)); // y intercept of segment A\n\n \t xmb = divide(bdy,bdx); // slope segment B\n \t xbb = by0 - (multiply(bx0,xmb)); // y intercept of segment B\n \t\n \t // parallel lines? \n \t if (xma == xmb) {\n \t\t // Need trig functions\n \t\t int dist = abs(multiply((xba-xbb),\n \t\t\t\t\t (cos(atan(divide((xma+xmb), TWO))))));\n \t\t if (dist < (1<<16) ) {\n \t\t\t temp[0]=xIntersect; temp[1]=yIntersect;\n \t\t return temp;\n \t\t } else {\n \t\t return null;\n \t\t }\n \t } else {\n \t\t // Calculate points of intersection\n \t\t // At the intersection of line segment A and B, XA=XB=XINT and YA=YB=YINT\n \t\t if ((xma-xmb) == 0) {\n \t\t return null;\n \t\t }\n \t\t xIntersect = divide((xbb-xba),(xma-xmb));\n \t\t yIntersect = (multiply(xma,xIntersect)) + xba;\n \t }\n \t}\n\n \t// After the point or points of intersection are calculated, each\n \t// solution must be checked to ensure that the point of intersection lies\n \t// on line segment A and B.\n \t\n \tint minxa = min(ax0, ax1);\n \tint maxxa = max(ax0, ax1);\n\n \tint minya = min(ay0, ay1);\n \tint maxya = max(ay0, ay1);\n\n \tint minxb = min(bx0, bx1);\n \tint maxxb = max(bx0, bx1);\n\n \tint minyb = min(by0, by1);\n \tint maxyb = max(by0, by1);\n\n \tif ((xIntersect >= minxa) && (xIntersect <= maxxa) && (yIntersect >= minya) && (yIntersect <= maxya) \n \t\t&& \n \t\t(xIntersect >= minxb) && (xIntersect <= maxxb) && (yIntersect >= minyb) && (yIntersect <= maxyb)) {\n \t\ttemp[0]=xIntersect; temp[1]=yIntersect;\n \t\treturn temp;\n \t}\n \treturn null;\n }", "Point2D intersectionPoint(Line2D l);", "public void testIntersection() {\n\n\t\tScalarOperator sop = new ScalarOperator();\n\n\t\t// two segments only touching in one point:\n\t\t/**\n\t\t * <tt>\n\t\t * +\n\t\t * /\n\t\t * /\n\t\t * +------+\n\t\t * </tt>\n\t\t */\n\t\tSegmentElt3D seg1 = new SegmentElt3D(new Point3D(1.0, 1.0, 1.0),\n\t\t\t\tnew Point3D(3.0, 1.0, 1.0), new ScalarOperator());\n\t\tSegmentElt3D seg2 = new SegmentElt3D(new Point3D(3.0, 1.0, 1.0),\n\t\t\t\tnew Point3D(5.0, 2.0, 1.0), new ScalarOperator());\n\t\tSimpleGeoObj result = seg1.intersection(seg2, sop);\n\n\t\tassertTrue(result instanceof Point3D);\n\t\tif (result instanceof Point3D) {\n\t\t\tPoint3D resultPoint = (Point3D) result;\n\t\t\tassertTrue(resultPoint.isEqual(new Point3D(3.0, 1.0, 1.0), sop));\n\t\t}\n\n\t\t// two segments only touching in one point, segments are on one line:\n\t\t/**\n\t\t * <tt>\n\t\t * +------+------+\n\t\t * </tt>\n\t\t */\n\t\tseg1 = new SegmentElt3D(new Point3D(1.0, 1.0, 1.0), new Point3D(3.0,\n\t\t\t\t1.0, 1.0), new ScalarOperator());\n\t\tseg2 = new SegmentElt3D(new Point3D(3.0, 1.0, 1.0), new Point3D(5.0,\n\t\t\t\t1.0, 1.0), new ScalarOperator());\n\t\tresult = seg1.intersection(seg2, new ScalarOperator());\n\n\t\tassertTrue(result instanceof Point3D);\n\t\tif (result instanceof Point3D) {\n\t\t\tPoint3D resultPoint = (Point3D) result;\n\t\t\tassertTrue(resultPoint.isEqual(new Point3D(3.0, 1.0, 1.0), sop));\n\t\t}\n\n\t}", "@Test\n public void testGetIntersection_LineSegment2D() {\n System.out.println(\"getIntersection\");\n \n LineSegment2D segment = new LineSegment2D(new Point2D(), new Point2D(1,1));\n \n {\n LineSegment2D instance = new LineSegment2D(new Point2D(0,0.5), new Point2D(1,0.5));\n Point2D expResult = new Point2D(0.5, 0.5);\n Point2D result = instance.getIntersection(segment);\n assertEquals(expResult, result);\n }\n \n \n {\n LineSegment2D instance = new LineSegment2D(new Point2D(0,1.5), new Point2D(1,1.5));\n Point2D expResult = null;\n Point2D result = instance.getIntersection(segment);\n assertEquals(expResult, result);\n }\n }", "public static Shape2D intersection(Segment2D segment, Polygon2D polygon) {\n // intersection exists?\n if (!LinAlg2D.intersects(segment, polygon))\n throw new IntersectException(\"Given shapes do not intersect\");\n \n // get segment start and end points in world coords\n Vector2D segStart = segment.toWorld(segment.getStart());\n Vector2D segEnd = segment.toWorld(segment.getEnd());\n \n // first check to see which endpoints are inside the polygon\n boolean segStartContained = LinAlg2D.contains(polygon, segStart);\n boolean segEndContained = LinAlg2D.contains(polygon, segEnd);\n \n // if polygon contain the entire segment, return copy of segment\n if (segStartContained && segEndContained)\n return new Segment2D(segStart, segEnd);\n \n // get polygon edges\n LinkedList<Segment2D> edges = polygon.getEdges();\n LinkedList<Point2D> intersectPoints = new LinkedList<Point2D>();\n LinkedList<Segment2D> intersectSegs = new LinkedList<Segment2D>();\n \n // for each edge of given polygon...\n for (Segment2D edge : edges) {\n \n // check for intersection with given segment\n if(!LinAlg2D.intersects(segment, edge))\n continue;\n \n // compute intersection shape\n Shape2D intersection = intersection(segment, edge);\n \n // if intersection shape is a segment, add it to list and continue\n if(intersection instanceof Segment2D) {\n intersectSegs.add((Segment2D)intersection);\n continue;\n }\n \n // at this point, the intersection must be a point\n // check if this intersection point has been found already\n boolean inList = false;\n for(Point2D point : intersectPoints)\n if(point.equals(intersection))\n inList = true;\n \n // point not in list? add it\n if(!inList)\n intersectPoints.add((Point2D)intersection);\n }\n \n \n // if intersection segments were found concatenate and return\n if (intersectSegs.size() > 0) {\n Vector2D p1 = null;\n Vector2D p2 = null;\n for (Segment2D seg : intersectSegs) {\n // get segment endpoints in world coords\n Vector2D currStart = seg.toWorld(seg.getStart());\n Vector2D currEnd = seg.toWorld(seg.getEnd());\n \n // if first segment, set points and continue\n if (p1 == null) {\n p1 = currStart;\n p2 = currEnd;\n continue;\n }\n \n // replace shared point with new exclusive point\n if (currStart.equals(p1))\n p1 = currEnd;\n else if (currStart.equals(p2))\n p2 = currEnd;\n else if (currEnd.equals(p1))\n p1 = currStart;\n else if (currEnd.equals(p2))\n p2 = currStart;\n }\n \n // create and return segment out of p1 and p2\n return new Segment2D(p1, p2);\n }\n \n \n // at this point we know that any edge of the polygon intersects the\n // given segment 1 time at most\n \n // if two intersection points, create and return a segment\n if(intersectPoints.size() == 2) {\n Vector2D p1 = intersectPoints.get(0).getPosition();\n Vector2D p2 = intersectPoints.get(1).getPosition();\n return new Segment2D(p1, p2);\n }\n \n // at this point we know that there is only one intersection point\n Point2D point = intersectPoints.get(0);\n \n // if the point is one of the given segment's endpoints, return it\n if (segStart.equals(point.getPosition()) || segEnd.equals(point.getPosition()))\n return point;\n \n // at this point, we know that the intersection shape is a segment shape\n // starting at the enpoint of the given segment that is contained by the\n // polygon and ending at the point in which the given segment intersects\n // the polygon's edge\n \n // create segment and return\n if (segStartContained)\n return new Segment2D(segStart, point.getPosition());\n else if (segEndContained)\n return new Segment2D(point.getPosition(), segEnd);\n else if (intersectPoints.size() == 1)\n return intersectPoints.get(0);\n \n // if this point is reached, something went wrong with this algorithm\n throw new IntersectException(\"Computation of Segment2D-Polygon2D intersection failed.\");\n }", "public Point intersectLineSegment(Point p1, Point p2) {\n double vx = p2.x - p1.x;\n double vy = p2.y - p1.y;\n double a1 = ((vx >= 0 ? this.x2 : this.x1) - p1.x) / vx;\n double a2 = ((vy >= 0 ? this.y2 : this.y1) - p1.y) / vy;\n double a = Math.min(a1, a2);\n return new Point(p1.x + a * vx, p1.y + a * vy);\n }", "public static Boolean LineIntersect(Vector2 point1, Vector2 point2,\n Vector2 point3, Vector2 point4, Boolean firstIsSegment,\n Boolean secondIsSegment, Vector2 point) {\n point = new Vector2();\n // these are reused later.\n // each lettered sub-calculation is used twice, except\n // for b and d, which are used 3 times\n float a = point4.y - point3.y;\n float b = point2.x - point1.x;\n float c = point4.x - point3.x;\n float d = point2.y - point1.y;\n // denominator to solution of linear system\n float denom = (a * b) - (c * d);\n // if denominator is 0, then lines are parallel\n if (!(denom >= -Epsilon && denom <= Epsilon)) {\n float e = point1.y - point3.y;\n float f = point1.x - point3.x;\n float oneOverDenom = 1.0f / denom;\n // numerator of first equation\n float ua = (c * e) - (a * f);\n ua *= oneOverDenom;\n // check if intersection point of the two lines is on line segment 1\n if (!firstIsSegment || ua >= 0.0f && ua <= 1.0f) {\n // numerator of second equation\n float ub = (b * e) - (d * f);\n ub *= oneOverDenom;\n // check if intersection point of the two lines is on line\n // segment 2\n // means the line segments intersect, since we know it is on\n // segment 1 as well.\n if (!secondIsSegment || ub >= 0.0f && ub <= 1.0f) {\n // check if they are coincident (no collision in this case)\n if (ua != 0f || ub != 0f) {\n // There is an intersection\n point.x = point1.x + ua * b;\n point.y = point1.y + ua * d;\n return true;\n }\n }\n }\n }\n return false;\n }", "public void intersect(Shape s);", "private Point2D.Double findSegmentCrossPoint(micLine A1E1, micLine DD)\n {\n Point2D.Double intersectionPt = new Point2D.Double(-1.0,-1.0);\n double px = A1E1.first.x;\n double py = A1E1.first.y;\n\n double qx = DD.first.x;\n double qy = DD.first.y;\n \n double rx = A1E1.second.x - A1E1.first.x;\n double ry = A1E1.second.y - A1E1.first.y;\n\n double sx = DD.second.x - DD.first.x;\n double sy = DD.second.y - DD.first.y;\n\n micLine qmpLine = new micLine(new Point2D.Double(px, py), new Point2D.Double(qx, qy));\n\n Boolean checkColinearity_1 = Double.compare(micLineCrossProduct(A1E1, DD),0.0) == 0;\n Boolean checkColinearity_2 = Double.compare(micLineCrossProduct(qmpLine, A1E1), 0.0) == 0;\n\n if(checkColinearity_1 == true) {\n if(checkColinearity_2 == true) return null; //TO DO parallel and intersecting\n else return null; //parallel and non-intersecting\n }\n\n double t = micLineCrossProduct(qmpLine, DD) / micLineCrossProduct(A1E1, DD);\n double u = micLineCrossProduct(qmpLine, A1E1) / micLineCrossProduct(A1E1, DD);\n\n if(Double.compare(t,0.0) >= 0 && Double.compare(t,1.0) <= 0\n && Double.compare(u,0.0) >= 0 && Double.compare(u, 1.0) <= 0)\n {\n //logToChatCommand(\"t \" + Double.toString(t) + \" u \" + Double.toString(u));\n intersectionPt.x = px + t*rx;\n intersectionPt.y = py + t*ry;\n }\n if(Double.compare(intersectionPt.x,-1.0) == 0) return null;\n return intersectionPt;\n }", "public static Point intersectSegmentOri(Point p1, Point p2, double angle)\r\n\t{\r\n\t\tPoint ori = new Point(0.0, 0.0), out = new Point(Math.cos(angle),\r\n\t\t\t\tMath.sin(angle));\r\n\t\tPoint intersect = new Point(0,0);\r\n\t\tint stat = crossPointLL(p1, p2, ori, out, intersect);\r\n\r\n\t\t// parallel\r\n\t\tif(stat == 0)\r\n\t\t\treturn new Point(CGConst.INF, CGConst.INF);\r\n\r\n\t\t// check the case of intersect at the wrong side of the project line\r\n\t\tif(Math.cos(angle) * (intersect.x) < 0 || Math.sin(angle) * (intersect.y) < 0)\r\n\t\t\treturn new Point(CGConst.INF, CGConst.INF);\r\n\t\t\r\n\t\t// check if the intersection is on the segment\r\n\t\tif(intersectSP(p1, p2, intersect))\r\n\t\t\treturn intersect;\r\n\t\treturn new Point(CGConst.INF, CGConst.INF);\r\n\r\n\r\n\t}", "public static Shape2D intersection(Segment2D segment, Circle2D circle) {// intersection exists?\n if (!LinAlg2D.intersects(segment, circle))\n throw new IntersectException(\"Given shapes do not intersect\");\n \n // get segment endpoints in world coords\n Vector2D start = segment.toWorld(segment.getStart());\n Vector2D end = segment.toWorld(segment.getEnd());\n \n // determine which segment endpoints are inside the circle\n boolean startInside = LinAlg2D.contains(circle, start);\n boolean endInside = LinAlg2D.contains(circle, end);\n \n // if both endpoints inside circle, the segment is wholly contained\n if (startInside && endInside)\n return new Segment2D(start, end);\n \n \n // get circle center point and radius in world coords\n Vector2D center = circle.getCenter();\n double radius = circle.getRadius();\n \n // find closest point on segment to circle center point and store distance\n Vector2D closestPoint = LinAlg2D.closestBetween(center, start, end);\n double closestDist = center.distance(closestPoint);\n \n // if closest distance equals circle radius, then segment is tangential\n if (closestDist == radius)\n return new Point2D(closestPoint);\n \n // find closest endpoint to circle center and store distance\n double startDist = center.distance(start);\n double endDist = center.distance(end);\n Vector2D closestEnd = (startDist < endDist)? start : end;\n double closestEndDist = (startDist < endDist)? startDist : endDist;\n \n \n // both endpoints outside the circle:\n if (!startInside && !endInside) {\n \n // compute intersection segment distance\n double c = Math.asin(closestDist / radius);\n double halfIntSegDist = radius * Math.cos(c);\n \n // compute two intersection points\n Vector2D segDeltaVect = end.subtract(start);\n Vector2D deltaVect = new Vector2D(segDeltaVect, halfIntSegDist);\n Vector2D point1 = closestPoint.subtract(deltaVect);\n Vector2D point2 = closestPoint.add(deltaVect);\n \n // create and return intersection segment\n return new Segment2D(point1, point2);\n }\n \n \n // at this point we know that only one endpoint is inside the circle:\n \n // determine which endpoint is inside/outside\n Vector2D inside = (startInside)? start : end;\n Vector2D outside = (startInside)? end : start;\n \n // compute distance between inside point and intersection point\n double deltaDist;\n \n // segment parallel to radius:\n if (segment.isParallel(closestEnd.subtract(center))) {\n // pass through circle center point?\n if (closestDist == 0)\n deltaDist = radius + closestEndDist;\n else \n deltaDist = radius - closestEndDist;\n }\n \n // segment not parallel to radius:\n else {\n double a1 = Math.acos(closestDist / radius);\n double a2 = Math.acos(closestDist / closestEndDist);\n deltaDist = Math.sin(a1+a2) * closestEndDist * radius / closestDist;\n }\n \n // compute intersection point\n Vector2D deltaVect = new Vector2D(outside.subtract(inside), deltaDist);\n Vector2D intersectionPoint = inside.add(deltaVect);\n \n // create and return intersection segment\n return new Segment2D(inside, intersectionPoint);\n }", "public Point intersectionWith(Line other) {\n // Current line represented as a1x + b1y = c1\n double a1 = this.end.getY() - this.start.getY();\n double b1 = this.start.getX() - this.end.getX();\n double c1 = (a1 * this.start.getX()) + (b1 * this.start.getY());\n // Other line represented as a2x + b2y = c2\n double a2 = other.end.getY() - other.start.getY();\n double b2 = other.start.getX() - other.end.getX();\n double c2 = (a2 * other.start.getX()) + (b2 * other.start.getY());\n double determinant = a1 * b2 - a2 * b1;\n //If the lines are parallel - there is no a intersection unless one continues the other.\n //If one of the lines is actually a point - return null no mather what.\n if (determinant == 0) {\n if (this.start == other.start || this.start == other.end) {\n return this.start;\n }\n if (this.end == other.end || this.end == other.start) {\n return this.end;\n }\n return null;\n }\n //Calculate the intersection point between the two equations of a line.\n double newX = (b2 * c1 - b1 * c2) / determinant;\n double newY = (a1 * c2 - a2 * c1) / determinant;\n /*\n Checks whether the point is on the segment, if not - return null.\n (while considering a possible deviation of DEVIATION in the calculation).\n */\n if (Math.max(this.start.getX(), this.end.getX()) < newX - DEVIATION\n || Math.min(this.start.getX(), this.end.getX()) > newX + DEVIATION) {\n return null;\n }\n if (Math.max(other.start.getX(), other.end.getX()) < newX - DEVIATION\n || Math.min(other.start.getX(), other.end.getX()) > newX + DEVIATION) {\n return null;\n }\n if (Math.max(this.start.getY(), this.end.getY()) < newY - DEVIATION\n || Math.min(this.start.getY(), this.end.getY()) > newY + DEVIATION) {\n return null;\n }\n if (Math.max(other.start.getY(), other.end.getY()) < newY - DEVIATION\n || Math.min(other.start.getY(), other.end.getY()) > newY + DEVIATION) {\n return null;\n }\n return new Point(newX, newY);\n }", "public static Point getIntersection(Point start1, Point end1, Point start2, Point end2)\n\t{\n\t\t/* Rearrange points so that, in order of x values:\n\t\t * start is before end and point1 is before point2 */\n\t\tif(start1.x>end1.x) swap(start1,end1);\n\t\tif(start2.x>end2.x) swap(start2,end2);\n\t\tif(start1.x>start2.x) \n\t\t{\n\t\t\t/* Swap both start points and end points (like swapping lines). */\n\t\t\tswap(start1,start2);\n\t\t\tswap(end1,end2);\n\t\t}\n\t\t\n\t\t/* Create lines. */\n\t\tLine line1 = new Line(start1,end1);\n\t\tLine line2 = new Line(start2,end2);\n\t\t\n\t\t/* If lines are parallel, they intercept only if they have the same Oyintercept\n\t\t * and start2 is on line1 (Some portion of their segments overlap). */\n\t\tif(line1.slope==line2.slope || (isInfinity(line1.slope) && isInfinity(line2.slope)))\n\t\t{\t\t\n\t\t\tif(isBetween(start1,start2,end1))\n\t\t\t\tif(line1.slope==Double.POSITIVE_INFINITY || line1.Oyintercept==line2.Oyintercept) //+ infinity case\n\t\t\t\t\treturn start2;\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t/* Compute intersection point for lines. */\n\t\tdouble x=0,y=0;\n\t\tPoint intersection=null;\n\t\tif(!isInfinity(line1.slope) && !isInfinity(line2.slope))\n\t\t{\n\t\t\tx=(line2.Oyintercept-line1.Oyintercept)/(line1.slope-line2.slope);\n\t\t\ty=x*line1.slope+line1.Oyintercept;\n\t\t\tintersection=new Point(x,y);\n\t\t}\n\t\telse intersection=intersectionForVerticalLine(start1,start2,line1,line2);\n\t\t\n\t\t/* Check if within line segment range. */\n\t\tif(isBetween(start1,intersection,end1) && isBetween(start2,intersection,end2))\n\t\t\treturn intersection;\n\t\t\n\t\treturn null;\n\t}", "public static Shape2D intersection(Point2D point, Segment2D segment) {\n // intersection exists?\n if (!LinAlg2D.intersects(point, segment))\n throw new IntersectException(\"Given shapes do not intersect\");\n \n return new Point2D(point.getPosition());\n }", "public int rectIntersection( double x, double y, double w, double h );", "private int possibleIntersection(SweepEvent le1, SweepEvent le2) {\n\n // you can uncomment these two lines if self-intersecting polygons are not allowed\n// if (le1.polygonType.equals(le2.polygonType)) {\n// // self intersection\n// return 0;\n// }\n\n Intersection intersections = new Intersection(le1.segment(), le2.segment());\n\n if (Intersection.Type.NO_INTERSECTION.equals(intersections.type)) {\n // no intersection\n return 0;\n }\n\n if ((Intersection.Type.POINT.equals(intersections.type)) && ((le1.point.isCloseTo(le2.point)) || (le1.otherEvent.point.isCloseTo(le2.otherEvent.point)))) {\n // the line segments intersect at an endpoint of both line segments\n return 0;\n }\n\n if (Intersection.Type.OVERLAPPING.equals(intersections.type) && le1.polygonType.equals(le2.polygonType)) {\n throw new IllegalStateException(\"edges of the same polygon overlap\");\n }\n\n // The line segments associated to le1 and le2 intersect\n if (Intersection.Type.POINT.equals(intersections.type)) {\n if (!le1.point.isCloseTo(intersections.point) && !le1.otherEvent.point.isCloseTo(intersections.point)) {\n // if the intersection point is not an endpoint of le1.segment ()\n divideSegment(le1, intersections.point);\n }\n if (!le2.point.isCloseTo(intersections.point) && !le2.otherEvent.point.isCloseTo(intersections.point)) {\n // if the intersection point is not an endpoint of le2.segment ()\n divideSegment(le2, intersections.point);\n }\n return 1;\n }\n // The line segments associated to le1 and le2 overlap\n List<SweepEvent> sortedEvents = new ArrayList<>();\n\n if (le1.point.isCloseTo(le2.point)) {\n sortedEvents.add(null);\n } else if (sweepEventComparator.compare(le1, le2) < 0) {\n sortedEvents.add(le2);\n sortedEvents.add(le1);\n } else {\n sortedEvents.add(le1);\n sortedEvents.add(le2);\n }\n if (le1.otherEvent.point.isCloseTo(le2.otherEvent.point)) {\n sortedEvents.add(null);\n } else if (sweepEventComparator.compare(le1.otherEvent, le2.otherEvent) < 0) {\n sortedEvents.add(le2.otherEvent);\n sortedEvents.add(le1.otherEvent);\n } else {\n sortedEvents.add(le1.otherEvent);\n sortedEvents.add(le2.otherEvent);\n }\n\n if ((sortedEvents.size() == 2) || (sortedEvents.size() == 3 && sortedEvents.get(2) != null)) {\n // both line segments are equal or share the left endpoint\n le1.type = EdgeType.NON_CONTRIBUTING;\n le2.type = (le1.inOut == le2.inOut) ? EdgeType.SAME_TRANSITION : EdgeType.DIFFERENT_TRANSITION;\n if (sortedEvents.size() == 3) {\n divideSegment(sortedEvents.get(2).otherEvent, sortedEvents.get(1).point);\n }\n return 2;\n }\n if (sortedEvents.size() == 3) { // the line segments share the right endpoint\n divideSegment(sortedEvents.get(0), sortedEvents.get(1).point);\n return 3;\n }\n if (sortedEvents.get(0) != sortedEvents.get(3).otherEvent) {\n // no line segment includes totally the other one\n divideSegment(sortedEvents.get(0), sortedEvents.get(1).point);\n divideSegment(sortedEvents.get(1), sortedEvents.get(2).point);\n return 3;\n }\n // one line segment includes the other one\n divideSegment(sortedEvents.get(0), sortedEvents.get(1).point);\n divideSegment(sortedEvents.get(3).otherEvent, sortedEvents.get(2).point);\n return 3;\n }", "@Test\n public void testGetIntersection_ILine2D() {\n System.out.println(\"getIntersection(ILine2D)\");\n \n \n try {\n LineSegment2D instance = new LineSegment2D(new Point2D(0,0), new Point2D(1,1));\n ILine2D line = new Line2D(new Point2D(1,0), new Point2D(0,0.5));\n Point2D expResult = new Point2D(0.5, 0.5);\n Point2D result = instance.getIntersection(line);\n assertEquals(expResult, result);\n } catch(NoIntersectionException | EquivalentLineException e) {\n fail();\n }\n \n try {\n LineSegment2D instance = new LineSegment2D(new Point2D(2,2), new Point2D(-2,2));\n ILine2D line = new Line2D(new Point2D(1, 2), new Point2D(0, 0));\n Point2D expResult = new Point2D(1, 2);\n Point2D result = instance.getIntersection(line);\n assertEquals(expResult, result);\n } catch(NoIntersectionException | EquivalentLineException e) {\n fail();\n }\n }", "Point2D rightIntersectionPoint(Line2D l);", "public double IntersectPerimeterPolygon(Polygon a, Polygon b) throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method to select a particular action plan.
public SPResponse selectPlan(User user, Object[] params) { final SPResponse resp = new SPResponse(); String actionPlanId = (String) params[0]; Assert.hasText(actionPlanId, "Organization Plan id is required."); // validate the action plan try { getActionPlan(actionPlanId); } catch (DashboardRedirectException e) { log.warn("Action plan not found.", e); removeActionPlan(user, actionPlanId); throw e; } // get the user action plan selection and set the selected action plan id UserActionPlan userActionPlan = actionPlanFactory.getUserActionPlan(user); ActionPlanProgress actionPlanProgress = userActionPlan.getActionPlanProgress(actionPlanId); // validate if the action plan is applicable for the user Assert.notNull(actionPlanProgress, MessagesHelper.getMessage("service.growl.message2")); userActionPlan.setSelectedActionPlan(actionPlanId); actionPlanFactory.updateUserActionPlan(userActionPlan); return resp.isSuccess(); }
[ "@Override\n\tpublic TurnAction selectAction() {\n\t\tJSONObject message = new JSONObject();\n\t\tmessage.put(\"function\", \"select\");\n\t\tmessage.put(\"type\", \"action\");\n\n\t\tthis.sendInstruction(message);\n\t\tString selected = this.getResponse();\n\t\treturn TurnAction.valueOf(selected);\n\t}", "public Plan getPlan(String planName);", "private WorkflowPlan choosePlan(Set<WorkflowPlan> evaluatedPlans) {\n WorkflowPlan plan = evaluatedPlans.iterator().next();\n return plan;\n }", "private ActionPlanDao getActionPlan(String actionPlanId) {\n return Optional.ofNullable(actionPlanFactory.getActionPlan(actionPlanId)).orElseThrow(\n () -> new DashboardRedirectException(MessagesHelper.getMessage(\"service.growl.message2\")));\n }", "public void selectPlanFromDropDown(String plan) throws UIAutomationException{\r\n\t\t// Select Organization\r\n\t\t\r\n\t\telementController.requireElementSmart(fileName,\"Plan dropdown\",GlobalVariables.configuration.getAttrSearchList(),\"Plan dropdown\");\r\n\t\tUIActions.click(fileName,\"Plan dropdown\",GlobalVariables.configuration.getAttrSearchList(),\"Plan dropdown\");\r\n\t\t\t\t\r\n\t\tSelect planDropDownList = new Select(GlobalVariables.configuration.getWebElement());\r\n\t\tConfiguration.getConfigurationObject().setSelect(planDropDownList);\r\n\t\t\r\n\t\tUIActions.selectByTextAndClick(plan);\r\n\t\t\r\n\t\t// Assertion : Check Title of Page\r\n \t//String title=dataController.getPageDataElements(fileName, \"Communities Page Title\", \"Title\");\r\n \t//UIActions.waitForTitle(title,Integer.parseInt(GlobalVariables.configuration.getConfigData().get(\"TimeOutForFindingElementSeconds\")));\r\n\t}", "public A chooseAction();", "public void setPlan(String plan) {\n this.plan = plan;\n }", "public void setPlan(java.lang.String plan) {\n this.plan = plan;\n }", "public void chooseAction(int index) {\n selectedAction = actions.get(index);\n }", "public void setPlan(java.lang.String value) {\n this.plan = value;\n }", "public void setPlan(Plan plan) {\n this.plan = plan;\n }", "public void click_GetPlan() throws InterruptedException {\n\t\tThread.sleep(3000);\n\t\telement(\"Get_PlanBtn\").click();\n\t}", "private String getSelectedPlan(){\r\n SharedPreferences sharedPref = getActivity().getSharedPreferences(\"mysettings\",Context.MODE_PRIVATE);\r\n String workoutPlanName = sharedPref.getString(\"pickedplan\", EMPTY_PICKED_PLAN);\r\n return workoutPlanName;\r\n }", "public void toSelectingAction() {\n }", "public abstract Action selectedAction();", "public void clickPlanButton()\r\n\t{\r\n\t\tplanButton.click();\r\n\t}", "public void selectPaymPlan() {\n\t\tpaymMBBRadiobtn.click();\n\t}", "public void selectPaygPlan() {\n\t\tpaygMBBRadiobtn.click();\n\t}", "public void selectPaymentPlan(String paymentPlan, ExtentTest extentedReport) throws Exception {\n\t\ttry {\n\t\t\t(new WebDriverWait(driver, 300).pollingEvery(200, TimeUnit.MILLISECONDS)\n\t\t\t\t\t.ignoring(NoSuchElementException.class, StaleElementReferenceException.class)\n\t\t\t\t\t.withMessage(\"Unable to find Edit Details Link\"))\n\t\t\t\t\t\t\t.until(ExpectedConditions.elementToBeClickable(selectpaymentplan));\n\n\t\t\tSelect paymentdropdown = new Select(selectpaymentplan);\n\t\t\tpaymentdropdown.selectByVisibleText(paymentPlan);\n\t\t\tLog.message(\"Payment Plan Selected : \" + paymentPlan, extentedReport);\n\t\t\tWaitUtils.waitForSpinner(driver);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to Select Payment Plan\" + e);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A logger is responsible for the generation of a complete trace, composed of several feedlets. Once a Logger has been created, the programmer can proceed to create feedlets. The IGenericLogger interface is not meant to be directly implemented, it mainly serves to express functionality common to both ILogger and IConversionLogger.
public interface IGenericLogger { /** * Create a timer event and register it with the logger. * * @param name * The name of the timer event. * @return The new ITimerEvent instance. */ public ITimerEvent makeTimerEvent(String name); /** * Create a bookmark event and register it with the logger. * * @param name * The name of the bookmark event. * @return The new IBookmarkEvent instance. */ public IBookmarkEvent makeBookmarkEvent(String name); /* * Create a timer event which can occur in multiple feedlets at the same * time and register it with the logger. * * FIXME: turned off for 1.0.3 release because still not entirely stable * * @param name The name of the timer event. @return The new ITimerEvent * instance. */ // public ITimerEvent makePerFeedletTimerEvent(String name); /** * Create a value event and register it with the logger. * * @param name * The name of the value event. * @return The new IValueEvent instance. */ public IValueEvent makeValueEvent(String name); public void addEventType(EventType et); /** * Add a string to the string table. * * @param value * The string to add. */ public int addString(String value); /** * Add a property to the trace file. * * @param propertyName * The name of the property. * @param value * The property value. */ public void addProperty(String propertyName, String value); /** * An Oscilloscope figure is used for viewing Timer events in TuningFork. * This method allows you to define a group of Timer events that will show * up in the "Predefined Figures" portion of the TuningFork feed explorer. * * @param name * The name for the figure. * @param events * An array of Timer events which will comprise the figure. */ public void defineOscilloscopeFigure(String name, ITimerEvent[] events); /** * A Pie Chart figure is used for viewing durations of Timer events in * TuningFork. This method allows you to define a group of Timer events that * can be opened together as a Histogram from the "Predefined Figures" * portion of the TuningFork feed explorer. * * @param name * The name for the figure. * @param events * An array of Timer events which will comprise the figure. */ public void definePieChartFigure(String name, ITimerEvent[] events); /** * A Histogram figure is used for viewing durations of Timer events in * TuningFork. This method allows you to define a group of Timer events that * can be opened together as a Histogram from the "Predefined Figures" * portion of the TuningFork feed explorer. * * @param name * The name for the figure. * @param events * An array of Timer events which will comprise the figure. */ public void defineHistogramFigure(String name, ITimerEvent[] events); /** * A TimeSeries figure is used for viewing value events in TuningFork. * Intervals can also be superimposed. This method allows you to define a * group of Value and Timer events that will show up in the "Predefined * Figures" portion of the TuningFork feed explorer. * * @param name * The name for the figure. * @param values * An array of Value events which will be shown in the * figure. * @param intervals * An array of Timer events which will be shown in the * figure. */ public void defineTimeSeriesFigure(String name, IValueEvent[] values, ITimerEvent[] intervals); /** * This method can be called on shutdown to ensure that data is flushed to * the file or socket. Normally, the JVM will automatically activate this on * regular shutdown because the library installs a shutdown hook. */ public void close(); }
[ "public GenericLogger()\r\n\t{\r\n\t\tPackageLoggingController.setLogger(this);\r\n\t}", "public interface Logger {\n\n /**\n * Logs a message string at the specified severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the message string which should be included in the log\n * file.\n */\n public void log(Level level, String msg);\n\n /**\n * Logs message string and accompanying exception information at the specified\n * severity level.\n * \n * @param level This is the severity level at which the message should be\n * logged.\n * @param msg This is the message string which should be included in the log\n * file.\n * @param thrown This is the exception which should be logged with the\n * accompanying message.\n */\n public void log(Level level, String msg, Throwable thrown);\n\n /**\n * Gets the unique logging identifier associated with a given logger instance.\n * \n * @return Returns the unique logging identifier for the logger instance.\n */\n public String getLoggerId();\n\n /**\n * Gets the current logging level associated with a given logger instance.\n * \n * @return Returns the current logging level for the logger instance.\n */\n public Level getLogLevel();\n\n /**\n * Sets the logging level to be used for a given logger instance. If the\n * underlying logging service supports hierarchical logging this will also set\n * the log level for all loggers below the current instance in the log\n * hierarchy.\n * \n * @param logLevel This is the log level to be used by the logger instance for\n * all future log messages.\n */\n public void setLogLevel(Level logLevel);\n\n}", "public GenericLogger(int iLogLevel)\r\n\t{\r\n\t\tsetLogLevel(iLogLevel);\t\r\n\t\tPackageLoggingController.setLogger(this);\r\n\t}", "public abstract interface GenericLogger {\r\n\t/**\r\n\t * declaring ENTERING String.\r\n\t */\r\n\tString ENTERING = CommonConstants.LOGGER_ENTERING;\r\n\t/**\r\n\t * declaring EXITING String.\r\n\t */\r\n\tString EXITING = CommonConstants.LOGGER_EXITING;\r\n\r\n\t/**\r\n\t * Marks the entry into a debug method.\r\n\t * \r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t * @return start time in milliseconds\r\n\t */\r\n\tlong logMethodEntry(String correlationId);\r\n\r\n\t/**\r\n\t * Method to be used for logging level as debug.\r\n\t * \r\n\t * @param paramString\r\n\t * message to be logged\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid debug(String paramString, String correlationId);\r\n\r\n\t/**\r\n\t * Method to be used for logging level as info.\r\n\t * \r\n\t * @param paramString\r\n\t * message to be logged\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid info(String paramString, String correlationId);\r\n\r\n\t/**\r\n\t * Method to be used for logging level as warn.\r\n\t * \r\n\t * @param paramString\r\n\t * message to be logged\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid warn(String paramString, String correlationId);\r\n\r\n\r\n\t/**\r\n\t * Method to be used for logging level as error only in Api Services Log\r\n\t * \r\n\t * Resulting ErrorMessage goes only to ApiServices Local Logs\r\n\t * \r\n\t * @param error\r\n\t * object to be thrown to the calling method\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid error(Throwable error, String correlationId);\r\n\r\n\t/**\r\n\t * Method to be used for logging level as error\r\n\t * \r\n\t * in Api Services Logs and also ELF Logs\r\n\t * \r\n\t * @param apiErrorMessage\r\n\t * message to be logged\r\n\t * @param error\r\n\t * object to be thrown to the calling method\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid error(String apiErrorMessage, Exception error, String correlationId);\r\n\r\n\t/**\r\n\t * Method to be used for logging level as fatal.\r\n\t * \r\n\t * @param paramString\r\n\t * message to be logged\r\n\t */\r\n\tvoid fatal(String paramString);\r\n\r\n\t/**\r\n\t * Marks the exit point from a debug method.\r\n\t * \r\n\t * @param startTime\r\n\t * start time of method entry\r\n\t * @param correlationId\r\n\t * - tracking Id to be logged\r\n\t */\r\n\tvoid logMethodExit(long startTime, String correlationId);\r\n\r\n\t/**\r\n\t * @return status if logging is enabled at debug level\r\n\t */\r\n\tboolean isDebugEnabled();\r\n\r\n\t/**\r\n\t * @return status if logging is enabled at error level\r\n\t */\r\n\tboolean isErrorEnabled();\r\n\r\n\t/**\r\n\t * @return status if logging is enabled at fatal level\r\n\t */\r\n\tboolean isFatalEnabled();\r\n\r\n\t/**\r\n\t * @return status if logging is enabled at info level\r\n\t */\r\n\tboolean isInfoEnabled();\r\n\r\n\t/**\r\n\t * @return status if logging is enabled at warn level\r\n\t */\r\n\tboolean isWarnEnabled();\r\n\t\r\n\t\r\n\t/**\r\n\t * This method is used to set the default logger level at run time.\r\n\t * \r\n\t * @param logLevel\r\n\t * - level to be set for logger.\r\n\t */\r\n\tvoid setLoggerLevel(String logLevel);\r\n}", "public Log(Logger logger) {\n this.logger = logger;\n }", "Object createLogger(String name);", "public LogHelper(Logger logger) {\n this.logger = logger;\n }", "Logger createLogger(Class clazz, CelebrosExportData loggerData);", "public interface Logger {\n\n\t/**\n\t * Set the name for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(String className);\n\t\n\t/** \n\t * Set the class for meaningful class names in log messages\n\t * \n\t * If your logger supports instantiating a logger with a class name, \n\t * the implementation should allow instantiation in this manner.\n\t * Otherwise, a NOOP implementation is acceptable.\n\t */\n\tpublic Logger setLoggerClass(Class<?> clazz);\n\t\n\t/**\n * Log a fatal event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void fatal(String message);\n\t\n\t/**\n * Log a fatal level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void fatal(String message, Throwable throwable);\n\n\t/**\n * Log an error level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void error(String message);\n\t\n\t/**\n * Log an error level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void error(String message, Throwable throwable);\n\n\t/**\n * Log a warning level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void warning(String message);\n\t\n\t/**\n * Log a warning level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void warning(String message, Throwable throwable);\n\n\t/**\n * Log an info level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void info(String message);\n\t\n\t/**\n * Log an info level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void info(String message, Throwable throwable);\n\n\t/**\n * Log a debug level security event\n * \n * @param message \n * \t\tthe message to log\n */\n\tpublic void debug(String message);\n\t\n\t/**\n * Log a debug level security event\n * and also record the stack trace associated with the event.\n * \n * @param message \n * \t\tthe message to log\n * @param throwable \n * \t\tthe exception to be logged\n */\n\tpublic void debug(String message, Throwable throwable);\n}", "public interface LogOwner {\n\tLogger getLogger();\n}", "public interface LoggerFactory\n{\n /**\n * Returns the name of this logger factory. This name must consist of ASCII letters,\n * digits and underscore (_) only.\n * It is a short name that can be used in configurations to refer to the logging\n * framework binding that is provided by this factory.\n */\n public String getName();\n\n /**\n * Returns a new logger instance that is not named (empty string name) and therefore\n * not be retrieved again in any way by the factory.\n */\n public Logger createLogger();\n\n /**\n * Returns a logger instance corresponding to the given name.\n * If it does not exist yet, it will be created.\n * Otherwise the already existing logger will be returned.\n */\n public Logger getLogger(String loggerName);\n\n /**\n * Returns a logger instance corresponding to the full qualifies name of the given class.\n * If it does not exist yet, it will be created.\n * Otherwise the already existing logger will be returned.\n */\n public Logger getLogger(Class<?> clazz);\n\n}", "public interface Logger {\n\n /**\n * Logs a warning.\n * \n * @param text the warning text\n */\n public void warn(String text);\n \n /**\n * Logs an error.\n * \n * @param text the error text\n */\n public void error(String text);\n \n /**\n * Logs an information.\n * \n * @param text the information text\n */\n public void info(String text);\n \n }", "protected Logger createLogger()\n {\n Logger logger;\n if ((getContainerElement() != null) && (getContainerElement().getLog() != null))\n {\n // Ensure that the directories where the log will go are created\n getContainerElement().getLog().getParentFile().mkdirs();\n\n logger = new FileLogger(getContainerElement().getLog(), true);\n }\n else\n {\n logger = new MavenLogger(getLog());\n }\n\n if ((getContainerElement() != null) && (getContainerElement().getLogLevel() != null))\n {\n logger.setLevel(getContainerElement().getLogLevel());\n }\n\n return logger;\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 }", "public TraceLogger(Logger classLogger) {\n\n super(classLogger);\n }", "protected abstract InternalLogger newInstance(String name);", "public interface ILogWriter {\n\n\t/** Log an exception, with the stack trace, exception type and message. */\n\tvoid e(String tag, Exception e);\n\n\t/** Log a throwable, with the stack trace, exception type and message. */\n\tvoid e(String tag, Throwable tr);\n\n\t/** Log an error message. */\n\tvoid e(String tag, String msg);\n\n\t/** Log a debug message. */\n\tvoid d(String tag, String msg);\n\n\t/** Log an informative message. */\n\tvoid i(String tag, String msg);\n\n\t/** Log a warning message. */\n\tvoid w(String tag, String msg);\n}", "EmailLogRenderer registerLogger(Logger logger);", "protected Log createLogger()\n {\n return ((log != null) ? log : LogFactory.getLog(getClass()));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given a data graph this function identifies all 'flats' on the graph. For the definition of a flat see the findAllFlatsOfAtLeastLength(int length, BaseGraph graph) function in this class
public static GraphFlatCollection<IGraphFlat> findAllFlats(BaseGraph<AbstractGraphPoint> graph) { //NB a 'FLAT' must be at least 2 seconds long GraphFlatCollection<IGraphFlat> result = DTUtil.findAllFlatsOfAtLeastLength(2, graph); return result; }
[ "public static GraphFlatCollection<IGraphFlat> findAllFlatsOfAtLeastLength(int length, BaseGraph<AbstractGraphPoint> graph) {\r\n GraphFlatCollection<IGraphFlat> result = new GraphFlatCollection<IGraphFlat>(graph);\r\n if (0 < length && graph != null) {\r\n if (1 < graph.size()) {\r\n //Get a descending iterator of graph points\r\n Iterator<AbstractGraphPoint> descIter = graph.descendingIterator();\r\n AbstractGraphPoint currPoint = descIter.next();\r\n GraphFlat currFlat = new GraphFlat(currPoint);\r\n while (descIter.hasNext()) {\r\n currPoint = descIter.next();\r\n if (!currFlat.addPoint(currPoint)) {\r\n //Value has changed add currFlat to collection\r\n if (currFlat.isAtLeastXLong(length)) {\r\n result.add(currFlat);\r\n }\r\n //This point is the start of a new flat\r\n currFlat = new GraphFlat(currPoint);\r\n }\r\n }\r\n //If the last flat is at least the required length add it\r\n if (currFlat.isAtLeastXLong(length)) {\r\n result.add(currFlat);\r\n }\r\n }\r\n }\r\n return result;\r\n }", "public int getFlats() {\n return flats;\n }", "public Set<Flat> getFlats(){\n return content.stream().filter((Property p) -> p instanceof Flat)\n .map((Property p)-> (Flat) p)\n .collect(Collectors.toSet());\n }", "public static Set<List<Vertex>> depthFirstSearch(Graph graph) {\n\t\t\n\t\t\n\t\tList<Vertex> vertices = graph.getVertices();\n\t\tSet<List<Vertex>> dfs = new HashSet<List<Vertex>>();\n\t\t\n\t\tfor(Vertex v: vertices){\n\t\t\tList<Vertex> vList = new ArrayList<Vertex>();\n\t\t\tStack<Vertex> depth = new Stack<Vertex>();\n\t\t\tdepth.add(v);\n\t\t\t\n\t\t\twhile(!depth.isEmpty()){\n\t\t\t\tVertex currentV = depth.pop();\n\t\t\t\tvList.add(currentV);\n\t\t\t\t\n\t\t\t\tList<Vertex> downstream = graph.getDownstreamNeighbors(currentV);\n\t\t\t\tfor(Vertex neighbor : downstream){\n\t\t\t\t\tif(depth.contains(neighbor)){\n\t\t\t\t\t\tdepth.remove(neighbor);\n\t\t\t\t\t}\n\t\t\t\t\tif(!vList.contains(neighbor)){\n\t\t\t\t\t\tdepth.add(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdfs.add(vList);\n\t\t}\n\t\t\n\t\t\n\t\treturn dfs;\n\n\t}", "public static Set<List<Vertex>> depthFirstSearch(Graph graph) {\n Set<List<Vertex>> arrayListHashSet=new HashSet<>();\n\n for(int i=0;i<graph.getVertices().size();i++){\n ArrayList<Vertex> visitedArrayList=new ArrayList<>();\n for(int j=0;j<graph.getVertices().size();j++){\n if(visitedArrayList.size()==0){\n if(!visitedArrayList.contains(graph.getVertices().get(i))){\n depthFirstSearch(graph.getVertices().get(i),visitedArrayList,graph);\n }\n }\n else{\n if(!visitedArrayList.contains(graph.getVertices().get(j))){\n depthFirstSearch(graph.getVertices().get(j),visitedArrayList,graph);\n }\n }\n }\n arrayListHashSet.add(visitedArrayList);\n }\n return arrayListHashSet; // this should be changed\n }", "protected List<DependencyNode> determineRootSet(List<DependencyNode> graph)\n {\n List<DependencyNode> result = new ArrayList<DependencyNode> ();\n for ( DependencyNode n : graph ) {\n result.addAll( determineRootSet( n ) );\n }\n return result;\n }", "@Test\n public void testSingleFlatten() throws Exception {\n // sdk_predecessor -----> out -\\ /-> sdk_successor --> out\n // ambiguous_flatten --> out -> no_location_successor --> out\n // runner_predecessor --> out -/ \\-> runner_successor --> out\n MutableNetwork<Node, Edge> network = CloneAmbiguousFlattensFunctionTest.createEmptyNetwork();\n Node sdkPredecessor = CloneAmbiguousFlattensFunctionTest.createSdkNode(\"sdk_predecessor\");\n Node runnerPredecessor = CloneAmbiguousFlattensFunctionTest.createRunnerNode(\"runner_predecessor\");\n Node sdkPredecessorOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"sdk_predecessor.out\");\n Node runnerPredecessorOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"runner_predecessor.out\");\n Node ambiguousFlatten = CloneAmbiguousFlattensFunctionTest.createFlatten(\"ambiguous_flatten\", AMBIGUOUS);\n Node ambiguousFlattenOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"ambiguous_flatten.out\");\n Node sdkSuccessor = CloneAmbiguousFlattensFunctionTest.createSdkNode(\"sdk_successor\");\n Node runnerSuccessor = CloneAmbiguousFlattensFunctionTest.createRunnerNode(\"runner_successor\");\n Node noLocationSuccessor = CloneAmbiguousFlattensFunctionTest.createNoLocationNode();\n Node sdkSuccessorOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"sdk_successor.out\");\n Node runnerSuccessorOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"runner_successor.out\");\n Node noLocationSuccessorOutput = CloneAmbiguousFlattensFunctionTest.createPCollection(\"no_location_successor.out\");\n network.addNode(sdkPredecessor);\n network.addNode(runnerPredecessor);\n network.addNode(sdkPredecessorOutput);\n network.addNode(runnerPredecessorOutput);\n network.addNode(ambiguousFlatten);\n network.addNode(ambiguousFlattenOutput);\n network.addNode(sdkSuccessor);\n network.addNode(runnerSuccessor);\n network.addNode(noLocationSuccessor);\n network.addNode(sdkSuccessorOutput);\n network.addNode(runnerSuccessorOutput);\n network.addNode(noLocationSuccessorOutput);\n network.addEdge(sdkPredecessor, sdkPredecessorOutput, DefaultEdge.create());\n network.addEdge(runnerPredecessor, runnerPredecessorOutput, DefaultEdge.create());\n network.addEdge(sdkPredecessorOutput, ambiguousFlatten, DefaultEdge.create());\n network.addEdge(runnerPredecessorOutput, ambiguousFlatten, DefaultEdge.create());\n network.addEdge(ambiguousFlatten, ambiguousFlattenOutput, DefaultEdge.create());\n network.addEdge(ambiguousFlattenOutput, sdkSuccessor, DefaultEdge.create());\n network.addEdge(ambiguousFlattenOutput, runnerSuccessor, DefaultEdge.create());\n network.addEdge(ambiguousFlattenOutput, noLocationSuccessor, DefaultEdge.create());\n network.addEdge(sdkSuccessor, sdkSuccessorOutput, DefaultEdge.create());\n network.addEdge(runnerSuccessor, runnerSuccessorOutput, DefaultEdge.create());\n network.addEdge(noLocationSuccessor, noLocationSuccessorOutput, DefaultEdge.create());\n // After:\n // SdkPredecessor -----> out --> SdkFlatten --> out --> SdkSuccessor --> out\n // X\n // RunnerPredecessor --> out --> RunnerFlatten --> out --> RunnerSuccessor --> out\n // \\-> NoLocationSuccessor --> out\n List<List<Node>> originalPaths = Networks.allPathsFromRootsToLeaves(network);\n network = new CloneAmbiguousFlattensFunction().apply(network);\n // Get sdk and runner flattens and outputs.\n ParallelInstructionNode sdkFlatten = null;\n ParallelInstructionNode runnerFlatten = null;\n for (Node node : network.nodes()) {\n if ((node instanceof ParallelInstructionNode) && ((getParallelInstruction().getFlatten()) != null)) {\n ParallelInstructionNode castNode = ((ParallelInstructionNode) (node));\n if ((castNode.getExecutionLocation()) == (ExecutionLocation.SDK_HARNESS)) {\n sdkFlatten = castNode;\n } else\n if ((castNode.getExecutionLocation()) == (ExecutionLocation.RUNNER_HARNESS)) {\n runnerFlatten = castNode;\n } else {\n Assert.assertTrue(\"Ambiguous flatten not removed from network.\", ((castNode.getExecutionLocation()) != (ExecutionLocation.AMBIGUOUS)));\n }\n\n }\n }\n Assert.assertNotNull(\"Ambiguous flatten was not cloned into sdk flatten.\", sdkFlatten);\n Assert.assertNotNull(\"Ambiguous flatten was not cloned into runner flatten.\", runnerFlatten);\n Node sdkFlattenOutput = Iterables.getOnlyElement(network.successors(sdkFlatten));\n Node runnerFlattenOutput = Iterables.getOnlyElement(network.successors(runnerFlatten));\n Assert.assertEquals(2, network.predecessors(sdkFlatten).size());\n Assert.assertEquals(2, network.predecessors(runnerFlatten).size());\n Assert.assertEquals(1, network.successors(sdkFlattenOutput).size());\n Assert.assertEquals(2, network.successors(runnerFlattenOutput).size());\n Assert.assertSame(sdkSuccessor, Iterables.getOnlyElement(network.successors(sdkFlattenOutput)));\n Assert.assertThat(network.successors(runnerFlattenOutput), JUnitMatchers.hasItems(runnerSuccessor, noLocationSuccessor));\n Assert.assertEquals(originalPaths.size(), Networks.allPathsFromRootsToLeaves(network).size());\n }", "public static List<List<Object>> getPaths(Map<Object, List<Object>> graph) {\n List<List<Object>> paths = new ArrayList<>();\n\n Set<Object> nodes = graph.keySet();\n Map<Object, Integer> inCount = getInCount(graph);\n Map<Object, Integer> outCount = getOutCount(graph);\n\n Set<Object> oneInOneOutNodes = new HashSet<>(nodes);\n\n for (Object node : nodes) {\n if (!(inCount.getOrDefault(node, 0) == 1 && outCount.getOrDefault(node, 0) == 1)) {\n oneInOneOutNodes.remove(node);\n if (outCount.getOrDefault(node, 0) > 0) {\n for (Object nextNode : graph.get(node)) {\n List<Object> nonBranchingPath = new ArrayList<>(Arrays.asList(node, nextNode));\n while (inCount.getOrDefault(nextNode, 0) == 1 && outCount.getOrDefault(nextNode, 0) == 1) {\n Object nextNextNode = graph.get(nextNode).get(0);\n nonBranchingPath.add(nextNextNode);\n nextNode = nextNextNode;\n }\n paths.add(nonBranchingPath);\n }\n }\n }\n }\n\n for (Object node : new HashSet<>(oneInOneOutNodes)) {\n Object nextNode = graph.get(node).get(0);\n List<Object> isolatedCycle = new ArrayList<>(Arrays.asList(node));\n while (oneInOneOutNodes.contains(nextNode)) {\n if (nextNode.equals(node)) {\n isolatedCycle.add(node);\n paths.add(isolatedCycle);\n break;\n }\n oneInOneOutNodes.remove(nextNode);\n isolatedCycle.add(nextNode);\n nextNode = graph.get(nextNode).get(0);\n }\n }\n\n return paths;\n }", "public long dinic(Network graph, int source, int sink) {\n long flow = 0;\n\n Integer[] level = new Integer[graph.vertices];\n Arrays.fill(level, -1);\n level[source] = 0;\n\n Queue<Integer> q = new Queue<>();\n q.push(source);\n\n while (dinicBfs(graph, q, level, sink)) {\n Integer[] ptr = new Integer[graph.vertices];\n long pushed = dinicDfs(graph, source, sink, Long.MAX_VALUE, ptr, level);\n while (pushed > 0) {\n flow += pushed;\n pushed = dinicDfs(graph, source, sink, Long.MAX_VALUE, ptr, level);\n }\n\n Arrays.fill(level, -1);\n level[source] = 0;\n q.push(source);\n }\n\n return flow;\n }", "public void DFS() {\r\n\t\tSet<Vertex> visited = new HashSet<Vertex>();\r\n\r\n\t\t// Create a stack for DFS\r\n\t\tStack<Vertex> stack = new Stack<Vertex>();\r\n\r\n\t\tDFS(this.vertices[3], visited, stack); // DFS starting with 40\r\n\r\n\t\t// Call the helper function to print DFS traversal\r\n\t\t// 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\tDFS(this.vertices[i], visited, stack);\r\n\t}", "static void floodfill() {\r\n\t\tprintThis(\"Flood Fill Demo (the input graph must be UNDIRECTED)\");\r\n\t\tnumComp = 0;\r\n\t\tdfs_num = new int[V];\r\n\t\tArrays.fill(dfs_num, DFS_WHITE);\r\n\t\tfor (int i = 0; i < V; i++)\r\n\t\t\tif (dfs_num[i] == DFS_WHITE)\r\n\t\t\t\tfloodfill(i, ++numComp);\r\n\t\tfor (int i = 0; i < V; i++)\r\n\t\t\tSystem.out.printf(\"Vertex %d has color %d\\n\", i, dfs_num[i]);\r\n\t}", "public static Set<List<Vertex>> breadthFirstSearch(Graph graph) {\n\t\t// TODO: Implement this method\n\t\tList<Vertex> vertices = graph.getVertices();\n\t\tSet<List<Vertex>> returnValues = new HashSet<List<Vertex>>();\n\t\t\n\t\tfor(Vertex v : vertices){\n\t\t\tList<Vertex> currentList = new ArrayList<Vertex>();\n\t\t\tQueue<Vertex> toBeExplored = new LinkedList<Vertex>();\n\t\t\ttoBeExplored.add(v);\n\t\t\t\n\t\t\twhile(!toBeExplored.isEmpty()){\n\t\t\t\tVertex currentVertex = toBeExplored.poll();\n\t\t\t\tcurrentList.add(currentVertex);\n\t\t\t\tList<Vertex> downStreamNeighbors = graph.getDownstreamNeighbors(currentVertex);\n\t\t\t\t\n\t\t\t\tfor(Vertex neighbor: downStreamNeighbors){\n\t\t\t\t\tif(!currentList.contains(neighbor) && !toBeExplored.contains(neighbor)){\n\t\t\t\t\t\ttoBeExplored.add(neighbor);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturnValues.add(currentList);\n\t\t\t\n\t\t}\n\t\treturn returnValues; // this should be changed\n\t}", "public static void flat_edge(Agraph_s g, Agedge_s e) {\r\nENTERING(\"8dvukicq96g5t3xgdl0ue35mj\",\"flat_edge\");\r\ntry {\r\n elist_append(e, ND_flat_out(agtail(e)));\r\n elist_append(e, ND_flat_in(aghead(e)));\r\n GD_has_flat_edges(g, NOT(false));\r\n GD_has_flat_edges(dot_root(g), NOT(false));\r\n} finally {\r\nLEAVING(\"8dvukicq96g5t3xgdl0ue35mj\",\"flat_edge\");\r\n}\r\n}", "public void setFlats(int flats) {\n this.flats = flats;\n }", "public List<Collection<Vertex<Integer>>> detect(UndirectedGraph<Integer,Integer> graph){\n\t\tlong start = System.currentTimeMillis();\n\t\tList<Collection<Vertex<Integer>>> diamonds = find(graph);\n\t\tlong stop = System.currentTimeMillis();\n\t\tp1time = \"\"+(stop-start);\n\t\tfound=diamonds.size();\n\t\treturn diamonds;\n\t}", "public double getFlatness() {\n\treturn flatness;\n }", "public List<Set<SDGNode>> firstPass() {\n Object[] edges = icfg.edgeSet().toArray();\n\n // first, temporarily remove all edges but CF and CALL\n for (int i = 0; i < edges.length; i++) {\n SDGEdge e = (SDGEdge) edges[i];\n if (e.getKind() != SDGEdge.Kind.CONTROL_FLOW\n && e.getKind() != SDGEdge.Kind.CALL) {\n\n buffer.addFirst(e);\n icfg.removeEdge(e);\n }\n }\n\n // then compute SCCs\n StrongConnectivityInspector<SDGNode, SDGEdge> sci = new StrongConnectivityInspector<SDGNode, SDGEdge>(icfg);\n List<Set<SDGNode>> erg = sci.stronglyConnectedSets();\n\n // put return edges back\n for (SDGEdge e : buffer) {\n icfg.addEdge(e);\n }\n buffer.clear();\n\n return erg;\n }", "private <T extends ExcludeSpec> FlattenOperationResult flatten(Class<T> flattenType, Set<ExcludeSpec> specs, Predicate<ExcludeSpec> fastExit, Predicate<ExcludeSpec> ignoreSpec) {\n boolean filtered = false;\n boolean flatten = false;\n int size = 0;\n for (ExcludeSpec spec : specs) {\n if (fastExit.test(spec)) {\n return FlattenOperationResult.FAST_EXIT;\n }\n if (ignoreSpec.test(spec)) {\n filtered = true;\n } else if (flattenType.isInstance(spec)) {\n flatten = true;\n size += ((CompositeExclude) spec).size();\n } else {\n size++;\n }\n }\n if (!filtered && !flatten) {\n return FlattenOperationResult.of(specs);\n }\n if (filtered && !flatten) {\n return filterOnly(specs, ignoreSpec);\n }\n // slowest path\n return expensiveFlatten(flattenType, maybeFilter(specs, ignoreSpec, filtered), size);\n }", "private List<SparkTran> getAllTrans() {\n List<SparkTran> result = new LinkedList<SparkTran>();\n Set<SparkTran> seen = new HashSet<SparkTran>();\n\n for (SparkTran leaf: leafTrans) {\n // make sure all leaves are visited at least once\n visit(leaf, seen, result);\n }\n\n return result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method registers the given ComponentSystemEventListener that should be notified when this DeferredFragment is ready to be rendered.
public void addReadyListener(ComponentSystemEventListener listener) { listeners.add(listener); }
[ "@Override\n public ComponentSystemEventListener getComponentSystemEventListener() {\n if (compListener == null) {\n compListener = new InsertComponent.PreRenderViewListener(this);\n }\n return compListener;\n }", "private void notifyViewReady() {\n ViewEvent e = new ViewEvent(this);\n synchronized (listeners) {\n listeners.forEach(l -> l.onViewReady(e));\n }\n }", "public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {\n // Ensure we only do this once... NOTE: I tried to unsubscribe from\n // the event, but ran into a ConcurrentModificationException... the\n // list of listeners is probably still being looped through while I\n // am attempting to remove this Listener. So I'll do this instead:\n if (done) {\n return;\n }\n done = true;\n\n // Get the component\n DeferredFragment comp = (DeferredFragment) event.getComponent();\n\n // Get the UIViewRoot Facet Map\n FacesContext ctx = FacesContext.getCurrentInstance();\n UIViewRoot viewRoot = ctx.getViewRoot();\n Map<String, UIComponent> facetMap = viewRoot.getFacets();\n\n // Create a place holder...\n String key = comp.getFacetKey(ctx);\n UIComponent placeHolder = new UIOutput();\n placeHolder.getAttributes().put(\n \"value\", \"<span id='\" + key + \"'></span>\");\n\n // Swap comp with the placeHolder...\n List<UIComponent> peers = comp.getParent().getChildren();\n int index = peers.indexOf(comp);\n peers.set(index, placeHolder);\n comp.setPlaceHolderId(placeHolder.getClientId(ctx));\n\n // Move this component to the FacetMap\n facetMap.put(key, comp);\n\n // Register dependency(s)\n String dependency = (String) comp.getAttributes().get(\"dependency\");\n int dependencyCnt = 0;\n if (dependency != null) {\n dependencyCnt = DependencyManager.getInstance().addDependencies(\n dependency, new DeferredFragmentDependencyListener(comp));\n }\n\n // Store the dependency count...\n comp.setDependencyCount(dependencyCnt);\n\n // Ensure we have a FragmentRenderer component...\n FragmentRenderer fr = FragmentRenderer.getInstance(viewRoot);\n\n // Increment fragment count on FragmentRenderer component...\n fr.addDeferredFragment(comp);\n comp.addReadyListener(fr);\n }", "void onSystemReady();", "private void onPhaseActivityManagerReady() {\n // RoleManager doesn't tell us about upgrade, so we still need to listen for app upgrades.\n // (app uninstall/disable will be notified by RoleManager.)\n final IntentFilter packageFilter = new IntentFilter();\n packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);\n packageFilter.addDataScheme(\"package\");\n\n mContext.registerReceiverAsUser(mPackageUserMonitor, UserHandle.ALL,\n packageFilter, null, mHandler);\n\n final IntentFilter userFilter = new IntentFilter();\n userFilter.addAction(Intent.ACTION_USER_REMOVED);\n mContext.registerReceiverAsUser(mPackageUserMonitor, UserHandle.ALL,\n userFilter, null, mHandler);\n\n mContext.getContentResolver().registerContentObserver(Settings.Global.getUriFor(\n Settings.Global.APP_BINDING_CONSTANTS), false, mSettingsObserver);\n\n refreshConstants();\n }", "protected void onViewReady() {\n checkViewReady();\n }", "public void applicationReady()\r\n\t{\r\n\t\tJComponent comp = getPluginComponent();\r\n\t\tif (comp != null)\r\n\t\t{\r\n\t\t\tcomp.addHierarchyListener(this);\r\n\t\t}\r\n\t}", "private void registerForDisplayEvents(){\r\n \t\tString eventFilter = \"(&\" + \r\n \t\t\t\t\"(\" + CSSEventConstants.EVENT_NAME + \"=displayUpdate)\" +\r\n \t\t\t\t\"(\" + CSSEventConstants.EVENT_SOURCE + \"=org/societies/css/device)\" +\r\n \t\t\t\t\")\";\r\n \t\tthis.eventMgr.subscribeInternalEvent(this, new String[]{EventTypes.DISPLAY_EVENT}, eventFilter);\r\n \t\tLOG.debug(\"Subscribed to \"+EventTypes.DISPLAY_EVENT+\" events\");\r\n \t}", "void loadEventRegistrationsFragment();", "@Override\n public void nearbyFragmentsAreReady() {\n Timber.d(\"Nearby fragments are ready to be used by presenter\");\n nearbyViewsAreReady = true;\n // The condition for initialize operations is both having views ready and tab is selected\n if (onTabSelected) {\n checkForPermission();\n }\n }", "protected void onViewReady() {\n if (isCallEnded()) {\n Log.d(LOG_TAG, \"onCallError : the call is ended\");\n return;\n }\n\n synchronized (LOG_TAG) {\n for (MXCallListener listener : mxCallListeners) {\n try {\n listener.onViewReady();\n } catch (Exception e) {\n }\n }\n }\n }", "public void onStoreReady() {\n mMxEventDispatcher.dispatchOnStoreReady();\n }", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "public void register() {\n unregister();\n Log.d(TAG, \"[register in eventbus]\");\n EventBus.getDefault().register(this);\n }", "@Override\n protected void onRegister() {\n IBinder displayToken = Surface.getBuiltInDisplay(Surface.BUILT_IN_DISPLAY_ID_MAIN);\n sendDisplayDeviceEvent(new LocalDisplayDevice(displayToken, true),\n DISPLAY_DEVICE_EVENT_ADDED);\n }", "public final void fireInitEvent() {\n if (firingEvents && !initialized) {\n initialized = true;\n listeners.forEach(listener -> listener.onInit(this));\n }\n }", "protected void installListeners()\n {\n menuBar.addContainerListener(containerListener);\n menuBar.addPropertyChangeListener(propertyChangeListener);\n }", "public void registerDeviceStateListener() {\n boolean registerResult = DeviceManager.registerDeviceStateCallback(iDeviceStateCallback);\n listener.updateResult(\"Register \" + (registerResult ? \"Success\" : \"Failed\"));\n }", "@Override\n public void notifyServiceCreated(){\n List<Fragment> frags = getChildFragmentManager().getFragments();\n for(Fragment frag : frags){\n if(frag instanceof BasePanelFragment){\n ((BasePanelFragment)frag).notifyServiceCreated();\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Metodo responsavel por listar os emprestimos em que o usuario eh o dono do item, em ordem alfabetica pelo nome do item.
public String listarEmprestimosEmprestandoOrdenadosPorNomeItem(Usuario usuario) { List<Emprestimo> listaEmprestimos = retornaListaEmprestimos(usuario, true); if (listaEmprestimos.isEmpty()) return "Nenhum item emprestado"; Collections.sort(listaEmprestimos, new OrdenaItemEmprestadoAlfabetico()); String stringEmprestimos = "Emprestimos: "; for (Emprestimo emprestimo : listaEmprestimos) { stringEmprestimos += emprestimo.toString() + "|"; } return stringEmprestimos; }
[ "public String listarEmprestimosRequerenteOrdenadosPorNomeItem(Usuario usuario) {\n\n\t\tList<Emprestimo> listaEmprestimos = retornaListaEmprestimos(usuario, false);\n\n\t\tif (listaEmprestimos.isEmpty())\n\t\t\treturn \"Nenhum item pego emprestado\";\n\n\t\tCollections.sort(listaEmprestimos, new OrdenaItemEmprestadoAlfabetico());\n\n\t\tString stringEmprestimos = \"Emprestimos pegos: \";\n\t\tfor (Emprestimo emprestimo : listaEmprestimos) {\n\t\t\tstringEmprestimos += emprestimo.toString() + \"|\";\n\t\t}\n\n\t\treturn stringEmprestimos;\n\t}", "public List<Usuario> listarUsuariosTodos(String username, String nombre, String apellido);", "List<Item> getUserItems(User user);", "public void addListaUsuario_Sincroniza(Usuario item);", "public List<Item> getToDoList(String username) throws ToDoListException;", "@Override\r\n\t public List<Item> getItems(String userEmail) throws ToDoListDAOException {\n \t \r\n\t\t\tSession session = factory.openSession();\r\n\t\t\ttry {\r\n\t\t\t\tQuery query = session.createQuery(\"from Item i WHERE i.email = '\"+ userEmail +\"'\");\r\n\t\t\t\tList queryList = query.list();\r\n\t\t\t\tSystem.out.println(\"from dao\" + queryList);\r\n\t\t\t\tif(queryList != null && queryList.isEmpty())\r\n\t\t\t\t\treturn (List<Item>)queryList;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn (List<Item>)queryList;\r\n\t\t\t}\r\n\t\t\tcatch ( HibernateException e ) {\r\n\t\t\t\tthrow new ToDoListDAOException(\"Unable to get task list from the database\");\r\n\t\t\t} finally {\r\n\t\t\t\tif (session != null)\r\n\t\t\t\t\tsession.close(); \r\n\t\t\t} \r\n\t\t}", "@Override\n public List<AdminInfo> searchByItem(String item, String name) {\n List<AdminInfo> result = adminDao.searchByItem(item, name);\n return result;\n }", "private List<Emprestimo> retornaListaEmprestimos(Usuario usuario, boolean emprestando) {\n\n\t\tList<Emprestimo> listaEmprestimos = new ArrayList<Emprestimo>();\n\n\t\tfor (Emprestimo emprestimo : this.emprestimos) {\n\n\t\t\tif (emprestando) {\n\t\t\t\tif (emprestimo.getDonoDoItem().equals(usuario))\n\t\t\t\t\tlistaEmprestimos.add(emprestimo);\n\t\t\t} else {\n\t\t\t\tif (emprestimo.getUsuarioRequerente().equals(usuario))\n\t\t\t\t\tlistaEmprestimos.add(emprestimo);\n\t\t\t}\n\t\t}\n\t\treturn listaEmprestimos;\n\t}", "public List<Usuario> listarUsuarios();", "public UserItem getUserItemByIds(UserItem ui);", "public ArrayList<Usuario> listarUsuarios () throws RemoteException;", "public String navigateUsuarioList() {\n if (this.getSelected() != null) {\n FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"Usuario_items\", this.getSelected().getUsuarioList());\n }\n return \"/usuario/index\";\n }", "public static void listUserItems() {\n if (myItems.size() == 0) {\n System.out.println(\"You aren't carrying anything.\");\n } else {\n System.out.print(\"You are carrying: \");\n for (int i = 0; i < myItems.size(); i++) {\n if (myItems.size() == 0) {\n System.out.println(\"nothing\");\n } else if (myItems.size() == 1) {\n System.out.print(myItems.get(i));\n System.out.print('\\n');\n } else {\n System.out.print(myItems.get(i) + \", \");\n }\n String lastItem = myItems.get(myItems.size() - 1);\n if ((lastItem.equalsIgnoreCase(myItems.get(i)) && myItems.size() != 1)) {\n System.out.print('\\n');\n }\n }\n }\n }", "public void cargarEmpresasUsuario() {\n List<Integer> lista = new ArrayList<>();\n\n noCliente = activeUser.getCliente();\n String tipoUser = activeUser.getPerfil().getTipoUser();\n if (tipoUser.equalsIgnoreCase(\"CLIENTE\") && (noCliente != null && !noCliente.isEmpty())) {\n esClienteEmpresa = true;\n } else {\n esClienteEmpresa = false;\n noCliente = \"\";\n }\n\n activeUser.getEmpresas().forEach(emp -> {\n lista.add(emp.getId());\n });\n idsEmpresasAsignadas = lista.toArray(new Integer[lista.size()]);\n\n //BUSCA EN LOS PERFILES SI EL USUARIO PUEDE CANCELAR ARCHIVOS\n this.cancelar = (activeUser.getPerfil().getPerfil() & Long.parseLong(numPerfilCancelacion)) == Long.parseLong(numPerfilCancelacion);\n\n }", "private String[] getUserList(Item item) {\n\t\t\n\t\tSet<String> lists = new HashSet<String>();\n\t\tif(usersToLists == null) {\n\t\t\tLogger.getLogger(ListItemFilter.class).info(\"User list is null\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t\tif(item.getUserId() == null) {\n\t\t\tLogger.getLogger(ListItemFilter.class).info(\"User in item is null\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\t\n\t\tSet<String> userLists = usersToLists.get(item.getUserId());\n\t\tif(userLists != null) {\n\t\t\tlists.addAll(userLists);\n\t\t}\n\t\t\n\t\tString[] mentions = item.getMentions();\n\t\tif(mentions != null) {\n\t\t\tfor(String mention : mentions) {\n\t\t\t\tuserLists = usersToLists.get(mention);\n\t\t\t\tif(userLists != null) {\n\t\t\t\t\tlists.addAll(userLists);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString refUserId = item.getReferencedUserId();\n\t\tif(refUserId != null) {\n\t\t\tuserLists = usersToLists.get(refUserId);\n\t\t\tif(userLists != null) {\n\t\t\t\tlists.addAll(userLists);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(lists.size() > 0) {\n\t\t\treturn lists.toArray(new String[lists.size()]);\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "List<InventoryItem> getInventory(String username);", "public List <UsuarioPessoaJuridica> consultaPageListaUsuarioJuridicoItemColecao(int idEdicaoAlbum){\n\n\n\t\tString sql =\"SELECT us.guid_usuario, us.nome_exibicao, us.foto_usuario from Usuario us, item_colecao ic\"\n\t\t\t\t+ \" where ic.id_edicao_album_fk = ? \"\n\t\t\t\t+ \" and us.id_usuario = ic.id_usuario_pk\"\n\t\t\t\t+ \" and (Select IF(COUNT(*), true, false) tag from usuario_pj where id_usuario = us.id_usuario)\"\n\t\t\t\t+ \" limit 10\";\n\n\t\tObject [] parametros = {idEdicaoAlbum};\n\n\t\tList <UsuarioPessoaJuridica> listaUsuario = jdbcTemplate.query(sql, parametros, new UsuarioPessoaJuridicaPageRowMapper());\n\n\t\treturn listaUsuario;\n\t}", "public void listaritems() {\n System.out.print(\"Items: \");\n for (Item i : this.getItems()) {\n System.out.print(i.getDescricao() + \"; \");\n }\n System.out.println(\"\\n\");\n }", "public List<UserDO> getUsersByName(String name);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts this V1CreateModifierOptionRequest into string format.
@Override public String toString() { return "V1CreateModifierOptionRequest [" + "body=" + body + "]"; }
[ "public String toString() {\n return toString(mModifier);\n }", "@Override\r\n public String toString() {\r\n return \"CatalogModifier [\" + \"name=\" + name + \", priceMoney=\" + priceMoney + \", ordinal=\"\r\n + ordinal + \", modifierListId=\" + modifierListId + \"]\";\r\n }", "private String addOptions() {\n\t\tStringBuilder tag = new StringBuilder();\n\t\tint OptionsNumber = Integer.parseInt(parameters[0]);\n\t\t// Nine Parameters: OptionsNumber, Option1, Option1Tag, Option2, Option2Tag, Option3, Option3Tag, Option4, Option4Tag\n\t\t// Minimum Three Parameters, Maximum Nine\n\t\t// If OptionsNumber = 1, Use Option1 and Option1Tag only. If OptionsNumber = 2, Use Option1 and Option2.\n\t\ttag.append(\"options:[\");\n\t\ttag.append(\"[\" + parameters[1] + \"|\" + parameters[2] + \"]\");\n\t\tif (OptionsNumber > 1) {\n\t\t\ttag.append(\", [\" + parameters[3] + \"|\" + parameters[4] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 2) {\n\t\t\ttag.append(\", [\" + parameters[5] + \"|\" + parameters[6] + \"]\");\n\t\t}\n\t\tif (OptionsNumber > 3) {\n\t\t\ttag.append(\", [\" + parameters[7] + \"|\" + parameters[8] + \"]\");\n\t\t}\n\t\ttag.append(\"]\");\n\t\treturn tag.toString();\n\n\t}", "public String getOptionsAsString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (!runtimeKeys.get(i))\n buf.append(key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (runtimeKeys.get(i))\n buf.append(\"* \" + key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "public ResourceUnionVo generateCreateOpportunityCommandDescription(\n\t\t\tC4CUserActionVo request) {\n\t\tResourceUnionVo resourceUnionVo = new ResourceUnionVo();\n\t\tResourceUnion resourceUnion = new ResourceUnion();\n\t\tresourceUnion.setType(ResourceUnionConstants.TYPE_CHAT);\n\t\t// default index: 1, could be adjust later.\n\t\tresourceUnion.setDisplayIndex(3);\n\t\tString content = \"If neccessary, Click this button to create a new Opportunity \";\n\t\tString customerName = dumDeepLearnProcessUtility.getCustomerNameFromRequest(request);\n\t\tif(customerName != null){\n\t\t\tcontent = content + \" for customer:\" + customerName;\n\t\t}else{\n\t\t\tcontent = content + \":\";\n\t\t}\n\t\tresourceUnion.setContent(content);\n\t\tresourceUnionVo.setResourceUnion(resourceUnion);\n\t\treturn resourceUnionVo;\n\t}", "private String createOption(String optionSetId) {\n return optionActions.createOption(\n \"Option name auto\" + DataGenerator.randomString(),\n \"Option code auto\" + DataGenerator.randomString(),\n optionSetId);\n }", "public String toAttrSpec() {\n return String.format(\"%s[%s]=%s\", name, type.toString(), value);\n }", "@Override\r\n public String toString() {\r\n return \"BulkCreateTeamMembersRequest [\" + \"teamMembers=\" + teamMembers + \"]\";\r\n }", "ICallMuteRequest buildRequest(final java.util.List<? extends Option> requestOptions);", "com.google.protobuf.ByteString\n getOptionsDescriptionBytes();", "private String getOptionsString()\r\n\t{\r\n\t\tString options = \"\";\r\n\t\t\r\n\t\tfor (JRadioButton button : buttons)\r\n\t\t{\r\n\t\t\toptions += (StringEscaper.escape(button.getText()) + \";\" + button.isSelected() + \".\");\r\n\t\t}\r\n\t\t\r\n\t\toptions = options.substring(0, options.length() - 1); // Trim off the trailing ,\r\n\t\t\r\n\t\treturn options;\r\n\t}", "private static NBTTagCompound writeAttributeModifierToNBT(AttributeModifier par0AttributeModifier)\n {\n NBTTagCompound var1 = new NBTTagCompound();\n var1.setString(\"Name\", par0AttributeModifier.getName());\n var1.setDouble(\"Amount\", par0AttributeModifier.getAmount());\n var1.setInteger(\"Operation\", par0AttributeModifier.getOperation());\n var1.setLong(\"UUIDMost\", par0AttributeModifier.getID().getMostSignificantBits());\n var1.setLong(\"UUIDLeast\", par0AttributeModifier.getID().getLeastSignificantBits());\n return var1;\n }", "protected String paramString() {\r\n\r\n String str = \"key=\" + keyCode; //$NON-NLS-1$\r\n if (shiftModifier) {\r\n str += \",usesShiftModifier\"; //$NON-NLS-1$\r\n }\r\n return str;\r\n }", "public static String toString(int optionNumber) {\n\t\tswitch (optionNumber) {\n\t\tcase RESERVED_0:\n\t\t\treturn \"Reserved (0)\";\n\t\tcase CONTENT_TYPE:\n\t\t\treturn \"Content-Type\";\n\t\tcase MAX_AGE:\n\t\t\treturn \"Max-Age\";\n\t\tcase PROXY_URI:\n\t\t\treturn \"Proxy-Uri\";\n\t\tcase ETAG:\n\t\t\treturn \"ETag\";\n\t\tcase URI_HOST:\n\t\t\treturn \"Uri-Host\";\n\t\tcase LOCATION_PATH:\n\t\t\treturn \"Location-Path\";\n\t\tcase URI_PORT:\n\t\t\treturn \"Uri-Port\";\n\t\tcase LOCATION_QUERY:\n\t\t\treturn \"Location-Query\";\n\t\tcase URI_PATH:\n\t\t\treturn \"Uri-Path\";\n\t\tcase OBSERVE:\n\t\t\treturn \"Observe\";\n\t\tcase TOKEN:\n\t\t\treturn \"Token\";\n\t\tcase BLOCK:\n\t\t\treturn \"Block\";\n\t\tcase URI_QUERY:\n\t\t\treturn \"Uri-Query\";\n\t\tcase BLOCK2:\n\t\t\treturn \"Block2\";\n\t\tcase BLOCK1:\n\t\t\treturn \"Block1\";\n\t\t}\n\t\treturn String.format(\"Unknown option [number %d]\", optionNumber);\n\t}", "public String toString() {\n return \"TetheringRequest [ type= \" + mRequestParcel.tetheringType\n + \", localIPv4Address= \" + mRequestParcel.localIPv4Address\n + \", staticClientAddress= \" + mRequestParcel.staticClientAddress\n + \", exemptFromEntitlementCheck= \"\n + mRequestParcel.exemptFromEntitlementCheck + \", showProvisioningUi= \"\n + mRequestParcel.showProvisioningUi + \" ]\";\n }", "@Override\r\n public String toString() {\r\n return \"V1UpdateOrderRequest [\" + \"action=\" + action + \", shippedTrackingNumber=\"\r\n + shippedTrackingNumber + \", completedNote=\" + completedNote + \", refundedNote=\"\r\n + refundedNote + \", canceledNote=\" + canceledNote + \"]\";\r\n }", "public String getModifierName() {\n return modifierName;\n }", "private static String pssParameterSpecToString(PSSParameterSpec spec) {\n StringBuilder res = new StringBuilder();\n res.append(\"digestAlgorithm:\")\n .append(spec.getDigestAlgorithm())\n .append(\"\\nmgfAlgorithm:\")\n .append(spec.getMGFAlgorithm())\n .append(\"\\nsaltLength:\")\n .append(spec.getSaltLength())\n .append(\"\\ntrailerField:\")\n .append(spec.getTrailerField());\n if (spec.getMGFAlgorithm().equals(\"MGF1\")) {\n MGF1ParameterSpec mgf1Params = (MGF1ParameterSpec) spec.getMGFParameters();\n res.append(\"\\nmgf1 digestAlgorithm:\").append(mgf1Params.getDigestAlgorithm());\n }\n return res.toString();\n }", "public String toString()\n {\n DecimalFormat df = new DecimalFormat(\"#.00\");\n String words = getOptionName() + \": $\" + df.format(getOptionPrice()) + \".\";\n return words;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback when the continue button is clicked. The scenario and side have now been selected and are set in the game object.
private void continueButton() { Side side = view.getRadioButtonAllies().isSelected() ? Side.ALLIES : Side.AXIS; game.setNew(); game.setScenario(scenarioViewModel.getScenario().getValue()); game.setHumanSide(side); game.setSavedGameName(Resource.DEFAULT_SAVED_GAME); startGame(); navigate.goNext(this.getClass(), stage); }
[ "@Override\n public void onContinueDialogYesButtonClick() {\n startNewGame();\n }", "protected void changeSideClicked(ActionEvent e) {\n blackPlayer = 1 - blackPlayer;\n updateTurnInfo();\n startNewGame();\n }", "@FXML\n\tpublic void onPressedContinue()\n\t{\n\t\teditButton.setDisable(false);\n\t\tcontinueBtn.setStyle(\"\");\n\t\tcontinueBtn.setDisable(true);\t\n\t\tsesRoomSelected(sessionCreatedRooms.get(sessionCreatedRooms.size() - 1));\n\t\t\n\t}", "public void proceedGame()\n { \n if (Greenfoot.mouseClicked(proceed)) { //if user clicked proceed\n Greenfoot.setWorld(new GameWorld(time,lv,bgm,musicStatus,stackList,stackDefList));\n }\n }", "@FXML\n\tpublic void continueGame(ActionEvent event) {\n\t\tgz.continueGame();\n\t}", "private void nextButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_nextButtonActionPerformed\n if(napakalakiModel.getCurrentPlayer() == null){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel); \n }\n else{\n // Si ha cumplido el mal rollo puede continuar\n if( napakalakiModel.getCurrentPlayer().validState() ){\n this.nextButton.setEnabled(false);\n this.combatButton.setEnabled(false);\n this.playerView1.enableAfterNextButton();\n napakalakiModel.nextTurn();\n this.combatResultLabel.setText(\"\");\n // Llamo al setNapakalaki para que surjan efecto los cambios\n setNapakalaki(napakalakiModel);\n }\n else{\n this.combatResultLabel.setText(\"No cumples las condiciones para pasar de turno.\");\n }\n } \n }", "public void clickContinue() {\n\t\tcontinueButton.click();\n\t}", "public void continueGame() {\r\n board.printUI();\r\n }", "@Override\n\tpublic boolean performClick() { // Handles clicks; stuff can go awry if you falsely return false, I've learned\n\t\tsuper.performClick();\n\t\tint[] origin = {X0, Y0};\n\t\tint[] dimensions = {rows, cols};\n\n\t\tif (ViewController.getStatus() == 0) { // Scenario: close initial dialogue and proceed to tutorial mode query\n\t\t\t//flags stay same, though status and yes is changed by VC\n\t\t\treturn true;\n\t\t}\n\t\tif (ViewController.getStatus() == 1) { // Scenario: yes/no up and user clicked\n\t\t\t//CAUTION: may need to check if window was resized\n\t\t\tViewController.updateYN(yesX, noX, yesNoY);\n\t\t\treturn true;\n\t\t}\n\t\tif (ViewController.getStatus() == 2) { // Scenario: Neutral\n\t\t\tViewController.updateBoard(origin, dimensions, hexSize);\n\t\t\treturn true;\n\t\t}\n\t\tif (ViewController.getStatus() == 3) { // Scenario: options menu up\n\t\t\tViewController.updateWH(getWidth(), getHeight());\n\t\t\tViewController.updateBoard(origin, dimensions, hexSize);\n\t\t}\n\t\tif (ViewController.getStatus() == 4) { // Scenario: options menu closed, awaiting tile selection\n\t\t\tViewController.updateBoard(origin, dimensions, hexSize);\n\t\t}\n\t\telse { }\n\t\treturn true;\n\t}", "@Step\n public void clickContinueButton(){\n actionWithWebElements.clickOnElement(continueButton);\n }", "@Override\n public void onNewGameButtonClick() {\n if(game.isStarted()){\n startView.showContinueGameDialog();\n } else {\n startNewGame();\n }\n }", "public void playScenario()\r\n {\r\n currentPlayDirection = 1; // forwards\r\n runAnimation(); // perform animation\r\n }", "@Override\n public void changeTurn() {\n super.changeTurn();\n\n if (controller.getCurrentPlayerID().equals(controller.getClientPlayerID()) && this.worker1Button != null && this.worker2Button != null) {\n reinitialization();\n\n this.selectedWorkerButton = worker1Button;\n this.selectedWorkerButton.setBorder(BorderFactory.createLineBorder(Color.YELLOW, 2, true));\n }\n\n this.newTurn = true;\n\n }", "public void interactWhenSteppingOn() {\r\n\t\t\r\n\t}", "public void executeDecision() {\n // Plays the sound that indicates the player pressed a button.\n storage.sounds.get(\"click3\").play(1.0f);\n switch (cursorPos) {\n case 0:\n newGame();\n break;\n case 1:\n loadGame();\n break;\n case 2:\n quitGame();\n break;\n }\n // Stops the title screen music.\n storage.music.get(\"titlescreenmusic\").stop();\n storage.music.get(\"titlescreenmusicloop\").stop();\n }", "private void chooseNextMove() {\n\n //Check if it's a new user or not\n if (getIntent().hasExtra(\"new_user\")) {\n this.new_user = false;\n HorizontalStepView step_view = (HorizontalStepView)findViewById(R.id.step_view);\n step_view.setVisibility(View.GONE);\n }\n //Enable StepView\n else {\n //Get StepView obj from last activity\n this.sw = getIntent().getParcelableExtra(\"stepview_obj\");\n sw.setSteps(3);\n //Set up step view\n HorizontalStepView stepView = (HorizontalStepView) findViewById(R.id.step_view);\n sw.setStepView(stepView, this);\n }\n }", "public void singlePlayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startSinglePlayerGame();\n }", "public void continueGame(View view){\n Intent resumeIntent = new Intent(this, GameActivity.class);\n boolean isResume = true;\n resumeIntent.putExtra(\"resumeGame\",isResume );\n startActivity(resumeIntent);\n finish();\n\n }", "private void crossPressed() {\n\t\tif (!talkmode) {\n\t\t\tif (checkLoot() || checkNearbyVillagers() || checkDoors(doors, player.direction) || checkSigns()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\tif (question) {\n\t\t\t\texitQuestionDialog();\n\t\t\t}\n\n\t\t\tLoot g = dialog.getGift();\n\t\t\tif (g != null) {\n\t\t\t\tLoad.collectLoot(g);\n\t\t\t}\n\t\t\tString takeName = dialog.getTakeName();\n\t\t\tif (takeName != null) {\n\t\t\t\tint takeAmount = dialog.getTakeAmount();\n\t\t\t\tif (takeName.equals(\"gold\")) {\n\t\t\t\t\tLoad.getPartyItems().addGold(-takeAmount);\n\t\t\t\t} else {\n\t\t\t\t\tLoad.getPartyItems().take(takeName, takeAmount);\n\t\t\t\t}\n\t\t\t}\n\t\t\tHashMap<String, Integer> t = dialog.getBeforeTriggers();\n\t\t\tHashMap<String, Integer> triggerAdds = dialog.getTriggerAdds();\n\t\t\tboolean finished = dialog.isFinished();\n\t\t\tdoTriggers(t);\n\t\t\tif (triggerAdds != null) {\n\t\t\t\tDatabase.incrementStatus(triggerAdds);\n\t\t\t}\n\t\t\tif (finished) {\n\t\t\t\tsetTalking(false);\n\t\t\t\tif (dialog.shouldTrigger()) {\n\t\t\t\t\tt = dialog.getTriggers();\n\t\t\t\t\tdoTriggers(t);\n\t\t\t\t\texecuteTrigger(talkingVillager);\n\t\t\t\t} else {\n\t\t\t\t\tdialog.resetDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (dialog.isQuestion()) {\n\t\t\t\t\tinitQuestionDialog();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Model__Group__0__Impl" $ANTLR start "rule__Model__Group__1" ../org.xtext.example.helloxcore.ui/srcgen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3243:1: rule__Model__Group__1 : rule__Model__Group__1__Impl rule__Model__Group__2 ;
public final void rule__Model__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3247:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 ) // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3248:2: rule__Model__Group__1__Impl rule__Model__Group__2 { pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__17074); rule__Model__Group__1__Impl(); state._fsp--; if (state.failed) return ; pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__17077); rule__Model__Group__2(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3218:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3219:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__07013);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__07016);\n rule__Model__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:471:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:472:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__1951);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__1954);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:611:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../emfviews.dsl.ui/src-gen/emfviews/dsl/ui/contentassist/antlr/internal/InternalSqlview.g:612:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__11251);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__11254);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:800:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:801:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__11682);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__11685);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3276:1: ( rule__Model__Group__2__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:3277:2: rule__Model__Group__2__Impl\n {\n pushFollow(FOLLOW_rule__Model__Group__2__Impl_in_rule__Model__Group__27135);\n rule__Model__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1767:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1768:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__13612);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__13615);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:440:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../eu.artist.migration.mdt.database.sql.editor.ui/src-gen/eu/artist/migration/mdt/database/sql/editor/ui/contentassist/antlr/internal/InternalSQLDSL.g:441:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__0890);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__0893);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:1162:1: ( rule__Model__Group__1__Impl )\n // InternalAst.g:1163:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2092:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2093:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__14153);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__14156);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:898:1: ( rule__Model__Group__1__Impl )\n // InternalMLRegression.g:899:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:769:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../com.idobjects.dsl.ui/src-gen/com/idobjects/dsl/ui/contentassist/antlr/internal/InternalIdObjectsDsl.g:770:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__01620);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__01623);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2574:1: ( rule__Model__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2575:2: rule__Model__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__15074);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAst.g:1135:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // InternalAst.g:1136:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_5);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2089:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2090:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_rule__Model__Group__1__Impl_in_rule__Model__Group__14468);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__2_in_rule__Model__Group__14471);\n rule__Model__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2056:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../com.blasedef.onpa.ONPA.ui/src-gen/com/blasedef/onpa/ui/contentassist/antlr/internal/InternalONPA.g:2057:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__04076);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__04079);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:871:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // InternalMLRegression.g:872:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_3);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_2);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalCsv.g:898:1: ( rule__Model__Group__1__Impl rule__Model__Group__2 )\n // InternalCsv.g:899:2: rule__Model__Group__1__Impl rule__Model__Group__2\n {\n pushFollow(FOLLOW_5);\n rule__Model__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__Model__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1389:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../org.iobserve.rac.constraint.ui/src-gen/org/iobserve/rac/constraint/ui/contentassist/antlr/internal/InternalConstraintLang.g:1390:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__02977);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__02980);\n rule__Model__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Model__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1736:1: ( rule__Model__Group__0__Impl rule__Model__Group__1 )\n // ../com.mguidi.soa.ui/src-gen/com/mguidi/soa/ui/contentassist/antlr/internal/InternalSOA.g:1737:2: rule__Model__Group__0__Impl rule__Model__Group__1\n {\n pushFollow(FOLLOW_rule__Model__Group__0__Impl_in_rule__Model__Group__03550);\n rule__Model__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Model__Group__1_in_rule__Model__Group__03553);\n rule__Model__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the menu matching the passed in name.
public Menu findMenuByName(String menuName);
[ "public Menu getMenu(String name) {\n\t\treturn getMenu(new StringBinding() {\n\t\t\t@Override\n\t\t\tprotected String computeValue() {\n\t\t\t\treturn name;\n\t\t\t}\n\t\t});\n\t}", "public MenuItem getMenuItem(String name) {\n return menuItems.stream().filter(i -> i.getName().equalsIgnoreCase(name)).findFirst().orElse(null);\n }", "public MenuItem getMenuItemByName(String name){\n for (MenuItem item: menuItems){\n if (item.getFoodName().equals(name)){\n return item;\n }\n }\n return null;\n }", "public JMenu getMenuItem(String menuName) {\n menuName = menuName.trim();\n JMenu menu = null;\n for(int i = 0; i<menuBar.getMenuCount(); i++) {\n JMenu next = menuBar.getMenu(i);\n if(next.getText().equals(menuName)) {\n menu = next;\n break;\n }\n }\n return menu;\n }", "public MenuItem getMenuItemByName(String name) throws SQLException {\n ArrayList<MenuItem> menus = new ArrayList<>(menuItemDao.queryForEq(\"name\", name));\n if (menus.size() != 0)\n return menus.get(0);\n\n return null;\n }", "public MenuItem getMenuItem(String s){\n MenuItem m=null;\n for(MenuItem mi : menuContent)\n if(mi.getName().equals(s))\n m=mi;\n return m;\n }", "public static MenuType getMenuItem(String name) {\n\t\tMenuType menuItem = new MenuType(\"Null\",\"\",\"n\",0,0);\n\n\t\ttry {\n\t\t\tConnection conn = databaseConnect();\n\t\t\t\n\t\t\t//prepare sql statement\n\t\t\tString sql = \"SELECT * FROM Menu WHERE name = ?\";\n\t\t\tPreparedStatement statement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, name);\n\t\t\t\n\t\t\tResultSet result = statement.executeQuery();\n\t\t\t\n\t\t\tmenuItem.id = result.getInt(\"id\");\n\t\t\tmenuItem.name = result.getString(\"name\");\n\t\t\tmenuItem.category = result.getString(\"category\");\n\t\t\tmenuItem.price = result.getFloat(\"price\");\n\t\t\tmenuItem.status = result.getString(\"status\");\n\t\t\tmenuItem.cost = result.getFloat(\"cost\");\n\n\t\t\t//Print error message if not found\n\t\t\tif (menuItem.id == 0) {\n\t\t\t\tSystem.out.println(\"No menu item found with name \" + name);\n\t\t\t}\n\t\t\t\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn menuItem;\n\t\t\t\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Error in getMenuItem\");\n\t\t\te.printStackTrace();\n\t\t\treturn menuItem;\n\t\t}\n\t}", "MenuItems findByMenuName(String name)throws MenuItemNotFoundException;", "private JMenuItem getMenuItem(String name, JMenu menu) {\n int count=menu.getMenuComponentCount();\n if(count==0){\n return null;\n }\n\n //Skip over all JMenu components that are not JMenu or JMenuItem\n for (int i=0; i<count; i++ ){\n if( !menu.getItem(i).getClass().getName().equals(\"javax.swing.JMenu\") && !menu.getItem(i).getClass().getName().equals(\"javax.swing.JMenuItem\")){\n continue;\n }\n\n JMenuItem jmi=menu.getItem(i);\n if(jmi.getText().equalsIgnoreCase(name)) {\n\n return jmi;\n }\n }\n return null;\n }", "String getMenuName();", "Menu getMenu();", "private static JMenuItem getSubmenuByName( String name,\r\n\t\t\t\t\t\t\t\t\t\t\tMenuElement[] contents )\r\n\t{\r\n\t\tJMenuItem found = null;\r\n\t\tfor( int i = 0; found==null && i < contents.length ; ++i )\r\n\t\t{\r\n\t\t\t// This is not documented, but the system creates internal\r\n\t\t\t// popup menus for empty submenus. If we come across one of\r\n\t\t\t// these, then look for \"name\" in the popup's contents. This\r\n\t\t\t// would be a lot easier if PopupMenu and JMenuItem\r\n\t\t\t// implemented a common interface, but they don't.\r\n\t\t\t// I can't use a class adapter to make them appear to\r\n\t\t\t// implement a comon interface becuase the JPopupWindows\r\n\t\t\t// are manufactured by Swing, not by me.\r\n\r\n\t\t\tif( contents[i] instanceof JPopupMenu )\r\n\t\t\t\tfound = getSubmenuByName( name,\r\n\t\t\t\t\t\t\t((JPopupMenu)contents[i]).getSubElements());\r\n\r\n\t\t\telse if( ((JMenuItem) contents[i]).getName().equals(name) )\r\n\t\t\t\tfound = (JMenuItem) contents[i];\r\n\t\t}\r\n\t\treturn found;\r\n\t}", "@Override\n public MenuItems findByMenuName(String itemName) throws MenuItemNotFoundException{\n // Optional optional=Optional.of(repository.findByName(itemName));\n if(!repository.existsByName(itemName)){\n throw new MenuItemNotFoundException();\n }\n MenuItems menuItems=repository.findByName(itemName);\n return menuItems;\n }", "MenuItem getMenuItem();", "public MenuItem getMenuItem(String name, EventHandler<ActionEvent> eventHandler) {\n\t\treturn getMenuItem(new StringBinding() {\n\t\t\t@Override\n\t\t\tprotected String computeValue() {\n\t\t\t\treturn name;\n\t\t\t}\n\t\t}, eventHandler);\n\t}", "public String getMenuName() {\r\n return menuName;\r\n }", "public String getMenuName() {\r\n return menuName;\r\n }", "public String getMenuName() {\n return menuName;\n }", "Menu getMenuFile();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This constructs the frame and its characteristics for the freeze user page
public AdminFreezeUserPage(IUserAccount user, ResourceBundle languageRB) { this.languageRB = languageRB; String freezeUserLabelText =languageRB.getString("freezeUserLabelText"); freezeUsers.addAll(tradingSystemGUINavigator.getFlaggedNavigator()); freezeUserPageFrame = new JFrame(); freezeUserPageFrame.setTitle(freezeUserLabelText); freezeUserPageFrame.setSize(1200,(freezeUsers.size())*20+150); freezeUserPageFrame.setLocationRelativeTo(null); freezeUserPageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); freezeUserPageFrame.setResizable(true); JPanel content = new JPanel(); freezeUserPageFrame.getContentPane().add(content); LayoutManager layout = new BoxLayout(content, BoxLayout.Y_AXIS); Box boxes[] = new Box[3]; boxes[0] = Box.createHorizontalBox(); boxes[1] = Box.createHorizontalBox(); boxes[2] = Box.createHorizontalBox(); boxes[0].createGlue(); boxes[1].createGlue(); boxes[2].createGlue(); content.add(boxes[0]); content.add(boxes[1]); content.add(boxes[2]); JPanel panel = new JPanel(); JPanel panel2 = new JPanel(); JPanel panel3 = new JPanel(); panel.setPreferredSize(new Dimension(1200,50)); panel2.setPreferredSize(new Dimension(1200,(freezeUsers.size())*20)); panel3.setPreferredSize(new Dimension(1200,100)); boxes[0].add(panel); boxes[1].add(panel2); boxes[2].add(panel3); JLabel headerLabel2 = new JLabel(freezeUserLabelText, JLabel.CENTER); panel.add(headerLabel2); freezeUserPageOption(user, panel2, panel3); }
[ "protected void createFrame() {\n MyInternalFrame frame = new MyInternalFrame();\n frame.setVisible(true); //necessary as of 1.3\n desktop.add(frame);\n try {\n frame.setSelected(true);\n } catch (java.beans.PropertyVetoException e) {}\n }", "public void createFrame()\n\t{\n\t\tframe = new JFrame(\"Question \" + questionCode + \":\"); // title is removed (see below)\n\t\tframe.setSize(600, 348);\n\t\tframe.setDefaultCloseOperation(frame.HIDE_ON_CLOSE);\n\t\tframe.setResizable(false);\n\t\tframe.setLocation(300, 426);\n\t\t\n\t\tholderPanel = new JPanel();\n\t\tcards = new CardLayout();\n\t\tholderPanel.setLayout(cards);\n\t\t\n\t\tfirstPage = new FirstPage(this);\n\t\tsecondPage = new SecondPage(this);\n\t\t\n\t\tholderPanel.add(firstPage, \"first\"); \n\t\tholderPanel.add(secondPage, \"second\");\n\t\t\n\t\tframe.getContentPane().add(holderPanel);\n\t\t\n\t\t// Got the below code from: \n\t\t//https://stackoverflow.com/questions/276254/how-to-disable-or-hide-the-close-x-button-on-a-jframe \n\t\t// it removes the top bar so user can't close it by themselves\n\t\t// they are forced to answer the question\n\t\tframe.setUndecorated(true);\n\t\tframe.getRootPane().setWindowDecorationStyle(JRootPane.NONE);\n\t\t\n\t\tframe.setVisible(true);\n\n\t}", "private void createInternalFrame() {\n \n \t\tmainCircuitFrame = new CircuitPanel(\"Beispielschaltung.circuit\");\n \t\tmainCircuitFrame.setVisible(true);\n \t\tdesktop.add(mainCircuitFrame);\n \t\ttry {\n \t\t\tmainCircuitFrame.setSelected(true);\n \t\t\tmainCircuitFrame.setMaximum(true);\n \t\t} catch (PropertyVetoException e) {\n \t\t\tLOG.warn(\"Error encountered while selecting internal frame.\");\n \t\t}\n \t}", "private void buildAndDisplayFrame() {\n\n\t\tframe.add(panelForIncomingCall, BorderLayout.NORTH);\n\t\tpanelForIncomingCall.add(welcomeThenDisplayCallInfo);\n\n\t\tframe.add(backgroundPanel, BorderLayout.CENTER);\n\t\tbackgroundPanel.add(userInstructions);\n\t\tbackgroundPanel.add(startButton);\n\t\tbackgroundPanel.add(declineDisplay);\n\n\t\tframe.add(acceptDeclineBlockBottomPanel, BorderLayout.SOUTH);\n\t\tacceptDeclineBlockBottomPanel.add(acceptButton);\n\t\tacceptDeclineBlockBottomPanel.add(declineButton);\n\t\tacceptDeclineBlockBottomPanel.add(blockButton);\n\n\t\tframe.setSize(650, 700); // sizes frame to whatever we want\n\t\tframe.setLocationRelativeTo(null); // puts at center of screen\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setVisible(true);\n\t}", "public UserFrame() {\n initComponents();\n \n }", "public void createAndShowFrame() {\n\t\tgetSwingRenderer().showFrame(createFrame());\n\t}", "private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }", "FRAME createFRAME();", "private void createGUI() {\n\n\t\t// add GUI components\n\t\tthis.setLayout(new BoxLayout(this.getContentPane(), BoxLayout.Y_AXIS));\n\t\tthis.setMenuBar(presFac.getMenuBar());\n\t\tthis.add(presFac.getContextDisplay());\n\t\tthis.add(presFac.getStatusBar());\n\n\t\t// set window preferences\n\t\tthis\n\t\t\t\t.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n\t\tthis.setTitle(presFac.getLogicFacade().getLanguageData().getProperty(\n\t\t\t\t\"window_title\"));\n\t\tthis.setIconImage(new ImageIcon(getClass().getResource(\n\t\t\t\tpresFac.getClientIcon())).getImage());\n\t\t// set application size to 80 per cent of screen size\n\t\tDimension screen = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n\t\tscreen.height = Math.min(768, (int) (0.8 * screen.height));\n\t\tscreen.width = Math.min(1024, (int) (0.8 * screen.width));\n\t\tthis.setSize(screen);\n\t\tthis.setMinimumSize(screen);\n\t\t// center application\n\t\tthis.setLocationRelativeTo(null);\n\n\t\t// before closing this frame\n\t\tthis.addWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tcloseGUI();\n\t\t\t}\n\t\t});\n\t}", "public WelcomeFrame() {\n initComponents();\n lblUser.setText(\"<html>Xin chào <b>\" + Application.TEACHER.getName().replace(\"<\", \"&lt;\").replace(\">\", \"&gt;\")+ \"</b>!</html>\");\n runClock();\n }", "private static void createAndShowUI() {\n\t\tframe = new JFrame();\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBounds(100, 100, 1480, 820);\n\n\t\tframe.setContentPane(new GameDriver().getPanel());\n\t\t//frame.getContentPane().add(new GameDriver().getPanel());\n\t\tframe.setLocationRelativeTo(null);\n\t\tframe.setVisible(true);\n\t}", "Frame createFrame();", "public FrameUtama() {\n initComponents();\n }", "private void setFrame() {\n\t\tframeGui.setTitle(\"String Species with Genetic Algorithm\");\n\t\tframeGui.setSize(WIDTH, HEIGHT);\n\t\tframeGui.setLocation(POS_X, POS_Y);\n\t\tframeGui.setVisible(true);\n\t\tframeGui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeGui.setLayout(null);\n\t\tframeGui.getContentPane().setBackground(Color.WHITE);\n\n\t}", "protected void createMainFrame() throws Exception {\n\t\t/*String dataSrc = \" using tranSMART\";\n\t\tif (Singleton.getState().getDataMode() == State.BIOSERVICES_MODE) {\n\t\t\tdataSrc = \" using AQG\";\n\t\t} else if (Singleton.getState().getDataMode() == State.TRANSMART_DEV_SERVICES_MODE) {\n\t\t\tdataSrc = \" using tranSMART Dev Instance\";\n\t\t} else if (Singleton.getState().getDataMode() == State.TRANSMART_SERVICES_MODE) {\n\t\t\tdataSrc = \" using tranSMART Stage Instance\";\n\t\t}*/\n String dataRetrievalSource = Singleton.getDataModel().getWebServices().getSourceName();\n frame = Singleton.getMainFrame();\n frame.setTitle(\"GWAVA: Genome-Wide Association Visual Analyzer \"\n\t\t\t\t+ VERSION + \" using \" + dataRetrievalSource);\n\t\t/*\n\t\t * UserPreferences userPref = Singleton.getUserPreferences();\n\t\t * userPref.loadUserPreferences();\n\t\t */\n\t\tDataModel dataModel = Singleton.getDataModel();\n\n\t\t//MainPanel mainPanel = new MainPanel();\n MainPanel mainPanel = Singleton.getMainPanel();\n\n\t\tframe.setContentPane(mainPanel);\n\t\tframe.setJMenuBar(new MenuBar(mainPanel));\n Image img = loadImageIconResource();\n if(img != null) {\n frame.setIconImage(img);\n\t\t}\n\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.addWindowListener(new WindowCloseController());\n\t\tframe.pack();\n if(Singleton.getUserPreferences().getMainFrameLocation() != null) {\n frame.setLocation(Singleton.getUserPreferences().getMainFrameLocation());\n }\n if(Singleton.getUserPreferences().getMainFrameSize() != null) {\n frame.setSize(Singleton.getUserPreferences().getMainFrameSize());\n }\n\t\tframe.setVisible(true);\n \n\t}", "private TankTroubleGUI(){\n frame = new JFrame();\n users = new ArrayList<>();\n loadUsers();\n welcomePanel = WelcomePanel.getInstance();\n loginMenu = LoginMenu.getInstance(frame, users);\n registerMenu = RegisterMenu.getInstance(frame, users);\n mainMenu = MainMenu.getInstance(frame);\n pcMenu = PCMenu.getInstance(frame);\n serverGame = ServerMenu.getInstance(frame);\n serverOrClientMenu = ServerOrClientMenu.getInstance(frame);\n joinGame = ClientMenu.getInstance(frame);\n settingMenu = SettingMenu.getInstance(frame);\n\n //look and feel\n try {\n javax.swing.UIManager.setLookAndFeel(com.jtattoo.plaf.texture.TextureLookAndFeel.class.getName());\n } catch (Exception ignored) {}\n\n makeFrame();\n welcome();\n frame.setVisible(true);\n }", "public FramePrincipal() {\n initComponents();\n }", "public void makeFrame() {\r\n\t\t\r\n\t\tframe.setTitle(\"Craps\");\r\n\t\tframe.setSize(600, 400);\r\n\t\tframe.setLocation(200, 200);\r\n\t\tframe.setVisible(true);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.setResizable(false);\r\n\t\tframe.add(panel);\r\n\t}", "public static void MenuScreen(IUserAccount user, ResourceBundle languageRB) {\n EventQueue.invokeLater(new Runnable() {\n @Override\n public void run() {\n try {\n AdminFreezeUserPage window = new AdminFreezeUserPage(user, languageRB);\n window.freezeUserPageFrame.setVisible(true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of the theDataSourceDT property.
public void setTheDataSourceDT(DataSourceDT aTheDataSourceDT) { theDataSourceDT = aTheDataSourceDT; setItDirty(true); }
[ "public DataSourceDT getTheDataSourceDT()\n {\n return theDataSourceDT;\n }", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }", "public void setDataSource(DataSource dataSource);", "public void setDatasource(DataSource source) {\n datasource = source;\n }", "public void setUseDataSource(boolean useDataSource) {\n\t\tthis.useDataSource = useDataSource;\n\t}", "public void setDS(DataStorage ds)\r\n\t{\r\n\t\tthis.ds = ds;\r\n\t}", "public void setDatasourceID(int datasource);", "public void setDataSourceFactory(DataSourceFactory dsf) {\r\n\t\tthis.factory = dsf;\r\n\t}", "public void setDataSourceName(String paramDSName) {\n\tstrDSName = paramDSName;\n }", "public DBAccess setDatasource(DataSource datasource) {\r\n\t\tif (!equals(this.datasource, datasource)) {\r\n//\t\t\tclose();\r\n\t\t\tthis.datasource = datasource;\r\n\t\t\tsqlBuilder = dbActions = query = update = batch = resetAutocommit = key = configLocation = connectionName = null;\r\n\t\t\tkey();\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void setExternalDataSource(DataSource externalDataSource) {\r\n this.externalDataSource = externalDataSource;\r\n }", "public void setDataSources(DataSources dataSources) {\r\n this.dataSources = dataSources;\r\n }", "@ProgrammaticProperty\n public void setSeparateTestSetDataSource(String spec) {\n m_separateTestSetDataSource = spec;\n }", "public void setEmployeeDataSource(final EmployeeDataSource employeeDataSource) {\r\n this.employeeDataSource = employeeDataSource;\r\n }", "public TemporaryDataSource(DataSource dataSource){\n\t\tthis.ds = dataSource;\n\t}", "public void setTheDataSourceColumnDTCollection(Collection<Object> aTheDataSourceColumnDTCollection)\n {\n theDataSourceColumnDTCollection = aTheDataSourceColumnDTCollection;\n setItDirty(true);\n }", "public void setDataSource(Object dataSource) throws DataOutdoorException {\n\t\t//get the workBook \n\t\ttry {\n\t\t\tif (dataSource instanceof File) {\n\t\t\t\tthis.dataSource = WorkbookFactory.create((File) dataSource);\n\t\t\t} else {\n\t\t\t\tthis.dataSource = WorkbookFactory.create(new File(dataSource.toString()));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new DataOutdoorException(e);\n\t\t}\n\t}", "void setServerDataSource(String serverDataSource) {\n\t\tif (serverDataSource == null) {\n\t\t\tserverDataSource_ = \"\";\n\t\t} else {\n\t\t\tserverDataSource_ = serverDataSource;\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR start "group_by" C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:35:1: group_by : GROUP_BY ( WS )+ column ( elements_delimiter column ) ;
public final DqlGrammarParser.group_by_return group_by() throws RecognitionException { DqlGrammarParser.group_by_return retval = new DqlGrammarParser.group_by_return(); retval.start = input.LT(1); int group_by_StartIndex = input.index(); Object root_0 = null; Token GROUP_BY27=null; Token WS28=null; DqlGrammarParser.column_return column29 = null; DqlGrammarParser.elements_delimiter_return elements_delimiter30 = null; DqlGrammarParser.column_return column31 = null; Object GROUP_BY27_tree=null; Object WS28_tree=null; try { if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return retval; } // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:35:10: ( GROUP_BY ( WS )+ column ( elements_delimiter column )* ) // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:2: GROUP_BY ( WS )+ column ( elements_delimiter column )* { root_0 = (Object)adaptor.nil(); GROUP_BY27=(Token)match(input,GROUP_BY,FOLLOW_GROUP_BY_in_group_by204); GROUP_BY27_tree = (Object)adaptor.create(GROUP_BY27); adaptor.addChild(root_0, GROUP_BY27_tree); // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:13: ( WS )+ int cnt13=0; loop13: do { int alt13=2; int LA13_0 = input.LA(1); if ( (LA13_0==WS) ) { alt13=1; } switch (alt13) { case 1 : // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:13: WS { WS28=(Token)match(input,WS,FOLLOW_WS_in_group_by206); } break; default : if ( cnt13 >= 1 ) break loop13; EarlyExitException eee = new EarlyExitException(13, input); throw eee; } cnt13++; } while (true); pushFollow(FOLLOW_column_in_group_by210); column29=column(); state._fsp--; adaptor.addChild(root_0, column29.getTree()); // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:23: ( elements_delimiter column )* loop14: do { int alt14=2; int LA14_0 = input.LA(1); if ( (LA14_0==WS||LA14_0==COMMA) ) { alt14=1; } switch (alt14) { case 1 : // C:\\Users\\asd\\workspaceBambrikii\\KBParser\\src\\test\\java\\org\\bambrikii\\kbParser\\dql\\grammar\\DqlGrammar.g:36:25: elements_delimiter column { pushFollow(FOLLOW_elements_delimiter_in_group_by214); elements_delimiter30=elements_delimiter(); state._fsp--; pushFollow(FOLLOW_column_in_group_by217); column31=column(); state._fsp--; adaptor.addChild(root_0, column31.getTree()); } break; default : break loop14; } } while (true); } retval.stop = input.LT(-1); retval.tree = (Object)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { } return retval; }
[ "public final void groupby() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:213:2: ( GROUP_BY fieldname ( comma fieldname )* )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:213:4: GROUP_BY fieldname ( comma fieldname )*\r\n {\r\n match(input,GROUP_BY,FOLLOW_GROUP_BY_in_groupby1309); \r\n out(\" group by \");\r\n pushFollow(FOLLOW_fieldname_in_groupby1313);\r\n fieldname();\r\n\r\n state._fsp--;\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:213:44: ( comma fieldname )*\r\n loop60:\r\n do {\r\n int alt60=2;\r\n int LA60_0 = input.LA(1);\r\n\r\n if ( (LA60_0==COMMA) ) {\r\n alt60=1;\r\n }\r\n\r\n\r\n switch (alt60) {\r\n \tcase 1 :\r\n \t // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:213:45: comma fieldname\r\n \t {\r\n \t pushFollow(FOLLOW_comma_in_groupby1316);\r\n \t comma();\r\n\r\n \t state._fsp--;\r\n\r\n \t pushFollow(FOLLOW_fieldname_in_groupby1318);\r\n \t fieldname();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop60;\r\n }\r\n } while (true);\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public final QueryParser.join_group_by_clause_return join_group_by_clause() throws RecognitionException {\n QueryParser.join_group_by_clause_return retval = new QueryParser.join_group_by_clause_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token BY419=null;\n QueryParser.join_group_by_expr_list_return join_group_by_expr_list420 =null;\n\n\n Object BY419_tree=null;\n\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:546:22: ( BY ^ join_group_by_expr_list )\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:546:24: BY ^ join_group_by_expr_list\n {\n root_0 = (Object)adaptor.nil();\n\n\n BY419=(Token)match(input,BY,FOLLOW_BY_in_join_group_by_clause4149); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BY419_tree = \n (Object)adaptor.create(BY419)\n ;\n root_0 = (Object)adaptor.becomeRoot(BY419_tree, root_0);\n }\n\n pushFollow(FOLLOW_join_group_by_expr_list_in_join_group_by_clause4152);\n join_group_by_expr_list420=join_group_by_expr_list();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, join_group_by_expr_list420.getTree());\n\n }\n\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "GroupBy groupBy(String... columns);", "public final AstValidator.join_group_by_clause_return join_group_by_clause() throws RecognitionException {\n AstValidator.join_group_by_clause_return retval = new AstValidator.join_group_by_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree BY337=null;\n AstValidator.join_group_by_expr_return join_group_by_expr338 =null;\n\n\n CommonTree BY337_tree=null;\n\n\n retval.exprCount = 0;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:545:2: ( ^( BY ( join_group_by_expr )+ ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:545:4: ^( BY ( join_group_by_expr )+ )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n BY337=(CommonTree)match(input,BY,FOLLOW_BY_in_join_group_by_clause2833); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n BY337_tree = (CommonTree)adaptor.dupNode(BY337);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(BY337_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:545:10: ( join_group_by_expr )+\n int cnt97=0;\n loop97:\n do {\n int alt97=2;\n int LA97_0 = input.LA(1);\n\n if ( (LA97_0==BIGDECIMALNUMBER||LA97_0==BIGINTEGERNUMBER||LA97_0==CUBE||LA97_0==DIV||LA97_0==DOLLARVAR||LA97_0==DOUBLENUMBER||LA97_0==FALSE||LA97_0==FLOATNUMBER||LA97_0==GROUP||LA97_0==IDENTIFIER||LA97_0==INTEGER||LA97_0==LONGINTEGER||LA97_0==MINUS||LA97_0==NULL||LA97_0==PERCENT||LA97_0==PLUS||LA97_0==QUOTEDSTRING||LA97_0==STAR||LA97_0==TRUE||(LA97_0 >= BAG_VAL && LA97_0 <= BIN_EXPR)||(LA97_0 >= CASE_COND && LA97_0 <= CASE_EXPR)||(LA97_0 >= CAST_EXPR && LA97_0 <= EXPR_IN_PAREN)||LA97_0==FUNC_EVAL||LA97_0==INVOKER_FUNC_EVAL||(LA97_0 >= MAP_VAL && LA97_0 <= NEG)||LA97_0==TUPLE_VAL) ) {\n alt97=1;\n }\n\n\n switch (alt97) {\n \tcase 1 :\n \t // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:545:12: join_group_by_expr\n \t {\n \t _last = (CommonTree)input.LT(1);\n \t pushFollow(FOLLOW_join_group_by_expr_in_join_group_by_clause2837);\n \t join_group_by_expr338=join_group_by_expr();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) \n \t adaptor.addChild(root_1, join_group_by_expr338.getTree());\n\n\n \t if ( state.backtracking==0 ) { retval.exprCount++; }\n\n \t if ( state.backtracking==0 ) {\n \t }\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt97 >= 1 ) break loop97;\n \t if (state.backtracking>0) {state.failed=true; return retval;}\n EarlyExitException eee =\n new EarlyExitException(97, input);\n throw eee;\n }\n cnt97++;\n } while (true);\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private static void DoGroupBy () {\n \n ArrayList <Attribute> inAtts = new ArrayList <Attribute> ();\n inAtts.add (new Attribute (\"Int\", \"o_orderkey\"));\n inAtts.add (new Attribute (\"Int\", \"o_custkey\"));\n inAtts.add (new Attribute (\"Str\", \"o_orderstatus\"));\n inAtts.add (new Attribute (\"Float\", \"o_totalprice\"));\n inAtts.add (new Attribute (\"Str\", \"o_orderdate\"));\n inAtts.add (new Attribute (\"Str\", \"o_orderpriority\"));\n inAtts.add (new Attribute (\"Str\", \"o_clerk\"));\n inAtts.add (new Attribute (\"Int\", \"o_shippriority\"));\n inAtts.add (new Attribute (\"Str\", \"o_comment\"));\n \n ArrayList <Attribute> outAtts = new ArrayList <Attribute> ();\n outAtts.add (new Attribute (\"Str\", \"att1\"));\n outAtts.add (new Attribute (\"Str\", \"att2\"));\n outAtts.add (new Attribute (\"Float\", \"att3\"));\n outAtts.add (new Attribute (\"Int\", \"att4\"));\n \n ArrayList <String> groupingAtts = new ArrayList <String> ();\n groupingAtts.add (\"o_orderdate\");\n groupingAtts.add (\"o_orderstatus\");\n \n HashMap <String, AggFunc> myAggs = new HashMap <String, AggFunc> ();\n myAggs.put (\"att1\", new AggFunc (\"none\", \"Str(\\\"status: \\\") + o_orderstatus\"));\n myAggs.put (\"att2\", new AggFunc (\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n myAggs.put (\"att3\", new AggFunc (\"avg\", \"o_totalprice * Int (100)\"));\n myAggs.put (\"att4\", new AggFunc (\"sum\", \"Int (1)\"));\n \n // run the selection operation\n try {\n Grouping foo = new Grouping (inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\"); \n } catch (Exception e) {\n throw new RuntimeException (e);\n }\n }", "@Test\n public void groupByExplodeColumn() throws Exception {\n String sql = \"desc verbose select k1, e1, count(*) from db1.tbl1 lateral view explode_split(k2, \\\",\\\") tmp as e1 \"\n + \"group by k1, e1;\";\n String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(ctx, sql, true);\n // group by node with k1, e1\n Assert.assertTrue(explainString.contains(\"2:AGGREGATE (update finalize)\"));\n Assert.assertTrue(explainString.contains(\"group by: `k1`, `e1`\"));\n // table function node\n Assert.assertTrue(explainString.contains(\"1:TABLE FUNCTION NODE\"));\n Assert.assertTrue(explainString.contains(\"table function: explode_split(`k2`, ',')\"));\n Assert.assertTrue(explainString.contains(\"tuple ids: 0 1\"));\n Assert.assertTrue(explainString.contains(\"TupleDescriptor{id=1, tbl=tmp, byteSize=32, materialized=true}\"));\n Assert.assertTrue(explainString.contains(\"SlotDescriptor{id=1, col=e1, type=VARCHAR(*)}\"));\n // group by tuple\n Assert.assertTrue(explainString.contains(\"TupleDescriptor{id=2, tbl=null, byteSize=32, materialized=true}\"));\n }", "@Override\n public String getSPARQLGroupBy()\n {\n return \"\";\n }", "public final PSOARuleMLPSParser.group_element_return group_element() throws RecognitionException {\n PSOARuleMLPSParser.group_element_return retval = new PSOARuleMLPSParser.group_element_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n PSOARuleMLPSParser.rule_return rule27 =null;\n\n PSOARuleMLPSParser.group_return group28 =null;\n\n\n\n try {\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:90:5: ( rule | group )\n int alt9=2;\n switch ( input.LA(1) ) {\n case AND:\n case CURIE:\n case EXISTS:\n case EXTERNAL:\n case FORALL:\n case ID:\n case IRI_REF:\n case NUMBER:\n case OR:\n case STRING:\n case TOP:\n case VAR_ID:\n {\n alt9=1;\n }\n break;\n case GROUP:\n {\n alt9=2;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 9, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt9) {\n case 1 :\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:90:9: rule\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n pushFollow(FOLLOW_rule_in_group_element411);\n rule27=rule();\n\n state._fsp--;\n\n adaptor.addChild(root_0, rule27.getTree());\n\n }\n break;\n case 2 :\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:91:9: group\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n pushFollow(FOLLOW_group_in_group_element421);\n group28=group();\n\n state._fsp--;\n\n adaptor.addChild(root_0, group28.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public ModelQuery groupBy(String... by) {\n\t\tfor (int i = 0; i < by.length; i++) {\n\t\t\tby[i] = parseField(by[i]).getGeneratedName();\n\t\t}\n\n\t\tthis.qb.groupBy(by);\n\t\treturn this;\n\t}", "public final QueryParser.join_group_by_expr_list_return join_group_by_expr_list() throws RecognitionException {\n QueryParser.join_group_by_expr_list_return retval = new QueryParser.join_group_by_expr_list_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token LEFT_PAREN421=null;\n Token COMMA423=null;\n Token RIGHT_PAREN425=null;\n QueryParser.join_group_by_expr_return join_group_by_expr422 =null;\n\n QueryParser.join_group_by_expr_return join_group_by_expr424 =null;\n\n QueryParser.join_group_by_expr_return join_group_by_expr426 =null;\n\n\n Object LEFT_PAREN421_tree=null;\n Object COMMA423_tree=null;\n Object RIGHT_PAREN425_tree=null;\n RewriteRuleTokenStream stream_LEFT_PAREN=new RewriteRuleTokenStream(adaptor,\"token LEFT_PAREN\");\n RewriteRuleTokenStream stream_RIGHT_PAREN=new RewriteRuleTokenStream(adaptor,\"token RIGHT_PAREN\");\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n RewriteRuleSubtreeStream stream_join_group_by_expr=new RewriteRuleSubtreeStream(adaptor,\"rule join_group_by_expr\");\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:549:25: ( LEFT_PAREN join_group_by_expr ( COMMA join_group_by_expr )* RIGHT_PAREN -> ( join_group_by_expr )+ | join_group_by_expr )\n int alt117=2;\n alt117 = dfa117.predict(input);\n switch (alt117) {\n case 1 :\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:549:27: LEFT_PAREN join_group_by_expr ( COMMA join_group_by_expr )* RIGHT_PAREN\n {\n LEFT_PAREN421=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_join_group_by_expr_list4161); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_LEFT_PAREN.add(LEFT_PAREN421);\n\n\n pushFollow(FOLLOW_join_group_by_expr_in_join_group_by_expr_list4163);\n join_group_by_expr422=join_group_by_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_join_group_by_expr.add(join_group_by_expr422.getTree());\n\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:549:57: ( COMMA join_group_by_expr )*\n loop116:\n do {\n int alt116=2;\n int LA116_0 = input.LA(1);\n\n if ( (LA116_0==COMMA) ) {\n alt116=1;\n }\n\n\n switch (alt116) {\n \tcase 1 :\n \t // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:549:59: COMMA join_group_by_expr\n \t {\n \t COMMA423=(Token)match(input,COMMA,FOLLOW_COMMA_in_join_group_by_expr_list4167); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_COMMA.add(COMMA423);\n\n\n \t pushFollow(FOLLOW_join_group_by_expr_in_join_group_by_expr_list4169);\n \t join_group_by_expr424=join_group_by_expr();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_join_group_by_expr.add(join_group_by_expr424.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop116;\n }\n } while (true);\n\n\n RIGHT_PAREN425=(Token)match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_join_group_by_expr_list4174); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_RIGHT_PAREN.add(RIGHT_PAREN425);\n\n\n // AST REWRITE\n // elements: join_group_by_expr\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 550:24: -> ( join_group_by_expr )+\n {\n if ( !(stream_join_group_by_expr.hasNext()) ) {\n throw new RewriteEarlyExitException();\n }\n while ( stream_join_group_by_expr.hasNext() ) {\n adaptor.addChild(root_0, stream_join_group_by_expr.nextTree());\n\n }\n stream_join_group_by_expr.reset();\n\n }\n\n\n retval.tree = root_0;\n }\n\n }\n break;\n case 2 :\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:551:27: join_group_by_expr\n {\n root_0 = (Object)adaptor.nil();\n\n\n pushFollow(FOLLOW_join_group_by_expr_in_join_group_by_expr_list4230);\n join_group_by_expr426=join_group_by_expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, join_group_by_expr426.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private static void DoGroupBy()\n\t{\n\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAtts.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Float\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att4\"));\n\n\t\tArrayList<String> groupingAtts = new ArrayList<String>();\n\t\tgroupingAtts.add(\"o_orderdate\");\n\t\tgroupingAtts.add(\"o_orderstatus\");\n\n\t\tHashMap<String, AggFunc> myAggs = new HashMap<String, AggFunc>();\n\t\tmyAggs.put(\"att1\", new AggFunc(\"none\",\n\t\t\t\t\"Str(\\\"status: \\\") + o_orderstatus\"));\n\t\tmyAggs.put(\"att2\", new AggFunc(\"none\", \"Str(\\\"date: \\\") + o_orderdate\"));\n\t\tmyAggs.put(\"att3\", new AggFunc(\"avg\", \"o_totalprice * Int (100)\"));\n\t\tmyAggs.put(\"att4\", new AggFunc(\"sum\", \"Int (1)\"));\n\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Grouping(inAtts, outAtts, groupingAtts, myAggs, \"orders.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public final void orderby() throws RecognitionException {\r\n try {\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:209:2: ( ORDER_BY fieldname ( comma fieldname )* ( ASC | DESC )? )\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:209:4: ORDER_BY fieldname ( comma fieldname )* ( ASC | DESC )?\r\n {\r\n match(input,ORDER_BY,FOLLOW_ORDER_BY_in_orderby1272); \r\n out(\" order by \");\r\n pushFollow(FOLLOW_fieldname_in_orderby1276);\r\n fieldname();\r\n\r\n state._fsp--;\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:209:44: ( comma fieldname )*\r\n loop58:\r\n do {\r\n int alt58=2;\r\n int LA58_0 = input.LA(1);\r\n\r\n if ( (LA58_0==COMMA) ) {\r\n alt58=1;\r\n }\r\n\r\n\r\n switch (alt58) {\r\n \tcase 1 :\r\n \t // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:209:45: comma fieldname\r\n \t {\r\n \t pushFollow(FOLLOW_comma_in_orderby1279);\r\n \t comma();\r\n\r\n \t state._fsp--;\r\n\r\n \t pushFollow(FOLLOW_fieldname_in_orderby1281);\r\n \t fieldname();\r\n\r\n \t state._fsp--;\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop58;\r\n }\r\n } while (true);\r\n\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:210:3: ( ASC | DESC )?\r\n int alt59=3;\r\n int LA59_0 = input.LA(1);\r\n\r\n if ( (LA59_0==ASC) ) {\r\n alt59=1;\r\n }\r\n else if ( (LA59_0==DESC) ) {\r\n alt59=2;\r\n }\r\n switch (alt59) {\r\n case 1 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:210:4: ASC\r\n {\r\n match(input,ASC,FOLLOW_ASC_in_orderby1289); \r\n out(\" asc \");\r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\entornotrabajo\\\\workspace-sgo\\\\persistance\\\\src\\\\main\\\\java\\\\es\\\\caser\\\\persistance\\\\sql\\\\antlr\\\\SQLGrammar.g:210:26: DESC\r\n {\r\n match(input,DESC,FOLLOW_DESC_in_orderby1295); \r\n out(\" desc \");\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n finally {\r\n }\r\n return ;\r\n }", "public AggregateOperator setGroupByColumns(List<Integer> groupByColumns);", "public final AstValidator.join_group_by_expr_return join_group_by_expr() throws RecognitionException {\n AstValidator.join_group_by_expr_return retval = new AstValidator.join_group_by_expr_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree STAR341=null;\n AstValidator.col_range_return col_range339 =null;\n\n AstValidator.expr_return expr340 =null;\n\n\n CommonTree STAR341_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:548:20: ( col_range | expr | STAR )\n int alt98=3;\n switch ( input.LA(1) ) {\n case COL_RANGE:\n {\n alt98=1;\n }\n break;\n case BIGDECIMALNUMBER:\n case BIGINTEGERNUMBER:\n case CUBE:\n case DIV:\n case DOLLARVAR:\n case DOUBLENUMBER:\n case FALSE:\n case FLOATNUMBER:\n case GROUP:\n case IDENTIFIER:\n case INTEGER:\n case LONGINTEGER:\n case MINUS:\n case NULL:\n case PERCENT:\n case PLUS:\n case QUOTEDSTRING:\n case TRUE:\n case BAG_VAL:\n case BIN_EXPR:\n case CASE_COND:\n case CASE_EXPR:\n case CAST_EXPR:\n case EXPR_IN_PAREN:\n case FUNC_EVAL:\n case INVOKER_FUNC_EVAL:\n case MAP_VAL:\n case NEG:\n case TUPLE_VAL:\n {\n alt98=2;\n }\n break;\n case STAR:\n {\n int LA98_3 = input.LA(2);\n\n if ( (LA98_3==DOWN) ) {\n alt98=2;\n }\n else if ( (LA98_3==EOF||LA98_3==UP||LA98_3==BIGDECIMALNUMBER||LA98_3==BIGINTEGERNUMBER||LA98_3==CUBE||LA98_3==DIV||LA98_3==DOLLARVAR||LA98_3==DOUBLENUMBER||LA98_3==FALSE||LA98_3==FLOATNUMBER||LA98_3==GROUP||LA98_3==IDENTIFIER||LA98_3==INTEGER||LA98_3==LONGINTEGER||LA98_3==MINUS||LA98_3==NULL||LA98_3==PERCENT||LA98_3==PLUS||LA98_3==QUOTEDSTRING||LA98_3==STAR||LA98_3==TRUE||(LA98_3 >= BAG_VAL && LA98_3 <= BIN_EXPR)||(LA98_3 >= CASE_COND && LA98_3 <= CASE_EXPR)||(LA98_3 >= CAST_EXPR && LA98_3 <= EXPR_IN_PAREN)||LA98_3==FUNC_EVAL||LA98_3==INVOKER_FUNC_EVAL||(LA98_3 >= MAP_VAL && LA98_3 <= NEG)||LA98_3==TUPLE_VAL) ) {\n alt98=3;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 98, 3, input);\n\n throw nvae;\n\n }\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 98, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt98) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:548:22: col_range\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_col_range_in_join_group_by_expr2853);\n col_range339=col_range();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, col_range339.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 2 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:548:35: expr\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_expr_in_join_group_by_expr2858);\n expr340=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_0, expr340.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n case 3 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:548:42: STAR\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n STAR341=(CommonTree)match(input,STAR,FOLLOW_STAR_in_join_group_by_expr2862); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR341_tree = (CommonTree)adaptor.dupNode(STAR341);\n\n\n adaptor.addChild(root_0, STAR341_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public interface GroupElement extends Construct {\r\n\r\n\t\tpublic Rule asRule();\r\n\r\n\t\tpublic Group asGroup();\r\n\r\n\t}", "public final QueryParser.join_group_by_expr_return join_group_by_expr() throws RecognitionException {\n QueryParser.join_group_by_expr_return retval = new QueryParser.join_group_by_expr_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token STAR429=null;\n QueryParser.col_range_return col_range427 =null;\n\n QueryParser.expr_return expr428 =null;\n\n\n Object STAR429_tree=null;\n\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:554:20: ( col_range | expr | STAR )\n int alt118=3;\n switch ( input.LA(1) ) {\n case GROUP:\n {\n int LA118_1 = input.LA(2);\n\n if ( (LA118_1==DOUBLE_PERIOD) ) {\n alt118=1;\n }\n else if ( (LA118_1==EOF||LA118_1==COMMA||(LA118_1 >= DIV && LA118_1 <= DOLLAR)||LA118_1==FULL||LA118_1==INNER||LA118_1==LEFT||LA118_1==LEFT_PAREN||LA118_1==MINUS||LA118_1==OUTER||(LA118_1 >= PARALLEL && LA118_1 <= POUND)||LA118_1==RIGHT||LA118_1==RIGHT_PAREN||LA118_1==SEMI_COLON||LA118_1==STAR||LA118_1==USING) ) {\n alt118=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 1, input);\n\n throw nvae;\n\n }\n }\n break;\n case IDENTIFIER_L:\n {\n int LA118_2 = input.LA(2);\n\n if ( (LA118_2==DOUBLE_PERIOD) ) {\n alt118=1;\n }\n else if ( (LA118_2==EOF||LA118_2==COMMA||(LA118_2 >= DIV && LA118_2 <= DOLLAR)||LA118_2==FULL||LA118_2==INNER||LA118_2==LEFT||LA118_2==LEFT_PAREN||LA118_2==MINUS||LA118_2==OUTER||(LA118_2 >= PARALLEL && LA118_2 <= POUND)||LA118_2==RIGHT||LA118_2==RIGHT_PAREN||LA118_2==SEMI_COLON||LA118_2==STAR||LA118_2==USING) ) {\n alt118=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 2, input);\n\n throw nvae;\n\n }\n }\n break;\n case DOLLARVAR:\n {\n int LA118_3 = input.LA(2);\n\n if ( (LA118_3==DOUBLE_PERIOD) ) {\n alt118=1;\n }\n else if ( (LA118_3==EOF||LA118_3==COMMA||LA118_3==DIV||LA118_3==FULL||LA118_3==INNER||LA118_3==LEFT||LA118_3==MINUS||LA118_3==OUTER||(LA118_3 >= PARALLEL && LA118_3 <= POUND)||LA118_3==RIGHT||LA118_3==RIGHT_PAREN||LA118_3==SEMI_COLON||LA118_3==STAR||LA118_3==USING) ) {\n alt118=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 3, input);\n\n throw nvae;\n\n }\n }\n break;\n case DOUBLE_PERIOD:\n {\n alt118=1;\n }\n break;\n case ALL:\n case AND:\n case AS:\n case ASC:\n case BAG:\n case BY:\n case BYTEARRAY:\n case CACHE:\n case CHARARRAY:\n case COGROUP:\n case CROSS:\n case DEFINE:\n case DESC:\n case DISTINCT:\n case DOUBLE:\n case DOUBLENUMBER:\n case FALSE:\n case FILTER:\n case FLATTEN:\n case FLOAT:\n case FLOATNUMBER:\n case FOREACH:\n case FULL:\n case GENERATE:\n case IF:\n case IMPORT:\n case INNER:\n case INPUT:\n case INT:\n case INTEGER:\n case INTO:\n case IS:\n case JOIN:\n case LEFT:\n case LEFT_BRACKET:\n case LEFT_CURLY:\n case LEFT_PAREN:\n case LIMIT:\n case LOAD:\n case LONG:\n case LONGINTEGER:\n case MAP:\n case MAPREDUCE:\n case MINUS:\n case NOT:\n case OR:\n case ORDER:\n case OUTER:\n case OUTPUT:\n case PARALLEL:\n case PARTITION:\n case QUOTEDSTRING:\n case RETURNS:\n case RIGHT:\n case SAMPLE:\n case SHIP:\n case SPLIT:\n case STDERROR:\n case STDIN:\n case STDOUT:\n case STORE:\n case STREAM:\n case STR_OP_EQ:\n case STR_OP_GT:\n case STR_OP_GTE:\n case STR_OP_LT:\n case STR_OP_LTE:\n case STR_OP_MATCHES:\n case STR_OP_NE:\n case THROUGH:\n case TRUE:\n case TUPLE:\n case UNION:\n case USING:\n case BOOL:\n case REALIAS:\n {\n alt118=2;\n }\n break;\n case STAR:\n {\n alt118=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 118, 0, input);\n\n throw nvae;\n\n }\n\n switch (alt118) {\n case 1 :\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:554:22: col_range\n {\n root_0 = (Object)adaptor.nil();\n\n\n pushFollow(FOLLOW_col_range_in_join_group_by_expr4239);\n col_range427=col_range();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, col_range427.getTree());\n\n }\n break;\n case 2 :\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:554:35: expr\n {\n root_0 = (Object)adaptor.nil();\n\n\n pushFollow(FOLLOW_expr_in_join_group_by_expr4244);\n expr428=expr();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, expr428.getTree());\n\n }\n break;\n case 3 :\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:554:42: STAR\n {\n root_0 = (Object)adaptor.nil();\n\n\n STAR429=(Token)match(input,STAR,FOLLOW_STAR_in_join_group_by_expr4248); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR429_tree = \n (Object)adaptor.create(STAR429)\n ;\n adaptor.addChild(root_0, STAR429_tree);\n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public void testDerby4402AggregateInGroupBy() throws Exception\n {\n \tassertCompileError(\n \"42Y26\", \"select c1 from test group by sum(c3)\");\n \tassertCompileError(\n \"42Y26\", \"select c1 from test group by (c1+sum(c3))\");\n }", "public final QueryParser.group_item_list_return group_item_list() throws RecognitionException {\n QueryParser.group_item_list_return retval = new QueryParser.group_item_list_return();\n retval.start = input.LT(1);\n\n\n Object root_0 = null;\n\n Token COMMA204=null;\n QueryParser.group_item_return group_item203 =null;\n\n QueryParser.group_item_return group_item205 =null;\n\n\n Object COMMA204_tree=null;\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n RewriteRuleSubtreeStream stream_group_item=new RewriteRuleSubtreeStream(adaptor,\"rule group_item\");\n try {\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:355:17: ( group_item ( COMMA group_item )* -> ( group_item )+ )\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:355:19: group_item ( COMMA group_item )*\n {\n pushFollow(FOLLOW_group_item_in_group_item_list2268);\n group_item203=group_item();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) stream_group_item.add(group_item203.getTree());\n\n // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:355:30: ( COMMA group_item )*\n loop55:\n do {\n int alt55=2;\n int LA55_0 = input.LA(1);\n\n if ( (LA55_0==COMMA) ) {\n alt55=1;\n }\n\n\n switch (alt55) {\n \tcase 1 :\n \t // /Users/wrvhage/Dropbox/teaching/Information_Retrieval_2012_2013/Distributed/pig-0.10.0-lucene/src//org/apache/pig/parser/QueryParser.g:355:32: COMMA group_item\n \t {\n \t COMMA204=(Token)match(input,COMMA,FOLLOW_COMMA_in_group_item_list2272); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_COMMA.add(COMMA204);\n\n\n \t pushFollow(FOLLOW_group_item_in_group_item_list2274);\n \t group_item205=group_item();\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) stream_group_item.add(group_item205.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop55;\n }\n } while (true);\n\n\n // AST REWRITE\n // elements: group_item\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 356:16: -> ( group_item )+\n {\n if ( !(stream_group_item.hasNext()) ) {\n throw new RewriteEarlyExitException();\n }\n while ( stream_group_item.hasNext() ) {\n adaptor.addChild(root_0, stream_group_item.nextTree());\n\n }\n stream_group_item.reset();\n\n }\n\n\n retval.tree = root_0;\n }\n\n }\n\n retval.stop = input.LT(-1);\n\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public final PSOARuleMLPSParser.group_return group() throws RecognitionException {\n PSOARuleMLPSParser.group_return retval = new PSOARuleMLPSParser.group_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n Token GROUP23=null;\n Token LPAR24=null;\n Token RPAR26=null;\n PSOARuleMLPSParser.group_element_return group_element25 =null;\n\n\n CommonTree GROUP23_tree=null;\n CommonTree LPAR24_tree=null;\n CommonTree RPAR26_tree=null;\n RewriteRuleTokenStream stream_GROUP=new RewriteRuleTokenStream(adaptor,\"token GROUP\");\n RewriteRuleTokenStream stream_RPAR=new RewriteRuleTokenStream(adaptor,\"token RPAR\");\n RewriteRuleTokenStream stream_LPAR=new RewriteRuleTokenStream(adaptor,\"token LPAR\");\n RewriteRuleSubtreeStream stream_group_element=new RewriteRuleSubtreeStream(adaptor,\"rule group_element\");\n try {\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:5: ( GROUP LPAR ( group_element )* RPAR -> ^( GROUP ( group_element )* ) )\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:9: GROUP LPAR ( group_element )* RPAR\n {\n GROUP23=(Token)match(input,GROUP,FOLLOW_GROUP_in_group376); \n stream_GROUP.add(GROUP23);\n\n\n LPAR24=(Token)match(input,LPAR,FOLLOW_LPAR_in_group378); \n stream_LPAR.add(LPAR24);\n\n\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:20: ( group_element )*\n loop8:\n do {\n int alt8=2;\n switch ( input.LA(1) ) {\n case AND:\n case CURIE:\n case EXISTS:\n case EXTERNAL:\n case FORALL:\n case GROUP:\n case ID:\n case IRI_REF:\n case NUMBER:\n case OR:\n case STRING:\n case TOP:\n case VAR_ID:\n {\n alt8=1;\n }\n break;\n\n }\n\n switch (alt8) {\n \tcase 1 :\n \t // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:20: group_element\n \t {\n \t pushFollow(FOLLOW_group_element_in_group380);\n \t group_element25=group_element();\n\n \t state._fsp--;\n\n \t stream_group_element.add(group_element25.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop8;\n }\n } while (true);\n\n\n RPAR26=(Token)match(input,RPAR,FOLLOW_RPAR_in_group383); \n stream_RPAR.add(RPAR26);\n\n\n // AST REWRITE\n // elements: GROUP, group_element\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 86:40: -> ^( GROUP ( group_element )* )\n {\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:43: ^( GROUP ( group_element )* )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot(\n stream_GROUP.nextNode()\n , root_1);\n\n // org/ruleml/api/presentation_syntax_parser/PSOARuleMLPS.g:86:51: ( group_element )*\n while ( stream_group_element.hasNext() ) {\n adaptor.addChild(root_1, stream_group_element.nextTree());\n\n }\n stream_group_element.reset();\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n\n retval.tree = root_0;\n\n }\n\n retval.stop = input.LT(-1);\n\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Refresh the table to reflect its content.
public void refresh() { getTableViewer().refresh(); }
[ "public void refreshTable() {\n\t\tmyTable.refreshTable();\n\t}", "private void refreshTable() {\n data = getTableData();\n updateTable();\n }", "private void refresh() {\r\n\t\tthis.updateFine();\r\n\t\tthis.fillTable();\r\n\t}", "public void refreshTable() {\n loadInTaskView();\n }", "private void refreshTable() {\n outputVehicleData(query);\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 void refreshTable(){\n\n customerTableView.refresh();\n\n }", "public void refresh() {\n calcDataInTable();\n fireTableDataChanged();\n\n}", "public void refreshTable() {\t\t\n\t\ttry {\n\t\t\ttableTraffics.getItems().clear();\n\t\t\ttableTraffics.getItems().addAll(controller.getTraffics());\n\t\t\ttableTraffics.refresh();\n\t\t\t\n\t\t\tCollections.sort(controller.getEvents(), new Comparator<EventAllocatorModel>() {\n\t \t\t@Override\n\t\t\t\tpublic int compare(EventAllocatorModel o1, EventAllocatorModel o2) {\n\t\t\t\t\tString name1 = o1.getEvent().getName();\n\t\t\t\t\tString name2 = o2.getEvent().getName();\n\t \t\t\tint comp = name1.compareTo(name2);\n\t\t\t\t\tif(comp!=0){\n\t \t\t\t\treturn comp;\n\t \t\t\t}else{\n\t \t\t\t\tif(o1.getSize()>o2.getSize()){\n\t \t\t\t\t\treturn 1;\n\t \t\t\t\t}else{\n\t \t\t\t\t\treturn -1;\n\t \t\t\t\t}\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttableEvents.getItems().clear();\n\t\t\ttableEvents.getItems().addAll(controller.getEvents());\n\t\t\ttableEvents.refresh();\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tdisplayMessage(\"Error\", e.getMessage());\n\t\t\tcontroller.rollback();\t\t\t\n\t\t}\n\t\t\t\n\t}", "@Override\r\n public void refresh()\r\n {\r\n dataProvider.refresh();\r\n Range r = new Range(0, cellTable.getPageSize());\r\n cellTable.setVisibleRangeAndClearData(r, true);\r\n selectionModel.clear();\r\n }", "public void refresh()\n\t{\n\t\tLogger.debug(\"Updating executors table\", Level.GUI, this);\n\t\tm_executorsTable.refreshAll();\n\t\tupdateButtons();\n\t}", "private void actuallyRefresh() {\n synchronized (this) {\n if (table != null) {\n table.recomputeModel(book, getDisplayedSecurities(), allowMissingPrices, timelySnapshotInterval);\n }\n }\n if (tablePane != null) {\n tablePane.setVisible(true);\n tablePane.revalidate();\n }\n }", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "private void refreshTable() {\n // reset add product button to be disabled\n addProductButton.setDisable(true);\n // if there is space available, enable it\n for (Product p : machine.getProducts()) {\n if (p.getDescription().equals(\"\")) {\n addProductButton.setDisable(false);\n }\n }\n // convert products from ArrayList to ObservableList\n ObservableList<Product> products = FXCollections.observableArrayList(machine.getProducts());\n // refresh table\n table.getItems().clear();\n table.setItems(products);\n borderPane.setTop(topMenu);\n borderPane.setCenter(table);\n }", "public void refreshTables() {\n List<Task> all = resultGenerator.getAllTasks();\n List<Task> todays = resultGenerator.getTodayTasks();\n List<Task> tomorrow = resultGenerator.getTomorrowsTasks();\n List<Task> upcoming = resultGenerator.getUpcomingTasks();\n List<Task> floating = resultGenerator.getFloatingTasks();\n\n updateTable(all, INDEX_ALL);\n updateTable(todays, INDEX_TODAY);\n updateTable(tomorrow, INDEX_TOMORROW);\n updateTable(upcoming, INDEX_UPCOMING);\n updateTable(floating, INDEX_SOMEDAY);\n \n }", "public void updateTable() {\n ((AbstractTableModel) table.getModel()).fireTableDataChanged();\n }", "public void refreshPressed() {\n //refresh the content of the tableView\n ObservableList<String[]> data = PresentationCtrl.getInstance().getHistories();\n tableView.setItems(data);\n }", "public void refresh() {\n generateGrid();\n }", "public void refresh() {\n getIndexOperations().refresh();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets the "signalPeriod" attribute
void unsetSignalPeriod();
[ "void unsetValuePeriod();", "void unsetPeriod();", "void setSignalPeriod(double signalPeriod);", "public void unsetPeriod()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PERIOD$6, 0);\n }\n }", "public void unsetPeriod()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PERIOD$2, 0);\n }\n }", "public void unsetSignalTuning() {\n this.signalTuning = null;\n }", "void xsetSignalPeriod(org.apache.xmlbeans.XmlDouble signalPeriod);", "void unsetAppliesPeriod();", "void unsetInvoicePeriod();", "void unsetTimeInterval();", "private void reset(){\r\n period.setF_hour(0);\r\n period.setF_min(0);\r\n period.setT_hour(0);\r\n period.setT_min(0);\r\n period.setTemperature(0);\r\n }", "void unsetRecurrenceDuration();", "public void unsetRate()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(RATE$32);\r\n }\r\n }", "public void setSignal(double signal) {_signal = signal;}", "void unsetDuration();", "void unsetValueRatio();", "public void unsetCurve() {\n this.curve = null;\n }", "void unsetRateOfChangeOfAppliedCantOverTime();", "double getSignalPeriod();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
public int getBlockTextureFromSideAndMetadata(int par1, int par2) { par2 &= 3; return par2 == 1 ? 63 : (par2 == 2 ? 79 : (par2 == 3 ? 30 : super.getBlockTextureFromSideAndMetadata(par1, par2))); }
[ "public int getBlockTextureFromSideAndMetadata(int par1, int par2)\n {\n if (par2 > 7)\n {\n par2 -= 8;\n }\n\n switch (par2)\n {\n case 1:\n return 210;\n\n case 2:\n return 194;\n\n case 3:\n return 178;\n\n case 4:\n return 162;\n\n case 5:\n return 146;\n\n case 6:\n return 130;\n\n case 7:\n return 114;\n\n default:\n return 64;\n }\n }", "public abstract ResourceLocation getTexture(int block, int meta);", "public int getBlockTextureFromSide(int par1)\n {\n \tif(par1 == 1) return 25;\n return this.blockIndexInTexture;\n }", "public int getBlockTextureFromSide(int par1)\n {\n return this.blockIndexInTexture;\n }", "public Icon getBlockTexture(IBlockAccess bAccess, int x, int y, int z, int side)\n {\n \tint metadata = bAccess.getBlockMetadata(x, y, z);\n return side == 1 ? this.iconPathTop : (side == 0 ? Block.dirt.getIcon(side, metadata) : this.m_IconPathSideByMetadataArray[metadata]);\n }", "public static void loadBlockTextures() {\n\t\tspriteTopOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOn.png\");\n\t\tspriteTopOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/topOff.png\");\n\t\tspriteROn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOn.png\");\n\t\tspriteROff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/rxOff.png\");\n\t\tspriteTOn = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOn.png\");\n\t\tspriteTOff = ModLoader.addOverride(\"/terrain.png\",\n\t\t\t\t\"/WirelessSprites/txOff.png\");\n\t}", "public Icon getBlockTexture(IBlockAccess bAccess, int x, int y, int z, int side)\n {\n int direction = this.GetFacing(bAccess, x, y, z);\n\n if (side == direction)\n {\n return this.m_IconInput;\n }\n else\n {\n FCUtilsBlockPos var7 = new FCUtilsBlockPos(x, y, z);\n var7.AddFacingAsOffset(side);\n return bAccess.getBlockId(var7.i, var7.j, var7.k) == DecoModuleMechanical.decoBlockSteelAxleID && ((DecoBlockSteelAxle)DecoModuleMechanical.decoBlockSteelAxle).IsAxleOrientedTowardsFacing(bAccess, var7.i, var7.j, var7.k, side) ? this.m_IconOutput : this.blockIcon;\n }\n }", "public MC_Block getBlockAt(MC_Location loc);", "Block getBlock(String congName, String blockName, String blockNumber);", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "public DataBlock getBlock (\n int entity,\n boolean create\n );", "public MC_Block getBlockFromName(String name);", "public abstract int getBlockMetadata(int a, int b, int c);", "Block getInnerBlock();", "public static IIcon getIconSideOverlay(BLRenderBlocks rb, Block block, int metadata, int x, int y, int z, int side) {\n if (HasGrassRender(block)) {\n return ((IGrassBlock) block).getIconSideOverlay(rb.getBlockAccess(), metadata, x, y, z, side);\n }\n IIcon i = rb.getBlockIcon(block, rb.getBlockAccess(), x, y, z, side);\n if (\"grass_side\".equals(i.getIconName())) {\n return BlockGrass.func_149990_e();\n }\n return null;\n }", "public IBlockState getBlockFromMeta(int blockMeta) {\n return INNER_BLOCKS[Math.min(INNER_BLOCKS.length - 1, blockMeta)];\n }", "private synchronized void loadSecondaryBlock(boolean next) {\n int step = (next) ? 1 : -2;\n if ((currentBlock + step) < 0) return;//return early if we are already at the beginning\n Controller.INSTANCE.run(() -> {\n String content = fullContent.get(currentBlock) + fullContent.get(currentBlock + step);\n mine.setContent(content);\n return Unit.INSTANCE;\n });\n }", "public static Genome addBlock(Genome genome)\n {\n ArrayList<GeneBlock> geneBlocks;\n ArrayList<GeneNeuron> geneNeurons;\n Random rand = MainSim.RANDOM;\n float min = .501f;\n float max = 3f;\n\n geneBlocks = genome.getGENE_BLOCKS();\n geneNeurons = genome.getGENE_NEURONS();\n if (geneBlocks.size() <= 0)\n {\n return (genome);\n }\n int index = MainSim.RANDOM.nextInt(geneBlocks.size());\n\n // GeneBlock block=geneBlocks.get(index);\n GeneBlock randBlock;\n float sizeX;\n float sizeY;\n float sizeZ;\n\n sizeX = rand.nextFloat() * (max - min) + min;\n sizeY = rand.nextFloat() * (max - min) + min;\n if (sizeX > 1f && sizeY > 1f)\n {\n sizeZ = rand.nextFloat() + min;\n }\n else\n {\n sizeZ = rand.nextFloat() * (max - min) + min;\n }\n ImmutableVector size = new ImmutableVector(sizeX, sizeY, sizeZ);\n ImmutableVector randAngle = new ImmutableVector(0, 0, 0);//new ImmutableVector(rand.nextFloat()*(float)Math.PI/2,rand.nextFloat()*(float)Math.PI/2,rand.nextFloat()*(float)Math.PI/2);\n int parentOffset = -1 * index;\n int xSign = (rand.nextBoolean()) ? 1 : -1;\n int ySign = (rand.nextBoolean()) ? 1 : -1;\n int zSign = (rand.nextBoolean()) ? 1 : -1;\n ImmutableVector randPivot;\n int randomFace = rand.nextInt(3);\n\n if (randomFace == 0)\n {\n randPivot = new ImmutableVector(xSign * rand.nextFloat(), ySign, zSign);\n }\n else if (randomFace == 1)\n {\n randPivot = new ImmutableVector(xSign, ySign * rand.nextFloat(), zSign);\n }\n else\n {\n randPivot = new ImmutableVector(xSign, ySign, zSign * rand.nextFloat());\n }\n\n ImmutableVector parentPivot = new ImmutableVector(-randPivot.X, -randPivot.Y, -randPivot.Z);\n\n if (randomFace == 0)\n {\n randBlock = new GeneBlock(parentOffset, randPivot, parentPivot, size,\n Axis.UNIT_X.getImmutableVector(), Axis.UNIT_X.getImmutableVector(),\n randAngle);\n }\n else if (randomFace == 1)\n {\n randBlock = new GeneBlock(parentOffset, randPivot, parentPivot, size,\n Axis.UNIT_Y.getImmutableVector(), Axis.UNIT_Y.getImmutableVector(),\n randAngle);\n }\n else\n {\n randBlock = new GeneBlock(parentOffset, randPivot, parentPivot, size,\n Axis.UNIT_Z.getImmutableVector(), Axis.UNIT_Z.getImmutableVector(),\n randAngle);\n }\n\n geneBlocks.add(randBlock);\n Genome newGenome = new Genome(genome.getRootSize(), genome.getRootEulerAngles());\n for (GeneBlock geneBlock : geneBlocks)\n {\n newGenome.addGeneBlock(geneBlock);\n\n }\n for (GeneNeuron geneNeuron : geneNeurons)\n {\n newGenome.addGeneNeuron(geneNeuron);\n }\n newGenome = Randomizer.randomizeNeuron(newGenome, geneBlocks.size() - 1);\n return newGenome;\n }", "public static BlockSide getSide(final int side) {\n\t\treturn getRotatedSide(side, 0);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves this Entity's parent.
public Entity getParent() { return parent; }
[ "public E getParentEntity() {\n return parentEntity;\n }", "public Resource getParent()\n {\n if(parent == null)\n {\n if(parentId != -1)\n {\n try\n {\n parent = new ResourceRef(coral.getStore().getResource(parentId), coral);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"corrupted data parent resource #\"+parentId+\n \" does not exist\", e);\n }\n }\n else\n {\n parent = new ResourceRef(null, coral);\n }\n }\n try\n {\n return parent.get();\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"in-memory data incosistency\", e);\n }\n }", "public Person getParent() {\n\t\treturn this.parent;\n\t}", "public XMLPath getParent() {\r\n return this.parent == null ? null : this.parent.get();\r\n }", "public iTData getParent()\r\n {\r\n return theParent;\r\n }", "public final Element parent() {\n \t\tif(_parentLink != null) {\n \t\t\treturn _parentLink.getOtherEnd();\n \t\t} else {\n \t\t\treturn _parent;\n \t\t}\n \t}", "public String getParentEntityContent() {\r\n return parentEntityContent;\r\n }", "public String getParentId() {\n return getProperty(Property.PARENT_ID);\n }", "public Optional<Cause> getParent() {\n return this.parent;\n }", "public CellMO getParent() {\n if (parentRef==null)\n return null;\n return parentRef.get(); \n }", "public Geometrie getParent()\r\n {\r\n return m_parent;\r\n }", "public Path getParent(\n ) {\n return this.parent;\n }", "public User getParent()\n\t{\n\t\t\treturn this.parent;\n\t}", "public int getParentId() {\n return parentId;\n }", "public GObject getParent() {\n\t\treturn parent_;\n\t}", "public Long getParentId() {\r\n return parentId;\r\n }", "public String getParentId() {\n return parentId;\n }", "public Node getParentNode() {\n\t\treturn parent;\n\t}", "public Expression getParent() {\n\t\treturn myParent;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Finds a method using its name and parameter types.
public Method findMethod(final String methodName, final List<Type> parameterTypes) { GeneratorHelper.checkJavaMethodName("parameter:methodName", methodName); Checker.notNull("parameter:parameterTypes", parameterTypes); Method found = null; final Iterator<Method> methods = this.getMethods().iterator(); while (methods.hasNext()) { final Method method = methods.next(); if (false == method.getName().equals(methodName)) { continue; } final List<MethodParameter> methodParameters = method.getParameters(); if (methodParameters.size() != parameterTypes.size()) { continue; } found = method; final Iterator<MethodParameter> methodParametersIterator = methodParameters.iterator(); final Iterator<Type> parameterTypesIterator = parameterTypes.iterator(); while (parameterTypesIterator.hasNext()) { final Type type = parameterTypesIterator.next(); final MethodParameter parameter = methodParametersIterator.next(); if (false == type.equals(parameter.getType())) { found = null; break; } } if (null != found) { break; } } return found; }
[ "public MethodInfo findMethodInfo( String name, Signature sig ) ;", "public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {\n Class<?> searchType = clazz;\n while (searchType != null) {\n Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());\n for (Method method : methods) {\n if (name.equals(method.getName()) &&\n (paramTypes == null || Arrays.equals(paramTypes, method.getParameterTypes()))) {\n return method;\n }\n }\n searchType = searchType.getSuperclass();\n }\n return null;\n }", "public SootMethod getMethod(String name, List parameterTypes) throws\n ca.mcgill.sable.soot.NoSuchMethodException, ca.mcgill.sable.soot.AmbiguousMethodException\n {\n boolean found = false;\n SootMethod foundMethod = null;\n \n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name) &&\n parameterTypes.equals(method.getParameterTypes()))\n {\n if(found)\n throw new ca.mcgill.sable.soot.AmbiguousMethodException();\n else { \n found = true;\n foundMethod = method;\n }\n }\n }\n\n if(found)\n return foundMethod;\n else\n throw new ca.mcgill.sable.soot.NoSuchMethodException();\n }", "private Method findMethod(Call call)\n {\n if (call.getScriptName() == null)\n {\n throw new IllegalArgumentException(Messages.getString(\"DefaultRemoter.MissingClassParam\")); //$NON-NLS-1$\n }\n \n if (call.getMethodName() == null)\n {\n throw new IllegalArgumentException(Messages.getString(\"DefaultRemoter.MissingMethodParam\")); //$NON-NLS-1$\n }\n \n Creator creator = creatorManager.getCreator(call.getScriptName());\n Method[] methods = creator.getType().getMethods();\n List available = new ArrayList();\n \n methods:\n for (int i = 0; i < methods.length; i++)\n {\n // Check method name and access\n if (methods[i].getName().equals(call.getMethodName()))\n {\n // Check number of parameters\n if (methods[i].getParameterTypes().length == call.getInboundContext().getParameterCount())\n {\n // Clear the previous conversion attempts (the param types\n // will probably be different)\n call.getInboundContext().clearConverted();\n \n // Check parameter types\n for (int j = 0; j < methods[i].getParameterTypes().length; j++)\n {\n Class paramType = methods[i].getParameterTypes()[j];\n if (!converterManager.isConvertable(paramType))\n {\n // Give up with this method and try the next\n break methods;\n }\n }\n \n available.add(methods[i]);\n }\n }\n }\n \n // Pick a method to call\n if (available.size() > 1)\n {\n log.warn(\"Warning multiple matching methods. Using first match.\"); //$NON-NLS-1$\n }\n \n // At the moment we are just going to take the first match, for a\n // later increment we might pack the best implementation\n if (available.isEmpty())\n {\n return null;\n }\n \n return (Method) available.get(0);\n }", "Block getFindMethod();", "private static Method getMethod(Class<?> clazz, String methodName, Class[] objects) throws NoSuchMethodException {\n\n List<Method> methods = Arrays.asList(clazz.getMethods());\n\n // filter to methods with the correct name and which accept the correct number of parameters\n methods = methods.stream()\n // filter to methods with the same name\n .filter(method -> method.getName().equals(methodName) && method.getParameters().length == objects.length)\n .collect(Collectors.toList());\n\n // no matches? throw an exception\n if(methods.size() == 0) throw new NoSuchMethodException(\"Could not find a method named '\" + methodName + \"' that accepts the specified arguments, \" + objects);\n\n Method matchingMethod = null;\n\n // find a method that accepts the specified arguments\n for(Method method : methods){\n // if we found a match then we're done!\n if(compareParameters(method.getParameters(), objects)){\n matchingMethod = method;\n break;\n }\n }\n\n if(matchingMethod == null) throw new NoSuchMethodException(\"Could not find a method named '\" + methodName + \"' that accepts the specified arguments, \" + objects);\n\n return matchingMethod;\n\n }", "public AMethod lookupMethodInterface(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\treturn candidate;\n\t}", "public SootMethod getMethod(String name, List parameterTypes, Type returnType) throws\n ca.mcgill.sable.soot.NoSuchMethodException\n {\n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name) &&\n parameterTypes.equals(method.getParameterTypes()) &&\n returnType.equals(method.getReturnType()))\n {\n return method;\n }\n }\n\n throw new ca.mcgill.sable.soot.NoSuchMethodException(getName() + \".\" + name + \"(\" + \n parameterTypes + \")\" + \" : \" + returnType);\n }", "public SootMethod getMethod(String name) throws\n ca.mcgill.sable.soot.NoSuchMethodException, ca.mcgill.sable.soot.AmbiguousMethodException\n {\n boolean found = false;\n SootMethod foundMethod = null;\n \n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name))\n {\n if(found)\n throw new ca.mcgill.sable.soot.AmbiguousMethodException();\n else { \n found = true;\n foundMethod = method;\n }\n }\n }\n\n if(found)\n return foundMethod;\n else\n throw new ca.mcgill.sable.soot.NoSuchMethodException();\n }", "private Method getBestMatchingMethod(Object o, String methodName, Class[] parameterClasses) throws NoSuchMethodException {\r\n Method method = null;\r\n boolean hasMatch;\r\n\r\n for (Class c : parameterClasses) {\r\n hasMatch = true;\r\n try {\r\n method = o.getClass().getMethod(methodName, c);\r\n } catch (NoSuchMethodException e) {\r\n hasMatch = false;\r\n }\r\n if (hasMatch)\r\n break;\r\n }\r\n if (method == null)\r\n throw new NoSuchMethodException(\"No Such Method: \" + methodName);\r\n return method;\r\n }", "@SuppressWarnings(\"all\")\n public static Method findMethodOrThrowException(Class<?> type, String methodName, Class<?>... parameterTypes) {\n Method methodToMock = findMethod(type, methodName, parameterTypes);\n throwExceptionIfMethodWasNotFound(type, methodName, methodToMock, (Object[]) parameterTypes);\n return methodToMock;\n }", "public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tChecker.notNull(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tfinal MostDerivedMethodFinder finder = new MostDerivedMethodFinder();\r\n\t\tfinder.setMethodName(methodName);\r\n\t\tfinder.setParameterTypes(parameterTypes);\r\n\t\tfinder.start(this);\r\n\t\treturn finder.getFound();\r\n\t}", "public SyaroMethod findMethod(String name, List<VariableType> args) {\n\t\tList<VariableType> prms;\n\t\tSyaroMethod resn = null; // returns if arguments is not conversible\n\t\tSyaroMethod res = null; // the nearest conversible\n\t\tint count = 0;\n\n\t\tfor(SyaroMethod mth : methods) {\n\t\t\tif(mth.getName().equals(name)) {\n\t\t\t\tprms = mth.getArgumentTypes();\n\t\t\t\tif(args.size() == prms.size()) {\n\t\t\t\t\tif(!isConversible(args, mth)) {\n\t\t\t\t\t\tresn = mth;\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(res == null || isConversible(mth.getArgumentTypes(), res)) {\n\t\t\t\t\t\tres = mth;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res != null ? res : count == 1 ? resn : null;\n\t}", "public MethodConstant findModuleMethod(String sMethod, ObjectHandle[] ahArg)\n {\n TypeInfo infoModule = getModule().getType().ensureTypeInfo();\n\n TypeConstant[] atypeArg;\n if (ahArg.length == 0)\n {\n atypeArg = TypeConstant.NO_TYPES;\n }\n else\n {\n int cArgs = ahArg.length;\n\n atypeArg = new TypeConstant[cArgs];\n for (int i = 0; i < cArgs; i++)\n {\n atypeArg[i] = ahArg[i].getType(); // could be null for DEFAULT values\n }\n }\n\n return infoModule.findCallable(sMethod, true, false, TypeConstant.NO_TYPES, atypeArg);\n }", "private AMethod lookupMethodImplementedInterfaces(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tType t = (Type) e.nextElement();\n\t\t\tAClass cl = t.getRefType();\n\t\t\tcandidate =\n\t\t\t\tcl.lookupMethodInterface(\n\t\t\t\t\tconfig,\n\t\t\t\t\tmth_name,\n\t\t\t\t\tparam_types,\n\t\t\t\t\tcandidate);\n\t\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn candidate;\n\t}", "@SuppressWarnings(\"unchecked\")\n static Method findMatchingMethod(Class<?> runtimeClass,\n JDiffClassDescription.JDiffMethod method) {\n Method[] methods = runtimeClass.getDeclaredMethods();\n\n for (Method m : methods) {\n if (matches(method, m)) {\n return m;\n }\n }\n\n return null;\n }", "public static Method findMethod(Class<?> clazz, String name) {\n return findMethod(clazz, name, new Class<?>[0]);\n }", "public boolean declaresMethod(String name, List parameterTypes)\n {\n resolveIfNecessary();\n // inefficient\n\n Iterator methodIt = getMethods().iterator();\n\n while(methodIt.hasNext())\n {\n SootMethod method = (SootMethod) methodIt.next();\n\n if(method.getName().equals(name) &&\n method.getParameterTypes().equals(parameterTypes))\n return true;\n }\n \n return false;\n }", "Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves the policy set
public String getPolicySet();
[ "PolicySet createPolicySet();", "PoliciesClient getPolicies();", "public ParameterMap getPolicies() {\n return policyParams;\n }", "Policy getPolicy();", "public List<PolicyType> getPoliciesChild() {\n List<PolicyType> policies = new ArrayList<PolicyType>();\n if (policySetOrPolicyOrPolicySetIdReference != null) {\n for (JAXBElement<?> jb: policySetOrPolicyOrPolicySetIdReference) {\n if (jb.getName().getLocalPart().equals(\"Policy\")) {\n policies.add((PolicyType)jb.getValue());\n } else if (jb.getName().getLocalPart().equals(\"PolicySet\")) {\n PolicySetType policySetChild = (PolicySetType) jb.getValue();\n policies.addAll(policySetChild.getPoliciesChild());\n }\n }\n }\n return policies;\n }", "public Policy getPolicy() {\n return policy;\n }", "public Policies policies() {\n return this.policies;\n }", "public java.util.List<org.xmlsoap.schemas.ws.x2004.x09.policy.Policy> getPolicyList()\n {\n final class PolicyList extends java.util.AbstractList<org.xmlsoap.schemas.ws.x2004.x09.policy.Policy>\n {\n public org.xmlsoap.schemas.ws.x2004.x09.policy.Policy get(int i)\n { return OperatorContentTypeImpl.this.getPolicyArray(i); }\n \n public org.xmlsoap.schemas.ws.x2004.x09.policy.Policy set(int i, org.xmlsoap.schemas.ws.x2004.x09.policy.Policy o)\n {\n org.xmlsoap.schemas.ws.x2004.x09.policy.Policy old = OperatorContentTypeImpl.this.getPolicyArray(i);\n OperatorContentTypeImpl.this.setPolicyArray(i, o);\n return old;\n }\n \n public void add(int i, org.xmlsoap.schemas.ws.x2004.x09.policy.Policy o)\n { OperatorContentTypeImpl.this.insertNewPolicy(i).set(o); }\n \n public org.xmlsoap.schemas.ws.x2004.x09.policy.Policy remove(int i)\n {\n org.xmlsoap.schemas.ws.x2004.x09.policy.Policy old = OperatorContentTypeImpl.this.getPolicyArray(i);\n OperatorContentTypeImpl.this.removePolicy(i);\n return old;\n }\n \n public int size()\n { return OperatorContentTypeImpl.this.sizeOfPolicyArray(); }\n \n }\n \n synchronized (monitor())\n {\n check_orphaned();\n return new PolicyList();\n }\n }", "public PoliciesClient getPolicies() {\n return this.policies;\n }", "public PolicyMap getPolicyMap();", "SecurityPoliciesClient getSecurityPolicies();", "public int getPolicy()\n {\n return _policy;\n }", "public String getPolicy() {\n return policy;\n }", "@RequestMapping(value = \"/all\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<PolicyRef>> getPolicies() {\n\t\tList<PolicyRef> groups = treatmentPolicyService.getPolicies();\n\t return new ResponseEntity<>(groups, HttpStatus.OK);\n\t}", "public Set<Policy> findPolicyByPerson(String id);", "public java.util.List<PolicyDetail> getUserPolicyList() {\n if (userPolicyList == null) {\n userPolicyList = new com.amazonaws.internal.ListWithAutoConstructFlag<PolicyDetail>();\n userPolicyList.setAutoConstruct(true);\n }\n return userPolicyList;\n }", "public PolicyDefinitionsClient getPolicyDefinitions() {\n return this.policyDefinitions;\n }", "Policy _get_policy(int policy_type);", "public List<Policy> getPolicyList(User u) {\r\n\t\t\r\n\t\treturn u.getPolicyList();\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This method correctly toggles fillBox by considering other relevant properties of the drawing panel. This method takes a boolean argument and toggles the filled property along with other relevant properties.
private void setFillBox(boolean booleanFlag) { // Toggle fill on. if (booleanFlag) { fillBox.setSelected(true); drawPanel.setIsFilled(true); lineWidthTextField.setEnabled(false); dashLengthTextField.setEnabled(false); dashBox.setEnabled(false); } // Toggle fill off. else { fillBox.setSelected(false); drawPanel.setIsFilled(false); lineWidthTextField.setEnabled(true); dashLengthTextField.setEnabled(true); dashBox.setEnabled(true); } }
[ "public void toggleFill() {\n\t\tfill = !fill;\n\t}", "private void fillShape(){\n\t\tif (chkFill.isSelected()) {\r\n\t\t\tellipse.setFill(Color.LIGHTSEAGREEN);\r\n\t\t\trectangle.setFill(Color.DEEPSKYBLUE);\r\n\t\t\tcircle.setFill(Color.DEEPPINK);\r\n\t\t}\r\n\t\t//When checkbox is not selected, make shapes transparent.\r\n\t\telse {\r\n\t\t\tellipse.setFill(Color.TRANSPARENT);\r\n\t\t\trectangle.setFill(Color.TRANSPARENT);\r\n\t\t\tcircle.setFill(Color.TRANSPARENT);\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void toggleFill() {\n // empty bc mock\n }", "void setFill(boolean fill);", "void setFilled(boolean filled);", "public void setFilled(boolean filled){\r\n isFilled = filled;\r\n\r\n }", "public void setFillPolygon(final boolean setting)\n {\n setFill = setting;\n }", "public final void setFillFrame(boolean fill)\r\n {\r\n fillFrame = fill;\r\n }", "public void setFilled(boolean filled){\n\t\t this.filled = filled;\n\t }", "public abstract void setFilled(boolean filled);", "public void setFilled(boolean filled) {\n this.filled = filled;\n }", "public void setFilled ( boolean flag ) {\r\n\t\tfill_flag = flag;\r\n\t}", "@Override\n public void setFilled(boolean f) {\n cover.setFilled(f);\n }", "public void setShouldFillShape(boolean shouldFillShape) {\n boolean oldShouldFillShape = this.shouldFillShape;\n this.shouldFillShape = shouldFillShape;\n propertyChangeSupport.firePropertyChange(\"shouldFillShape\", oldShouldFillShape, shouldFillShape);\n }", "public boolean isFill() {\n return fill;\n }", "public void setFull(boolean boxFull) {\n full = boxFull;\n }", "public boolean isShouldFillShape() {\n return this.shouldFillShape;\n }", "public boolean getFillState() {\r\n\t\treturn noFill;\r\n\t}", "public Action setFillEnabled(boolean fillEnabled) {\n mFillEnabled = fillEnabled;\n return this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve a columns' list of database and table
public List<String> getColumns(String database, String table) throws SQLException;
[ "List<String> getColumns();", "List<Column> getAllColumns();", "public List<GenTableColumn> selectDbTableColumnsByName(String tableName);", "List<Column> getQueryColumns();", "public List getDbColumns() {\n return _dbColumns;\n }", "public List<String> getColumnsName();", "java.util.List<com.google.cloud.datastream.v1alpha1.OracleColumn> \n getOracleColumnsList();", "java.util.List<com.factset.protobuf.stach.v2.table.ColumnDefinitionProto.ColumnDefinition> \n getColumnsList();", "java.util.List<com.google.devtools.kythe.proto.Filecontext.ContextDependentVersion.Column> \n getColumnList();", "public static void getColumnsMetadata(ArrayList tables)\n throws SQLException {\n ResultSet rs = null;\n // Print the columns properties of the actual table\n\n\n }", "List<String> getSourceColumns();", "com.vitessedata.llql.llql_proto.LLQLData.Schema getCols();", "Variable[] allColumns();", "public Map<String, ColumnMetaData> getColumns();", "public ArrayList getTables(String Db);", "public ArrayList<ColumnInTable> getAllColumns() {\n Schema schema = Schema.getSchema();\n ArrayList<ColumnInTable> columns = new ArrayList<ColumnInTable>();\n \n for (int i = 0; i < fromTables.size(); i++) {\n Table t = schema.getTable(fromTables.get(i).first());\n for (Entry<String, Column> entry: t.getAllColumns().entrySet()) {\n columns.add(new ColumnInTable(entry.getValue(), i));\n }\n }\n \n return columns;\n }", "@Test\n public void columnsWithColumnNameFilterAndTableNameFilter() throws Exception {\n GetColumnsResp resp = BaseTestQuery.client.getColumns(null, null, LikeFilter.newBuilder().setPattern(\"%bits\").build(), LikeFilter.newBuilder().setPattern(\"%\\\\_p%\").setEscape(\"\\\\\").build()).get();\n Assert.assertEquals(OK, resp.getStatus());\n List<ColumnMetadata> columns = resp.getColumnsList();\n Assert.assertEquals(4, columns.size());\n TestMetadataProvider.verifyColumn(\"sys\", DRILLBITS.getTableName(), \"user_port\", columns);\n TestMetadataProvider.verifyColumn(\"sys\", DRILLBITS.getTableName(), \"control_port\", columns);\n TestMetadataProvider.verifyColumn(\"sys\", DRILLBITS.getTableName(), \"data_port\", columns);\n }", "@Test\n\tvoid selectDbTableColumns() {\n\t\tList<CodeGenTableColumn> res = service.selectDbTableColumns(\"SYS_ROLE\");\n\t\tAssertions.assertNotNull(res);\n\t}", "public List<String> getListStudentColumn() {\r\n List<String> listColumn = new ArrayList<>();\r\n Connection con = null;\r\n PreparedStatement ps = null;\r\n try {\r\n con = DBContext.getInstance().getConnection();\r\n String querySelectAllStudent = \"Select * from student\";\r\n ps = con.prepareStatement(querySelectAllStudent);\r\n ResultSet rs = ps.executeQuery();\r\n ResultSetMetaData metadata = rs.getMetaData();\r\n int columnCount = metadata.getColumnCount();\r\n for (int i = 1; i <= columnCount; i++){\r\n listColumn.add(metadata.getColumnName(i));\r\n }\r\n rs.close();\r\n ps.close();\r\n con.close();\r\n } catch (SQLException | ClassNotFoundException ex) {\r\n Logger.getLogger(StudentDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n return listColumn;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the package instance. Because the package instance can only be loaded once, the package proxy should always be used.
public PackageProxy(){ if(packages==null){ try { packages = Packages.getInstance(); } catch ( UnsupportedOperationException ex) { LOG.fatal("Could not initialize packages: {}", ex.getMessage(), ex); } } }
[ "Package createPackage();", "DomainPackage createDomainPackage();", "public static TinyDP newDeploymentPackage()\n {\n return new TinyDPImpl( new DPBuilder(), null, new Bucket(), StoreFactory.defaultStore() );\n }", "@Override\n public java.lang.AutoCloseable createInstance() {\n logger.info(\"Creating the Registry Handler Implementation Instance...\");\n\n DataBroker dataBrokerService = getDataBrokerDependency();\n RpcProviderRegistry rpcProviderRegistry = getRpcRegistryDependency();\n RegistryHandlerProvider provider = new RegistryHandlerProvider(dataBrokerService, rpcProviderRegistry);\n\n logger.info(\"Creating the Registry Handler Implementation created...\");\n\n return provider;\n }", "DataPackage createDataPackage();", "private DefPackage()\n {\n\n }", "public JsDocPackage createPackage(String packageName)\n {\n if(this.sealed) throw new JsDocException(\"Attempt to change sealed doclet.\");\n JsDocPackage p = (JsDocPackage)this.packages.get(packageName);\n if(p == null) {\n p = new JsDocPackage(this, packageName);\n this.packages.put(packageName, p);\n }\n return p;\n }", "EPackage createEPackage();", "public PackageSection createPackage() {\n PackageSection ps = newPackageSection();\n this.packages.add( ps );\n return ps;\n }", "public static void create() {\n create(Library.loadNative(\n XR.class,\n \"org.lwjgl.openxr\",\n Configuration.OPENXR_LIBRARY_NAME.get(Platform.mapLibraryNameBundled(Platform.get() == Platform.WINDOWS\n ? \"openxr-loader\"\n : \"openxr_loader\")),\n true\n ));\n }", "public PackageManager() {\n \t// initialize the graph\n graph = new Graph();\n }", "ShipmentPackage createShipmentPackage();", "public static IngestHelperInterface create() {\n ClassLoader cl = SimpleDataTypeHelper.class.getClassLoader();\n return (IngestHelperInterface) Proxy.newProxyInstance(cl, new Class[] {IngestHelperInterface.class}, new SimpleDataTypeHelper());\n }", "public Object instanceCreate() throws IOException, ClassNotFoundException {\n return new URLPresenter(this);\n }", "public PackageServer() {\n\t\t\n\t\t// Create the release folder\n\t\tLOGGER.debug(\"Creating directory: {}\", RELEASE_FOLDER);\n\t\tif (PackageUtils.createDirectory(RELEASE_FOLDER)) {\n\t\t\tLOGGER.debug(\"Created: {}\", RELEASE_FOLDER);\n\t\t} else {\n\t\t\tLOGGER.debug(\"Failed creating: {}\", RELEASE_FOLDER);\n\t\t}\n\t}", "public void newPackageLibrary() {\n compilerInfo.setPackageLibrary(new PackageLibrary());\n }", "ExternalPackages createExternalPackages();", "private TypePackage createPackageFrom(PackageDescription description) {\n return TypePackageImpl.create(description);\n }", "ModulePackage createModulePackage();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return the time elapsed between the two clocks in seconds.
public static int timeElapsed(Clock firstClock, Clock secondClock) { int time; int hoursElapsed; int minutesElapsed; int secondsElapsed; if (firstClock == secondClock){ time =0; }else{ hoursElapsed= firstClock.hours - secondClock.hours; minutesElapsed = firstClock.minutes- secondClock.minutes; secondsElapsed = firstClock.seconds - firstClock.seconds; time = secondsElapsed + (minutesElapsed*60)+ (hoursElapsed*3600); } return time; }
[ "public long elapsedSeconds(){\n if(isRunning){\n return ((System.currentTimeMillis() - t0) / 1000L);\n }else{\n return ((t1 - t0) / 1000L);\n }\n }", "public static long timeDiff(Calendar c1, Calendar c2) {\n\t\treturn (c2.getTimeInMillis() - c1.getTimeInMillis()) / 1000;\n\t}", "public long getElapsedTime(){\n long timePassed = endTime - startTime;\n return timePassed;\n }", "public int getElapsedTime() {\n long endTime = startTime + duration;\n\n int elapsedTime;\n if (reversed) {\n elapsedTime = (int) (endTime - currentTime);\n } else {\n elapsedTime = (int) (currentTime - startTime);\n }\n\n return elapsedTime;\n }", "private long getTimeDifference(Time timeValue1, Time timeValue2){\n return (timeValue2.getTime()-timeValue1.getTime())/1000;\n }", "public double getTimeDifference(String first, String second)\r\n\t{\r\n\t\tdouble diff=0;\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\r\n\t\t\tDate end = dateFormat.parse(first);\r\n\t\t\tDate start = dateFormat.parse(second);\r\n\r\n\t\t\tdiff = (end.getTime()-start.getTime());\r\n\t\t} catch(Exception e) { \r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t\treturn diff;\r\n\t}", "public long getDurationInSec(){\n\t\tlong end = System.currentTimeMillis();\n\t\treturn (end-start)/1000;\n\t}", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "public double timeDiff(double time1, double time2)\n {\n return fixhour(time2- time1);\n }", "public int secInClock() {\r\n return this.seconds; \r\n }", "public long getTime()\r\n {\r\n return this.elapsed;\r\n }", "public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }", "public int getTimeElapsed() {\n return timeElapsed.getNano();\n }", "private static double timeInSec(long endTime, long startTime) {\n\t\tlong duration = (endTime - startTime);\n\t\tif (duration > 0) {\n\t\t\tdouble dm = (duration/1000000.0); //Milliseconds\n\t\t\tdouble d = dm/1000.0; //seconds\n\t\t\treturn d ;\n\t\t}\n\t\treturn 0.0 ;\n\t}", "public Long getElapsedSeconds() {\n if (startedAt == null) {\n throw new IllegalStateException();\n }\n\n if (state == State.ACTIVE) {\n return ChronoUnit.SECONDS.between(startedAt, LocalDateTime.now());\n }\n\n return ChronoUnit.SECONDS.between(startedAt, stoppedAt);\n }", "private long getDuration() { return System.nanoTime() - start; }", "public long elapsedHours(){\n if(isRunning){\n return ((System.currentTimeMillis() - t0) / 3600000L);\n }else{\n return ((t1 - t0) / 3600000L);\n }\n }", "long getTimerSeconds();", "public int elapsedMillis() {\n return Js.coerceToInt(currentTimeMillis() - start);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Called by the Spring MVC controller to display the service assembly view page.
@RequestMapping({"/assemblyView.html", "/assemblyView.htm"}) public String viewAssembly(@RequestParam(value = "baseNamespace") String baseNamespace, @RequestParam(value = "filename") String filename, @RequestParam(value = "version") String version, HttpSession session, Model model) { String targetPage = null; try { RepositorySecurityManager securityManager = getSecurityManager(); UserPrincipal user = getCurrentUser( session ); RepositoryItem item = getRepositoryManager().getRepositoryItem( baseNamespace, filename, version ); checkItemType( item, RepositoryItemType.ASSEMBLY ); if (securityManager.isReadAuthorized( user, item )) { FreeTextSearchService searchService = FreeTextSearchServiceFactory.getInstance(); String assemblyIndexId = IndexingUtils.getIdentityKey( item ); AssemblySearchResult assembly = searchService.getAssembly( assemblyIndexId, true ); if (assembly == null) { throw new RepositoryException( "The requested release cannot be displayed." ); } List<ReleaseSearchResult> providerReleases = searchService.getReleases( assembly.getReferencedProviderIds(), true ); List<ReleaseSearchResult> consumerReleases = searchService.getReleases( assembly.getReferencedConsumerIds(), true ); Collections.sort( providerReleases, (ReleaseSearchResult r1, ReleaseSearchResult r2) -> r1 .getReleaseName().compareTo( r2.getReleaseName() ) ); Collections.sort( consumerReleases, (ReleaseSearchResult r1, ReleaseSearchResult r2) -> r1 .getReleaseName().compareTo( r2.getReleaseName() ) ); model.addAttribute( IMAGE_RESOLVER, new SearchResultImageResolver() ); model.addAttribute( PAGE_UTILS, new PageUtils() ); model.addAttribute( "item", item ); model.addAttribute( "assembly", assembly ); model.addAttribute( "providerReleases", providerReleases ); model.addAttribute( "consumerReleases", consumerReleases ); model.addAttribute( "externalProviders", assembly.getExternalProviders() ); model.addAttribute( "externalConsumers", assembly.getExternalConsumers() ); } else { setErrorMessage( ASSEMBLY_NOT_AUTHORIZED, model ); targetPage = new SearchController().defaultSearchPage( session, model ); } } catch (Exception e) { log.error( "An error occured while displaying the assembly.", e ); setErrorMessage( "An error occured while displaying the assembly (see server log for details).", model ); targetPage = new SearchController().defaultSearchPage( session, model ); } if (targetPage == null) { targetPage = applyCommonValues( model, "assemblyView" ); } return targetPage; }
[ "@GetMapping(\"/service\")\n\tpublic String showService() {\n\t\treturn \"service\";\n\t}", "@Override\n public String getAssembly() {\n return assemblyView.getText();\n }", "public String showPage() {\n\n return SUCCESS;\n }", "@RequestMapping(\"/companyCalendar\")\n\tpublic String getCompanyCalendarPage() {\n\t\treturn \"companyCalendar\";\n\t}", "@RequestMapping(\"/documentCenter\")\n\tpublic String getDocumentCenterPage() {\n\t\treturn \"documentCenter\";\n\t}", "@RequestMapping(value = \"/ticketCenter\")\n\tpublic String getTicketCenterPage(){\n\t\treturn \"ticketCenter\";\n\t}", "@RequestMapping(value = \"displayOrganizationsPage\", method=RequestMethod.GET )\n public String displayOrganizationsPage(Model model){\n List<Organization> organizationsList = service.getAllOrganizations(); \n model.addAttribute(\"organizationsList\",organizationsList);\n List<ZipCodeInfo> zipCodes = service.getAllZipCodes(); \n model.addAttribute(\"zipCodes\",zipCodes);\n return \"organization\";\n }", "@GetMapping(\"/details\")\n\tpublic String showVendorDetails()\n\t{\n\t\tSystem.out.println(\"in show vendor dtls\");\n\t\treturn \"/vendor/details\";//Actual view name : /WEB-INF/views/vendor/details.jsp\n\t}", "@RequestMapping(\"/showForm\")\n public String showForm() {\n return \"helloworld-form\";\n }", "@RequestMapping(\"/sovDirectory\")\n\tpublic String getSovDirectoryPage() {\n\t\treturn \"sovDirectory\";\n\t}", "@RequestMapping(\"/showForm\")\n public String showForm(){\n return \"helloworld-form\";\n }", "public void showAccountOverview() {\n\n try {\n //display \"AccountOverview.FXML\"\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Main.class.getResource(\"view/AccountOverview.fxml\"));\n AnchorPane accountOverview = (AnchorPane) loader.load();\n\n //set \"AccountOverview.FXML\" in center of rootLayout\n rootLayout.setCenter(accountOverview);\n\n //give controller access to MainApp\n AccountOverviewController controller = loader.getController();\n controller.setMainApp(this);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@RequestMapping(\"/processForm\")\n\tpublic String processForm() {\n\t\treturn \"helloworld\";\t\t\t// returns JSP view name\n\t}", "public IDeployerManagementView createDeployerManagementView(DeployerManagementController deployerManagementController);", "@RequestMapping(\"/showForm\")\n\tpublic String showFrom() {\n\t\treturn \"helloworld-form\";\n\t}", "@DefaultHandler\r\n public Resolution view() throws ServiceException {\r\n vocabularyFolder =\r\n vocabularyService.getVocabularyFolder(vocabularyFolder.getIdentifier(), vocabularyFolder.isWorkingCopy());\r\n \r\n validateView();\r\n // Check if vocabulary concept url\r\n Resolution resolution = getVocabularyConceptResolution();\r\n if (resolution != null) {\r\n return resolution;\r\n }\r\n \r\n initFilter();\r\n vocabularyConcepts = vocabularyService.searchVocabularyConcepts(filter);\r\n vocabularyFolderVersions =\r\n vocabularyService.getVocabularyFolderVersions(vocabularyFolder.getContinuityId(), vocabularyFolder.getId(),\r\n getUserName());\r\n \r\n return new ForwardResolution(VIEW_VOCABULARY_FOLDER_JSP);\r\n }", "@RequestMapping(\"/\")\n\tpublic String start() {\n\t\treturn \"response\"; //for home.jsp\n\t}", "@GetMapping(value = {\"/loanClosureForm\" })\n public ModelAndView productOverview() {\n ModelAndView modelAndView = new ModelAndView(\"views/customerservice/loanClosureSearch/LoanClosureForm\");\n return modelAndView;\n }", "@RequestMapping(\"/ShowForm\")\n\tpublic String showForm() {\n\t\treturn \"studentForm\";\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value for child leaf "fulldomainname", using a String value.
public void setFullDomainNameValue(String fullDomainNameValue) throws JNCException { setFullDomainNameValue(new YangString(fullDomainNameValue)); }
[ "public void setFullDomainNameValue(YangString fullDomainNameValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"full-domain-name\",\n fullDomainNameValue,\n childrenNames());\n }", "public void setFullname(String value) {\n setAttributeInternal(FULLNAME, value);\n }", "public void setFullName(String value) {\n setAttributeInternal(FULLNAME, value);\n }", "public void setFullName(String value) {\r\n setAttributeInternal(FULLNAME, value);\r\n }", "public void setFullName(java.lang.CharSequence value) {\n this.full_name = value;\n }", "public void addFullDomainName() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"full-domain-name\",\n null,\n childrenNames());\n }", "public void setFullName(java.lang.String fullName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FULLNAME$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FULLNAME$2);\n }\n target.setStringValue(fullName);\n }\n }", "public void setDomainNameValue(YangString domainNameValue)\n throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"domain-name\",\n domainNameValue,\n childrenNames());\n }", "public void xsetFullName(org.apache.xmlbeans.XmlString fullName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FULLNAME$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FULLNAME$2);\n }\n target.set(fullName);\n }\n }", "public void unsetFullDomainNameValue() throws JNCException {\n delete(\"full-domain-name\");\n }", "void setFullName(String fullName);", "public void setFullName(String fullName) {\n ((ObjectNode) jsonContent).put(FULL_NAME_KEY, fullName);\n }", "public void setFullName(String fullName);", "public YangString getFullDomainNameValue() throws JNCException {\n return (YangString)getValue(\"full-domain-name\");\n }", "public void setUserFQN(String value){\n ((LoginResponseDMO) core).setUserFQN(value);\n }", "public void setChildName(PersonShortData child) {\r\n\t\tpParent.setText(Resurses.getString(\"MENU_OTHER\") + \" \" + child.getAlfaName());\r\n\t}", "private void setRpcFullName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n rpcFullName_ = value;\n }", "public void setParent1LastName(String str1) throws AcisException {\n\n\t\tenterText(PMLastName, str1);\n\n\t\tlogger.info(\"Parent1 LastName provided is:\" + str1);\n\t}", "public void setMiddleName(String value) {\r\n setAttributeInternal(MIDDLENAME, value);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the arguments (parameters) for the BackendListenerClient to be executed with.
public void setArguments(Arguments args) { // Bug 59173 - don't save new default argument args.removeArgument(GraphiteBackendListenerClient.USE_REGEXP_FOR_SAMPLERS_LIST, GraphiteBackendListenerClient.USE_REGEXP_FOR_SAMPLERS_LIST_DEFAULT); setProperty(new TestElementProperty(ARGUMENTS, args)); }
[ "public void setArgs(String args) {\n this.additionalArgs = args;\n }", "void setBindArguments(String[] bindArgs);", "void setArguments(String arguments);", "public void setArguments(List<CommandLineBinding> arguments) {\n this.arguments = arguments;\n }", "protected void setAllowedArguments(ClientType clientType) {\n switch (clientType) {\n case CLI_KAFKA_VERIFIABLE_PRODUCER:\n allowedArguments.add(ClientArgument.TOPIC);\n allowedArguments.add(ClientArgument.BROKER_LIST);\n allowedArguments.add(ClientArgument.MAX_MESSAGES);\n allowedArguments.add(ClientArgument.THROUGHPUT);\n allowedArguments.add(ClientArgument.ACKS);\n allowedArguments.add(ClientArgument.PRODUCER_CONFIG);\n allowedArguments.add(ClientArgument.MESSAGE_CREATE_TIME);\n allowedArguments.add(ClientArgument.VALUE_PREFIX);\n allowedArguments.add(ClientArgument.REPEATING_KEYS);\n allowedArguments.add(ClientArgument.USER);\n break;\n case CLI_KAFKA_VERIFIABLE_CONSUMER:\n allowedArguments.add(ClientArgument.BROKER_LIST);\n allowedArguments.add(ClientArgument.TOPIC);\n allowedArguments.add(ClientArgument.GROUP_ID);\n allowedArguments.add(ClientArgument.MAX_MESSAGES);\n allowedArguments.add(ClientArgument.SESSION_TIMEOUT);\n allowedArguments.add(ClientArgument.VERBOSE);\n allowedArguments.add(ClientArgument.ENABLE_AUTOCOMMIT);\n allowedArguments.add(ClientArgument.RESET_POLICY);\n allowedArguments.add(ClientArgument.ASSIGMENT_STRATEGY);\n allowedArguments.add(ClientArgument.CONSUMER_CONFIG);\n allowedArguments.add(ClientArgument.USER);\n allowedArguments.add(ClientArgument.GROUP_INSTANCE_ID);\n break;\n default:\n throw new IllegalArgumentException(\"Unexpected client type!\");\n }\n }", "public void setArguments (String arguments)\n {\n this.arguments = arguments;\n }", "void setJvmArguments(List<String> arguments);", "public void setCommandLineArgs(final String[] args) {\r\n \t\tthis.commandLineArgs = (String[])args.clone();\r\n \t}", "public abstract void setParameters();", "public abstract void configure(String[] args);", "private void parseArguments(String[] args)\n {\n if (args.length > 0) {\n if (args[0].equalsIgnoreCase(\"derbyclient\"))\n {\n framework = \"derbyclient\";\n driver = \"org.apache.derby.jdbc.ClientDriver\";\n protocol = \"jdbc:derby://localhost:1527/\";\n }\n }\n }", "private void setOptions(String optionArgs) {\n\t\t// TODO any engine options?\n\t\t\n\t}", "public void setJvmargs(String args) {\n this.additionalJvmArgs = args;\n }", "public static void setArguments(int a) { arguments.add(a); }", "public void setOptionValues(String[] args) throws ForgeOptionException;", "void setArgs(SchedulerArgs args);", "protected abstract void injectCmdArgs();", "@Override\r\n\tpublic ICommand setArgument(String[] args) {\r\n\t\treturn null;\r\n\t}", "public void fillCLIArgs(List<String> args) {\n\t\tif (transactionalCheckBox.isSelected()) {\n\t\t\targs.add(\"-transactional\");\n\t\t}\n\t\tObject isolationLevel = isolationLevelComboBox.getSelectedItem();\n\t\tif (isolationLevel != null && !String.valueOf(Connection.TRANSACTION_NONE).equals(isolationLevel)) {\n\t\t\targs.add(\"-isolation-level\");\n\t\t\targs.add(isolationLevel.toString());\n\t\t}\n\t\tInteger nt = numThreads();\n\t\tif (nt != null) {\n\t\t\targs.add(\"-threads\");\n\t\t\targs.add(\"\" + nt);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A Simple Payment Setup Protocol service delivers queries and payment setup messages to receivers.
public interface SpspService { /** * The sender (this service) queries the receiver endpoint to get information about the type of * payment that can be made to this receiver: * * @param endpoint * The address of the receiver endpoint * @return * Information about the receiver */ Receiver query(URI endpoint); /** * The sender submits payment information to the receiver to set up a payment. * * @param endpoint * The address of the receiver endpoint * @param amount * The amount. Only relevant to payee receivers, not invoices * @param senderIdentifier * Identifies the sender * @param memo * A message for the recipient linked to the payment. Only relevant to payee receivers, not * invoices. * @return */ PaymentRequest setupPayment(URI endpoint, String amount, String senderIdentifier, String memo); }
[ "public void send_setup()\n {\n out.println(\"chain_setup\");\n }", "public ACQIPPSETUPSetup()\n\t{\n\t\tinitComponents();\n\t}", "void makePayment(Order order, TourPackage tourPackageOrder, User currentUser, StatusOrder statusOrder) throws ServiceException;", "public void do_payment() {\r\n\t\ttry {\r\n\t\t\tclick(pay_by_bank_wire);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.getMessage();\r\n\t\t}\r\n\t}", "PaymentHandler createPaymentHandler();", "public void testAddSetupRequest() throws Exception {\n\n Element element;\n\n xmlUtils = new XmlUtils(AP_NS_PREFIX, AP_NS_URI, AP_XML_VERSION);\n document = parse(clientxml);\n\n element = xmlUtils.getElement(document.getDocumentElement(), COMMAND);\n assertNotNull(element);\n element = xmlUtils.getElement(element, AP_E_SETUP);\n assertNull(element);\n\n ParseUtils.addSetupRequest(xmlUtils, document, COMMAND);\n\n element = xmlUtils.getElement(document.getDocumentElement(), COMMAND);\n assertNotNull(element);\n element = xmlUtils.getElement(element, AP_E_SETUP);\n assertNotNull(element);\n }", "public static void soap() {\n\t\tBasicConfigurator.configure();\n\t\tSAPExchangeService sapExchangeService = new SAPExchangeService();\n\t\tSAPExchangeServiceEndpoint sapExchangeServiceEndpoint;\n\t\tsapExchangeServiceEndpoint = sapExchangeService.getSAPExchangeServicePort();\n\t\tObjectFactory objectFactory = new ObjectFactory();\n\t\tEXCHANGERATEREQUEST exchangeRateRequest = prepareExchangeRateRequest(objectFactory);\n\t\tsapExchangeServiceEndpoint.processSAPExchangeRate(exchangeRateRequest);\n\t}", "void retrievePayment(RetrievePaymentRequest request);", "public void run()\n\t{\n\t\tMSetup ms = new MSetup(Env.getCtx(), m_WindowNo);\n\t\tm_frame.setBusyTimer(45);\n\t\t// Step 1\n\t\tboolean ok = ms.createClient(fClientName.getText(), fOrgName.getText(),\n\t\t\tfUserClient.getText(), fUserOrg.getText());\n\t\tString info = ms.getInfo();\n\n\t\tif (ok)\n\t\t{\n\t\t\t// Generate Accounting\n\t\t\tKeyNamePair currency = (KeyNamePair)fCurrency.getSelectedItem();\n\t\t\tif (!ms.createAccounting(currency,\n\t\t\t\tfProduct.isSelected(), fBPartner.isSelected(), fProject.isSelected(),\n\t\t\t\tfMCampaign.isSelected(), fSRegion.isSelected(),\n\t\t\t\tm_file))\n\t\t\t{\n\t\t\t\tADialog.error(m_WindowNo, this, \"AccountSetupError\");\n\t\t\t\tdispose();\n\t\t\t}\n\t\t\t// Generate Entities\n\t\t\tKeyNamePair p = (KeyNamePair)fCountry.getSelectedItem();\n\t\t\tint C_Country_ID = p.getKey();\n\t\t\tp = (KeyNamePair)fRegion.getSelectedItem();\n\t\t\tint C_Region_ID = p.getKey();\n\t\t\tms.createEntities(C_Country_ID, fCity.getText(), C_Region_ID, currency.getKey());\n\t\t\tinfo += ms.getInfo();\n\t\t\t//\tCreate Print Documents\n\t\t\tPrintUtil.setupPrintForm(ms.getAD_Client_ID());\n\t\t}\n\n\t\tADialog.info(m_WindowNo, this, \"VSetup\", info);\n\t\tdispose();\n\t}", "public interface PaymentService {\n\n\t/**\n\t * Pay the given {@link Order} with the {@link CreditCard} identified by the\n\t * given {@link CreditCardNumber}.\n\t * \n\t * @param order\n\t * @param creditCardNumber\n\t * @return\n\t */\n\tCreditCardPayment pay(Order order, CreditCardNumber creditCardNumber);\n\n\t/**\n\t * Returns the {@link Payment} for the given {@link Order}.\n\t * \n\t * @param order\n\t * @return the {@link Payment} for the given {@link Order} or\n\t * {@literal null} if the Order hasn't been payed yet.\n\t */\n\tPayment getPaymentFor(Order order);\n\n\t/**\n\t * Takes the receipt\n\t * \n\t * @param order\n\t * @return\n\t */\n\tReceipt takeReceiptFor(Order order);\n}", "public void execute() {\n try {\n PSSWorker pssWorker = PSSWorker.getInstance();\n PSSClient pssClient = pssWorker.getPSSClient();\n\n Object[] req = {this.getRequestData()};\n pssClient.invoke(PSSConstants.PSS_SETUP,req);\n\n this.setResultData(null); \n this.executed();\n \n } catch (OSCARSServiceException ex) {\n this.fail(ex);\n }\n }", "public interface MdmScomoDpHandler {\n /**\n * Notification that the delivery package is available for download and the\n * Engine is awaiting command to start download.\n * \n * @param scomoDpInstance SCOMO DP instance.\n * @param dd Download descriptor.\n * @return true to indicate to start downloading the package package, or\n * false to postpone download execution until\n * MdmScomoDp.resumeDLSession() is called.\n */\n boolean confirmDownload(MdmScomoDp scomoDpInstance, DownloadDescriptor dd);\n\n /**\n * Notification that the delivery package has been downloaded and the Engine\n * is awaiting command to start install.\n * \n * @param scomoDpInstance SCOMO DP instance.\n * @return true to launch the Installer to execute install, or false to\n * postpone installation execution until either:\n * MdmScomoDp.executeInstall() is called, or after device reboot.\n */\n boolean confirmInstall(MdmScomoDp scomoDpInstance);\n\n /**\n * Request the installer to start with the execution of the delivery\n * package.\n * \n * @param scomoDpInstance SCOMO DP instance.\n * @param deliveryPkgPath Path to the downloaded delivery package.\n * @param isActive A flag to indicate whether to install DCs in their active\n * state.\n * @return The return value is ignored.\n */\n ScomoOperationResult executeInstall(MdmScomoDp scomoDpInstance, String deliveryPkgPath, boolean isActive);\n}", "private void launchPayPalPayment() {\n\n\t\tPayPalPayment thingsToBuy = prepareFinalCart();\n\n\t\tIntent intent = new Intent(MainActivity.this, PaymentActivity.class);\n\n\t\tintent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, paypalConfig);\n\n\t\tintent.putExtra(PaymentActivity.EXTRA_PAYMENT, thingsToBuy);\n\n\t\tstartActivityForResult(intent, REQUEST_CODE_PAYMENT);\n\t}", "public SendDirectEmailService() {\n }", "@Test\n public void demoCreateTransportOrderToPoint() {\n List<DestinationCreationTO> destinations\n = List.of(\n new DestinationCreationTO(\"Some point\", Destination.OP_MOVE)\n );\n // end::createTransportOrderToPoint_createDestinations[]\n\n // tag::createTransportOrderToPoint_createTransportOrderCreationTO[]\n TransportOrderCreationTO orderTO\n = new TransportOrderCreationTO(\"MyTransportOrder\", destinations)\n .withIntendedVehicleName(\"Some vehicle\")\n .withIncompleteName(true);\n // end::createTransportOrderToPoint_createTransportOrderCreationTO[]\n\n // tag::createTransportOrderToPoint_useServiceToCreateOrder[]\n TransportOrderService transportOrderService = getATransportOrderService();\n transportOrderService.createTransportOrder(orderTO);\n // end::createTransportOrderToPoint_useServiceToCreateOrder[]\n\n // tag::createTransportOrderToPoint_triggerDispatcher[]\n DispatcherService dispatcherService = getADispatcherService();\n dispatcherService.dispatch();\n // end::createTransportOrderToPoint_triggerDispatcher[]\n }", "public static void makePayment() {\n // Get the project number the user wishes to work on\n Project proj = getProject();\n int newAmount = getUserInt(\"Add client's next payment: \");\n\n try {\n projMang.updateAmountPaid(proj, newAmount);\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public interface PaymentService {\n\n PaymentResponse processPayment(PaymentRequest paymentRequest);\n\n}", "public PAYMENTS() {\n initComponents();\n }", "@Test\n public void threeDS_success_full_billing_with_email_with_shipping_basic_transaction() throws UiObjectNotFoundException, InterruptedException, JSONException, BSPaymentRequestException {\n setupBeforeTransaction(true, true, true);\n basic3DSFlow(TestingShopperCreditCard.VISA_CREDIT_CARD_FOR_3DS_SUCCESS, true, CardinalManager.ThreeDSManagerResponse.AUTHENTICATION_SUCCEEDED.name());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Count the number of sites in the persistent store.
public long countSites() { return siteOids.size(); }
[ "int getStoreCount();", "public int numberOfOpenSites() {\r\n\r\n\t\treturn count;\r\n\t}", "public int numberOfOpenSites() {\n return count;\n }", "public int openSites() {\n return count;\n }", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "int getDomainsCount();", "public int numberOfOpenSites() {\n return number;\n }", "@Override\n public int numberOfOpenSites() {\n return myOpenCount;\n }", "public int numberOfOpenSites() {\n return numOpenSite;\n }", "@Transactional\r\n\tpublic Integer countPrograms() {\r\n\t\treturn ((Long) programDAO.createQuerySingleResult(\"select count(o) from Program o\").getSingleResult()).intValue();\r\n\t}", "public Short getStoreCount() {\n return storeCount;\n }", "@Transactional\r\n\tpublic Integer countVisits() {\r\n\t\treturn ((Long) visitDAO.createQuerySingleResult(\"select count(o) from Visit o\").getSingleResult()).intValue();\r\n\t}", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int getKeyStoreCount() {\n return _keyStores.size();\n }", "protected abstract int getStateStoreCount();", "public int getServerCount() {\r\n return serverCount;\r\n }", "long countNumberOfProductsInDatabase();", "@Transactional\n\tpublic Integer countRcsCountryLists() {\n\t\treturn ((Long) rcsCountryListDAO.createQuerySingleResult(\"select count(o) from RcsCountryList o\").getSingleResult()).intValue();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column CTSCARDS_MGT_HST.MAILING_PO_BOX
public void setMAILING_PO_BOX(String MAILING_PO_BOX) { this.MAILING_PO_BOX = MAILING_PO_BOX == null ? null : MAILING_PO_BOX.trim(); }
[ "public void setPO_BOX(String PO_BOX)\r\n {\r\n\tthis.PO_BOX = PO_BOX == null ? null : PO_BOX.trim();\r\n }", "public void setPO_BOX(String PO_BOX) {\r\n this.PO_BOX = PO_BOX == null ? null : PO_BOX.trim();\r\n }", "public String getMAILING_PO_BOX() {\r\n return MAILING_PO_BOX;\r\n }", "public void setMAILING_POBOX_AREA(BigDecimal MAILING_POBOX_AREA) {\r\n this.MAILING_POBOX_AREA = MAILING_POBOX_AREA;\r\n }", "public void setPoBoxOfAddress(String poBoxOfAddress) {\r\n\t\tthis.poBoxOfAddress = poBoxOfAddress;\r\n\t}", "public String getPO_BOX() {\r\n return PO_BOX;\r\n }", "public String getPO_BOX()\r\n {\r\n\treturn PO_BOX;\r\n }", "public void setPO_BOX_AREA(BigDecimal PO_BOX_AREA)\r\n {\r\n\tthis.PO_BOX_AREA = PO_BOX_AREA;\r\n }", "public void setPOBOX_AREA(BigDecimal POBOX_AREA) {\r\n this.POBOX_AREA = POBOX_AREA;\r\n }", "@Column(name = \"L1_POST_OFFICE_BOX\")\n\tpublic String getPostOfficeBox()\n\t{\n\t\treturn postOfficeBox;\n\t}", "public BigDecimal getMAILING_POBOX_AREA() {\r\n return MAILING_POBOX_AREA;\r\n }", "public void setPostalBox(java.lang.String postalBox)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(POSTALBOX$28, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(POSTALBOX$28);\n }\n target.setStringValue(postalBox);\n }\n }", "public void setMAILING_COUNTRY(BigDecimal MAILING_COUNTRY) {\r\n this.MAILING_COUNTRY = MAILING_COUNTRY;\r\n }", "public void setSMTP_ADDR(java.lang.String value)\n {\n if ((__SMTP_ADDR == null) != (value == null) || (value != null && ! value.equals(__SMTP_ADDR)))\n {\n _isDirty = true;\n }\n __SMTP_ADDR = value;\n }", "public String getMailbox() {\n return mailbox;\n }", "@ApiModelProperty(value = \"CRS PO Box Address\")\n \n public String getPoBox() {\n return poBox;\n }", "public String getMailbox() {\r\n\t\treturn mailbox;\r\n\t}", "public void xsetPostalBox(org.apache.xmlbeans.XmlString postalBox)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(POSTALBOX$28, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(POSTALBOX$28);\n }\n target.set(postalBox);\n }\n }", "public void setMAILING_POSTAL_CODE(BigDecimal MAILING_POSTAL_CODE) {\r\n this.MAILING_POSTAL_CODE = MAILING_POSTAL_CODE;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ name of port list
public static String[] commonPortsListNames(){ String[] portNames = { "File Transfer Protocol (FTP) Data Transfer" ,"File Transfer Protocol (FTP) Command Control" ,"Secure Shell (SSH) Secure Login" ,"Telnet remote login service, unencrypted text messages" ,"Simple Mail Transfer Protocol (SMTP) E-mail routing" ,"Domain Name System (DNS) service" ,"Hypertext Transfer Protocol (HTTP) used in World Wide Web" ,"Protocol standard for a NetBIOS service on a TCP/UDP transport: Concepts and methods" ,"HTTP Secure (HTTPS) HTTP over TLS/SSL" ,"MS Networking access" ,"Microsoft SQL Server database management system (MSSQL) server" ,"Microsoft SQL Server database management system (MSSQL) monitor" ,"MySQL database system" ,"Microsoft Terminal Server (RDP) officially registered as Windows Based Terminal (WBT)" ," Alternative port for HTTP"}; return portNames; }
[ "java.lang.String getNamedPort();", "private void listPorts() {\n\t\tint i = 1;\n\t\tfor (Portfolio port : getContext().getUserPorts())\n\t\t\tSystem.out.println(i++ + \": \" + port.getName());\n\t\tSystem.out.print(\"Select a portfolio to view by their number (integer): \");\n\t}", "public ArrayList<Port> getPortList() {\n return portList;\n }", "String getPort();", "java.lang.String getPort();", "public void list() {\n Enumeration pList = CommPortIdentifier.getPortIdentifiers();\r\n\r\n // Process the list.\r\n while (pList.hasMoreElements()) {\r\n\t\tCommPortIdentifier cpi = (CommPortIdentifier) pList.nextElement();\r\n\t\tcommPortC.addItem(cpi.getName());\r\n\t}\r\n }", "public String getPortName() {\n return portName;\n }", "public List<PortType> getAllIdcpPorts ();", "public Map getPorts()\n {\n return ports;\n }", "public String[] getPortNames() {\n SerialPort[] serialports = SerialPort.getCommPorts();\n String[] portNames = new String[serialports.length];\n int length = serialports.length;\n for (int i = 0; i < length; i++) {\n portNames[i] = serialports[i].getDescriptivePortName();\n }\n return portNames;\n }", "public final int getNamePort() {\n return m_namePort;\n }", "public Object[] getNameServerPorts() {\n\t\treturn _nameserverPorts.toArray();\n\t}", "public String getPortName() {\n return portName;\n }", "Collection<ServerPort> getServerPorts();", "protected List<String> getSerialPortList() {\r\n\t\tList<String> ports = new ArrayList<>();\r\n\t\tSerialPort[] commports = SerialPort.getCommPorts();\r\n\t\tfor (SerialPort port : commports) {\r\n\t\t\tif (!port.getDescriptivePortName().toLowerCase().contains(\"uno\")\r\n\t\t\t\t\t&& !port.getDescriptivePortName().toLowerCase().contains(\"mega\")) {\r\n\t\t\t\tports.add(port.getSystemPortName().toUpperCase());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ports;\r\n\t}", "public ArrayList<Port> getPorts() {\n return portList;\n }", "public List<PortType> getPortTypes();", "public void setPorts(ArrayList<Port> portList) {\n this.portList = portList;\n }", "public void addPorts(){\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create an instance of UiNodeTextAttributes given an JSON string
public static UiNodeTextAttributes fromJson(String jsonString) throws IOException { return JSON.getGson().fromJson(jsonString, UiNodeTextAttributes.class); }
[ "public static Attr fromJson(String s) {\n try {\n return YAML_OBJECT_MAPPER.readValue(s, Attr.class);\n } catch (JsonProcessingException e) {\n throw new IllegalArgumentException(\"Failed to create attribute from JSON\", e);\n }\n }", "boolean supportsTextAttributes();", "public abstract NSText setUpFieldEditorAttributes(NSText textObj);", "NodeAttribute createNodeAttribute();", "public Text createTextNode(String data);", "public static Font fromJson(JSONObject jsonObject){\n Font font = new Font();\n try {\n font.url = jsonObject.getString(\"url\");\n font.family = jsonObject.getString(\"family\");\n font.bold = jsonObject.getBoolean(\"bold\");\n font.italic = jsonObject.getBoolean(\"italic\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return font;\n }", "public static Tag createTag(JSONObject json)\n {\n Tag t = null;\n if (json.has(\"id\") && json.has(\"name\") && json.has(\"color\"))\n {\n try\n {\n t = new Tag(json.getInt(\"id\"), json.getString(\"name\"), Integer.parseInt(\n json.getString(\"color\"), 16) + 0xff000000);\n }\n catch (JSONException je)\n {\n je.printStackTrace();\n }\n }\n return t;\n }", "@Function Text createTextNode(String data);", "Atributo createAtributo();", "private static AttributedString makeAttributedText(\n final Font font,\n final String text_data)\n {\n final AttributedString as = new AttributedString(text_data);\n as.addAttribute(TextAttribute.FONT, font);\n as.addAttribute(\n TextAttribute.FOREGROUND,\n Color.WHITE,\n 0,\n text_data.length() - 1);\n return as;\n }", "public static ExternalAttribute fromJson(String json) {\n return WxCpGsonBuilder.create().fromJson(json, ExternalAttribute.class);\n }", "public static void add_text_atts(){\r\n\t\tString styleName = \"\";\r\n\r\n\t\tif(!_text_atts.equals(\"\")){\r\n\t\t\tfor(Iterator<String> it=_text_atts_map.keySet().iterator();it.hasNext();){\r\n\t\t\t\tString name = it.next();\r\n\t\t\t\tif(_text_atts_map.get(name).equals(_text_atts)){\r\n\t\t\t\t\tstyleName = name;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(styleName.equals(\"\")){\r\n\t\t\t\tstyleName = gen_row_id();\r\n\t\t\t\t_text_atts_map.put(styleName,_text_atts);\r\n\t\t\t}\r\n\r\n\t\t\t//it should be cleared.\r\n\t\t\t_text_atts = \"\";\r\n\t\t\t_style_name_map.put(_row_counter, styleName);\r\n\t\t}\r\n\t}", "protected abstract void createAttributes();", "public String insertAttributes(String text, HashMap<String, Object> attr)\n\t{\n\t\tint i = text.indexOf(\">\");\n\t\tString tail = text.substring(i);\n\t\tString head = text.substring(0, i);\n\t\tString style = \" style=\\\"\" + mxVdxUtils.getStyleString(attr, \":\")\n\t\t\t\t+ \"\\\"\";\n\t\treturn head + style + tail;\n\t}", "@Override\n\tprotected TextAttribute createTextAttribute(String[] stylePrefs) {\n\t\tint fontModifier = SWT.NORMAL;\n\t\tif (Boolean.valueOf(stylePrefs[2]).booleanValue()) { // bold\n\t\t\tfontModifier |= SWT.BOLD;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[3]).booleanValue()) { // italic\n\t\t\tfontModifier |= SWT.ITALIC;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[4]).booleanValue()) { // strikethrough\n\t\t\tfontModifier |= TextAttribute.STRIKETHROUGH;\n\t\t}\n\t\tif (Boolean.valueOf(stylePrefs[5]).booleanValue()) { // underline\n\t\t\tfontModifier |= TextAttribute.UNDERLINE;\n\t\t}\n\t\treturn new TextAttribute(EditorUtility.getColor(ColorHelper.toRGB(stylePrefs[0])),\n\t\t\t\tEditorUtility.getColor(ColorHelper.toRGB(stylePrefs[1])), fontModifier);\n\t}", "private Pokemon.Attributes parseJsonForAttributes(JsonObject infoObj) {\n //getting attribute objects from Json -> height and weight\n JsonElement heightEle = infoObj.get(\"height\");\n JsonElement weightEle = infoObj.get(\"weight\");\n\n String h = heightEle.toString();\n String w = weightEle.toString();\n\n return new Pokemon.Attributes(h, w);\n }", "public static String escHTMLAndJSON(String str) {\n\t\tstr = getHTMLValidText(str);\n\t\treturn escapeJSONString(str);\n\t}", "private void addAttributes(final UjoTextable ujo, boolean ignoreMissingProp) {\n for (String[] attrib : $attributes) {\n final Key key = ujo.readKeys().findDirectKey\n (ujo, attrib[0], actionImport, false, !ignoreMissingProp);\n if (key != null){\n ujo.writeValueString(key, attrib[1], null, actionImport);\n }\n }\n }", "public Text createTextNode(String data, Element parent);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
return a list of OperatorApplication
public List<OperatorApplication> processOperatorApplication(OperatorApplication opApp) { List<OperatorApplication> basicOpApps = new ArrayList<OperatorApplication>(); if (opApp.getOpType().name().equals("BASIC")) { basicOpApps.add(opApp); logger.info("Type:" + opApp.getOpType().name()); logger.info("Operator Execution Name: " + opApp.getAnnOperatorName()); logger.info("id:" + opApp.getOperatorID()); logger.info("name:" + opApp.getOperatorName()); logger.info("Type name " + opApp.getOperatorTypeName()); for (SimpleParameter sparams : opApp.getSimpleParameters()) { logger.info("simple:" + sparams.getDataPropertyID()); logger.info("simple:" + sparams.getDataPropertyName()); logger.info("simple:" + sparams.getDataType()); logger.info("simple:" + sparams.getValue()); } for (Parameter params : opApp.getParameters()) { logger.info("Param" + params.getInstClassID()); logger.info("Param" + params.getInstID()); logger.info("Param" + params.getInstName()); logger.info("Param" + params.getInstTypeName()); logger.info("Param" + params.getRoleID()); logger.info("Param" + params.getRoleName()); } for (IOObjectDescription desc: opApp.getProducedObject()) { logger.info("Produces id: " + desc.getIOObjectID()); logger.info("Produces type id: " + desc.getIOObjectTypeID()); logger.info("Produces name: " + desc.getIOObjectName()); logger.info("Produces location: " + desc.getIOOLocation()); logger.info("Produces type: " + desc.getIOObjectType()); logger.info("Produces role: " + desc.getRoleName()); logger.info("Produces RM: " + desc.getRMRoleName()); } for (IOObjectDescription desc: opApp.getUsedObject()) { logger.info("Uses id: " + desc.getIOObjectID()); logger.info("Uses type id: " + desc.getIOObjectTypeID()); logger.info("Uses name: " + desc.getIOObjectName()); logger.info("Uses location: " + desc.getIOOLocation()); logger.info("Uses type: " + desc.getIOObjectType()); logger.info("Uses role: " + desc.getRoleName()); logger.info("User RM: " + desc.getRMRoleName()); } } else { for (OperatorApplication steps : opApp.getSteps()) { basicOpApps.addAll(processOperatorApplication(steps)); } } return basicOpApps; }
[ "public List<Application> getApplications();", "public ArrayList<Application> getApplications() { // it will come back and call this to get the applications\n return applications;\n }", "java.util.List<com.google.cloud.talent.v4beta1.Application> getApplicationsList();", "List<MobileApplication> getMobileApplications();", "public List<Application> getApplications()\n {\n return _apps;\n }", "@Override\n\tpublic List<Application> getAllApplications() {\n\t\treturn applicationRepo.findAll(new Sort(Sort.Direction.ASC, \"codeCCX\"));\n\t}", "public Applications applications() { return applications; }", "java.util.List<com.clarifai.grpc.api.App> \n getAppsList();", "public List<ApplicationItem> getApplicationItems();", "public static List<AppInfo> getAppList()\r\n {\r\n NomadicAppManager appMangr = NomadicAppManager.getInstance();\r\n return appMangr.getAppsList();\r\n }", "@Override\n\tpublic List<Application> getApplications()\n\t{\n\t\treturn entityManager.createQuery(\"from Application a join a.prog p where p.department=(select dno from Department where dname='Accounting') and term='Fall 2016'\").getResultList();\n\t}", "public List<FeedHenryApplication> getSelectedApplications(){\n\t\tObject[] checked = block.getCheckedElements();\n\t\tif(checked == null || checked.length <1){\n\t\t\treturn Collections.emptyList();\n\t\t}\n\t\tfinal List<FeedHenryApplication> selectedApps = new ArrayList<>();\n\t\tfor (int i = 0; i < checked.length ; i++) {\n\t\t\tif(checked[i] instanceof FeedHenryApplication){\n\t\t\t\tselectedApps.add((FeedHenryApplication)checked[i]);\n\t\t\t}\n\t\t}\n\t\treturn selectedApps;\n\t}", "public List<AppInstance> getAppInstances()\n {\n return apps;\n }", "private Collection findApplications(IWContext iwc) {\n \t\tCollection applications = null;\n \n \t\ttry {\n \t\t\tString childId = iwc.getParameter(CHILD_ID);\n \n \t\t\tif (childId != null) {\n \t\t\t\tiwc.setSessionAttribute(CHILD_ID, childId);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tchildId = (String) iwc.getSessionAttribute(CHILD_ID);\n \t\t\t}\n \n \t\t\tapplications = getChildCareBusiness(iwc).getUnhandledApplicationsByChild(Integer.parseInt(childId));\n \n \t\t\t//Add canceled and removed applications from this session\t\n \t\t\tCollection deletedApps = (Collection) iwc.getSessionAttribute(DELETED_APPLICATIONS);\n \t\t\tif (deletedApps != null) {\n \t\t\t\tapplications.addAll(deletedApps);\n \t\t\t}\n \n \t\t}\n \t\tcatch (RemoteException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tcatch (NumberFormatException e) { //parameter not a number\n \t\t\treturn new ArrayList(); //empty collection\n \t\t}\n \t\tcatch (NullPointerException e) { //no parameter set\n \t\t\treturn new ArrayList(); //empty collection\n \t\t}\n \n \t\treturn applications;\n \t}", "ApplicationsClient getApplications();", "@Public\n List<ApplicationReport> getApplications() throws IOException;", "public List<Application> getApplicationList()\n throws CloudDeploymentException, InvalidTokenException, NetworkUnavailableException, HttpClientException {\n String getAppListUrl = CloudServiceConstants.ServiceEndpoints.INDEX_URL;\n\n Map<String, String> data = new HashMap<>();\n data.put(CloudServiceConstants.Parameters.PARAM_ACTION, CloudServiceConstants.Actions.GET_APPLICATION_LIST);\n\n String response = HTTPClientUtil.sendPostWithFormData(getAppListUrl, new HashMap<String, String>(), data,\n cookieStore);\n\n if (null == response) {\n return null;\n }\n\n List<Application> applications = JsonUtils.getApplicationListFromJson(response);\n\n // Filter carbon apps\n List<Application> carbonapps = applications.stream()\n .filter(x -> CloudServiceConstants.AppConfigs.ESB.equals(x.getApplicationType()))\n .collect(Collectors.toList());\n\n return carbonapps;\n }", "public List<LeaveApplication> getAll();", "public ArrayList<JobApplication> getAllJobApplications() {\n return applications;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
PUT /customerComplaintss > Updates an existing customerComplaints.
@RequestMapping(value = "/customerComplaintss", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) @Timed @Transactional public ResponseEntity<CustomerComplaints> updateCustomerComplaints(HttpServletRequest request, @RequestBody CustomerComplaints customerComplaints) throws URISyntaxException, Exception { log.debug("REST request to update CustomerComplaints : {}", customerComplaints); if (customerComplaints.getId() == null) { return createCustomerComplaints(request, customerComplaints); } CustomerComplaints customerComplaints1 = customerComplaintsRepository.findOne(customerComplaints.getId()); customerComplaints1.setStatus(customerComplaints1.getStatus() + 1); customerComplaints1.setAdjustmentAmt(customerComplaints.getAdjustmentAmt()); customerComplaints1.setAdjustmentBillId(customerComplaints.getAdjustmentBillId()); CustomerComplaints result = customerComplaintsRepository.save(customerComplaints1); approveApplication(customerComplaints.getId(), customerComplaints.getRemarks()); if (CPSConstants.UPDATE.equals(workflowService.getMessage()) && customerComplaints.getComplaintTypeMaster().getId() ==1) { CustDetails custDetails = custDetailsRepository.findByCanForUpdate(customerComplaints.getCan()); Adjustments adjustments = new Adjustments(); TransactionTypeMaster ttm = null; BigDecimal amount = new BigDecimal(customerComplaints.getAdjustmentAmt().toString()); adjustments.setBillFullDetails(null); adjustments.setCan(customerComplaints.getCan()); adjustments.setRemarks(customerComplaints.getRemarks()); adjustments.setTxnTime(ZonedDateTime.now()); adjustments.setStatus(TxnStatus.INITIATED); adjustments.setCustDetails(custDetails); adjustments.setAmount(amount.abs()); /*Float amt = customerComplaints.getAdjustmentAmt(); //commented by mohib after changing float to bigdecimal if (amt < 0) { //Debit ttm = transactionTypeMasterRepository.findOne(2L); } else if (amt > 0) { //Credit ttm = transactionTypeMasterRepository.findOne(1L); }*/ BigDecimal amt = customerComplaints.getAdjustmentAmt(); int res = amt.compareTo(new BigDecimal("0")); if (res == -1) { //Debit ttm = transactionTypeMasterRepository.findOne(2L); } else if (res == 1) { //Credit ttm = transactionTypeMasterRepository.findOne(1L); } adjustments.setTransactionTypeMaster(ttm); adjustments.setCustomerComplaints(customerComplaints); adjustmentsRepository.save(adjustments); } return ResponseEntity.ok() .headers( HeaderUtil.createEntityUpdateAlert("customerComplaints", customerComplaints.getId().toString())) .body(result); }
[ "@RequestMapping(value = \"/customerComplaintss\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<CustomerComplaints> createCustomerComplaints(HttpServletRequest request,\n\t\t\t@RequestBody CustomerComplaints customerComplaints) throws URISyntaxException, Exception {\n\t\tlog.debug(\"REST request to save CustomerComplaints : {}\", customerComplaints);\n\t\tif (customerComplaints.getId() != null) {\n\t\t\treturn ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"customerComplaints\", \"idexists\",\n\t\t\t\t\t\"A new customerComplaints cannot already have an ID\")).body(null);\n\t\t}\n\n\t\t// customerComplaints.setPhoto(\"\");\n\t\tcustomerComplaints.setRelevantDoc(\"\");\n\t\tcustomerComplaintsRepository.save(customerComplaints);\n\n\t\tHashMap<String, String> hm = new HashMap<String, String>();\n\t\thm.put(\"relevantDoc\", \"setRelevantDoc\");\n\t\tUploadDownloadResource.setValues(customerComplaints, hm, request, customerComplaints.getId());\n\t\tcustomerComplaints.setStatus(0);\n\t\tCustomerComplaints result = customerComplaintsRepository.save(customerComplaints);\n\n\t\ttry {\n\t\t\tworkflowService.getUserDetails();\n\t\t\tworkflowService.setAssignedDate(ZonedDateTime.now().toString());\n\t\t\tcustomerComplaintsWorkflowService.createTxn(customerComplaints);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn ResponseEntity.created(new URI(\"/api/customerComplaintss/\" + result.getId()))\n\t\t\t\t.headers(HeaderUtil.createEntityCreationAlert(\"customerComplaints\", result.getId().toString()))\n\t\t\t\t.body(result);\n\t}", "public void updateCustomer(Customer customer);", "public void updateCustomer(Customer customer) throws SQLException;", "public void setComplaints(List<Complaint> complaints) {\n this.complaints = complaints;\n }", "public void update(Customer customer);", "void updateCustomer(Customer customer);", "public void updateCustomer (Customer customer) \r\n\t\t\tthrows DoesNotExistException, SQLException;", "@PutMapping(\"/update-customer\")\n public void updateCustomer(@RequestParam String jwt, @RequestBody Customer customer) {\n\n try {\n jwtValidation(jwt);\n service.updateCustomer(customer.getId(), customer);\n\n } catch (CouponSystemException e) {\n throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage());\n }\n }", "@PUT\n public synchronized Response updateCustomer(String customer) {\n\n //customer = Encryption.encryptDecrypt(customer);\n\n Customer customer1 = new Gson().fromJson(customer, Customer.class);\n\n Customer cc = customerRepository.updateCustomer(customer1);\n\n if(cc == null){\n\n return Response\n .status(400)\n .type(\"application/json\")\n .entity(\"\\\"You have entered something invalid. Check if the account number you entered is valid\\\":\\\"failed\\\"}\")\n .build();\n }\n\n // customer = Encryption.encryptDecrypt(customer);\n\n //Clearer cache\n cache.clear();\n\n\n return Response\n .status(200)\n .type(\"application/json\")\n .entity(\"{\\\"userUpdated\\\":\\\"true\\\"}\")\n .build();\n }", "@RequestMapping(value = \"/customerComplaints/approveCustomerCompaints\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<Void> approveApplication(@RequestParam(value = \"id\", required = false) Long id,\n\t\t\t@RequestParam(value = \"remarks\", required = false) String remarks) throws Exception {\n\n\t\tworkflowService.getUserDetails();\n\t\tworkflowService.getRequestType();\n\t\tCustomerComplaints customerComplaints = customerComplaintsRepository.findOne(id);\n\t\tworkflowService.setRemarks(remarks);\n\t\tworkflowService.setApprovedDate(ZonedDateTime.now());\n\t\t// Integer status = customerComplaints.getStatus();\n\t\t// status +=1;\n\t\t// customerComplaints.setStatus(status);\n\t\t// workflowService.setRequestStatus(status);\n\t\tcustomerComplaintsWorkflowService.approvedCustomerComplaintsRequest(customerComplaints);\n\t\t/*\n\t\t * if(workflowService.getRequestStatus() == 2){\n\t\t * applicationTxnWorkflowService.updateApplicationTxn(id); }\n\t\t */\n\t\t// customerComplaintsRepository.save(customerComplaints);\n\t\treturn ResponseEntity.ok().build();\n\t}", "@RequestMapping(method = RequestMethod.PUT,\n consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity<UpdateCustomerResponse> updateCustomerDetails(@RequestHeader(\"authorization\") final String authorization,\n @RequestBody(required = false) final UpdateCustomerRequest updateCustomerRequest)\n throws AuthorizationFailedException, UpdateCustomerException {\n\n // Throw exception if first name is not present\n if (FoodAppUtil.isEmptyField(updateCustomerRequest.getFirstName())) {\n throw new UpdateCustomerException(UCR_002.getCode(), UCR_002.getDefaultMessage());\n }\n final String accessToken = getAccessToken(authorization);\n final CustomerEntity customerEntity = customerService.getCustomer(accessToken);\n customerEntity.setFirstName(updateCustomerRequest.getFirstName());\n customerEntity.setLastName(updateCustomerRequest.getLastName());\n CustomerEntity updatedCustomerEntity = customerService.updateCustomer(customerEntity);\n\n final UpdateCustomerResponse updateCustomerResponse = new UpdateCustomerResponse()\n .id(updatedCustomerEntity.getUuid())\n .status(Constants.UPDATE_CUSTOMER_MESSAGE)\n .firstName(updatedCustomerEntity.getFirstName())\n .lastName(updatedCustomerEntity.getLastName());\n\n return new ResponseEntity<UpdateCustomerResponse>(updateCustomerResponse, HttpStatus.OK);\n }", "@RequestMapping(value = \"/customerComplaintss/{id}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<Void> deleteCustomerComplaints(@PathVariable Long id) {\n\t\tlog.debug(\"REST request to delete CustomerComplaints : {}\", id);\n\t\tcustomerComplaintsRepository.delete(id);\n\t\treturn ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"customerComplaints\", id.toString()))\n\t\t\t\t.build();\n\t}", "public String editCustomer(Customer customer) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://138.197.50.244:3306/LittleBobbyTablesAuctionHouse\", \"littlebobbytables\", \"bestcse305group\");\r\n\t\t\tString query = \"UPDATE CustomerData SET Address = ?, City = ?, CreditCard = ?, EmailAddress = ?, FirstName = ?, LastName = ?, Rating = ?, State = ?, Telephone = ?, ZipCode = ? WHERE CustomerID = ?\";\r\n\t\t\tPreparedStatement preparedStmt = con.prepareStatement(query);\r\n\t\t\tpreparedStmt.setString (1, customer.getAddress());\r\n\t\t\tpreparedStmt.setString (2, customer.getCity());\r\n\t\t\tpreparedStmt.setString (3, customer.getCreditCard());\r\n\t\t\tpreparedStmt.setString (4, customer.getEmail());\r\n\t\t\tpreparedStmt.setString (5, customer.getFirstName());\r\n\t\t\tpreparedStmt.setString (6, customer.getLastName());\r\n\t\t\tpreparedStmt.setString (7, \"\" + customer.getRating());\r\n\t\t\tpreparedStmt.setString (8, customer.getState());\r\n\t\t\tpreparedStmt.setString (9, customer.getTelephone());\r\n\t\t\tpreparedStmt.setString (10, \"\" + customer.getZipCode());\r\n\t\t\tpreparedStmt.setString (11, customer.getCustomerID());\r\n\t\t\tpreparedStmt.execute();\r\n\t\t} catch(Exception e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t\treturn \"failure\";\r\n\t\t}\t\r\n\r\n\t\treturn \"success\";\r\n\t}", "@PutMapping(\"/customers\")\n\tpublic Customer updatecustomer(@RequestBody Customer thecustomer) {\n\t\t\n\t\tthecustomerService.saveCustomer(thecustomer); //as received JSON object already has id,the saveorupdate() DAO method will update details of existing customer who has this id\n\t\treturn thecustomer;\n\t}", "public void update(Customer customerToUpdate) throws RecordNotFoundException;", "public boolean updateCustomer(String customerJSON);", "@RequestMapping(value = \"/customerComplaintss/{id}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<CustomerComplaints> getCustomerComplaints(@PathVariable Long id) {\n\t\tlog.debug(\"REST request to get CustomerComplaints : {}\", id);\n\t\tCustomerComplaints customerComplaints = customerComplaintsRepository.findOne(id);\n\t\treturn Optional.ofNullable(customerComplaints).map(result -> new ResponseEntity<>(result, HttpStatus.OK))\n\t\t\t\t.orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/{id}\", params = \"form\", method = RequestMethod.POST)\n\tpublic String update(@Valid Customer customer, BindingResult bindingResult, \n\t\t\t\t\t\tModel uiModel, HttpServletRequest httpServletRequest, \n\t\t\t\t\t\tRedirectAttributes redirectAttributes, Locale locale) {\n\t\t\tlogger.info(\"Updating customer\"); \n\t\t\tif (bindingResult.hasErrors()) {\n\t\t\t\tuiModel.addAttribute(\"message\", new Message(\"error\", messageSource.getMessage(\"customer_save_fail\", new Object[]{}, locale)));\n\t\t\t\tuiModel.addAttribute(\"customer\", customer);\n\t\t\t\treturn \"customers/update\"; \n\t\t\t}\n\t\t\tuiModel.asMap().clear(); \n\t\t\tredirectAttributes.addFlashAttribute(\"message\", new Message(\"success\",messageSource.getMessage(\"customer_save_success\", new Object[]{}, locale))); \n\t\t\tcustomerService.save(customer);\n\t\t\treturn \"redirect:/customers/\" + UrlUtil.encodeUrlPathSegment(customer.getId().toString(),httpServletRequest);\n\t}", "@PutMapping(\"/customers/{id}\")\n public ResponseEntity<Customer> updateCustomer(@PathVariable(\"id\") Integer id, @RequestBody Customer customer) {\n Optional<Customer> dbCustomer = customerRepository.findById(id);\n\n if (dbCustomer.isPresent()) {\n dbCustomer.get().setCountry(customer.getCountry());\n dbCustomer.get().setFirstname(customer.getFirstname());\n dbCustomer.get().setLastname(customer.getLastname());\n return new ResponseEntity<>(customerRepository.save(dbCustomer.get()), HttpStatus.OK);\n } else {\n return new ResponseEntity<>(HttpStatus.NOT_FOUND);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test for addMove() method.
@Test public void addMoveTest() { assertEquals(0, builder.build().getAnimations().size()); this.builder.addMove("O", 5, 5, 12, 12, 11, 15); assertEquals(1, builder.build().getAnimations().size()); }
[ "@Test\n public void testAddMove() {\n turn.getHarbourDisplay().add(personCard);\n turn.addMove(player1, personCard);\n int indexLastMove = turn.getMoves().size()-1;\n Assert.assertEquals(turn.getMoves().get(indexLastMove).getPlayer(), player1);\n Assert.assertEquals(turn.getMoves().get(indexLastMove).getCard(), personCard);\n }", "public void testMove()\n {\n //TODO\n }", "public void testMove(Move move) throws InvalidMoveException {\n tryMove(move, false);\n }", "@Test\n public void testMove() {\n map.requestMovement(myEntity, coordinate);\n EasyMock.expectLastCall();\n \n EasyMock.replay(map);\n \n myEntity.move(coordinate);\n \n EasyMock.verify(map);\n }", "@Test\r\n public void moveTest() {\r\n workerArtemis.move(map.getGrid()[2][3]);\r\n assertEquals(map.getGrid()[2][2], workerArtemis.oldPosition);\r\n }", "public void addMove(Move move) {\n if (!this.getMoves().contains(move) && !this.outOfBound(move.getX(), move.getYcoordinate())) {\n this.getMoves().add(move);\n }\n }", "public void addMove(Move m)\n\t{\n\t\tmoveList.add(m); \n\t}", "@Test\n public void testMove() {\n System.out.println(\"Animal.move\");\n animal1.move(101);\n animal2.move(202);\n assertEquals(101, animal1.getLocation());\n assertEquals(202, animal2.getLocation());\n }", "public void addMove(Move mov) {\r\n\t\taddMoves(mov, 1);\r\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testAddMoveEventWithoutAddShape() {\n move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);\n testAnimation.addEvent(r, move1, 10, 50);\n }", "public void addMove(String move) {\n moves.add(move);\n }", "@Test\n\tpublic void testMove002() {\n\t\t\n\t\tString expected = \"PacMan must be placed to move\";\n\t\tString actual = pacman.move();\n\t\tassertEquals(expected,actual);\n\t}", "@Test\n public void testValidMove() {\n \n // 1 space\n int newX = 0;\n int newY = 2;\n boolean expResult = true;\n boolean result = pawn.validMove(newX, newY);\n assertEquals(expResult, result);\n // 2 spaces\n newX = 0;\n newY = 3;\n expResult = true;\n result = pawn.validMove(newX, newY);\n assertEquals(expResult, result);\n // illegal 2 space\n pawn.y = 3;\n newX = 0;\n newY = 5;\n expResult = false;\n result = pawn.validMove(newX, newY);\n assertEquals(expResult, result);\n // illegal horizontal\n newX = 1;\n newY = 3;\n expResult = false;\n result = pawn.validMove(newX, newY);\n assertEquals(expResult, result);\n }", "Move createMove();", "@Test\n\tpublic void movePlayerTest()\n\t{\n\t\tBoardGame monopoly = new BoardGame();\n\n\t\tmonopoly.addPlayer(\"Noa\", GamePiece.RED_THIMBLE, Location.HALL);\n\t\tmonopoly.addPlayer(\"Nigh\", GamePiece.BLUE_BOOT, Location.BALLROOM);\n\t\t\n\t\tmonopoly.movePlayer(\"Noa\", Location.STUDY);\n\t\t\n\t\tAssert.assertEquals(\"movePlayerTest incorrect\", Location.STUDY, monopoly.getPlayersLocation(\"Noa\"));\n\t}", "@Test (expected = IllegalArgumentException.class)\n public void testAddMoveNullPointerPlayer() {\n turn.addMove(nullPlayer,personCard);\n }", "@Test\n\tpublic void TestUpdateMove(){\n\t\tassertTrue(board.getChessSpace(3,2).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(3,3).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(2,3).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(1,2).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(2,1).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(1,1).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(3,1).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertTrue(board.getChessSpace(1,3).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertFalse(board.getChessSpace(4,2).getDependentMoves().indexOf(kingmove) != -1);\n\t\tassertFalse(board.getChessSpace(2,2).getDependentMoves().indexOf(kingmove) != -1);\n\t}", "@Test\n public void testMovePieceValidMove() {\n Position pos = new Position(board, 3, 3);\n Pawn pawn = new Pawn(Color.WHITE);\n board.getSquare(pos).addPiece(pawn);\n pawn.setPosition(pos);\n Position pos1 = new Position(board, 4, 3);\n assertTrue(chess.movePiece(board.getSquare(pos), board.getSquare(pos1), pawn));\n }", "@Test\n public void testMove() {\n System.out.println(\"move\");\n Elevator instance = new Elevator(b2);\n int expResult = 0;\n int result = instance.move();\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 }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Clean up application registration by ID
public HttpResponse cleanUpApplicationRegistrationByApplicationId(int applicationId, String applicationName) throws APIManagerIntegrationTestException { try { checkAuthentication(); String requestData = "action=cleanUpApplicationRegistrationByApplicationId&appId=" + applicationId + "&applicationName=" + applicationName + "&keyType=PRODUCTION"; return HTTPSClientUtils.doPost(new URL( backendURL + "store-old/site/blocks/subscription/subscription-add/ajax/subscription-add.jag?" + requestData), "", requestHeaders); } catch (Exception e) { throw new APIManagerIntegrationTestException("Unable to cleanup application - " + applicationName + ". Error: " + e.getMessage(), e); } }
[ "public void clearApplicationID() {\n genClient.clear(CacheKey.applicationID);\n }", "public void remApplicationId(ApplicationId applicationId);", "public boolean removeUserApplication(int id);", "public void deleteRegistration(UUID id);", "public void deleteApplication(int theId);", "public void deleteRegisterDetails(Context context)\n {\n\n saveHardWareKey(context,null);\n saveDeviceName(context,null);\n\n }", "void removeApp(String bundleId);", "public void unregisterApplication(String internalAppId){\n\t\tString webServiceUrl = serviceProfile.getServiceApiUrl()+\"/\"+internalAppId;\n\t\tlogger.info(\"unregistering application \"+ webServiceUrl);\n\t\t\n\t\tResponseEntity<Void> response = restTemplate.exchange(webServiceUrl, HttpMethod.DELETE,\n null, Void.class);\n\t\tVoid body = response.getBody();\n\t}", "public static void unRegister() {\n OnePushContext.getInstance().unRegister();\n }", "void unsetExternalId();", "void remove(String installedAppId);", "@Override\n public void onUnregistered(Context context) {\n SharedPreferences prefs = Util.getSharedPreferences(context);\n String deviceRegistrationID = prefs.getString(Util.DEVICE_REGISTRATION_ID, null);\n DeviceRegistrar.registerOrUnregister(context, deviceRegistrationID, false);\n }", "protected void unregisterSdtIpeApplication() {\r\n\t\tif (sdtIPEApplication != null) {\r\n\t\t\tDeviceList.getInstance().removeListener(sdtIPEApplication);\r\n\t\t\tsdtIPEApplication.deleteIpeApplicationEntity();\r\n\t\t\tsdtIPEApplication = null;\r\n\t\t}\r\n\t}", "void removeAllApplications(Id.Account id) throws OperationException;", "public int removeCustomDevice(String id);", "void removeAllApplications(Id.Namespace id);", "void unsetBrandID();", "private void unregister()\n {\n\tLog.d(Globals.TAG, \"UNREGISTER USERID: \" + regid);\n\tnew AsyncTask<Void, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(Void... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.UNREGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent unregistration\";\n\t\t gcm.unregister();\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tremoveRegistrationId(getApplicationContext());\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t\t((TextView)findViewById(R.id.gcm_userid_textview)).setText(regid);\n\t }\n\t}.execute();\n }", "public void deleteRegistration(String regNumber)throws Exception;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Retorna Todos Los usuarios Que PErtenecen al ROL dado. OJO: Es lo mimso que el de arriba, pero se llenana mas datos del DTO y en el RolID se setea el id del ROL.
public ArrayList usuariosByRol(Long idRol, String tipoHab);
[ "public List<RolModel> listarRolUsuario();", "private void recuperarUsuarios() {\r\n\t\tusuarios = Factories.persistence.createUsuarioDao()\r\n\t\t\t\t.getUsuariosInactiveFirst();\r\n\t\tLog.debug(\"Obtenida lista de usuarios conteniendo [%d] usuarios\", \r\n\t\t\t\tusuarios.size());\r\n\t}", "public ArrayList<Usuario> getUsuarios(Usuario creador){\r\n ArrayList<Usuario> al= new ArrayList<>();\r\n if (creador.isAdmin()){\r\n try {\r\n String sql= \"Select * from sistemasEM.usuarios\";\r\n Statement s= connection.createStatement();\r\n ResultSet rs = s.executeQuery(sql);\r\n Usuario u;\r\n while(rs.next()){\r\n TipoDescuento td = this.getTipoDescuento(rs.getInt(\"permisosDescuento\"));\r\n TipoPersonal tp = this.getTipoPersonal(rs.getInt(\"permisosPersonal\"));\r\n al.add( new Usuario(rs.getInt(\"id\"), rs.getString(\"nombre\"), rs.getString(\"mostrar\"),rs.getBoolean(\"admin\"),tp,td,rs.getBoolean(\"notas\"),rs.getBoolean(\"habilitacion\"),rs.getBoolean(\"profesor\"),rs.getInt(\"ciProfesor\"),rs.getBoolean(\"cambiarContra\")));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManejadorCodigoBD.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n return al;\r\n }", "public List<Usuario> recuperaUsuarios() {\n\n\t\tString jpql = \"SELECT u FROM Usuario u\";\n\t\tTypedQuery<Usuario> query = this.em.createQuery(jpql, Usuario.class);\n\t\treturn query.getResultList();\n\t}", "public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }", "public void addRolUser(String tiporol){\n if(tiporol.equals(\"Administrador\")){ //y el rol es agregado a una lista de roles del usuario\r\n Administrador administrador = new Administrador();\r\n administrador.setUsuario(selected);// agrego el usuario al rol\r\n selected.addRol(administrador);// agreaga el rol al usuario selected\r\n }else if(tiporol.equals(\"Administrativo\")){\r\n Administrativo administrativo = new Administrativo();\r\n administrativo.setUsuario(selected);// agrego el usuario al rol\r\n selected.addRol(administrativo);// agreaga el rol al usuario selected\r\n }else if(tiporol.equals(\"Docente\")){\r\n Docente docente = new Docente();\r\n docente.setUsuario(selected);// agrego el usuario al rol\r\n selected.addRol(docente);// agreaga el rol al usuario selected\r\n }else{\r\n Alumno selectedAlumno = new Alumno();\r\n selectedAlumno.setUsuario(selected);// agrego el usuario al rol\r\n selected.addRol(selectedAlumno); // agreaga el rol al usuario selected\r\n }\r\n }", "@Override\n public List<Usuario> obtenerListaUsuarios(Integer id) {\n return service.obtenerListaUsuarios(id);\n }", "UsuarioRol getUsuarioRolById(Integer id);", "public RolUsuario getRol() {\n\t\treturn rol;\n\t}", "public List<Usuario> obtenerTodosLosUsuarios() {\n \n Session sess = sessionFactory.openSession();\n Query q = sess.createQuery(\"from Usuario u order by nombre desc\");\n List<Usuario> ret = q.list();\n sess.close();\n return ret;\n }", "private void cargarUsuario() {\n try {\n rol = null;\n if (usuario != null && usuario.getUsuario() != null) {\n for (SsRoles rols : usuario.getUsuario().getSsRolesList()) {\n for (String rl : ROL) {\n if (rols.getCodigoRol().equalsIgnoreCase(rl)) {\n rol = new SsRoles();\n rol = rols;\n }\n }\n }\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void llenarControles(Cliente pCliente) {\n try {\n clienteActual = ClienteDAL.obtenerPorId(pCliente); // Obtener el Rol por Id \n this.txtNombre.setText(clienteActual.getNombre()); // Llenar la caja de texto txtNombre con el nombre del rol \n this.txtApellido.setText(clienteActual.getApellido());\n this.txtDui.setText(clienteActual.getDui());\n //clienteActual.setNumero(Integer.parseInt(this.txtNumero.getText()));\n this.txtNumero.setText(Integer.toString(clienteActual.getNumero()));\n } catch (Exception ex) {\n // Enviar el mensaje al usuario de la pantalla en el caso que suceda un error al obtener los datos de la base de datos\n JOptionPane.showMessageDialog(frmPadre, \"Sucedio el siguiente error: \" + ex.getMessage());\n }\n }", "public List<Usuario> listarUsuarios();", "public List<UsuarioDto> getAvalesByIdSolicitud(BigInteger idSolicitud) throws BusinessException {\n try {\n\n List<UsuarioDto> avales = avaSolDao.getAvalesByIdSolicitud(idSolicitud);\n\n for (UsuarioDto aval : avales) {\n /*Cuando el usuario está activo*/\n if(aval.getEstatus()==null){\n aval.setEstatus(0);\n }\n \n if (aval.getEstatus() == 1) {\n aval.setEstatusStr(Constantes.USR_ACTIVO);\n } else {\n aval.setEstatusStr(Constantes.USR_BAJA);\n }\n\n switch (aval.getEstatusAvalInt()) {\n case 1:\n aval.setEstatusAvalStr(Constantes.SOLAVA_PENDIENTE);\n break;\n case 2:\n aval.setEstatusAvalStr(Constantes.SOLAVA_VALIDANDO);\n break;\n case 3:\n aval.setEstatusAvalStr(Constantes.SOLAVA_APROBADO);\n break;\n case 4:\n aval.setEstatusAvalStr(Constantes.SOLAVA_RECHAZADO);\n break;\n }\n }\n\n return avales;\n } catch (IntegracionException ex) {\n throw new BusinessException(ex.getMessage(), ex);\n }\n }", "List<PermisoDTO> encontrarPermisosPorRol(Long idRol);", "public Usuario[] buscarTodosLosUsuarios() {\n\r\n\t\treturn usuarios.values().toArray(new Usuario[usuarios.size()]);\r\n\t}", "public List<Roll> selectRollsUser(String name);", "List<Usuario> obtenerUsuarios() throws Exception;", "public List<Usuario> listarUsuariosTodos(String username, String nombre, String apellido);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bool call_method_supported = 10;
@java.lang.Override public boolean getCallMethodSupported() { return callMethodSupported_; }
[ "boolean getCallMethodSupported();", "@java.lang.Override\n public boolean getCallMethodSupported() {\n return callMethodSupported_;\n }", "public Builder setCallMethodSupported(boolean value) {\n \n callMethodSupported_ = value;\n onChanged();\n return this;\n }", "public boolean inCall();", "public boolean supportsCallee(SootMethod method);", "boolean isSetCallFeature();", "public boolean isCall() {\n return _isCall;\n }", "public boolean isCall() {\n return _isCall;\n }", "public boolean isMethodSupported(String methodName) throws IOException;", "boolean supports(MethodParameter parameter);", "boolean isEnableBlockingCalls();", "boolean isDiscouragedCall(XAbstractFeatureCall call);", "default boolean isSupport(Object bean, Method method) {\n return true;\n }", "java.lang.String getCallMode();", "static boolean isMethodSupported(Object service, String methodName) {\r\n return isMethodSupported(service, methodName, new Class[] {});\r\n }", "String getSupportedMethods();", "public boolean isIPVoiceCallSupported() {\n\t\tLogger.i(TAG, \"isIPVoiceCallSupported value \" + ipVoiceCall);\n\t\treturn ipVoiceCall;\t\t\t\t\n\t}", "private boolean isSupportedMethod(String sHTTPMethod) {\n return Arrays.asList(SUPPORTED_METHODS).contains(sHTTPMethod.toUpperCase());\n }", "public boolean isCallQueryMechanism() {\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create an alert dialog to warn the user before deleting any record
private void showDeleteConfirmationDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.delete_book_warning); builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { deletebook(); } }); builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { if (dialogInterface != null) { dialogInterface.dismiss(); } } }); //show alert dialog upon deletion AlertDialog alertDialog = builder.create(); alertDialog.show(); }
[ "protected void getRecordDeletionConfirmation()\r\n {\r\n dialogBuilder.setTitle(R.string.view_person_delete_confirm_dialog_title);\r\n dialogBuilder.setMessage(R.string.view_person_delete_confirm_dialog_message);\r\n\r\n dialogBuilder.setPositiveButton(\r\n R.string.view_person_delete_confirm_dialog_positive_button_text,\r\n new DialogInterface.OnClickListener() {\r\n\r\n public void onClick(DialogInterface dialog, int which) {\r\n deleteEntityInformation();\r\n dialog.dismiss();\r\n }\r\n });\r\n\r\n dialogBuilder.setNegativeButton(\r\n R.string.view_person_delete_confirm_dialog_negative_button_text,\r\n new DialogInterface.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });\r\n\r\n AlertDialog alert = dialogBuilder.create();\r\n alert.show();\r\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteNoteAlert(int position) {\n AlertDialog.Builder builderExitDialog = new AlertDialog.Builder(context);\n builderExitDialog.setTitle(\"Warning\");\n builderExitDialog.setCancelable(false);\n builderExitDialog.setMessage(\"Are you sure you want to delete?\");\n builderExitDialog.setPositiveButton(\"Yes\", (dialog, which) -> {\n ((MainActivity)context).deleteNote(stickyNotesModels.get(position).id+\"\");\n });\n builderExitDialog.setNegativeButton(\"No\", (dialog, which) -> dialog.cancel());\n builderExitDialog.show();\n }", "private void confirmDeleteLog() {\n new AlertDialog.Builder(this)\n .setTitle(R.string.confirm_delete_log_title)\n .setMessage(R.string.confirm_delete_log_message)\n .setPositiveButton(R.string.btn_delete_log, (dialog, which) -> {\n service.deleteEntireAuditLog();\n dialog.dismiss();\n })\n .setNegativeButton(R.string.btn_cancel, (dialog, which) -> dialog.dismiss())\n .show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message\n // This also creates click listeners for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the phone.\n deletePhone();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the phone.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setMessage(R.string.delete_dialog);\n dialog.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //if user click the delete then the product will deleted\n deleteProduct();\n }\n });\n\n //otherwise cancel the delete\n dialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (dialogInterface != null) {\n dialogInterface.dismiss();\n }\n }\n });\n\n AlertDialog alertDialog = dialog.create();\n alertDialog.show();\n }", "private void delete(){\n try{\n int dialogButton = JOptionPane.YES_NO_OPTION;\n int dialogResult = JOptionPane.showConfirmDialog (null, \"Are you sure want to delete this record?\",\"Delete\",dialogButton);\n \n if(dialogResult == JOptionPane.YES_OPTION){\n if(UserRepository.destroy(Integer.parseInt(txtId.getText()))){\n LogRepository.create(new Log(0, authUser.getId(), \"User\", \"DELETE\"));\n\n JOptionPane.showMessageDialog(null, \"Delete successful\", \"Delete\", JOptionPane.INFORMATION_MESSAGE);\n txtId.setText(\"\");\n txtName.setText(\"\");\n txtUsername.setText(\"\");\n txtPassword.setText(\"\");\n txtEmail.setText(\"\");\n txtPhone.setText(\"\");\n txtAddress.setText(\"\");\n\n getUsers();\n }\n else{\n JOptionPane.showMessageDialog(null, \"Oops, something's wrong\", \"Delete\", JOptionPane.INFORMATION_MESSAGE);\n }\n }\n } catch (Exception e){\n JOptionPane.showMessageDialog(null, \"Please choose a record\", \"Delete\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.deleteThisProduct);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteDialog() {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n View view = View.inflate(this, R.layout.delete_alert_dialog, null);\r\n builder.setView(view);\r\n TextView okBtn = (TextView) view.findViewById(R.id.alert_yes_button);\r\n TextView cancelBtn = (TextView) view.findViewById(R.id.alert_no_button);\r\n final AlertDialog deleteDialog = builder.create();\r\n deleteDialog.show();\r\n okBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n // method to delete file after click on OK button\r\n deleteFile();\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n cancelBtn.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n deleteDialog.dismiss();\r\n }\r\n });\r\n }", "private void showDeleteSupplierConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_supplier_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the supplier.\n nameUpdated = \"Unknown\";\n phoneUpdated = \"Unknown\";\n changeSupplierInBooks(nameToUpdate, nameUpdated, phoneUpdated);\n deleteSupplier();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the supplier.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "private void nothingToDelete() {\r\n \r\n Alert nothingToDelete = new Alert(AlertType.ERROR);\r\n \r\n nothingToDelete.setTitle(\"Error deleting\");\r\n nothingToDelete.setHeaderText(\"Nothing to delete\");\r\n nothingToDelete.setContentText(\"You have to select at least one item before pressing \\\"Delete item\\\". \");\r\n\r\n nothingToDelete.showAndWait();\r\n }", "private void showDeleteSuccess() {\n Notification notification = Notification.show(\"Your Advert Has Been Deleted \");\n notification.addThemeVariants(NotificationVariant.LUMO_ERROR);\n UI.getCurrent().getPage().reload();\n }", "void showCantDelete();", "private void showSimplePopUp() {\t\n\t\tfinal BookStorage db = new BookStorage(this);\n\t\t\n\t\t AlertDialog.Builder helpBuilder = new AlertDialog.Builder(this);\n\n helpBuilder.setTitle(\"Confirmation\");\n helpBuilder.setMessage(\"Are you sure you want to remove \" + bookList.getListTitle() + \"?\");\n\n\t\t helpBuilder.setNegativeButton(\"Cancel\",\n\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t \n\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t //Just close dialog box\n\t\t\t }\n\t\t });\n\t\t \n\t\t //If the confirm button is clicked, remove the list from the database\n\t\t helpBuilder.setPositiveButton(\"Confirm\",\n\t\t new DialogInterface.OnClickListener() {\n\t\t\t \n\t\t\t @SuppressLint(\"NewApi\") public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t db.deleteBookList(bookList);\n\t\t\t\t finish();\n\t\t\t }\t\n\t\t });\n\t\t AlertDialog helpDialog = helpBuilder.create();\n\t\t helpDialog.show();\n\t}", "public void deleteFunction() {\n try {\n\n Vehicle selectedVehicle = vehicles.getSelectionModel().getSelectedItem();\n\n if (!(selectedVehicle.equals(null))) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Delete Confirmation\");\n alert.setHeaderText(\"Deleting selected vehicle.\");\n alert.setContentText(\"Are you sure you want to do this?\");\n\n\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n selectedVehicle.deleteVehicleData();\n refreshTable();\n }\n }\n\n } catch(NullPointerException e) {\n Alert errorAlert = new Alert(Alert.AlertType.INFORMATION);\n errorAlert.setTitle(\"Unable to Delete Vehicle Information\");\n errorAlert.setHeaderText(null);\n errorAlert.setContentText(\"Please Select Vehicle\");\n errorAlert.showAndWait();\n }\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Click Edit Outlet in Summary page
public void clickEditOutlet() { wait.until(ExpectedConditions.visibilityOfElementLocated(btn_expand)); scrollIntoView(driver.findElement(btn_expand)); wait.until(ExpectedConditions.elementToBeClickable(driver.findElement(btn_expand))).click(); wait.until(ExpectedConditions.visibilityOfElementLocated(btn_edit_outlet)).click(); System.out.println("Navigated to Edit outlet page"); }
[ "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "public void clickEdit(){\n\t\tdriver.findElement(edit).click();\n\t}", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "public void clickOnEditButtonOnSavedListings() {\r\n\t\tprint(\"Click on Edit under Saved Listing Section\");\r\n\t\tlocator = Locator.MyTrader.Saved_Listing_Edit.value;\r\n\t\tclickOn(locator);\r\n\t\tAssert.assertTrue(isElementPresent(Locator.MyTrader.Your_Saved_Listing.value));\r\n\t}", "@When(\"^I click on Edit \\\"([^\\\"]*)\\\"$\")\n public void iClickOnEdit(SObject sObject) {\n Navigator.mapActions(sObject).clickEditButton(helper.getItemName());\n }", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "public void editNote()\n\t{\n\t\tclick_button(\"RateSheet Summary Note\", summaryTabNote);\n\t\tenter_text_value_without_clear(\"Summary Tab Note\", summaryTabNote, \" Edited\");\n\t\tclick_button(\"Summary Tab Note Save\", summaryTabNoteSave);\n\t\tfixed_wait_time(4);\n\t\tclick_button(\"RateSheet Summary Note\", summaryTabNote);\n\t\toParameters.SetParameters(\"SummaryTabNoteAfterEdit\", get_field_value(\"RateSheet Summary Tab\", summaryTabNote));\n\n\t\tif(oParameters.GetParameters(\"SummaryTabNoteAfterEdit\").equals(oParameters.GetParameters(\"SummaryTabNote\")))\n\t\t\toReport.AddStepResult(\"Summary Note\",\"Navigated to Rate Sheet Summary Tab then Edited the Summary Note but Modified Rate Sheet Note is not displayed \",\"FAIL\");\n\t\telse\n\t\t\toReport.AddStepResult(\"Summary Note\",\"Navigated to Rate Sheet Summary Tab then Edited the Summary Note, Verified that Modified Rate Sheet Note is displayed\",\"PASS\");\n\t\t\n\t}", "protected void editAction(){\n\t\tStructuredSelection selection = (StructuredSelection)pointsTable.getSelection();\n\t\tif (!selection.isEmpty()){\t\n\t\t\tPoint editElement = (Point)selection.getFirstElement();\n\n\t\t\tProvidePointDialog dialog = new ProvidePointDialog(getShell(), editElement.getX(), editElement.getY());\n\t\t\tif (dialog.open() == Dialog.OK){\n\t\t\t\teditElement.setX(dialog.getX());\n\t\t\t\teditElement.setY(dialog.getY());\n\t\t\t\tpointsTable.refresh();\n\t\t\t\tpaintArea.redraw();\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t}", "private void editButtonPressed() {\n\t\topenEditStoryActivity(storyData.KEY_ID);\n\t}", "public void clickEditContent( String widgetId ) {\n switchToDashboardFrame();\n format( btnWidgetEdit, widgetId ).click();\n }", "public void clickOnEditButtonOnSavedSearches() {\r\n\t\tprint(\"Click on Edit under Saved Searches Section\");\r\n\t\tlocator = Locator.MyTrader.Saved_Search_Edit.value;\r\n\t\tclickOn(locator);\r\n\t\tsleep(2000);\r\n\t\tAssert.assertTrue(isElementPresent(Locator.MyTrader.Your_Saved_Searches.value));\r\n\t}", "public void clickOnSaveButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Save\"));\r\n\t}", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "public void editShiftAction() {\n\t\tArrayList<SpatialObjectModel> locations = (ArrayList<SpatialObjectModel>) getSpatialObjects();\n\t\tthis.animalShiftEditPanel = new AnimalShiftEditPanel(animalsTab, locations);\n\t\tUtils.changePanelContent(this.animalsTab, this.animalShiftEditPanel);\n\t}", "public void clickEditPromptButton() {\n btnEditPrompt.click();\n }", "public void Edit_employee()\n\t{\n\t\tclk_edit_employee.click();\t\n\t}", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "public void clickEditCredential(){\r\n\r\n // find buttons in the page\r\n List<WebElement> buttons = credentialTable.findElements(By.tagName(\"button\"));\r\n\r\n // iterate over all the buttons in the page\r\n for(WebElement button: buttons){\r\n\r\n // find the edit button\r\n if(button.getTagName().equals(\"button\") && button.getAttribute(\"innerHTML\").equals(\"Edit\")){\r\n // click it\r\n button.click();\r\n break;\r\n }\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
.proto.Game game = 4;
proto.Game getGame();
[ "proto.GameOrBuilder getGameOrBuilder();", "com.protobuftest.protobuf.GameProbuf.Game.Result getResult();", "GameMessage.ServerRequest.GameType getGame();", "com.protobuftest.protobuf.GameProbuf.Game.ResultOrBuilder getResultOrBuilder();", "com.protobuftest.protobuf.GameProbuf.Game.MsgType getType();", "com.protobuftest.protobuf.GameProbuf.Game.Answer getAnswer();", "com.protobuftest.protobuf.GameProbuf.Game.Ready getReady();", "com.protobuftest.protobuf.GameProbuf.Game.ReadyOrBuilder getReadyOrBuilder();", "protobuf.clazz.Protocol.GameStartResponse getGameStart();", "com.protobuftest.protobuf.GameProbuf.Game.Point getPoint();", "com.zzsong.netty.protobuff.two.ProtoData.Dog getDog();", "com.protobuftest.protobuf.GameProbuf.Game.Question getQestion();", "com.zzsong.netty.protobuff.two.ProtoData.Car getCar();", "public void setGame(Game game);", "protobuf.clazz.Protocol.GameStartResponseOrBuilder getGameStartOrBuilder();", "public void setGame(Game g) { this.game = g; }", "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameDataOrBuilder getGameDataOrBuilder();", "com.protobuftest.protobuf.GameProbuf.Game.End getEnd();", "com.whiuk.philip.mmorpg.shared.Messages.ServerMessage.GameData.Type getType();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__Chord__Group__3__Impl" $ANTLR start "rule__Chord__Group__4" ../ufscar.Compiladores2.ui/srcgen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2963:1: rule__Chord__Group__4 : rule__Chord__Group__4__Impl ;
public final void rule__Chord__Group__4() throws RecognitionException { int stackSize = keepStackSize(); try { // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2967:1: ( rule__Chord__Group__4__Impl ) // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2968:2: rule__Chord__Group__4__Impl { pushFollow(FOLLOW_rule__Chord__Group__4__Impl_in_rule__Chord__Group__46018); rule__Chord__Group__4__Impl(); state._fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__Chord__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2936:1: ( rule__Chord__Group__3__Impl rule__Chord__Group__4 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2937:2: rule__Chord__Group__3__Impl rule__Chord__Group__4\n {\n pushFollow(FOLLOW_rule__Chord__Group__3__Impl_in_rule__Chord__Group__35956);\n rule__Chord__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Chord__Group__4_in_rule__Chord__Group__35959);\n rule__Chord__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleChord() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:409:2: ( ( ( rule__Chord__Group__0 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:410:1: ( ( rule__Chord__Group__0 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:410:1: ( ( rule__Chord__Group__0 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:411:1: ( rule__Chord__Group__0 )\n {\n before(grammarAccess.getChordAccess().getGroup()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:412:1: ( rule__Chord__Group__0 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:412:2: rule__Chord__Group__0\n {\n pushFollow(FOLLOW_rule__Chord__Group__0_in_ruleChord813);\n rule__Chord__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getChordAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2857:1: ( ( 'chord' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2858:1: ( 'chord' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2858:1: ( 'chord' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2859:1: 'chord'\n {\n before(grammarAccess.getChordAccess().getChordKeyword_0()); \n match(input,49,FOLLOW_49_in_rule__Chord__Group__0__Impl5804); \n after(grammarAccess.getChordAccess().getChordKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2845:1: ( rule__Chord__Group__0__Impl rule__Chord__Group__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2846:2: rule__Chord__Group__0__Impl rule__Chord__Group__1\n {\n pushFollow(FOLLOW_rule__Chord__Group__0__Impl_in_rule__Chord__Group__05773);\n rule__Chord__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Chord__Group__1_in_rule__Chord__Group__05776);\n rule__Chord__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2888:1: ( ( '(' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2889:1: ( '(' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2889:1: ( '(' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2890:1: '('\n {\n before(grammarAccess.getChordAccess().getLeftParenthesisKeyword_1()); \n match(input,47,FOLLOW_47_in_rule__Chord__Group__1__Impl5866); \n after(grammarAccess.getChordAccess().getLeftParenthesisKeyword_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2948:1: ( ( ')' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2949:1: ( ')' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2949:1: ( ')' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2950:1: ')'\n {\n before(grammarAccess.getChordAccess().getRightParenthesisKeyword_3()); \n match(input,48,FOLLOW_48_in_rule__Chord__Group__3__Impl5987); \n after(grammarAccess.getChordAccess().getRightParenthesisKeyword_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2907:1: ( rule__Chord__Group__2__Impl rule__Chord__Group__3 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2908:2: rule__Chord__Group__2__Impl rule__Chord__Group__3\n {\n pushFollow(FOLLOW_rule__Chord__Group__2__Impl_in_rule__Chord__Group__25897);\n rule__Chord__Group__2__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Chord__Group__3_in_rule__Chord__Group__25900);\n rule__Chord__Group__3();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2876:1: ( rule__Chord__Group__1__Impl rule__Chord__Group__2 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2877:2: rule__Chord__Group__1__Impl rule__Chord__Group__2\n {\n pushFollow(FOLLOW_rule__Chord__Group__1__Impl_in_rule__Chord__Group__15835);\n rule__Chord__Group__1__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Chord__Group__2_in_rule__Chord__Group__15838);\n rule__Chord__Group__2();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ChordParams__Group__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3045:1: ( ( ( rule__ChordParams__Group_1__0 )* ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3046:1: ( ( rule__ChordParams__Group_1__0 )* )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3046:1: ( ( rule__ChordParams__Group_1__0 )* )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3047:1: ( rule__ChordParams__Group_1__0 )*\n {\n before(grammarAccess.getChordParamsAccess().getGroup_1()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3048:1: ( rule__ChordParams__Group_1__0 )*\n loop15:\n do {\n int alt15=2;\n int LA15_0 = input.LA(1);\n\n if ( (LA15_0==44) ) {\n alt15=1;\n }\n\n\n switch (alt15) {\n \tcase 1 :\n \t // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3048:2: rule__ChordParams__Group_1__0\n \t {\n \t pushFollow(FOLLOW_rule__ChordParams__Group_1__0_in_rule__ChordParams__Group__1__Impl6172);\n \t rule__ChordParams__Group_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop15;\n }\n } while (true);\n\n after(grammarAccess.getChordParamsAccess().getGroup_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ChordParams__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3034:1: ( rule__ChordParams__Group__1__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3035:2: rule__ChordParams__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__ChordParams__Group__1__Impl_in_rule__ChordParams__Group__16145);\n rule__ChordParams__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Midi__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1094:1: ( rule__Midi__Group__4__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1095:2: rule__Midi__Group__4__Impl\n {\n pushFollow(FOLLOW_rule__Midi__Group__4__Impl_in_rule__Midi__Group__42347);\n rule__Midi__Group__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ChordParams__Group_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3097:1: ( rule__ChordParams__Group_1__1__Impl )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3098:2: rule__ChordParams__Group_1__1__Impl\n {\n pushFollow(FOLLOW_rule__ChordParams__Group_1__1__Impl_in_rule__ChordParams__Group_1__16269);\n rule__ChordParams__Group_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Midi__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1105:1: ( ( '}' ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1106:1: ( '}' )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1106:1: ( '}' )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1107:1: '}'\n {\n before(grammarAccess.getMidiAccess().getRightCurlyBracketKeyword_4()); \n match(input,36,FOLLOW_36_in_rule__Midi__Group__4__Impl2375); \n after(grammarAccess.getMidiAccess().getRightCurlyBracketKeyword_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ChordParams__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3005:1: ( rule__ChordParams__Group__0__Impl rule__ChordParams__Group__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3006:2: rule__ChordParams__Group__0__Impl rule__ChordParams__Group__1\n {\n pushFollow(FOLLOW_rule__ChordParams__Group__0__Impl_in_rule__ChordParams__Group__06085);\n rule__ChordParams__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__ChordParams__Group__1_in_rule__ChordParams__Group__06088);\n rule__ChordParams__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2978:1: ( ( ( rule__Chord__NameAssignment_4 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2979:1: ( ( rule__Chord__NameAssignment_4 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2979:1: ( ( rule__Chord__NameAssignment_4 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2980:1: ( rule__Chord__NameAssignment_4 )\n {\n before(grammarAccess.getChordAccess().getNameAssignment_4()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2981:1: ( rule__Chord__NameAssignment_4 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2981:2: rule__Chord__NameAssignment_4\n {\n pushFollow(FOLLOW_rule__Chord__NameAssignment_4_in_rule__Chord__Group__4__Impl6045);\n rule__Chord__NameAssignment_4();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getChordAccess().getNameAssignment_4()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleChordParams() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:437:2: ( ( ( rule__ChordParams__Group__0 ) ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:438:1: ( ( rule__ChordParams__Group__0 ) )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:438:1: ( ( rule__ChordParams__Group__0 ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:439:1: ( rule__ChordParams__Group__0 )\n {\n before(grammarAccess.getChordParamsAccess().getGroup()); \n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:440:1: ( rule__ChordParams__Group__0 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:440:2: rule__ChordParams__Group__0\n {\n pushFollow(FOLLOW_rule__ChordParams__Group__0_in_ruleChordParams873);\n rule__ChordParams__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getChordParamsAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ChordParams__Group_1__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3066:1: ( rule__ChordParams__Group_1__0__Impl rule__ChordParams__Group_1__1 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:3067:2: rule__ChordParams__Group_1__0__Impl rule__ChordParams__Group_1__1\n {\n pushFollow(FOLLOW_rule__ChordParams__Group_1__0__Impl_in_rule__ChordParams__Group_1__06207);\n rule__ChordParams__Group_1__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__ChordParams__Group_1__1_in_rule__ChordParams__Group_1__06210);\n rule__ChordParams__Group_1__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Midi__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1065:1: ( rule__Midi__Group__3__Impl rule__Midi__Group__4 )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:1066:2: rule__Midi__Group__3__Impl rule__Midi__Group__4\n {\n pushFollow(FOLLOW_rule__Midi__Group__3__Impl_in_rule__Midi__Group__32287);\n rule__Midi__Group__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Midi__Group__4_in_rule__Midi__Group__32290);\n rule__Midi__Group__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Chord__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2919:1: ( ( ruleChordParams ) )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2920:1: ( ruleChordParams )\n {\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2920:1: ( ruleChordParams )\n // ../ufscar.Compiladores2.ui/src-gen/ufscar/compiladores2/ui/contentassist/antlr/internal/InternalMusy.g:2921:1: ruleChordParams\n {\n before(grammarAccess.getChordAccess().getChordParamsParserRuleCall_2()); \n pushFollow(FOLLOW_ruleChordParams_in_rule__Chord__Group__2__Impl5927);\n ruleChordParams();\n\n state._fsp--;\n\n after(grammarAccess.getChordAccess().getChordParamsParserRuleCall_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Populate the action table of the specified state.
private void buildActionTable( Grammar grammar, State state, List<Action> tshifts, List<Action> ntshifts) { Collections.sort( tshifts); createSymbolTable( grammar, state, tshifts, ntshifts); state.gotos = new State[ grammar.rules().size()]; log.debugf( "\nState: %d -----------------------\n%s", state.index, itemSet( state)); for( int i=0; i<tshifts.size(); i++) { Action action = tshifts.get( i); if ( action.omit) continue; switch( action.type) { case tshift: state.stackOps[ i].next = action.itemSet.state; break; case reduce: state.stackOps[ i].reduce = action.item.rule; break; case accept: state.stackOps[ i].next = null; break; } state.stackOps[ i].next = (action.itemSet != null)? action.itemSet.state: null; log.debugf( " %s", action); } for( int i=0; i<ntshifts.size(); i++) { Action action = ntshifts.get( i); if ( action.omit) continue; state.gotos[ action.symbols[ 0]] = action.itemSet.state; log.debugf( " %s", action); } resolveConflicts( grammar, state, tshifts, ntshifts); }
[ "private static void populateStateTable() {\n /*\n * These are the items we'll be using while populating the state transition table.\n */\n TRANSITION_ITEMS.clear();\n TRANSITION_ITEMS.add(Pair.of(\"${1}\", new String[] {\"unlocked\", \"locked\"}));\n TRANSITION_ITEMS.add(Pair.of(\"${2}\", new String[] {\"enabled\", \"disabled\"}));\n TRANSITION_ITEMS.add(Pair.of(\"${3}\", new String[] {\"null\", \"failed\", \"dependency\", DEPENDENCY_FAILED}));\n TRANSITION_ITEMS.add(Pair.of(\"${3:fail}\", new String[] {\"failed\", DEPENDENCY_FAILED}));\n TRANSITION_ITEMS.add(Pair.of(\"${3:dep}\", new String[] {\"dependency\", DEPENDENCY_FAILED}));\n TRANSITION_ITEMS.add(Pair.of(\"${4}\", new String[] {\"null\", \"coldstandby\", \"hotstandby\", \"providingservice\"}));\n\n STATE_TABLE.clear();\n\n // lock\n populate(\"${1},enabled,${3},${4},lock\", LOCKED_ENABLED_NULL_COLDSTANDBY);\n populate(\"${1},enabled,${3},null,lock\", LOCKED_ENABLED_NULL_NULL);\n\n populate(\"${1},disabled,${3},${4},lock\", LOCKED_DISABLED_ANY_COLDSTANDBY);\n populate(\"${1},disabled,${3},null,lock\", LOCKED_DISABLED_ANY_NULL);\n\n\n // unlock\n populate(\"unlocked,enabled,${3},${4},unlock\", UNLOCKED_ENABLED_NULL_ANY);\n populate(\"unlocked,enabled,${3},coldstandby,unlock\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n\n populate(\"locked,enabled,${3},${4},unlock\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n populate(\"locked,enabled,${3},null,unlock\", UNLOCKED_ENABLED_NULL_NULL);\n\n populate(\"${1},disabled,${3},${4},unlock\", UNLOCKED_DISABLED_ANY_COLDSTANDBY);\n populate(\"${1},disabled,${3},null,unlock\", UNLOCKED_DISABLED_ANY_NULL);\n\n\n // disableFailed\n populate(\"${1},${2},${3},${4},disableFailed\", ANY_DISABLED_FAILED_COLDSTANDBY);\n populate(\"${1},${2},${3},null,disableFailed\", ANY_DISABLED_FAILED_NULL);\n\n populate(\"${1},disabled,${3:dep},${4},disableFailed\", ANY_DISABLED_DEPENDENCY_FAILED_COLDSTANDBY);\n populate(\"${1},disabled,${3:dep},null,disableFailed\", ANY_DISABLED_DEPENDENCY_FAILED_NULL);\n\n\n // enableNotFailed\n populate(\"unlocked,${2},${3},${4},enableNotFailed\", UNLOCKED_ENABLED_NULL_ANY);\n populate(\"unlocked,${2},${3},coldstandby,enableNotFailed\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n\n populate(\"unlocked,disabled,${3},${4},enableNotFailed\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n populate(\"unlocked,disabled,${3},null,enableNotFailed\", UNLOCKED_ENABLED_NULL_NULL);\n\n populate(\"locked,${2},${3},${4},enableNotFailed\", LOCKED_ENABLED_NULL_COLDSTANDBY);\n populate(\"locked,${2},${3},null,enableNotFailed\", LOCKED_ENABLED_NULL_NULL);\n\n populate(\"${1},disabled,${3:dep},${4},enableNotFailed\", ANY_DISABLED_DEPENDENCY_COLDSTANDBY);\n populate(\"${1},disabled,${3:dep},null,enableNotFailed\", ANY_DISABLED_DEPENDENCY_NULL);\n\n\n // disableDependency\n populate(\"${1},${2},${3},${4},disableDependency\", ANY_DISABLED_DEPENDENCY_COLDSTANDBY);\n populate(\"${1},${2},${3},null,disableDependency\", ANY_DISABLED_DEPENDENCY_NULL);\n\n populate(\"${1},disabled,${3:fail},${4},disableDependency\", ANY_DISABLED_DEPENDENCY_FAILED_COLDSTANDBY);\n populate(\"${1},disabled,${3:fail},null,disableDependency\", ANY_DISABLED_DEPENDENCY_FAILED_NULL);\n\n populate(\"unlocked,enabled,dependency,hotstandby,disableDependency\", UNLOCKED_DISABLED_DEPENDENCY_HOTSTANDBY);\n\n\n // enableNoDependency\n populate(\"unlocked,enabled,${3},${4},enableNoDependency\", UNLOCKED_ENABLED_NULL_ANY);\n populate(\"unlocked,enabled,${3},coldstandby,enableNoDependency\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n\n populate(\"unlocked,disabled,${3},${4},enableNoDependency\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n populate(\"unlocked,disabled,${3},null,enableNoDependency\", UNLOCKED_ENABLED_NULL_NULL);\n\n populate(\"locked,${2},${3},${4},enableNoDependency\", LOCKED_ENABLED_NULL_COLDSTANDBY);\n populate(\"locked,${2},${3},null,enableNoDependency\", LOCKED_ENABLED_NULL_NULL);\n\n populate(\"${1},disabled,${3:fail},${4},enableNoDependency\", ANY_DISABLED_FAILED_COLDSTANDBY);\n populate(\"${1},disabled,${3:fail},null,enableNoDependency\", ANY_DISABLED_FAILED_NULL);\n\n\n // promote\n populate(\"unlocked,enabled,${3},${4},promote\", UNLOCKED_ENABLED_NULL_PROVIDINGSERVICE);\n\n populate(\"locked,enabled,${3},${4},promote\", LOCKED_ENABLED_NULL_COLDSTANDBY_STANDBY_STATUS_EXCEPTION);\n\n populate(\"${1},disabled,${3},${4},promote\", ANY_DISABLED_ANY_COLDSTANDBY_STANDBY_STATUS_EXCEPTION);\n\n\n // demote\n populate(\"unlocked,enabled,${3},${4},demote\", UNLOCKED_ENABLED_NULL_HOTSTANDBY);\n\n populate(\"locked,enabled,${3},${4},demote\", LOCKED_ENABLED_NULL_COLDSTANDBY);\n\n populate(\"${1},disabled,${3},${4},demote\", ANY_DISABLED_ANY_COLDSTANDBY);\n }", "ActionState createActionState();", "public List<ActionValue> getActions(State state);", "private void initializeQTableForAction(Error error, Action action) {\n\t\tQTable actionDirectory = knowledge.getQTable();\n\n\t\tint contextId = action.getContextId();\n\n\t\tif (!actionDirectory.containsActionForErrorAndContext(error.getCode(), contextId, action.getId())) {\n\t\t\taction.setWeight(0);\n\t\t\tactionDirectory.setAction(error.getCode(), contextId, action);\n\t\t}\n\t}", "public void addAction(T state, AbstractAction<T> action) {\r\n // FIX ME : use multimap\r\n stateActionMap.put(state, action);\r\n }", "public short[][] action_table() {return _action_table;}", "protected void init_actions()\n {\n action_obj = new CUP$actions();\n }", "public void setAction(FlowTableAction action) {\r\n this.action = action;\r\n }", "public short[][] action_table() {\n\t\treturn _action_table;\n\t}", "private AutomatonFromTable automatonFromTable() {\n \tAutomatonFromTable hypothesis = new AutomatonFromTable(inputs);\n\t\t/*\n\t\t * Number of new states in the hypothesis is the \n\t\t * number of distinct rows in the upper half of the observation table\n\t\t */\n\t\tint noOfNewStates = -1;\n\t\tList<List<String>> distinctStates = new ArrayList<>();\n\t\tIterator<Entry<String, List<String>>> it = observationTableUpper.entrySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tdistinctStates.add(entry.getValue());\n\t\t}\n\t\tnoOfNewStates = new HashSet<>(distinctStates).size();\n\t\t//Adding those many number of states\n\t\tfor(int i=0;i<noOfNewStates;i++){\n\t\t\tif(i==0){\n\t\t\t\thypothesis.addInitialState();\n\t\t\t}else{\n\t\t\t\thypothesis.addState();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No.of new states \"+noOfNewStates);\n\t\t\n\t\t\n\t\tList<Transition> prefixStateMap = new ArrayList<>();\n\t\t\n\t\t//Adding the transitions for those states\n\t\tit = observationTableUpper.entrySet().iterator();\n\t\tSystem.out.println(\"Upper table size \"+observationTableUpper);\n\t\tint currentMaxState = 0;\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tString prefix = entry.getKey();\n\t\t\tList<String> results = entry.getValue();\n\t\t\tint currentState = getCurrentState(prefix, prefixStateMap);\n\t\t\tSystem.out.println(\"Current State \"+currentState);\n\t\t\tint nextState;\n\t\t\tif(prefix.contains(\"<>\")){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else if((nextState = checkErrorState(prefix, prefixStateMap))!=-1){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tif(!results.get(i+1).equals(\"-\")){\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Check for two start calls and make sure they end up on the same state.\n\t\t\t\t\t\t * This is Media Player specific and might need to be changed \n\t\t\t\t\t\t * add for conditional checks for other examples. \n\t\t\t\t\t\t * For Android Media Player, calling start after the first call to start\n\t\t\t\t\t\t * doesn't lead to a transition to a new state. So that needs to be specifically handled.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tboolean exceptionCase = false;\n\t\t\t\t\t\tif(prefix.contains(\"$\")){\n\t\t\t\t\t\t\tint lastIndex = prefix.lastIndexOf(\"$\");\n\t\t\t\t\t\t\tString lastCall = prefix.substring(lastIndex+1, prefix.length()-1);\n\t\t\t\t\t\t\tif(lastCall.contains(\"start()\") && results.get(i).contains(\"start()\")){\n\t\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t\t\texceptionCase = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if(!exceptionCase){\n\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Add all the final transitions to the automaton object\n\t\t */\n\t\tfor(Transition transition: prefixStateMap){\n\t\t\thypothesis.addTransition(transition);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Populate the Tree representation of the Automaton by doing a breadth-first search\n\t\t */\n\t\tint i = 0;\n\t\twhile(i<hypothesis.getNumberStates()){\n\t\t\tList<Transition> successorDetails = new ArrayList<>();\n\t\t\tfor(Transition transition: prefixStateMap){\n\t\t\t\tint startState = transition.getCurrentState();\n\t\t\t\tif(startState==i){\n\t\t\t\t\tsuccessorDetails.add(transition);\n\t\t\t\t\tautomatonTree.put(startState, successorDetails);\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tSystem.out.println(automatonTree);\n\t\treturn hypothesis;\n\t}", "public TStateTable () {\r\n\t m_users = new TIDIndex();\r\n\t m_resources = new TIDIndex();\r\n\t m_associations = new TUseStatus[INITIAL_MAX_RESOURCES_COUNT][INITIAL_MAX_USERS_COUNT];\r\n\t for (int a=0; a<INITIAL_MAX_RESOURCES_COUNT; a++)\r\n\t for (int b=0; b<INITIAL_MAX_USERS_COUNT; b++)\r\n\t m_associations[a][b] = null;\r\n\t m_current_max_users = INITIAL_MAX_USERS_COUNT;\r\n\t m_current_max_resources = INITIAL_MAX_RESOURCES_COUNT;\r\n\t m_current_users_count = 0;\r\n\t m_current_resources_count = 0;\r\n }", "public List<A> getAvailableActionsFor(S state);", "private void repopulateTableForAdd()\n {\n clearTable();\n populateTable(null);\n }", "Iterable<Action> getActions(GameState state, int id);", "public CustomerActionsTest() {\n initComponents();\n NamesLabels();\n Update_Table();\n }", "protected void init_actions()\r\n {\r\n action_obj = new CUP$Parser$actions(this);\r\n }", "protected abstract void initStates();", "public void testCtor() {\n assertNotNull(\"Failed to create a new AddActionStateAction instance.\", action);\n assertTrue(\"The state should be formatted.\", state.isSpecification());\n }", "private void createActions()\r\n {\n actions.put(ActionFactory.DELETE.getId(), new DeleteAction());\r\n actions.put(ActionFactory.REDO.getId(), new RedoAction());\r\n actions.put(ActionFactory.UNDO.getId(), new UndoAction());\r\n // actions.put(ActionFactory.PRINT.getId(), new PrintAction());\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ isVector Return true if this is a vector value type.
public boolean isVector() { return isSimple() ? V.isVector() : isExtendedVector(); }
[ "public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }", "public boolean is64BitVector() {\n\t\tif (!isSimple())\n\t\t\treturn isExtended64BitVector();\n\n\t\tSimpleValueType svt = V.getSimpleType();\n\n\t\treturn (svt == SimpleValueType.v8i8 || svt == SimpleValueType.v4i16 || svt == SimpleValueType.v2i32 ||\n\t\t\t\tsvt == SimpleValueType.v1i64 || svt == SimpleValueType.v2f32);\n\t}", "private boolean is256BitVector() {\n\t\tif (!isSimple())\n\t\t\treturn isExtended256BitVector();\n\n\t\tSimpleValueType svt = V.getSimpleType();\n\t\treturn (svt == SimpleValueType.v8f32 || svt == SimpleValueType.v4f64 || svt == SimpleValueType.v32i8 ||\n\t\t\t\tsvt == SimpleValueType.v16i16 || svt == SimpleValueType.v8i32 || svt == SimpleValueType.v4i64);\n\n\t}", "public static boolean isVector(int[] v) { return v != null && v.length == 2; }", "public boolean isValue() {\n switch(this.getType()) {\n case CONSTANT_INTEGER : \n case CONSTANT_FLOAT :\n case CONSTANT_DOUBLE : \n case CONSTANT_LONG : \n case CONSTANT_STRING:\n return true ;\n default :\n return false;\n }\n }", "public boolean isSetVec() {\n return this.vec != null;\n }", "public ExtendedValueType getVectorElementType() {\n\t\tif(!isVector()){\n\t\t\tassert false : INVALID_VECTOR_TYPE;\n\t\t\tLOG.error(INVALID_VECTOR_TYPE);\n\t\t}\n\n\t\tif (isSimple())\n\t\t\treturn new ExtendedValueType(V.getVectorElementType());\n\t\treturn getExtendedVectorElementType();\n\t}", "public boolean is128BitVector() {\n\t\tif (!isSimple())\n\t\t\treturn isExtended128BitVector();\n\n\t\tSimpleValueType svt = V.getSimpleType();\n\n\t\treturn (svt == SimpleValueType.v16i8 || svt == SimpleValueType.v8i16 || svt == SimpleValueType.v4i32 ||\n\t\t\t\tsvt == SimpleValueType.v2i64 || svt == SimpleValueType.v4f32 || svt == SimpleValueType.v2f64);\n\t}", "public static boolean isCollectVectors() {\n return fCollectVectors;\n }", "public static boolean IsVectorIndex(IndexType idx) {\n return idx != IndexType.INVALID && idx.getCode() < IndexType.TRIE.getCode();\n }", "public final Type vector_type() throws RecognitionException {\r\n Type type = null;\r\n\r\n\r\n Token INTEGER157=null;\r\n Type element_type158 =null;\r\n\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:926:5: ( '<' INTEGER 'x' element_type '>' )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:926:7: '<' INTEGER 'x' element_type '>'\r\n {\r\n match(input,46,FOLLOW_46_in_vector_type6559); \r\n\r\n INTEGER157=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_vector_type6561); \r\n\r\n match(input,91,FOLLOW_91_in_vector_type6563); \r\n\r\n pushFollow(FOLLOW_element_type_in_vector_type6565);\r\n element_type158=element_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n match(input,48,FOLLOW_48_in_vector_type6567); \r\n\r\n type = typeFactory.getVectorType(Integer.parseInt((INTEGER157!=null?INTEGER157.getText():null)), element_type158);\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return type;\r\n }", "VectorType11 getVector();", "public abstract boolean isScalarType();", "private boolean is512BitVector() {\n\t\tSimpleValueType svt = V.getSimpleType();\n\t\treturn isSimple() ? svt == SimpleValueType.v8i64 : isExtended512BitVector();\n\n\t}", "public nvo_coords.CoordsType getVector() {\n return vector;\n }", "public Vector getTypeFieldVec(){\r\n\t\treturn typeFieldVec;\r\n\t}", "public boolean isPow2VectorType() {\n\t\tint NElts = getVectorNumElements();\n\t\tboolean flag = false;\n\t\tif((NElts & (NElts - 1)) > 0){\n\t\t\tflag = true; \n\t\t}\n\t\treturn !flag;\n\t}", "public boolean isScalarType(Object in) {\r\n if (in == null) {\r\n return true; // Though not strictly scalar, null can be treated as such\r\n }\r\n Class<?> type = in.getClass();\r\n return simpleTypes.contains(type)\r\n || Number.class.isAssignableFrom(type)\r\n || String.class.isAssignableFrom(type)\r\n || Boolean.class.isAssignableFrom(type)\r\n || Character.class.isAssignableFrom(type)\r\n || Date.class.isAssignableFrom(type);\r\n }", "private Object isValidColumnVector(List<List<Double>> vector) {\n\t\tInteger nrows = vector.size();\n\n\t\tList<Integer> rowLengths = vector.stream().map(List::size).toList();\n\t\tInteger ncols = rowLengths.stream().mapToInt(Integer::intValue).sum() / rowLengths.size();\n\n\t\treturn (nrows == 3) && (ncols == 1);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Failure test for private method initialize(). Failure cause: The attributes for document content manager is invalid, ContestManagementException is expected.
public void test_Initialize_Failure12_SocketDocumentContentManager_attr_miss() throws Exception { context.addEntry("unitName", "contestManager"); context.addEntry("activeContestStatusId", new Long(1)); context.addEntry("defaultDocumentPathId", new Long(1)); context.addEntry("documentContentManagerClassName", "com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager"); context.addEntry("documentContentManagerAttributeKeys", "serverAddress,serverPort"); // context.addEntry("serverAddress", "127.0.0.1"); context.addEntry("serverPort", new Integer(40000)); Method method = beanUnderTest.getClass() .getDeclaredMethod("initialize", new Class[0]); method.setAccessible(true); try { method.invoke(beanUnderTest, new Object[0]); fail("ContestManagementException is expected."); } catch (InvocationTargetException e) { // success } }
[ "public void test_Initialize_Failure9_miss_documentManagerClassName()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure11_documentContentManagerClassName_ctor_wrong()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.failuretests.mock.SocketDocumentContentManagerCtorWrong\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure10_documentContentManagerClassName_type_wrong()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"documentContentManagerClassName\", \"java.lang.String\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure6_miss_defaultDocumentPathId()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n // context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_GetDocument_Failure1() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.close();\r\n beanUnderTest.getDocument(1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure1_miss_unitName()\r\n throws Exception {\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"loggerName\", \"contestManager\");\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocument_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.close();\r\n\r\n Document document = createDocumentForTest();\r\n\r\n beanUnderTest.addDocument(document);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocumentToContest_Failure5() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.addDocumentToContest(1, 1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocumentToContest_Failure3() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.close();\r\n beanUnderTest.addDocumentToContest(1, 1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure4_miss_activeContestStatusId()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n // context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocument_Failure4() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enablePersistenceException(true);\r\n\r\n Document document = createDocumentForTest();\r\n\r\n beanUnderTest.addDocument(document);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure7_defaultDocumentPathId_notLong()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \"contestManager\");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Object());\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_UpdateDocument_Failure2() throws Exception {\r\n try {\r\n initContext();\r\n\r\n\r\n Document document = createDocumentForTest();\r\n beanUnderTest.addDocument(document);\r\n entityManager.close();\r\n\r\n beanUnderTest.updateDocument(document);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_SaveDocumentContent_Failure6() throws Exception {\r\n try {\r\n initContext();\r\n\r\n Document document = this.createDocumentForTest();\r\n\r\n beanUnderTest.addDocument(document);\r\n\r\n byte[] content = new byte[1];\r\n content[0] = 1;\r\n\r\n // It should process successfully.\r\n beanUnderTest.saveDocumentContent(document.getDocumentId(), content);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_Initialize_Failure3_empty_unitName()\r\n throws Exception {\r\n context.addEntry(\"unitName\", \" \");\r\n context.addEntry(\"activeContestStatusId\", new Long(1));\r\n context.addEntry(\"defaultDocumentPathId\", new Long(1));\r\n context.addEntry(\"loggerName\", \"contestManager\");\r\n context.addEntry(\"documentContentManagerClassName\",\r\n \"com.topcoder.service.studio.contest.documentcontentmanagers.SocketDocumentContentManager\");\r\n context.addEntry(\"documentContentManagerAttributeKeys\",\r\n \"serverAddress,serverPort\");\r\n context.addEntry(\"serverAddress\", \"127.0.0.1\");\r\n context.addEntry(\"serverPort\", new Integer(40000));\r\n\r\n Method method = beanUnderTest.getClass()\r\n .getDeclaredMethod(\"initialize\",\r\n new Class[0]);\r\n\r\n method.setAccessible(true);\r\n\r\n try {\r\n method.invoke(beanUnderTest, new Object[0]);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (InvocationTargetException e) {\r\n // success\r\n }\r\n }", "public void test_UpdateDocument_Failure4() throws Exception {\r\n try {\r\n initContext();\r\n\r\n Document document = createDocumentForTest();\r\n beanUnderTest.addDocument(document);\r\n\r\n entityManager.enablePersistenceException(true);\r\n beanUnderTest.updateDocument(document);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocument_Failure3() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enableTransactionException(true);\r\n\r\n Document document = createDocumentForTest();\r\n\r\n beanUnderTest.addDocument(document);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_AddDocumentToContest_Failure4() throws Exception {\r\n try {\r\n initContext();\r\n\r\n entityManager.enableTransactionException(true);\r\n beanUnderTest.addDocumentToContest(1, 1);\r\n\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }", "public void test_SaveDocumentContent_Failure5() throws Exception {\r\n try {\r\n initContext();\r\n\r\n Document document = this.createDocumentForTest();\r\n\r\n beanUnderTest.addDocument(document);\r\n\r\n byte[] content = new byte[1];\r\n content[0] = 1;\r\n\r\n entityManager.enablePersistenceException(true);\r\n\r\n // It should process successfully.\r\n beanUnderTest.saveDocumentContent(document.getDocumentId(), content);\r\n fail(\"ContestManagementException is expected.\");\r\n } catch (ContestManagementException e) {\r\n // success\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Callback to allow the application to handle an exception in the main run() loop.
public void handleException(Exception e);
[ "@Override\r\n\tpublic void eventLoopException(Throwable exception) {\n\t\t\r\n\t\tMessageDialog.openWarning(shell, \"unexpected\", \"caughtunhandled\");\r\n\t}", "public void handleException();", "protected void handleException(Exception err)\n\t{\n\t\tif (killed)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\terr.printStackTrace();\n\t\tif (silentRetryCount > 0)\n\t\t{\n\t\t\tsilentRetryCount--;\n\t\t\tretry();\n\t\t\treturn;\n\t\t}\n\t\tif (responseCodeListeners != null)\n\t\t{\n\t\t\tfinal MPNetworkEvent n = new MPNetworkEvent(this, 600, err.getMessage());\n\t\t\tresponseCodeListeners.fireActionEvent(n);\n\t\t}\n\t\t// if (Display.isInitialized() && Dialog.show(\"Exception\",\n\t\t// err.toString() + \": \" + err.getMessage(), \"Retry\", \"Cancel\"))\n\t\t// {\n\t\t// retry();\n\t\t// }\n\t}", "public void handleException(Exception exception);", "private void handleUncaughtException(Thread t, Throwable e) {\r\n LOG.error(\"Caught unhandled exception, application will be stopped ...\", e);\r\n stop();\r\n }", "protected abstract void onException(final Exception exception);", "public void onException(COMPSsException e);", "void onSwallowException(Exception e);", "public void handledException(){\n\t\t\n\t\ttry{\n\t\t\t/*\n\t\t\t * Use a try block to surround risky code that might throw an exception.\n\t\t\t * The try block requires at least ONE catch block assuming you are only using\n\t\t\t * catch blocks.\n\t\t\t */\n\t\t\tString h = null;\n\t\t\th.toString();\n\t\t\t//throw is used to trigger a specific exception.\t\n\t\t\tSystem.out.println(\"THIS CODE IS NEVER REACHED\");\n\t\t}catch(NullPointerException e){\n\t\t\t/*\n\t\t\t * In the event of a try block triggering an exception, program execution\n\t\t\t * will immediately forward over the catch block.\n\t\t\t */\n\t\t\tSystem.out.println(\"CAUGHT!\");\n\t\t}catch(ArithmeticException e){\n\t\t\t/*\n\t\t\t * All these exceptions are unchecked, since they are all a part of RuntimeException,\n\t\t\t * which does NOT require you have a try catch block.\n\t\t\t */\n\t\t}\n\t\tcatch(RuntimeException e){\n\t\t\t/*\n\t\t\t * You cna have multiple catch blocks, but you need ot order them, most specific\n\t\t\t * to least, or you risk dead code.\n\t\t\t */\n\t\t\tSystem.out.println(\"CAUGHT!\");\n\t\t}\n\t}", "public void handle(Throwable t);", "@Override\n public void onException(Actor<String> self, Exception exc) {\n exc.printStackTrace();\n self.die();\n }", "protected void handleListenerException(Throwable ex) {\n\t\tlogger.error(\"Listener execution failed\", ex);\n\t}", "public void handleFatalPeriodicException(Throwable t)\n\t{\n\t\t// implement in other commands\n\t}", "void handleError(Throwable t);", "protected void onBackgroundError(Exception e) {\n\n }", "private static void error( Exception e ) {\n e.printStackTrace();\n System.exit(-1);\n }", "@Subscribe\n public void onException(ExceptionEvent exceptionEvent) {\n handleException(exceptionEvent.e);\n }", "protected void handleException(Throwable e) throws Throwable {\n\t\tlogException(e);\n\t\t/*\n\t\t * To avoid creating multiple screenshots for the same exception (which might\n\t\t * get handled multiple times as it pops us the call stack) we check to see if\n\t\t * the exception has already been captured.\n\t\t */\n\n\t\t//!pq: re-enabled to address:\n\t\tif (_iae == null &&_ite == null) {\n\t\t\t/*\n\t\t\t * WidgetSearch and Wait Exceptions are handled in UIContext, so all\n\t\t\t * we have to handle here are others.\n\t\t\t * \n\t\t\t * NOTE: if a user throws one of these exceptions themselves, the screenshots won't happen as they expect...\n\t\t\t */\n\t\t\tif (!(e instanceof WidgetSearchException) && !(e instanceof WaitTimedOutException)) {\n\t\t\t\tcreateScreenCapture(e.getMessage());\n\t\t\t}\n\t\t}\n\t\tthrow e;\n\t}", "protected void handleProcessingException(Exception e) throws NbaBaseException {\n unLockItems();\n if (e instanceof NbaBaseException) {\n NbaBaseException eb = (NbaBaseException) e;\n if (eb.isFatal() || eb instanceof NbaLockedException) {\n throw eb;\n }\n }\n if (result == null) {\n setWork(getOrigWorkItem());\n addComment(e.getMessage());\n changeStatus(getHostErrorStatus());\n setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getHostErrorStatus(), getHostErrorStatus()));\n }\n try {\n doUpdateWorkItem();\n } catch (NbaBaseException e1) {\n e1.forceFatalExceptionType();\n throw e1;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Stores the passed record complying with the historyRecordStructure.
void addRecord(HistoryRecord record) throws IOException;
[ "void addRecord(HistoryRec record);", "private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.apply();\n }", "public Record saveRecord(Record record);", "public void setRecord(LogRecord record) { this.record = record; }", "void saveActivityHistForAddEntity(Record inputRecord);", "void store(String id, RECORD record);", "public synchronized void save(MfRecord record) {\n getRecordRef(record.getId()).setValue(record);\n mRecords.put(record.getId(), record);\n\n Bundle data = new Bundle();\n data.putString(\"exercise\", record.getExercise());\n mAnalytics.logEvent(\"record_created\", data);\n updateRecordsCount();\n }", "LogRecord saveLog(LogRecord logRecord);", "@Override \n public void saveRecord(){\n if (newEmptyRecordCreated==true){\n saveNewRecord();\n setNewEmptyRecordSaved();\n \n }\n if (newEmptyRecordCreated==false){\n saveOldRecord();\n }\n \n }", "void addRecord(Record record);", "public void placeRecordInSlot(Record record){\n\t\tfor (int i=0; i< this.recordShelf.getSize(); i++){\n\t\t\tif(!this.recordShelf.isEmptySlot(i) && (this.recordShelf.getLabelOfSlot(i)!=null)){\n\t\t\t\tif(this.recordShelf.getLabelOfSlot(i).equals(record)){\n\t\t\t\t\tthis.recordShelf.putRecordOnSlot(record, i);\n\t\t\t\t\tSystem.out.println(\"Record : \" + record.getTitle() + \"added to shelf\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\tthis.stackOne.push(record);\n\t\tSystem.out.println(\"Record : \" + record.getTitle() + \"added to stack\");\n\t}", "public void setCurrentRecord(final Record record) {\n mCurrentRecord = record;\n saveCurrentRecord();\n }", "protected void saveToRepo(SensorRecord record) throws SaveToRepositoryException\n {\n SensorRecord savedRecord = repo.save(record);\n if (savedRecord != null) {\n log(\"saved data: \\n\" + savedRecord.toString(),Level.DEBUG);\n }\n else {\n throw new SaveToRepositoryException();\n }\n }", "public void insertRecord(Object key, Object record ) \n\t{ \n\t check(\"insert\", key, record);\n\t if ( htRecords.get(key) == null )\n\t {\n\t\t //--- Store a copy of the given key+record\n\t\t Object key2 = copy ( key ); // Is it realy useful for the key ?\n\t\t Object record2 = copy ( record );\n\t\t \n\t\t htRecords.put(key2, record2);\n\t }\n\t else\n\t {\n\t throw new RuntimeException(\"Cannot insert record (\" + recordClass + \") : duplicate key\");\n\t }\n\t}", "public void saveHistory() {\n history.save();\n }", "public void storeResidueHistory() {\n\t\ttheResidueHistory.store(theConfiguration);\n\t}", "private synchronized void addRecord(String key, RecordBase record) {\n List<RecordBase> recordList = this.records.get(key.toUpperCase());\n if (recordList != null) {\n recordList.add(record);\n } else {\n recordList = new ArrayList<>();\n recordList.add(record);\n this.records.put(key.toUpperCase(), recordList);\n }\n }", "public void setRecord(String record) {\n\t\tthis.record = record;\n\t\tthis.handleConfig(\"record\", record);\n\t}", "private void addRecordExisting(Person athlete, Record record) {\n requireAllNonNull(athlete, record);\n ArrayList<Record> currentPerformanceEntries = new ArrayList<>();\n currentPerformanceEntries.addAll(records.get(athlete));\n currentPerformanceEntries.add(record);\n records.remove(athlete);\n records.put(athlete, currentPerformanceEntries);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Displays an httpauthentication dialog.
void showHttpAuthentication(final HttpAuthHandler handler, String host, String realm) { mHttpAuthenticationDialog = new HttpAuthenticationDialog(WebViewActivity.this, host, realm); mHttpAuthenticationDialog.setOkListener(new HttpAuthenticationDialog.OkListener() { public void onOk(String host, String realm, String username, String password) { setHttpAuthUsernamePassword(host, realm, username, password); handler.proceed(username, password); mHttpAuthenticationDialog = null; } }); mHttpAuthenticationDialog.setCancelListener(new HttpAuthenticationDialog.CancelListener() { public void onCancel() { handler.cancel(); mHttpAuthenticationDialog = null; } }); mHttpAuthenticationDialog.show(); }
[ "public static void authenticate() {\n\n Stage window = new Stage();\n\n final String url = OAUTH_URL + getQuery();\n\n BorderPane borderPane = new BorderPane();\n WebView browser = new WebView();\n WebEngine webEngine = browser.getEngine();\n\n webEngine.load(url);\n borderPane.setCenter(browser);\n\n webEngine.setOnStatusChanged(event -> {\n if (event.getSource() instanceof WebEngine) {\n WebEngine we = (WebEngine) event.getSource();\n String location = we.getLocation();\n // If we are redirected to REDIRECT_URL we get contents, and send it to verify() to get access token\n if (location.startsWith(REDIRECT_URL) && location.contains(\"code\") && AUTH_OBECT == null) try {\n URL url1 = new URL(location);\n String[] params = url1.getQuery().split(\"&\");\n Map<String, String> map = new HashMap<>();\n for (String param : params) {\n String name = param.split(\"=\")[0];\n String value = param.split(\"=\")[1];\n map.put(name, value);\n }\n String code = map.get(\"code\");\n // We have code so we continue the flow\n verify(code);\n window.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // create scene\n window.setTitle(\"Authentication\");\n Scene scene = new Scene(borderPane, 750, 500);\n window.setScene(scene);\n window.showAndWait();\n }", "public O_OAuthenticate() {\n initComponents();\n initConnection();\n enableScroll();\n authenPanel.setVisible(false);\n }", "public void requestAuthentication();", "@Override\n public void showAuthScreen() {\n }", "public final void authenticate() {\r\n if (username.getText().isEmpty()) {\r\n kernel.showAlert(Alert.AlertType.WARNING, null, Language.get(17));\r\n } else if (password.getText().isEmpty() && authLeverage.isSelected()) {\r\n kernel.showAlert(Alert.AlertType.WARNING, null, Language.get(23));\r\n } else {\r\n try {\r\n Authentication auth = kernel.getAuthentication();\r\n String user;\r\n if (authLeverage.isSelected()) {\r\n user = \"leverage://\" + username.getText();\r\n auth.authenticate(user, password.getText());\r\n // Compraobacion de Parches\r\n Thread t = new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n loadAntiCheatSystem();\r\n }\r\n });\r\n t.start();\r\n } else {\r\n user = username.getText();\r\n auth.authenticate(user, null);\r\n }\r\n kernel.saveProfiles();\r\n username.setText(\"\");\r\n password.setText(\"\");\r\n showLoginPrompt(false);\r\n if(!Kernel.USE_LOCAL) {\r\n fetchAds();\r\n playButton.setText(Language.get(12));\r\n } else {\r\n playButton.setText(Language.get(79));\r\n }\r\n texturesLoaded = false;\r\n } catch (AuthenticationException ex) {\r\n kernel.showAlert(Alert.AlertType.ERROR, Language.get(22), ex.getMessage());\r\n password.setText(\"\");\r\n }/* catch (IOException e) {\r\n console.print(\"Error de Conexion al Servidor con RCON\");\r\n kernel.showAlert(Alert.AlertType.ERROR, null, Language.get(139));\r\n e.printStackTrace();\r\n }*/\r\n }\r\n }", "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "public void authenticated() {\n loginView.resetView();\n SecureFXMLApplication.showPage(firstView);\n }", "private PasswordAuthentication openDialog(String site, String prompt, String scheme) {\n\tfinal String theSite = site;\n\tfinal String thePrompt = prompt;\n\tfinal String theScheme = scheme;\n\ttry {\n\t return (PasswordAuthentication)PluginSysUtil.execute(new PluginSysAction() {\n\t\tpublic Object execute() throws Exception {\n\t\t return openDialogImpl(theSite, thePrompt, theScheme);\n\t\t}});\n\t}\n\tcatch(Exception e) {\n\t // should never happen\n\t assert(false);\n\t return null;\n\t}\n }", "private void requestAuthentication() throws IOException{\n\t\toutput.writeObject(new AuthenticationPacket(username, userPassword));\n\t\toutput.flush();\n\t\tshowMessage(\"\\nRequesting authentication from server\\n\");\n\t}", "public login(JFrame frame, Authenticator auth) {\n\t\tsetBackground(Color.GRAY);\n\t\t\n\t\tJLabel lblWelcomeToOpen = new JLabel(\"Welcome to the Open Journal Submission System\");\n\t\tlblWelcomeToOpen.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcomeToOpen.setBounds(10, 55, 780, 30);\n\t\tlblWelcomeToOpen.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 24));\n\t\t\n\t\tJLabel lblUsername = new JLabel(\"Username:\");\n\t\tlblUsername.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblUsername.setBounds(233, 183, 92, 22);\n\t\tlblUsername.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Password:\");\n\t\tlblPassword.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblPassword.setBounds(238, 253, 87, 22);\n\t\tlblPassword.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\ttextUser = new JTextField();\n\t\ttextUser.setBounds(369, 178, 180, 32);\n\t\ttextUser.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\ttextUser.setColumns(10);\n\t\t\n\t\tJButton loginbtn = new JButton(\"Login\");\n\t\tloginbtn.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tloginbtn.setBounds(449, 339, 100, 40);\n\t\tloginbtn.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString user = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\t\t\t\n\t\t\t\tif ((user == null || user.isEmpty()) && (pass == null || pass.isEmpty())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n //JOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.INFORMATION_MESSAGE);\n } else if (user == null || user.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter username\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } else if (pass == null || pass.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\t\t\t}\n\t\t});\n\t\tloginbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString uname = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\n\t\t\t\tif (auth.login(uname, pass) != null) {\n\t\t\t\t\tif (auth.login(uname, pass).getAccountType() == \"Researcher\") {\n\t\t\t\t\t\tResearcher panel = new Researcher(frame, auth);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Reviewer\") {\n\t\t\t\t\t\tSystem.out.println(uname);\n\t\t\t\t\t\tReviewer panel = new Reviewer(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Editor\") {\n\t\t\t\t\t\tEditor panel = new Editor(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account not found\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnRegister = new JButton(\"Register\");\n\t\tbtnRegister.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tregister panel = new register(frame, auth);\n\t\t\t\tframe.setContentPane(panel);\n\t\t\t\tframe.revalidate();\n\t\t\t}\n\t\t});\n\t\t\t\n\t\tbtnRegister.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tbtnRegister.setBounds(259, 339, 120, 40);\t\n\t\t\t\n\t\tsetLayout(null);\n\t\tadd(lblWelcomeToOpen);\n\t\tadd(lblPassword);\n\t\tadd(lblUsername);\n\t\tadd(textUser);\n\t\tadd(btnRegister);\n\t\tadd(loginbtn);\n\t\t\n\t\ttextPass = new JPasswordField();\n\t\ttextPass.setBounds(369, 251, 180, 32);\n\t\tadd(textPass);\n\n\t}", "private ModelAndView handleScriptBasicAuth(HttpServletRequest request, HttpServletResponse response)\n {\n\tfinal HttpSession session = request.getSession();\n\tString http_basic_auth = null, http_basic_auth_username = null, http_basic_auth_password = null, openid = null;\n\tBoolean user_authenticated = false;\n\tbyte[] byteArray = null;\n\thttp_basic_auth = request.getHeader(\"Authorization\");\n\t \n\t \n\tString http_basic_auth_enc = http_basic_auth.replaceAll(\"Basic \", \"\");\n\tbyteArray = Base64.decodeBase64(http_basic_auth_enc.getBytes());\n\tString http_basic_auth_dec = new String(byteArray);\n\tString[] parts = http_basic_auth_dec.split(\":\");\n\thttp_basic_auth_username = parts[0];\n\thttp_basic_auth_password = parts[1];\n\t \n\tif (LOG.isDebugEnabled()) LOG.debug(\"Attempting authentication with user=\"+http_basic_auth_username+\" password=\"+http_basic_auth_password);\n\t\t\n\tuser_authenticated = idp.authenticate_ids(http_basic_auth_username, http_basic_auth_password);\n\topenid = idp.getOpenid(http_basic_auth_username);\t\t\n\t\t\n\tif((user_authenticated) && (openid != null)) \n\t{\n\t return setPositiveSessionAuth(session, openid);\n\t} \n\telse\n\t{\n\t // set session-scope authentication flag to FALSE\n\t session.setAttribute(OpenidPars.SESSION_ATTRIBUTE_AUTHENTICATED, Boolean.FALSE);\n\t if (LOG.isDebugEnabled()) LOG.debug(\"Authentication error\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t return null;\n\t}\n }", "public void LogInOkHandle()\n\t{\n\t\tBaseQueries base = new BaseQueries();\n\t\tString loginName = txtLoginUserName.getText();\n\t\tString loginPassword = pswLoginPassword.getText();\n\t\tif (base.isInBase(loginName,loginPassword))\n\t\t{\n\t\t\tId = base.getUserId(loginName);\n\t\t\tmonthly.setVisible(true);\n\t\t\tloginpane.setVisible(false);\n\t\t\tArrayInit();\n\t\t\tMonthLabel.setText(\"January\");\n\t\t\tYearLabel.setText(\"2020\");\n\t\t\tfor(int i=1; i<32;i++)\n\t\t\t{\n\t\t\t\tarrayButtons[i+4].setText(Integer.toString(i));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\talert.setVisible(true);\n\t\t}\n\t}", "public AuthenticationPanel() {\n\t\tsuper();\n\t\tinitComponents();\n\t\tinitComponents2();\n\t}", "public interface CredentialsAuthenticationProvider extends AuthenticationProvider {\n\n class Credential {\n private final String key;\n\n /**\n * When {@code true}, the login form will use the secret/password widget rather than the regular text field.\n */\n private final boolean secret;\n\n public Credential(String key, boolean secret) {\n this.key = key;\n this.secret = secret;\n }\n\n public Credential(String key) {\n this(key, false);\n }\n\n public String getKey() {\n return key;\n }\n\n public boolean isSecret() {\n return secret;\n }\n }\n\n /**\n * Returns the list of credential required for login, normally username and password.\n * The strings will be used by the application as titles to the text fields, and then\n * as keys in the map passed to {@link #authenticate(java.util.Map)}.\n *\n * @return the list of credentials required for login.\n */\n List<Credential> getRequiredCredentials();\n\n /**\n * The main method of this interface - provide a consistent user id, within\n * the scope of this provider, for a user based on the request content.\n *\n * @param request All information needed to decide whether the user can be authenticated.\n * @return response with the result of the authentication process.\n * TODO BACKLOG push this method down to CredentialsAuthenticationProvider.\n */\n AuthenticationResponse authenticate(AuthenticationRequest request);\n}", "private void showInvalidCredential() {\n showMessageDialog(\"Invalid credentials\");\n }", "public void openSystemAdminLoginView()\n\t{\n\t\tm_systemAdminLoginView.show();\n\t\taccess(() -> Page.getCurrent().setTitle(\"Anmelden\"));\n\t}", "public abstract Result authenticate(HttpExchange exch);", "@RequestMapping(path = \"/login\", method = RequestMethod.GET)\n\tpublic ModelAndView displayLoginForm() {\n\t\t\n\t\treturn new ModelAndView(\"loginPage\", \"userCredential\", new UserCredentials());\n\t}", "public void launchAuthenticationProcess(Context c);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
SEARCH /_search/contactDetailss/:query > search for the contactDetails corresponding to the query.
@RequestMapping(value = "/_search/contactDetailss/{query}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public List<ContactDetails> searchContactDetailss(@PathVariable String query) { return StreamSupport .stream(contactDetailsSearchRepository.search(queryString(query)).spliterator(), false) .collect(Collectors.toList()); }
[ "List<ShipmentInfoPODDTO> search(String query);", "private void searchContacts(String query) {\n\t\tcontacts_name.clear();\n\t\tcontacts_id.clear();\n\t\tCursor c = db.searchContacts(query);\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tcontacts_name.add(c.getString(1));\n\t\t\t\tcontacts_id.add(c.getInt(0));\n\t\t\t} while (c.moveToNext());\n\t\t\tadapter = new ArrayAdapter<String>(this, R.layout.row_layout, R.id.label, contacts_name);\n\t\t\tsetListAdapter(adapter);\n\t\t}\n\t}", "private void searchFor(String query) {\n AnalyticsHelper.sendEvent(SCREEN_LABEL, \"Search\", \"\");\n Bundle args = new Bundle(1);\n if (query == null) {\n query = \"\";\n }\n args.putString(ARG_QUERY, query);\n mQuery = query;\n\n }", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "@Transactional(readOnly = true)\n public Page<ApplicantContactInfoDTO> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of ApplicantContactInfos for query {}\", query);\n return applicantContactInfoSearchRepository.search(queryStringQuery(query), pageable)\n .map(applicantContactInfoMapper::toDto);\n }", "@Override\n @Transactional(readOnly = true)\n public List<BusinessContactProfileDTO> search(String query) {\n log.debug(\"Request to search BusinessContactProfiles for query {}\", query);\n return StreamSupport\n .stream(businessContactProfileSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(businessContactProfileMapper::toDto)\n .collect(Collectors.toList());\n }", "public static Result customerSearch(String query) {\n\t\tPage<models.Customer> customers = models.Customer.findByQuickSearch(query);\n\n\t\treturn ok(customer_search.render(customers));\n\t}", "void contactQueryResult(String queryId, Contact contact);", "Page<ConsultationInfoDTO> search(String query, Pageable pageable);", "List<SearchResult> search(SearchQuery searchQuery);", "public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}", "List<AgentDTO> search(String query);", "private List<Contact> filter(List<Contact> contacts, String query){\n List<Contact> filteredModelList = new ArrayList<>();\n for (Contact contact : contacts) {\n String text = contact.getName().toLowerCase();\n if (text.contains(query.toLowerCase())) {\n filteredModelList.add(contact);\n }\n }\n return filteredModelList;\n }", "List<Tache> search(String query);", "private Contact searchByName() {\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"Search By Name\");\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"=========================\");\n\n InputHelper inputHelper = new InputHelper();\n String ans = inputHelper.readString(\"Type Name \");\n return this.repository.searchName(ans);\n }", "@GetMapping(\"/_search/job-details\")\n @Timed\n public List<JobDetails> searchJobDetails(@RequestParam String query) {\n log.debug(\"REST request to search JobDetails for query {}\", query);\n return StreamSupport\n .stream(jobDetailsSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "private Contact searchByPhonenum() {\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"Search By Phone Number\");\n System.out.format(\"\\033[31m%s\\033[0m%n\", \"=================\");\n InputHelper inputHelper = new InputHelper();\n int ans = inputHelper.readInt(\"Type phone number\");\n return this.repository.searchTelNum(ans);\n\n }", "void executeSearch(String query);", "@Override\n @Transactional(readOnly = true)\n public List<CollegeDTO> search(String query) {\n log.debug(\"Request to search Colleges for query {}\", query);\n return StreamSupport\n .stream(collegeSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(collegeMapper::toDto)\n .collect(Collectors.toList());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the talks according to the date
public List<Talk> GetTalksbyDate(String date) { SQLiteHelper dbHelper = new SQLiteHelper(getActivity()); SQLiteDatabase db = dbHelper.getReadableDatabase(); //create the format of our date, in this case it will be like this : 08/06/2016 18:00:00 SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); Room room; Date startDate = new Date(); Date endDate = new Date(); List<Talk> talks = new ArrayList<Talk>(); String [] projection = { SQLModel.TalksEntry.KEY_ID, SQLModel.TalksEntry.KEY_TITLE, SQLModel.TalksEntry.KEY_DESCRIPTION, SQLModel.TalksEntry.KEY_STARTDATE, SQLModel.TalksEntry.KEY_ENDDATE, SQLModel.TalksEntry.KEY_IDROOM, SQLModel.TalksEntry.KEY_KEYWORDS, SQLModel.TalksEntry.KEY_TIMESTAMP }; //We want to find all the talks according to the date Cursor c = db.query(false, SQLModel.TalksEntry.Table_Talks, projection, "StartDate LIKE '%"+date+"%'", null, null, null, "StartDate ASC",null); c.moveToFirst(); //for each talk that we found, we put the talk in the array while(!c.isAfterLast()){ try { //convert the startDate and the endDate that in format String to the format Date according to our SimpleDateFormat startDate = sdf.parse(c.getString(3)); endDate = sdf.parse(c.getString(4)); } catch (ParseException e) { //Handle exception here, most of the time you will just log it. e.printStackTrace(); } //get the room of the talk room = searchRoombyId(Integer.parseInt(c.getString(5))); Talk talk = new Talk((Integer.parseInt(c.getString(0))),c.getString(1),c.getString(2),startDate,endDate,room,c.getString(6)); talks.add(talk); c.moveToNext(); } db.close(); return talks; }
[ "public List<Meeting> getMeetingsMatchDate(Date date) {\n List<Meeting> currentMeetings = new ArrayList<>();\n for (int i = 0; i < mMeetings.size(); i++) {\n Meeting meeting = mMeetings.get(i);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.FRANCE);\n if (sdf.format(meeting.getDate()).equals(sdf.format(date)))\n currentMeetings.add(meeting);\n }\n return currentMeetings;\n }", "List<News> getNewsForDate(Date date);", "public ArrayList<MyEvent> getEvents(MyDate myDate);", "public Iterable<BookingPerOption> showReportByDay(Calendar date);", "public List<Practical> getTodayPracticals( String date ){\r\n\t\t \r\n\t\t SQLiteDatabase db = this.getReadableDatabase(); //getting readable data base\r\n\t\t \r\n\t\t List<Practical> practicals = new ArrayList<Practical>();\r\n\t\t \r\n\t\t //raw query will returns the practicals which has the selected date to a cursor object\r\n\t\t Cursor cursor = db.rawQuery(\" select * from \" +TABLE_CONTACTS+ \" where \"+ KEY_DATE+ \" = ? \", new String[] {date});\r\n\t\t cursor.moveToFirst();\r\n\t\t \r\n\t\t //adding data to list from cursor\r\n\t\t while(!cursor.isAfterLast()){\r\n\t\t\t Practical practical = cursortopractical(cursor);\r\n\t\t\t practicals.add(practical);\r\n\t\t\t cursor.moveToNext();\r\n\t\t }\r\n\t\t \r\n\t\t cursor.close();\t//closing the cursor\r\n\t\t return practicals;\r\n\t\t\r\n\t }", "public List<Event> getEventsByDate(String day) {\n String[] args={day};\n ArrayList<Event> result = new ArrayList<Event>();\n SQLiteDatabase db = myDbHelper.getWritableDatabase();\n\n Cursor myCursor = db.rawQuery(\"SELECT * FROM entertainment WHERE date=? ORDER BY startTime\", args);\n\n try{\n if (myCursor.moveToFirst()){\n do{\n Event event = new Event();\n event.setTitle(myCursor.getString((myCursor.getColumnIndex(\"title\"))));\n event.setBody(myCursor.getString((myCursor.getColumnIndex(\"body\"))));\n event.setDate(myCursor.getString((myCursor.getColumnIndex(\"date\"))));\n event.setEndTime(myCursor.getString((myCursor.getColumnIndex(\"endTime\"))));\n event.setStartTime(myCursor.getString((myCursor.getColumnIndex(\"startTime\"))));\n event.setLocation(myCursor.getString((myCursor.getColumnIndex(\"location\"))));\n event.setStarred(myCursor.getInt((myCursor.getColumnIndex(\"starred\"))));\n\n result.add(event);\n }while(myCursor.moveToNext());\n }\n }finally{\n myCursor.close();\n }\n db.close();\n return result;\n }", "Iterable<DTimings> queryByCreatedDate(java.util.Date createdDate);", "@GetMapping(\"/day\")\n public List<MoodResponse> getMoodsForDay(Authentication auth, @RequestBody HashMap<String, LocalDate> requestBody) {\n ApplicationUser user = applicationUserRepository.findByUsername(auth.getName());\n List<Mood>userMoodData = moodRepository.findByUser(user, sort);\n List<MoodResponse> moodResponse = new ArrayList<>();\n for(Mood userMood : userMoodData){\n if(requestBody.get(\"date\").compareTo(userMood.getTimestamp().toLocalDate()) == 0){\n MoodResponse mood = new MoodResponse(userMood);\n moodResponse.add(mood);\n }\n else if(requestBody.get(\"date\").compareTo(userMood.getTimestamp().toLocalDate()) < 1){\n break;\n }\n }\n return moodResponse;\n }", "static LinkedList<Event> getEvent(LocalDateTime date)\n {\n\n LinkedList<Event> events = new LinkedList<>();\n for(Event e : EVENTS)\n {\n if(e.getMyDateTime().equals(date))\n {\n events.add(e);\n }\n }\n\n return events;\n }", "public String showSongs(Calendar fromDate, Calendar toDate){\r\n\t\tString retString = \"\";\r\n\t\tfromDate.add(Calendar.DAY_OF_MONTH, -1);\r\n\t\ttoDate.add(Calendar.DAY_OF_MONTH, 1);\r\n\t\t//BAD: wenn fromDate und toDate das gleiche Objekt sind, wird bei fromDate.add(...) und toDate.add(...) auf das gleiche Objekt zugegriffen\r\n\t\t//entweder zwei verschiedene Objekte übergeben und als Vorbedingung festlegen oder fromDate bzw. toDate clonen\r\n\t\t\r\n\t\tfor(Song r : this.songList){\r\n\r\n\t\t\tif(r.getEndDate() == null && (r.getStartDate().after(fromDate) && r.getStartDate().before(toDate))) {\r\n\r\n\t\t\t\tretString = retString + r.toString() + \"\\n\";\r\n\r\n\t\t\t}\r\n\t\t\telse if(r.getEndDate() != null && (r.getStartDate().after(fromDate) && r.getEndDate().before(toDate))){\r\n\t\t\t\tretString = retString + r.toString() + \"\\n\";\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn retString;\r\n\r\n\t}", "Workshop schedule(List<Talk> talks);", "public ArrayList<Tournament> fetchTournamentsOrderByDate() {\n String tableName = TournamentEntry.TABLE_NAME;\n String[] columns = new String[]{\n TournamentEntry._ID,\n TournamentEntry.COLUMN_TOURNAMENT_NAME,\n TournamentEntry.COLUMN_STATUS_ID,\n TournamentEntry.COLUMN_ENTRY_PRICE,\n TournamentEntry.COLUMN_HOUSE_CUT,\n TournamentEntry.COLUMN_HOUSE_PROFIT,\n TournamentEntry.COLUMN_START_DATE,\n TournamentEntry.COLUMN_END_DATE\n };\n String selection = TournamentEntry.COLUMN_STATUS_ID + \" = ?\";\n String[] selectionArgs = new String[]{\"4\"};\n Cursor c = query(tableName, columns, selection, selectionArgs, null, null, TournamentEntry.COLUMN_START_DATE + \" ASC\");\n\n ArrayList<Tournament> tournaments = new ArrayList<>();\n if (c.moveToFirst()) {\n do {\n tournaments.add(mapToTournament(c));\n }\n while (c.moveToNext());\n }\n return tournaments;\n }", "public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}", "public List<Order> getOrdersByDate(Date date);", "public ArrayList<Tweet> tweetsByDate(String date) {\r\n return this.dateTable.get(date);\r\n }", "public List<Meeting> findConvenedMeetingsByUser(String username) throws SQLException {\n\t\t\n\t\tList<Meeting> meetings = new ArrayList<Meeting>();\n\n\t\tString query = \"SELECT id,title,date,time,duration,max_participants,creator,COUNT(guest) AS participants from meeting left join invitation on id=id_meeting where creator = ? AND date>=curdate() AND (date!=curdate() OR time>=curtime()) GROUP BY id,title,date,duration,max_participants,creator ORDER BY date,time; \";\n\t\ttry (PreparedStatement pstatement = connection.prepareStatement(query);) {\n\t\t\tpstatement.setString(1, username);\n\t\t\ttry (ResultSet result = pstatement.executeQuery();) {\n\t\t\t\twhile (result.next()) {\n\t\t\t\t\tMeeting meeting = new Meeting();\n\t\t\t\t\tmeeting.setId(result.getInt(\"id\"));\n\t\t\t\t\tmeeting.setTitle(result.getString(\"title\"));\n\t\t\t\t\tmeeting.setDate(Date.valueOf(result.getString(\"date\")));\n\t\t\t\t\tmeeting.setTime(Time.valueOf(result.getString(\"time\")));\n\t\t\t\t\tmeeting.setDuration(result.getInt(\"duration\"));\n\t\t\t\t\tmeeting.setMaxParticipants(result.getInt(\"max_participants\"));\n\t\t\t\t\tmeeting.setParticipants(result.getInt(\"participants\"));\n\t\t\t\t\tmeeting.setCreator(result.getString(\"creator\"));\n\t\t\t\t\tmeetings.add(meeting);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn meetings;\n\t}", "public Vector<Event> getEvents(Date date) {\r\n\t\tSystem.out.println(\">> DataAccess: getEvents\");\r\n\t\tVector<Event> res = new Vector<Event>();\t\r\n\t\tTypedQuery<Event> query = db.createQuery(\"SELECT ev FROM Event ev WHERE ev.eventDate=?1\", Event.class); \r\n\t\tquery.setParameter(1, date);\r\n\t\tList<Event> events = query.getResultList();\r\n\t\tfor (Event ev:events){\r\n\t\t\tSystem.out.println(ev.toString());\t\t \r\n\t\t\tres.add(ev);\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public Vector<Event> getEvents(Date date) {\n\t\tSystem.out.println(\">> DataAccess: getEvents\");\n\t\tVector<Event> res = new Vector<Event>();\t\n\t\tTypedQuery<Event> query = db.createQuery(\"SELECT ev FROM Event ev WHERE ev.eventDate=?1\",Event.class); \n\t\tquery.setParameter(1, date);\n\t\tList<Event> events = query.getResultList();\n\t \t for (Event ev:events){\n\t \t System.out.println(ev.toString());\t\t \n\t\t res.add(ev);\n\t\t }\n\t \treturn res;\n\t}", "public List getDates();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Split up and find the seats based on availability in each row
private synchronized String[] splitAndReserveSeats(int numSeats) { String[] seatNumbers = new String[numSeats]; int itr = 0; for(int i=rows-1;i>=0&&numSeats>0;i--){ for(int j=0;j<columns&&numSeats>0;j++){ if(!seatArray[i][j]){ numSeats--; seatArray[i][j] = true; rowAvailability[i]--; seatNumbers[itr++] = (char)(i+65)+String.valueOf(j+1); } } } if(itr!=seatNumbers.length) return null; return seatNumbers; }
[ "private AvailableSeats getSpecifiedSeatsFromAvailableSeats(ArrayList<Seat> availableSeats, int numSeats, int seatNumber, String rowName) {\r\n int length = availableSeats.size();\r\n int current=0,left=0,right=0;\r\n for(current=0;current<length;current++){\r\n if(availableSeats.get(current).getSeatNumber()==seatNumber)\r\n break;\r\n }\r\n if(current==length)\r\n return null;\r\n if(current==0)\r\n left=current;\r\n else if(availableSeats.get(current).isAisle()&&availableSeats.get(current-1).isAisle())\r\n left=current;\r\n else {\r\n for (left=current-1;left>=0;left--){\r\n if(availableSeats.get(left+1).getSeatNumber()-availableSeats.get(left).getSeatNumber()>1){\r\n left++;\r\n break;\r\n }\r\n if(availableSeats.get(left).isAisle()==true)\r\n break;\r\n }\r\n }\r\n\r\n if(current==length-1)\r\n right=current;\r\n else if(availableSeats.get(current).isAisle()&&availableSeats.get(current+1).isAisle())\r\n right=current;\r\n else{\r\n for (right=current+1;right<length;right++){\r\n if(availableSeats.get(right).getSeatNumber()-availableSeats.get(right-1).getSeatNumber()>1){\r\n right--;\r\n break;\r\n }\r\n if(availableSeats.get(right).isAisle()==true)\r\n break;\r\n }\r\n }\r\n if(right-left+1<numSeats)\r\n return null;\r\n if(current-left+1>=numSeats) {\r\n left = current - numSeats + 1;\r\n right = current;\r\n }else\r\n right=left+numSeats-1;\r\n HashMap<String,ArrayList<Integer>> proposedSeats = new HashMap<>();\r\n proposedSeats.put(rowName,new ArrayList<>());\r\n for(int x=left;x<=right;x++)\r\n proposedSeats.get(rowName).add(availableSeats.get(x).getSeatNumber());\r\n AvailableSeats result = new AvailableSeats();\r\n result.setAvailableSeats(proposedSeats);\r\n return result;\r\n }", "private void initSeats() {\n\t\tavailableSeats = new PriorityQueue<Seat>();\n\t\treservedSeats = new ArrayList<Seat>();\n\t\t//first row through last row\n\t\tfor(int row = 1; row <= 27; row++) {\n\t\t\t//left section to right section\n\t\t\tfor(Seat.Section sect : Seat.Section.values()) {\n\t\t\t\tswitch (sect) {\n\t\t\t\t//left section has seat numbers 122-128 \n\t\t\t\t//except for last row which has seats 127-128\n\t\t\t\tcase HouseLeft:\n\t\t\t\t\tint seatStart = (row < 27) ? 122 : 127;\n\t\t\t\t\tfor(int seatNum = seatStart; seatNum <= 128; seatNum++) {\n\t\t\t\t\t\tavailableSeats.add(new Seat(sect, row, seatNum));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t//middle section has seat numbers 108-121\n\t\t\t\t//except has no last 3 rows\n\t\t\t\tcase HouseMiddle:\n\t\t\t\t\tif(row < 25) {\n\t\t\t\t\t\tfor(int seatNum = 108; seatNum <= 121; seatNum++) {\n\t\t\t\t\t\t\tavailableSeats.add(new Seat(sect, row, seatNum));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t//right section has seat numbers:\n\t\t\t\t//no rows 1-2\n\t\t\t\t//101-106 for row 3\n\t\t\t\t//101-107 for rows 4-26\n\t\t\t\t//101-104 and 116-118 for last row\n\t\t\t\tcase HouseRight:\n\t\t\t\t\tif(row > 2 && row != 27) {\n\t\t\t\t\t\tint seatStop = (row != 3)? 107 : 106;\n\t\t\t\t\t\tfor(int seatNum = 101; seatNum <= seatStop; seatNum++) {\n\t\t\t\t\t\t\tavailableSeats.add(new Seat(sect, row, seatNum));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(row == 27) {\n\t\t\t\t\t\tfor(int seatNum = 101; seatNum <= 104; seatNum++) {\n\t\t\t\t\t\t\tavailableSeats.add(new Seat(sect, row, seatNum));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor(int seatNum = 116; seatNum <= 118; seatNum++) {\n\t\t\t\t\t\t\tavailableSeats.add(new Seat(sect, row, seatNum));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttotalSeats = availableSeats.size();\n\t}", "List<SeatDetails> findAvailableSeats();", "private synchronized String[] findBestSeats(int numSeats) {\n\t\tString[] seatNumbers = null;\n\t\tfor(int i=rows-1;i>=0;i--){\n\t\t\tif(rowAvailability[i]>=numSeats) {\n\t\t\t\tseatNumbers = holdSeatsInRow(i, numSeats);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(seatNumbers==null){\n\t\t\tseatNumbers = splitAndReserveSeats(numSeats);\n\t\t}\n\t\treturn seatNumbers;\n\t}", "private SeatInfo findSeatsAtRow(int numSeats, SeatingArrangement level , int rowId){\n\t\tSeatInfo[] seats = SystemData.getSeats()[rowId];\n\t\tint countSeats = 0;\n\t\t\n\t\tfor(int counter = 0; counter < seats.length; counter++){\n\t\t\tif( seats[counter].getStatus().equals(BookingStatus.AVAILABLE) ){\n\t\t\t\tcountSeats++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountSeats = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif( countSeats == numSeats ){\n\t\t\t\tint startSeatId = counter - numSeats + 1;\n\t\t\t\tseats[startSeatId].setSeatId(startSeatId);\n\t\t\t\treturn seats[startSeatId];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public ArrayList<Seat> getAllAvailableSeats() {\n ArrayList<Seat> allAvailableSeats = new ArrayList<>();\n\n for (Row r : this.theater.getAllRows()) {\n allAvailableSeats.addAll(r.getAllAvailableSeats());\n }\n return allAvailableSeats;\n }", "private synchronized String[] holdSeatsInRow(int r, int numSeats) {\n\t\tString[] seatNumbers = new String[numSeats];\n\t\tint startIndex = -1;\n\t\tint count = 0;\n\t\tfor(int i=0;i<columns && count<numSeats;i++){\n\t\t\tif(!seatArray[r][i]){\n\t\t\t\tif(startIndex==-1)\n\t\t\t\t\tstartIndex = i;\n\t\t\t\telse\n\t\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tstartIndex = -1;\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif(startIndex==-1) return null;\n\t\tfor(int i=startIndex;i<startIndex+numSeats;i++){\n\t\t\tseatArray[r][i] = true;\n\t\t\tseatNumbers[i-startIndex] = (char)(r+65)+String.valueOf(i+1); \n\t\t}\n\t\trowAvailability[r] -= numSeats;\n\t\treturn seatNumbers;\n\t}", "public List<String> unsoldLaunchSeats() {\n \n List<String> soldedSeats = Arrays.asList(launchSalseSeatImplDao.getTotalSoldedSeatsOnLaunchiOnCritera(launchAvailableSeat.lau_ava_seatID).split(\",\"));\n System.out.println(\"Solded seats size : \"+soldedSeats.size() +\" \"+\" velu from 0 positions \"+soldedSeats.get(0));\n List<String> availableSeatList = Arrays.asList(launchAvailableSeat.seatName.split(\",\"));\n\n List<String> unsold = new ArrayList<>();\n if (soldedSeats != null) {\n for (int i = 0; i < availableSeatList.size(); i++) {\n\n if (!soldedSeats.contains(availableSeatList.get(i))) {\n\n unsold.add(availableSeatList.get(i));\n }\n }\n } else {\n unsold = availableSeatList;\n }\n\n return unsold;\n\n }", "private List<SeatInfo> findRandomSeats( int numSeats , SeatingArrangement level ){\n\t\tList<SeatInfo> list = new ArrayList<SeatInfo>();\n\t\tboolean seatAssigned = false;\n\t\tint counter = level.startIndex();\n\t\twhile( !seatAssigned && counter <= level.endIndex()){\n\t\t\tSeatInfo[] seats = SystemData.getSeats()[counter];\n\t\t\tint innerCounter = 0;\n\t\t\twhile( !seatAssigned && innerCounter < seats.length){\n\t\t\t\tSeatInfo seat = seats[innerCounter];\n\t\t\t\tif( seat.getStatus().equals(BookingStatus.AVAILABLE) ){\n\t\t\t\t\tseat.setStatus(BookingStatus.HOLD);\n\t\t\t\t\tseat.setSeatId(innerCounter);\n\t\t\t\t\tseat.setRowId(counter);\n\t\t\t\t\tlist.add(seat);\n\t\t\t\t\t\n\t\t\t\t\tif( list.size() == numSeats ){\n\t\t\t\t\t\tseatAssigned = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinnerCounter++;\n\t\t\t}\n\t\t\t\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public ArrayList<Seat> getSeatsFromScreenInfo(ScreenInfo screenInfo){\r\n ArrayList<Seat> result = new ArrayList<>();\r\n String name = screenInfo.getName();\r\n Seat seat;\r\n for(Map.Entry<String, RowInfo> row : screenInfo.getSeatInfo().entrySet()){\r\n for(int seatNumber=0;seatNumber<row.getValue().getNumberOfSeats();seatNumber++) {\r\n seat = new Seat(name, row.getKey(), seatNumber, false, row.getValue().getAisleSeats().contains(seatNumber));\r\n result.add(seat);\r\n }\r\n }\r\n return result;\r\n }", "private List<SeatInfo> getSeatsList(SeatInfo startSeat, int numSeats){\n\t\tList<SeatInfo> seatList = new ArrayList<SeatInfo>();\n\t\tint rowId = startSeat.getRowId();\n\t\tint seatId = startSeat.getSeatId();\n\t\tSeatInfo[] seats = SystemData.getSeats()[rowId];\n\t\tint counter = 0;\n\t\twhile( counter < numSeats ){\n\t\t\tSeatInfo seat = seats[seatId+counter];\n\t\t\tseat.setStatus(BookingStatus.HOLD);\n\t\t\tseat.setSeatId(seatId+counter);\n\t\t\tseat.setRowId(rowId);\n\t\t\tseatList.add(seat);\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\treturn seatList;\n\t}", "@Override\r\n\tpublic List<Aircraft> findAircraftBySeats(int seats) {\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 seats number.\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\t\r\n\t\tfor(Aircraft x : airCrafts)\r\n\t\t{\r\n\t\t\tif(x.getSeats() >= seats)\r\n\t\t\t\toutput.add(x);\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "private void assignSeats() {\n\t\tfor (String party : this.candidates.keySet()) {\n\t\t\tint seats = 0;\n\t\t\tif (this.seats_first_round.containsKey(party))\n\t\t\t\tseats += this.seats_first_round.get(party);\n\t\t\tif (this.seats_second_round.containsKey(party))\n\t\t\t\tseats += this.seats_second_round.get(party);\n\t\t\t\n\t\t\tArrayList<String> candidates = this.candidates.get(party);\n\t\t\tif (seats > candidates.size())\n\t\t\t\tseats = candidates.size();\n\t\t\tthis.placement.put(party, (LinkedList<String>) new LinkedList<String>(candidates.subList(0, seats)));\n\t\t}\n\t}", "public List<Seat> getOccupiedSeats() {\r\n List<Seat> occupiedSeats = new ArrayList<>();\r\n for (Seat s : seats) {\r\n if (s.isOccupied()) {\r\n occupiedSeats.add(s);\r\n }\r\n }\r\n return occupiedSeats;\r\n }", "List<Seat> bestSeats();", "@Override\r\n\tpublic List<Aircraft> findAircraftBySeats(int seats) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tList<Aircraft> aircraftSeats = new ArrayList<Aircraft>(); \r\n\t\tfor(int i=0; i<aircraft.size(); i++) {\r\n\t\t\tif(aircraft.get(i).getSeats() >= seats) {\r\n\t\t\t\taircraftSeats.add(aircraft.get(i)); \r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} \r\n\r\n\t\treturn aircraftSeats;\r\n\t}", "public int getNumberAvailableSeats(){\n int out = Integer.MAX_VALUE;\n for(int i=0; i<flights.size();i++){\n for(int j=0; j<availabilities.size(); j++) {\n if (flights.get(i).getFlightNumber().equals(availabilities.get(j).getFlightNumber())) {\n if (availabilities.get(i).getNumberAvailableSeatsLeg1() < out) {\n out = availabilities.get(i).getNumberAvailableSeatsLeg1();\n }\n if (availabilities.get(i).getNumberAvailableSeatsLeg2() != null) {\n if (availabilities.get(i).getNumberAvailableSeatsLeg2() < out) {\n out = availabilities.get(i).getNumberAvailableSeatsLeg2();\n }\n }\n break;\n }\n }\n }\n return out;\n }", "@Transactional(isolation=Isolation.REPEATABLE_READ)\r\n public boolean reserveSeats(Seats seats, String screenName){\r\n String rowName;\r\n ArrayList<Seat> listOfSeatsToReserve = new ArrayList<>();\r\n for(Map.Entry<String,ArrayList<Integer>> row : seats.getSeats().entrySet()){\r\n rowName = row.getKey();\r\n for(Integer seatNumber : row.getValue()){\r\n Optional<Seat> optionalSeat = seatsRepository.findByScreenNameAndRowNameAndSeatNumberAndReserved(screenName, rowName, seatNumber, false);\r\n if(optionalSeat.isPresent())\r\n listOfSeatsToReserve.add(optionalSeat.get());\r\n else\r\n return false;\r\n }\r\n }\r\n for(Seat seat : listOfSeatsToReserve){\r\n seat.setReserved(true);\r\n seatsRepository.save(seat);\r\n }\r\n return true;\r\n }", "public List<String> getSeats(){\n\t\tList<String> seats = new ArrayList<String>();\r\n\t\tfor (int i = 1; i <= _seatDimension; i++) {\r\n\t\t\tfor (int j = 1; j <= _seatDimension; j++) {\r\n\t\t\t\tseats.add(Integer.toString(i) + \"\\t\" + Integer.toString(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn seats;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
interaction with backdrop //
@Test public void testClickOnBackdrop() { var prompt = openPrompt(); prompt.getBackdrop().click(); assertNoDisplayedModalDialog(); assertPromptInputNotApplied(); }
[ "public void cycleBackdrop() {\n \t\tRandom rand = new Random();\n \t\tint randBackdrop = rand.nextInt(backdrops.size());\n \t\tbackdrop = backdrops.get(randBackdrop);\n \t}", "void onDropped();", "void onDismissByBgPressed();", "@Override\n public final void downloadBackdrop(Context context) {\n super.downloadBackdrop(context);\n // also download the showtags backdrop\n if (mShowTags != null)\n mShowTags.downloadBackdrop(context);\n }", "public void windowBecameFront() \n {\n return; \n }", "public void windowBecameFront() { }", "void onExitAmbient();", "@Override\n public void actionPerformed(ActionEvent ae) {\n navigationView.getMainframe().updateFrame(ingredientControl.getView().getIngredientPanel());\n\n //back button listener in RIngredientPanel\n ingredientControl.getView().getIngredientPanel().getBackButton().addActionListener(new ActionListener() {\n //pass control back to mainPanel\n @Override\n public void actionPerformed(ActionEvent ae) {\n //pass control back to mainPanel\n navigationView.getMainframe().updateFrame(starterControl.getView().getMainPanel());\n }\n });\n }", "@Override\n public void actionPerformed(ActionEvent ae) {\n navigationView.getMainframe().updateFrame(recipeControl.getView().getRecipePanel());\n\n //back button listener in RecipePanel\n recipeControl.getView().getRecipePanel().getBackButton().addActionListener(new ActionListener() {\n //pass control back to mainPanel\n @Override\n public void actionPerformed(ActionEvent ae) {\n //pass control back to mainPanel\n navigationView.getMainframe().updateFrame(starterControl.getView().getMainPanel());\n }\n });\n }", "public String getBackdropUrl() {\n return backdropUrl;\n }", "public void setBackdropUrl(String backdropUrl) {\n this.backdropUrl = backdropUrl;\n }", "protected void onActivate() {\n \t\tif (!modal) {\n \t\t\tfixModal = true;\n \t\t\t// Deactivates the invisible modal dialog right after it was\n \t\t\t// accidentally activated by a Illustrator CS3 bug. Immediately\n \t\t\t// deactivating it does not work.\n \t\t\tinvokeLater(new Runnable() {\n \t\t\t\tpublic void run() {\n \t\t\t\t\tif (!isVisible()) {\n \t\t\t\t\t\t// Make sure that the focus goes back to whoever was\n \t\t\t\t\t\t// active before this invisible modal dialog got wrongly\n \t\t\t\t\t\t// activated.\n\t\t\t\t\t\tif (previousActiveDialog != null\n\t\t\t\t\t\t\t\t&& previousActiveDialog != ModalDialog.this)\n \t\t\t\t\t\t\tpreviousActiveDialog.setActive(true);\n \t\t\t\t\t\tsetActive(false);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t});\n \t\t} else {\n \t\t\tsuper.onActivate();\n \t\t}\n \t}", "public void back(ActionEvent e) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"episode.fxml\"));\n Stage backStage = (Stage)((Node)e.getSource()).getScene().getWindow();\n Parent root = loader.load();\n backStage.setScene(new Scene(root));\n\n EpisodeController controller = loader.getController();\n controller.settingLock();\n }", "public void run() {\n GifDrawable gifDrawable;\n GifImageView imageView = findViewById(R.id.backdrop);\n try {\n gifDrawable = new GifDrawable(getResources(), chooseEuroBeatBackdrop());\n imageView.setImageDrawable(gifDrawable);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void returnToPrev(){\r\n Stage stage = (Stage) exitButton.getScene().getWindow();\r\n stage.close();\r\n }", "void onAfterTransparentDlg(JQMPageEvent event);", "protected void onBSResume() {\n checkBSActivityRunning();\n mDrawer.addBSParentView(mInitialWaveform, mInitialDithering);// show\n // user UI\n // on back\n // screen\n isResumed = true;\n mCalled = true;\n }", "@FXML\n\tpublic void favPopUp(ActionEvent ae) {\n\n\t\tfinal Stage popUp = new Stage();\n\n\t\tpopUp.setTitle(\"Gerer\");\n\t\tpopUp.initModality(Modality.APPLICATION_MODAL);\n\n\t\tAnchorPane root;\n\n\t\ttry {\n\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(Constants.FAV_POPUP));\n\t\t\tFavPopUpControleur controller = new FavPopUpControleur(myfavs, diff_fav, this);\n\t\t\tfxmlLoader.setController(controller);\n\t\t\troot = fxmlLoader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tpopUp.setScene(scene);\n\t\t\tpopUp.initOwner(Main.mainStage);\n\t\t\tpopUp.show();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "public void mousePressed()\n{\n if(!welcomeFading)\n {\n welcomeFading = true;\n cp5.show();\n }\n if(!cp5.isMouseOver()) // check if were pressing a button\n {\n flock.AddAnimal(10, mouseX, mouseY);\n }\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Reads shots in the format (x.x, y.y)
public void read_shots(String path) { String script[]; try (BufferedReader br = new BufferedReader(new FileReader(path))) { String sCurrentLine; while ((sCurrentLine = br.readLine()) != null) { int xx= sCurrentLine.indexOf(","); double x,y; x=Double.valueOf(sCurrentLine.substring(1, xx)); y=Double.valueOf(sCurrentLine.substring(xx+1, sCurrentLine.length())); take_shot(new Vector2d(x,y)); } } catch (Exception e) { System.out.println("File not found or error while reading the file."); } }
[ "public DartShot[] getShots(int rot) {\n\t\t// Set up sources\n\t\tdouble[] fromLeft = {10.5, 8.5};\n\t\tdouble[] fromRight = {2.5, 8.5};\n\t\tdouble[] fromC = {2.5, 5.5};\n\t\tdouble[] from50 = {6.6, 8.5};\n\t\tdouble[] from30 = {8.5, 8.5};\n\t\tdouble[] from60 = {5.5, 8.5};\n\t\tdouble[] fromPipe = {7.0, 5.75};\n\t\t\n\t\tif( clipsByRotation == null) { \n\t\t\treturn new DartShot[0];\n\t\t}\n\t\t\n\t\t//Format the return data\n\t\tDartShot[] returnData = new DartShot[clipsByRotation.get(rot).size()];\n\t\tfor(int i=0; i < clipsByRotation.get(rot).size(); i++) {\n\t\t\treturnData[i] = new DartShot();\n\t\t\tDartClip theClip = clipsByRotation.get(rot).elementAt(i);\n\t\t\t\n\t\t\tdouble[] fromShot, toShot;\n\t\t\tint fromIndex, toIndex;\n\t\t\tboolean tip = false;\n\t\t\t\t\t\t\n\t\t\t// Start massive case analysis\n\t\t\tif( theClip.getSetString().equals(\"MS\") || theClip.getSetString().equals(\"HB LS\") ){\n\t\t\t\t//Set source\n\t\t\t\tfromShot = fromLeft;\n\t\t\t\tfromIndex = DartShot.LS_SHOT;\n\t\t\t\t\n\t\t\t\t// Set Dest\n\t\t\t\tif( theClip.getShotString().equals(\"SHARP\")) {\n\t\t\t\t\ttoShot = new double[]{3, 13.25};\n\t\t\t\t\ttoIndex = DartShot.SHARP;\n\t\t\t\t} else if( theClip.getShotString().equals(\"DEEP CROSS\")) {\n\t\t\t\t\ttoShot = new double[]{3, 18};\n\t\t\t\t\ttoIndex = DartShot.DEEP_CROSS;\n\t\t\t\t} else if( theClip.getShotString().equals(\"SEAM\")) {\n\t\t\t\t\ttoShot = new double[]{6.75, 18};\n\t\t\t\t\ttoIndex = DartShot.SEAM;\t\t\t\t\t\n\t\t\t\t} else if( theClip.getShotString().equals(\"BACK DOOR\")) {\n\t\t\t\t\ttoShot = new double[]{9, 18};\n\t\t\t\t\ttoIndex = DartShot.BACKDOOR;\n\t\t\t\t} else if( theClip.getShotString().equals(\"LINE\")) {\n\t\t\t\t\ttoShot = new double[]{10.5, 18};\n\t\t\t\t\ttoIndex = DartShot.LINE;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP SHARP\")) {\n\t\t\t\t\ttoShot = new double[]{3.5, 11.5};\n\t\t\t\t\ttoIndex = DartShot.TIP_SHARP;\n\t\t\t\t\ttip = true;\n\t\t\t\t}else if( theClip.getShotString().equals(\"TIP POT\")) {\n\t\t\t\t\ttoShot = new double[]{7, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_POT;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP LINE\")) {\n\t\t\t\t\ttoShot = new double[]{10.25, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_LINE;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't blow up if shot is not tagged, just skip drawing it by making SHOT_TO = SHOT_FROM\n\t\t\t\t\tSystem.err.println(\"Exception: Unknown or Untagged shot: \" + theClip.getShotString());\n\t\t\t\t\ttoShot = fromShot;\n\t\t\t\t\ttoIndex = fromIndex;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if( theClip.getSetString().equals(\"72\") || theClip.getSetString().equals(\"C\") || \n\t\t\t\t\t\ttheClip.getSetString().equals(\"HB RS\") || theClip.getSetString().equals(\"HB C\")){\n\t\t\t\t// Set source\n\t\t\t\tif( theClip.getSetString().equals(\"72\") || theClip.getSetString().equals(\"HB RS\") ) {\n\t\t\t\t\tfromShot = fromRight;\n\t\t\t\t\tfromIndex = DartShot.RS_SHOT;\n\t\t\t\t} else { \n\t\t\t\t\tfromShot = fromC;\n\t\t\t\t\tfromIndex = DartShot.RS_SHOT;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Set Dest\n\t\t\t\tif( theClip.getShotString().equals(\"SHARP\")) {\n\t\t\t\t\ttoShot = new double[]{10, 13.25};\n\t\t\t\t\ttoIndex = DartShot.SHARP;\t\t\t\n\t\t\t\t} else if( theClip.getShotString().equals(\"DEEP CROSS\")) {\n\t\t\t\t\ttoShot = new double[]{10, 18};\n\t\t\t\t\ttoIndex = DartShot.DEEP_CROSS;\n\t\t\t\t} else if( theClip.getShotString().equals(\"SEAM\")) {\n\t\t\t\t\ttoShot = new double[]{6.25, 18};\n\t\t\t\t\ttoIndex = DartShot.SEAM;\n\t\t\t\t} else if( theClip.getShotString().equals(\"BACK DOOR\")) {\n\t\t\t\t\ttoShot = new double[]{4, 18};\n\t\t\t\t\ttoIndex = DartShot.BACKDOOR;\n\t\t\t\t} else if( theClip.getShotString().equals(\"LINE\")) {\n\t\t\t\t\ttoShot = new double[]{2.5, 18};\n\t\t\t\t\ttoIndex = DartShot.LINE;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP SHARP\")) {\n\t\t\t\t\ttoShot = new double[]{9.5, 11.5};\n\t\t\t\t\ttoIndex = DartShot.TIP_SHARP;\n\t\t\t\t\ttip = true;\n\t\t\t\t}else if( theClip.getShotString().equals(\"TIP POT\")) {\n\t\t\t\t\ttoShot = new double[]{6, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_POT;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP LINE\")) {\n\t\t\t\t\ttoShot = new double[]{2.75, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_LINE;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't blow up if shot is not tagged, just skip drawing it by making SHOT_TO = SHOT_FROM\n\t\t\t\t\tSystem.err.println(\"Exception: Unknown or Untagged shot: \" + theClip.getShotString());\n\t\t\t\t\ttoShot = fromShot;\n\t\t\t\t\ttoIndex = fromIndex;\n\t\t\t\t}\n\t\t\t} else if( theClip.getSetString().equals(\"50\") || theClip.getSetString().equals(\"30\") || theClip.getSetString().equals(\"60\")){\n\t\t\t\t// Set source\n\t\t\t\tif( theClip.getSetString().equals(\"50\") ) {\n\t\t\t\t\tfromShot = from50;\n\t\t\t\t\tfromIndex = DartShot.FIFTY_SHOT;\n\t\t\t\t} else if (theClip.getSetString().equals(\"30\")) {\n\t\t\t\t\tfromShot = from30;\n\t\t\t\t\tfromIndex = DartShot.THIRTY_SHOT;\n\t\t\t\t} else {\n\t\t\t\t\tfromShot = from60;\n\t\t\t\t\tfromIndex = DartShot.SIXTY_SHOT;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Set Dest\n\t\t\t\tif( theClip.getShotString().equals(\"5\")) {\n\t\t\t\t\ttoShot = new double[]{3.0, 14};\n\t\t\t\t\ttoIndex = DartShot.FIVE;\n\t\t\t\t} else if( theClip.getShotString().equals(\"5/6\")) {\n\t\t\t\t\ttoShot = new double[]{5, 17};\n\t\t\t\t\ttoIndex = DartShot.FIVE_SIX;\n\t\t\t\t} else if( theClip.getShotString().equals(\"6\")) {\n\t\t\t\t\ttoShot = new double[]{6.6, 17.5};\n\t\t\t\t\ttoIndex = DartShot.SIX;\n\t\t\t\t} else if( theClip.getShotString().equals(\"1/6\")) {\n\t\t\t\t\ttoShot = new double[]{8, 17};\n\t\t\t\t\ttoIndex = DartShot.ONE_SIX;\n\t\t\t\t} else if( theClip.getShotString().equals(\"1\")) {\n\t\t\t\t\ttoShot = new double[]{10, 14};\n\t\t\t\t\ttoIndex = DartShot.ONE;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP 4\")) {\n\t\t\t\t\ttoShot = new double[]{3.5, 11.75};\n\t\t\t\t\ttoIndex = DartShot.TIP_FOUR;\n\t\t\t\t\ttip = true;\n\t\t\t\t}else if( theClip.getShotString().equals(\"TIP POT\")) {\n\t\t\t\t\ttoShot = new double[]{6.5, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_POT;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP 2\")) {\n\t\t\t\t\ttoShot = new double[]{9.5, 11.75};\n\t\t\t\t\ttoIndex = DartShot.TIP_TWO;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't blow up if shot is not tagged, just skip drawing it by making SHOT_TO = SHOT_FROM\n\t\t\t\t\tSystem.err.println(\"Exception: Unknown or Untagged shot: \" + theClip.getShotString());\n\t\t\t\t\ttoShot = fromShot;\n\t\t\t\t\ttoIndex = fromIndex;\n\t\t\t\t}\n\t\t\t} else if( theClip.getSetString().equals(\"Pipe\") ){\n\t\t\t\t// Set source\n\t\t\t\tfromShot = fromPipe;\n\t\t\t\tfromIndex = DartShot.PIPE_SHOT;\n\t\t\t\t\n\t\t\t\t// Set Dest\n\t\t\t\tif( theClip.getShotString().equals(\"5\")) {\n\t\t\t\t\ttoShot = new double[]{3, 15.5};\n\t\t\t\t\ttoIndex = DartShot.FIVE;\n\t\t\t\t} else if( theClip.getShotString().equals(\"5/6\")) {\n\t\t\t\t\ttoShot = new double[]{4.5, 17.5};\n\t\t\t\t\ttoIndex = DartShot.FIVE_SIX;\n\t\t\t\t} else if( theClip.getShotString().equals(\"6\")) {\n\t\t\t\t\ttoShot = new double[]{7, 17.5};\n\t\t\t\t\ttoIndex = DartShot.SIX;\t\t\t\n\t\t\t\t} else if( theClip.getShotString().equals(\"1/6\")) {\n\t\t\t\t\ttoShot = new double[]{8.5, 17.5};\n\t\t\t\t\ttoIndex = DartShot.ONE_SIX;\n\t\t\t\t} else if( theClip.getShotString().equals(\"1\")) {\n\t\t\t\t\ttoShot = new double[]{10, 15.5};\n\t\t\t\t\ttoIndex = DartShot.ONE;\t\t\t\t\t\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP 4\")) {\n\t\t\t\t\ttoShot = new double[]{3.5, 11.75};\n\t\t\t\t\ttoIndex = DartShot.TIP_FOUR;\n\t\t\t\t\ttip = true;\n\t\t\t\t}else if( theClip.getShotString().equals(\"TIP POT\")) {\n\t\t\t\t\ttoShot = new double[]{6.75, 12};\n\t\t\t\t\ttoIndex = DartShot.TIP_POT;\n\t\t\t\t\ttip = true;\t\t\t\t\t\n\t\t\t\t} else if( theClip.getShotString().equals(\"TIP 2\")) {\n\t\t\t\t\ttoShot = new double[]{9.5, 11.75};\n\t\t\t\t\ttoIndex = DartShot.TIP_TWO;\n\t\t\t\t\ttip = true;\n\t\t\t\t} else {\n\t\t\t\t\t// Don't blow up if shot is not tagged, just skip drawing it by making SHOT_TO = SHOT_FROM\n\t\t\t\t\tSystem.err.println(\"Exception: Unknown or Untagged shot: \" + theClip.getShotString());\n\t\t\t\t\ttoShot = fromShot;\n\t\t\t\t\ttoIndex = fromIndex;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// This happens when we have aces, BHE, etc.\n\t\t\t\t// Set coordinates so that no line is drawn.\n\t\t\t\tfromShot = new double[]{0, 0};\n\t\t\t\ttoShot = fromShot;\n\t\t\t\tfromIndex = 0;\n\t\t\t\ttoIndex = 0;\n\t\t\t}\n\t\t\t\n\t\t\treturnData[i].setShot(fromIndex, fromShot, toIndex, toShot, tip, rot);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn returnData;\t\n\t}", "private static void parse(String[] lines) {\n for (int i = 0; i < lines.length; i += 3) {\n String name = lines[i];\n String desc = lines[i + 1];\n String[] tags = Utility.trimStringArray(lines[i + 2].split(\",\"));\n pictures.add(new Picture(name, desc, tags));\n }\n }", "private static List<Rectangle> readFile(String path) throws IOException {\n\t\tif (path == null || path.isEmpty()) {\n\t\t\treturn new ArrayList<Rectangle>();\n\t\t}\n\t\t\n\t\tFileInputStream fis = new FileInputStream(path);\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(fis));\n\t\t\n\t\tString line = null;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\t\n\t\tbr.close();\n\t\t\n\t\t//parse Rectangle entities\n\t\tList<Rectangle> recs = parseRectangles(lines);\n\t\t\t\t\n\t\treturn recs;\n\t}", "public int getNumShots() { return numShots; }", "List<Shot> getShotList();", "public void loadShapePoints () {\n BufferedReader reader = null;\n float height = drawView.getCanvasHeight();\n float width = drawView.getCanvasWidth();\n float tmp = 0;\n try {\n reader = new BufferedReader(new InputStreamReader(getAssets().open(protocol+cornice)));\n String mLine;\n for (int elem=0; (mLine = reader.readLine()) != null; elem++) {\n mLine = mLine.replaceAll(\"\\\\s+\",\"\");\n if (elem%2==0) {\n tmp = Float.parseFloat(mLine);\n } else {\n float x = (width/2540)*(Float.valueOf(tmp));\n float y = (height/1109)*(Float.valueOf(Float.parseFloat(mLine)));\n Pair p1 = new Pair(x, y);\n points.add(p1);\n }\n }\n } catch (IOException e) { } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) { }\n }\n }\n drawView.setShape(points);\n }", "void findCogs(File input, int mode, Mappings map){\n int lineNum=0;\n\n BufferedReader reader;\n try {\n Path path =Paths.get(input.getAbsolutePath());\n System.out.println(\"Path: \"+input.getAbsolutePath());\n reader = Files.newBufferedReader(path,ENCODING);\n String line = null;\n while ((line = reader.readLine()) != null) {\n lineNum++;\n \n if(lineNum==1){\n String[] gensize=line.split(\" \");\n String c=gensize[gensize.length-1];\n System.out.println(\"String c COG: \"+c);\n String [] coord=c.split(\"\\\\.\\\\.\");\n System.out.println(\"coord size: \"+coord.length);\n minCoordinate=Integer.parseInt(coord[0]);\n maxCoordinate=Integer.parseInt(coord[1]);\n }\n \n if(lineNum>3){\n String[] st=line.split(\"\\t\");\n String[] coord=st[0].split(\"\\\\..\");\n int x=Integer.parseInt(coord[0]), y=Integer.parseInt(coord[1]);\n\n String cogName=\"\";\n if(mode==0){\n String pattern = \"(^COG)(\\\\d+)(\\\\D+)\";\n \n if(st[7].contains(\",\"))\n st[7]=st[7].split(\",\")[0];\n cogName=st[7].replaceAll(pattern, \"$1$2\");\n }\n else{\n cogName=st[3];\n }\n\n Triplet<Integer,Integer,String> t=new Triplet<Integer,Integer,String>(x,y,cogName);\n cogs.add(t);\n\n if(map.geneOgMapping.containsKey(cogName))\n ancogs.add(t);\n }\n }\n reader.close();\n }catch(IOException ioe)\n {\n System.err.println(\"IOException: \" + ioe.getMessage());\n }\n }", "public void load(File file) throws IOException{\n double x;\n double y;\n\n try (Scanner fileIn = new Scanner(file)) {\n while (fileIn.hasNextLine()) {\n // create an array out of the read line: the first element is the x value, the\n // second element is the y value\n List<String> xAndY = Arrays.asList(fileIn.nextLine().split(\",\"));\n if (xAndY.size() != 2) { // This would mean file is formatted incorrectly\n throw new NumberFormatException(\"File is formatted incorrectly: Must have \" +\n \"only X and Y coordinates\");\n }\n if (Double.valueOf(xAndY.get(0)) < 0 || Double.valueOf(xAndY.get(0)) > 1 ||\n Double.valueOf(xAndY.get(1)) < 0 || Double.valueOf(xAndY.get(1)) > 1) {\n throw new NumberFormatException(\"File is formatted incorrectly: point \" +\n \"coordinates not between 0 and 1\");\n }\n x = Double.valueOf(xAndY.get(0)) * Dot2DotController.CANVAS_WIDTH;\n y = Math.abs(Double.valueOf(xAndY.get(1)) * Dot2DotController.CANVAS_HEIGHT -\n Dot2DotController.CANVAS_HEIGHT);\n dots.add(new Dot(x, y));\n }\n }\n }", "private void posRead() throws IOException {\n\t\tFile file = new File(fullFileName());\n\t\tString line;\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\tStringBuffer fileText = new StringBuffer();\n\t\twhile((line = reader.readLine()) != null) {\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\twhile (st.hasMoreTokens()) {\n \t\tString tokenAndPos = st.nextToken();\n \t\tint slashIndex = tokenAndPos.lastIndexOf('/');\n \t\tif (slashIndex <= 0) throw new IOException(\"invalid data\");\n \t\tString token = tokenAndPos.substring(0,slashIndex);\n \t\tString pos = tokenAndPos.substring(1+slashIndex).intern();\n \t\tint start = this.length();\n \t\tthis.append(token);\n \t\tif (st.hasMoreTokens())\n \t\t\tthis.append(\" \");\n \t\telse\n \t\t\tthis.append(\" \\n\");\n \t\tint end = this.length();\n \t\tSpan span = new Span(start,end);\n \t\tthis.annotate(\"token\", span, new FeatureSet());\n \t\tthis.annotate(\"constit\", span, new FeatureSet(\"cat\", pos));\n \t}\n\t\t}\n\t}", "private void readFile(String filename) {\r\n try {\r\n FileInputStream input = new FileInputStream(filename);\r\n Scanner sc = new Scanner(input);\r\n while (sc.hasNext()) {\r\n x[m] = sc.nextDouble();\r\n y[m] = sc.nextDouble();\r\n m++;\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public void getCoords(){\n\t\ttry{\n\t\t\tScanner inn = new Scanner(new File(\"Input_data/coordinates.txt\"));\n\t\t\tint coordsIndex = 0;\n\t\t\twhile(inn.hasNext()){\n\t\t\t\tString[] lest = inn.nextLine().split(\"\\t\");\n\t\t\t\tdouble lat = Double.parseDouble(lest[0]);\n\t\t\t\tdouble lon = Double.parseDouble(lest[1]);\n\t\t\t\tlat = lat / 1000000;\n\t\t\t\tlon = lon / 1000000;\n\t\t\t\tcoords[coordsIndex++] = lat;\n\t\t\t\tcoords[coordsIndex++] = lon;\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Kan ikke lese filen coords.txt.\");\n\t\t}\n\t}", "public static ArrayList<Point> ReadData(String filePath) throws FileNotFoundException{\n \n ArrayList<Point> points = new ArrayList<>();\n\n Scanner inputStream = new Scanner(new File(filePath));\n\n String[] xs = inputStream.nextLine().split(\" \");\n String[] ys = inputStream.nextLine().split(\" \");\n\n int min = Math.min(xs.length, xs.length);\n\n for(int i = 0 ;i < min; i++){\n double x = Float.parseFloat(xs[i]);\n double y = Float.parseFloat(ys[i]);\n points.add(new Point(x,y));\n }\n\n\n\n return points;\n\n }", "protected void loadAnnotations() {\n // protected Map<Shape,String> annotations = new HashMap<Shape,String>();\n if (file_chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {\n File file = file_chooser.getSelectedFile(); BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(file));\n String line = null, header = in.readLine();\n while ((line = in.readLine()) != null) {\n StringTokenizer st = new StringTokenizer(line, \",\");\n String name = Utils.decFmURL(st.nextToken()),\n\t type = Utils.decFmURL(st.nextToken()),\n\t\t\t params = Utils.decFmURL(st.nextToken());\n if (type.equals(\"Rectangle2D\")) {\n st = new StringTokenizer(params, \"|\"); double x0 = Double.parseDouble(st.nextToken()),\n\t y0 = Double.parseDouble(st.nextToken()),\n\t\t\t\t\t\t\t w = Double.parseDouble(st.nextToken()),\n\t\t\t\t\t\t\t h = Double.parseDouble(st.nextToken());\n annotations.put(new Rectangle2D.Double(x0, y0, w, h), name);\n\t } else throw new IOException(\"Cannot Handle Shape Type \\\"\" + type + \"\\\"\");\n }\n } catch (IOException ioe) { JOptionPane.showMessageDialog(file_chooser, \"IOException: \" + ioe, \"File Load Error\", JOptionPane.ERROR_MESSAGE);\n } finally { if (in != null) { try { in.close(); } catch (IOException ioe) { } } }\n }\n }", "public void setNumShots(int numShots) {\n this.numShots = numShots;\n }", "@SuppressWarnings(\"unchecked\")\n private void getGeneList(){\n try{\n BufferedReader in = new BufferedReader(new FileReader(filepath));\n String line;\n\n while((line=in.readLine())!=null){\n StringTokenizer st = new StringTokenizer(line,\"\\t\");\n list.add(st.nextToken());\n }\n\n for(int i=0; i<list.size(); i++){\n String name = list.elementAt(i).toString();\n if(!name.equalsIgnoreCase(\"empty\")&&!name.equalsIgnoreCase(\"blank\")&&!name.equalsIgnoreCase(\"missing\")&&!name.equalsIgnoreCase(\"none\")){\n int replicate=0;\n writeable++;\n if(name.toLowerCase().indexOf(\"_rep\")==-1){\n for(int j=i+1; j<list.size(); j++){\n String otherName = list.elementAt(j).toString();\n if(name.equals(otherName)){\n replicate++;\n otherName = otherName + \"_rep\" + (replicate+1);\n list.setElementAt(otherName, j);\n }\n }\n if(replicate!=0) list.setElementAt(new String(name + \"_rep1\"), i);\n }\n }\n }\n\n\n in.close();\n } catch(Exception e){}\n }", "public Picture[] readFile (Scanner reader) {\n Picture[] unsortedPics = new Picture[Integer.parseInt(reader.nextLine())];\n int i = 0;\n while (reader.hasNextLine()) {\n Picture picture = new Picture(i, reader.next(), reader.next(), reader.nextLine());\n unsortedPics[i] = picture;\n i++;\n }\n return unsortedPics;\n }", "java.lang.String getPic2();", "public void readFile(String path) throws InvalidPathException, IOException {\r\n\r\n tiles = new Tile[16];\r\n\r\n Path tpath = Paths.get(path);\r\n byte[] data = Files.readAllBytes(tpath);\r\n\r\n ByteBuffer buffer = ByteBuffer.wrap(data);\r\n\r\n // not played is -889274641\r\n // played -889266451\r\n int playedHex = buffer.getInt();\r\n boolean played;\r\n if (playedHex == -889274641) {\r\n played = false;\r\n } else if (playedHex == -889266451) {\r\n played = true;\r\n } else {\r\n throw new FilerException(\"File type incorrect\");\r\n }\r\n \r\n int numberOfTiles = buffer.getInt();\r\n time = buffer.getLong();\r\n\r\n // create bin of IDs and rotations to grab from for randomization\r\n ArrayList<Integer> randomIDs = new ArrayList<Integer>(); \r\n ArrayList<Integer> randomRotations = new ArrayList<Integer>(); \r\n\r\n for (int i = 0; i < numberOfTiles; i++) {\r\n randomIDs.add(i);\r\n randomRotations.add(i % 4);\r\n }\r\n Collections.shuffle(randomIDs); \r\n Collections.shuffle(randomRotations); \r\n\r\n\r\n for (int i = 0; i < numberOfTiles; i++) {\r\n int tileWrapperID = buffer.getInt();\r\n int degree = buffer.getInt();\r\n\r\n int numLines = buffer.getInt();\r\n\r\n float[][] lines = new float[numLines][4];\r\n\r\n for (int j = 0; j < numLines; j++) {\r\n for (int k = 0; k < 4; k++) {\r\n lines[j][k] = buffer.getFloat();\r\n }\r\n }\r\n\r\n // depending on if the file has been played, either load as it is, or randomize\r\n if (played) {\r\n tiles[i] = new Tile(lines, degree, i, tileWrapperID);\r\n } else {\r\n time = 0;\r\n tileWrapperID = randomIDs.remove(0);\r\n degree = randomRotations.remove(0);\r\n tiles[i] = new Tile(lines, degree, i, tileWrapperID);\r\n }\r\n }\r\n }", "public static List<List<Integer>> readGraphFromDotFile(String filename) throws Exception {\n BufferedReader br = new BufferedReader(new FileReader(filename));\n\n br.readLine();\n ArrayList<List<Integer>> graph = new ArrayList<>();\n\n int max = 0;\n\n String line;\n while ( (line = br.readLine()) != null && !\"}\".equals(line)) {\n String ls[] = line.split(\"->\");\n Integer from = Integer.parseInt(ls[0].trim());\n Integer to = Integer.parseInt(ls[1].trim());\n\n max = Math.max(max, from);\n max = Math.max(max, to);\n\n ensureSize(graph, from);\n\n List<Integer> neighbours = graph.get(from);\n if (neighbours == null)\n neighbours = new ArrayList<Integer>();\n\n neighbours.add(to);\n }\n\n ensureSize(graph, max);\n\n br.close();\n return graph;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Feature: familyRec getter for familyRec gets
public FSArray getFamilyRec() { if (GEDCOMType_Type.featOkTst && ((GEDCOMType_Type)jcasType).casFeat_familyRec == null) jcasType.jcas.throwFeatMissing("familyRec", "net.myerichsen.gedcom.GEDCOMType"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((GEDCOMType_Type)jcasType).casFeatCode_familyRec)));}
[ "String getFamily();", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public SubFamily getSubFamily() {\r\n return pic_.getSubFamily();\r\n }", "public String getFamilyPerson(String familyId);", "public Person[] getFamilyList() {\r\n\t\treturn fam.getFamilyList();\r\n\t}", "public byte[] getFamily() {\n return family;\n }", "public Vertex getFamily() {\n\t\treturn family;\n\t}", "public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getFamily2() {\n return family2;\n }", "com.google.protobuf.ByteString getFamily();", "public java.util.Map<java.lang.CharSequence,java.lang.CharSequence> getFamily2() {\n return family2;\n }", "public FamilyManager getFamilyManager(){\n return _mFamilyM;\n }", "public String getProductFamily()\n {\n return productFamily;\n }", "org.hl7.fhir.FamilyHistory getFamilyHistory();", "public String getFamilyName();", "public Person GetFather() {\r\n return father;\r\n }", "String getFamilyAnamnese();", "public String getFamilyName()\r\n {\r\n return familyName;\r\n }", "public Integer getFamilyId() {\r\n return familyId;\r\n }", "com.zzsong.netty.protobuff.two.ProtoData.Person.Gender getGender();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
creates diagnosis data with everything (more or less steps and all timepoints)
private void diagnosticData2() throws IOException { System.out.println("Diagnostic data2"); // remove("ALSFRS_Data.csv", steps+"_ALSFRS_DATA.csv",path, steps); // remove("SVC_Data.csv", steps+"_SVC_DATA.csv",path, steps); // remove("Vitals_Data.csv", steps+"_Vitals_DATA.csv",path, steps); String alsfrs = path+ "ALSFRS_Data.csv"; String svc = path + "SVC_Data.csv"; String Demo = path + "Demo_Data.csv"; String Vitals = path + "Vitals_Data.csv"; BufferedReader inALS = new BufferedReader(new FileReader(alsfrs)); BufferedReader inDemo = new BufferedReader(new FileReader(Demo)); BufferedReader inVitals = new BufferedReader(new FileReader(Vitals)); BufferedReader inSVC = new BufferedReader(new FileReader(svc)); BufferedWriter outTrain = new BufferedWriter(new FileWriter(diagnosisOutput+"DiagnoseData.csv")); String line1,line2,line3,line4; line1 = inSVC.readLine(); line2 = inALS.readLine(); line4 = inDemo.readLine(); line3 = inVitals.readLine(); String[] splitHeight = line3.split(",",-1); String[] split4 = line4.split(",",-1); String patient = split4[0].replace(' ', '_')+","; patient += split4[4].replace(' ', '_') + "," + split4[11].replace(' ', '_') + ","+ splitHeight[4].replace(' ', '_') + ","; String[] split = line1.split(",",-1); patient += split[2].replace(' ', '_').replace('%', 'P') + "," + split[5].replace(' ', '_')+ "," + split[6].replace(' ', '_') + "," + split[7].replace(' ', '_')+ ","; String[] split3 = line3.split(",",-1); patient += split3[2].replace(' ', '_') + "," + split3[3].replace(' ', '_')+ "," + split3[6].replace(' ', '_')+ "," + split3[7].replace(' ', '_')+ "," + split3[8].replace(' ', '_') + "," + split3[9].replace(' ', '_') + ","; String[] split2 = line2.split(",",-1); patient += split2[15].replace(' ', '_'); outTrain.write(patient+'\n'); int last = 0; ArrayList<String> lines1 = new ArrayList<String>(); while ((line1 = inSVC.readLine()) != null) { String[] splited = line1.split(",",-1); if(last == 0){ last = Integer.parseInt(splited[0]); lines1.add(line1); continue; } if(last == Integer.parseInt(splited[0])){ lines1.add(line1); }else{ ArrayList<String> lines2 = new ArrayList<String>(); while ((line2 = inALS.readLine()) != null) { String[] splitedALS = line2.split(",",-1); if(last == Integer.parseInt(splitedALS[0])){ lines2.add(line2); }else{ if(lines2.size() > 0){ ArrayList<String> lines3 = new ArrayList<String>(); while ((line3 = inVitals.readLine()) != null) { String[] splitedVitals = line3.split(",",-1); if(last == Integer.parseInt(splitedVitals[0])){ lines3.add(line3); }else{ if(lines3.size() > 0){ ArrayList<String> lines4 = new ArrayList<String>(); while ((line4 = inDemo.readLine()) != null) { String[] splitedDemo = line4.split(",",-1); if(last == Integer.parseInt(splitedDemo[0])){ lines4.add(line4); }else{ if(lines4.size() > 0){ if(last == 168510){ @SuppressWarnings("unused") int j = 0; } splitHeight = lines3.get(0).split(",",-1); split4 = lines4.get((lines4.size()-1)).split(",",-1); patient = last+ ","; patient += split4[4] + "," + split4[11] + ","+ splitHeight[4] + ","; int len = Math.min(lines1.size(), lines2.size()); len = Math.min(len, lines3.size()); for(int i=0 ; i < len; i++){ splitHeight = lines3.get(0).split(",",-1); split4 = lines4.get((lines4.size()-1)).split(",",-1); patient = last+ ","; patient += split4[4] + "," + split4[11] + ","+ splitHeight[4] + ","; split = lines1.get(((lines1.size()-len)+i)).split(",",-1); patient += normalize(3,split[2]) + "," + normalize(4,split[5]) + "," + normalize(5,split[6]) + "," + normalize(6,split[7])+","; split3 = lines3.get(((lines3.size()-len)+i)).split(",",-1); patient += normalize(7,split3[2]) + "," + normalize(8,split3[3]) + "," + normalize(9,split3[6]) + "," + normalize(10,split3[7]) + "," + normalize(11,split3[8]) + "," + normalize(12,split3[9]) + ","; split2 = lines2.get(((lines2.size()-len)+i)).split(",",-1); String discret = discretize(13,split2[15]); patient += discret; outTrain.write(patient+'\n'); } lines1 = new ArrayList<String>(); lines2 = new ArrayList<String>(); lines3 = new ArrayList<String>(); lines4 = new ArrayList<String>(); inDemo.close(); break; } } } inDemo = new BufferedReader(new FileReader(Demo)); inDemo.readLine(); inVitals.close(); break; } } } inVitals = new BufferedReader(new FileReader(Vitals)); inVitals.readLine(); inALS.close(); break; } } } inALS = new BufferedReader(new FileReader(alsfrs)); inALS.readLine(); last = Integer.parseInt(splited[0]); lines1.add(line1); } } inALS.close(); inSVC.close(); inDemo.close(); inVitals.close(); outTrain.close(); CSV2arff(diagnosisOutput,"DiagnoseData"); }
[ "private void diagnosticData() throws IOException {\n\t\tSystem.out.println(\"Diagnostic data\");\n\t\tremove(\"ALSFRS_Data.csv\", steps+\"_ALSFRS_DATA.csv\",path, steps);\n\t\tremove(\"SVC_Data.csv\", steps+\"_SVC_DATA.csv\",path, steps);\n\t\tremove(\"Vitals_Data.csv\", steps+\"_Vitals_DATA.csv\",path, steps);\n\n\t\tString alsfrs = path+ steps+ \"_ALSFRS_Data.csv\";\n\t\tString svc = path + steps + \"_SVC_Data.csv\";\n\t\tString Demo = path + \"Demo_Data.csv\";\n\t\tString Vitals = path + steps + \"_Vitals_Data.csv\";\n\n\t\tBufferedReader inALS = new BufferedReader(new FileReader(alsfrs));\n\t\tBufferedReader inDemo = new BufferedReader(new FileReader(Demo));\n\t\tBufferedReader inVitals = new BufferedReader(new FileReader(Vitals));\n\t\tBufferedReader inSVC = new BufferedReader(new FileReader(svc));\n\n\t\tBufferedWriter outTrain = new BufferedWriter(new FileWriter(diagnosisOutput+\"DiagnoseData.csv\"));\n\t\tBufferedWriter outReal = new BufferedWriter(new FileWriter(diagnosisOutput+\"DiagnoseDataReal.csv\"));\n\n\t\tString line1,line2,line3,line4;\n\t\tline1 = inSVC.readLine();\n\t\tline2 = inALS.readLine();\n\t\tline4 = inDemo.readLine();\n\t\tline3 = inVitals.readLine();\n\n\n\t\tString[] splitHeight = line3.split(\",\",-1);\n\t\tString[] split4 = line4.split(\",\",-1);\n\t\tString patient = split4[0].replace(' ', '_')+\",\";\n\t\tpatient += split4[4].replace(' ', '_') + \",\" + split4[11].replace(' ', '_') + \",\"+ splitHeight[4].replace(' ', '_') + \",\";\n\n\t\tString[] split = line1.split(\",\",-1);\n\t\tpatient += split[2].replace(' ', '_').replace('%', 'P') + \",\" + split[5].replace(' ', '_')+ \",\" +\n\t\t\t\tsplit[6].replace(' ', '_') + \",\" + split[7].replace(' ', '_')+ \",\";\n\t\tString[] split3 = line3.split(\",\",-1);\n\t\tpatient += split3[2].replace(' ', '_') + \",\" + split3[3].replace(' ', '_')+ \",\" + split3[6].replace(' ', '_')+ \",\"\n\t\t\t\t+ split3[7].replace(' ', '_')+ \",\" + split3[8].replace(' ', '_') + \",\" + split3[9].replace(' ', '_') + \",\";\n\t\tString[] split2 = line2.split(\",\",-1);\n\t\tpatient += split2[15].replace(' ', '_');\n\t\toutTrain.write(patient+'\\n');\n\t\toutReal.write(patient+'\\n');\n\n\n\t\tint last = 0;\n\t\tArrayList<String> lines1 = new ArrayList<String>();\n\t\twhile ((line1 = inSVC.readLine()) != null) {\n\t\t\tString[] splited = line1.split(\",\",-1);\n\t\t\tif(last == 0){\n\t\t\t\tlast = Integer.parseInt(splited[0]);\n\t\t\t\tlines1.add(line1);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(last == Integer.parseInt(splited[0])){\n\t\t\t\tlines1.add(line1);\n\t\t\t}else{\n\t\t\t\tArrayList<String> lines2 = new ArrayList<String>();\n\t\t\t\twhile ((line2 = inALS.readLine()) != null) {\n\t\t\t\t\tString[] splitedALS = line2.split(\",\",-1);\n\t\t\t\t\tif(last == Integer.parseInt(splitedALS[0])){\n\t\t\t\t\t\tlines2.add(line2);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(lines2.size() > 2){\n\t\t\t\t\t\t\tArrayList<String> lines3 = new ArrayList<String>();\n\t\t\t\t\t\t\twhile ((line3 = inVitals.readLine()) != null) {\n\t\t\t\t\t\t\t\tString[] splitedVitals = line3.split(\",\",-1);\n\t\t\t\t\t\t\t\tif(last == Integer.parseInt(splitedVitals[0])){\n\t\t\t\t\t\t\t\t\tlines3.add(line3);\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tif(lines3.size() > 2){\n\t\t\t\t\t\t\t\t\t\tArrayList<String> lines4 = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\t\twhile ((line4 = inDemo.readLine()) != null) {\n\t\t\t\t\t\t\t\t\t\t\tString[] splitedDemo = line4.split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\tif(last == Integer.parseInt(splitedDemo[0])){\n\t\t\t\t\t\t\t\t\t\t\t\tlines4.add(line4);\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\tif(lines4.size() > 0){\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(last == 168510){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t@SuppressWarnings(\"unused\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tint j = 0;\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\tsplitHeight = lines3.get(0).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsplit4 = lines4.get((lines4.size()-1)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient = last+ \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += split4[4] + \",\" + split4[11] + \",\"+ splitHeight[4] + \",\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tfor(int i=0 ; i < steps-1; i++){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsplitHeight = lines3.get(0).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsplit4 = lines4.get((lines4.size()-1)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatient = last+ \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += split4[4] + \",\" + split4[11] + \",\"+ splitHeight[4] + \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsplit = lines1.get(((lines1.size()-steps)+i)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += normalize(3,split[2]) + \",\" + normalize(4,split[5]) + \",\" + normalize(5,split[6]) + \",\" + normalize(6,split[7])+\",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsplit3 = lines3.get(((lines3.size()-steps)+i)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += normalize(7,split3[2]) + \",\" + normalize(8,split3[3]) + \",\" + normalize(9,split3[6]) + \",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ normalize(10,split3[7]) + \",\" + normalize(11,split3[8]) + \",\" + normalize(12,split3[9]) + \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsplit2 = lines2.get(((lines2.size()-steps)+i)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString discret = discretize(13,split2[15]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += discret;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\toutTrain.write(patient+'\\n');\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient = last+ \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += split4[4] + \",\" + split4[11] + \",\"+ splitHeight[4] + \",\";\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tsplit = line1.split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += normalize(3,split[2].replace(' ', '_').replace('%', 'P')) + \",\" + normalize(4,split[5].replace(' ', '_'))+ \",\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalize(5,split[6].replace(' ', '_')) + \",\" + normalize(6,split[7].replace(' ', '_'))+ \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tsplit3 = line3.split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += normalize(7,split3[2].replace(' ', '_')) + \",\" + normalize(8,split3[3].replace(' ', '_'))+ \",\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalize(9,split3[6].replace(' ', '_'))+ \",\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ normalize(10,split3[7].replace(' ', '_'))+ \",\" + normalize(11,split3[8].replace(' ', '_')) + \",\" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnormalize(12,split3[9].replace(' ', '_')) + \",\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tsplit2 = lines2.get((lines2.size()-1)).split(\",\",-1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString discret = discretize(13,split2[15]);\n\t\t\t\t\t\t\t\t\t\t\t\t\tpatient += discret;\n\t\t\t\t\t\t\t\t\t\t\t\t\toutReal.write(patient+'\\n');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tlines1 = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\t\t\t\t\tlines2 = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\t\t\t\t\tlines3 = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\t\t\t\t\tlines4 = new ArrayList<String>();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tinDemo.close();\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\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\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\tinDemo = new BufferedReader(new FileReader(Demo));\n\t\t\t\t\t\t\t\t\t\tinDemo.readLine();\n\t\t\t\t\t\t\t\t\t\tinVitals.close();\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}\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinVitals = new BufferedReader(new FileReader(Vitals));\n\t\t\t\t\t\t\tinVitals.readLine();\n\t\t\t\t\t\t\tinALS.close();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tinALS = new BufferedReader(new FileReader(alsfrs));\n\t\t\t\tinALS.readLine();\n\t\t\t\tlast = Integer.parseInt(splited[0]);\n\t\t\t\tlines1.add(line1);\n\t\t\t}\n\t\t}\n\t\tinALS.close();\n\t\tinSVC.close();\n\t\tinDemo.close();\n\t\tinVitals.close();\n\t\toutTrain.close();\n\t\toutReal.close();\n\n\t\tCSV2arff(diagnosisOutput,\"DiagnoseData\");\n\t\tCSV2arff(diagnosisOutput,\"DiagnoseDataReal\");\n\t}", "private void generateDiagnoses(int patientId, Interval interval, boolean isAMI, int encId) {\n CodedValue dxCode = generator.generateRandomIVDDiagnosis(isAMI);\n session.execute(this.generatePatientDiagnosesDML(patientId, interval, dxCode, encId));\n }", "public void diagnose() {\n\n for (int i = 0; i < patientResultsArray.size(); i ++) {\n if (patientResultsArray.get(i) >= 5) {\n counter++;\n }\n }\n \n if (counter >= 5) {\n classification = 4;\n counter = 0;\n } else {\n classification = 2;\n counter = 0;\n }\n\n }", "public static void generateData() {\n\t\tgenerateData(TPCDSSettings.createWithDefaults());\n\t}", "public abstract Diagnose buildDiagnose(Diagnose diagnose);", "public void infect(){\n setDiseased(true);\n disease = new Disease(getSimulator(),this); \n diseaseCount = disease.getDuration();\n }", "private void buildNetDiagnosis(int nofSteps) {\n\t\tint i = nofSteps;\n\n\t\twhile (i > 0 && woflanNet != 0) { // Do something as long as soundness\n\t\t\t// is unknown.\n\t\t\ti--;\n\t\t\tif (isSound != 0 && woflanNet != 0) {\n\t\t\t\tnextButton.setVisible(false);\n\t\t\t\tfinishButton.setVisible(false);\n\t\t\t\twoflan.Close(woflanNet);\n\t\t\t\twoflanNet = 0;\n\t\t\t} else if (isWFNet == 0) { // Unknown whether WF-net.\n\t\t\t\troot.add(netDiagnosis);\n\t\t\t\t// Check whether WF-net.\n\t\t\t\tbuildWFNetDiagnosis();\n\t\t\t} else if (isWFNet == 1 && isSound == 0) {\n\t\t\t\t// No WF-net, hence soundness not defined (for sake of\n\t\t\t\t// simplicity say it is not sound).\n\t\t\t\tisSound = 1;\n\t\t\t\ti++;\n\t\t\t} else if (isWFNet == 2 && isSCoverable == 0) { // WF-net, unknown\n\t\t\t\t// whether\n\t\t\t\t// S-Coverable.\n\t\t\t\t// Check whether S-coverable\n\t\t\t\tbuildSCoverableDiagnosis();\n\t\t\t} else if (isSCoverable == 1 && isPICoverable == 0) { // No S-Cover,\n\t\t\t\t// check\n\t\t\t\t// whether\n\t\t\t\t// PI-cover\n\t\t\t\t// Check whether BPI-coverable\n\t\t\t\tbuildPIDiagnosis();\n\t\t\t} else if (isPICoverable == 1 && isBounded == 0) { // Check\n\t\t\t\t// boundedness\n\t\t\t\t// Check whether bounded\n\t\t\t\tbuildBoundedDiagnosis();\n\t\t\t} else if ((isSCoverable == 2 || isPICoverable == 2)\n\t\t\t\t\t&& isBounded == 0) {\n\t\t\t\tisBounded = 2;\n\t\t\t\ti++;\n\t\t\t} else if (isBounded == 2 && isNonDead == 0) { // Bounded: check\n\t\t\t\t// whether dead\n\t\t\t\t// transitions exist\n\t\t\t\t// Check whether 0-live\n\t\t\t\tbuildNonDeadDiagnosis();\n\t\t\t} else if (isBounded == 2 && isNonDead == 2 && isLive == 0) { // Bounded,\n\t\t\t\t// no\n\t\t\t\t// dead\n\t\t\t\t// transitions:\n\t\t\t\t// check\n\t\t\t\t// liveness\n\t\t\t\t// Check whether live\n\t\t\t\tbuildLiveDiagnosis();\n\t\t\t} else if (isLive == 2 && isSound == 0) {\n\t\t\t\tisSound = 2;\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tisSound = 1;\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t}", "private void populateDiagonals() {\r\n Integer[] diag0 = {0, 6, 12, 18, 24};\r\n Integer[] diag1 = {4, 8, 12, 16, 20};\r\n addToCollection(diagonalIndices, diag0);\r\n addToCollection(diagonalIndices, diag1);\r\n }", "private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }", "public static DataSet Make_d_DataSet( String EventFileName,\n String DetCalFileName,\n String bankInfoFileName,\n String MappingFileName,\n float firstToLoad,\n float numToLoad,\n float min,\n float max,\n boolean isLog,\n float first_logStep,\n int nUniformbins,\n boolean useDspaceMap,\n String DspaceMapFile,\n boolean useGhosting,\n String GhostInfoFile,\n int nGhostIDs,\n int nGhosts )\n throws Exception\n {\n String Instrument = FileIO.getSNSInstrumentName( EventFileName );\n SNS_Tof_to_Q_map SMap = new SNS_Tof_to_Q_map( Instrument, \n DetCalFileName,\n bankInfoFileName,\n MappingFileName,\n null );\n \n int[][] ghost_ids = null;\n double[][] ghost_weights = null;\n if ( useGhosting )\n {\n if ( nGhostIDs <= 0 )\n throw new IllegalArgumentException(\n \"Specify correct number of DAS IDs, not \" + nGhostIDs );\n\n if ( nGhosts <= 0 )\n throw new IllegalArgumentException(\n \"Specify correct ghost levels(16?), not \" + nGhosts );\n try\n {\n FileUtil.CheckFile( GhostInfoFile );\n }\n catch ( Exception ex )\n {\n String default_dir = SharedData.getProperty(\"ISAW_HOME\",\"\") +\n \"/InstrumentInfo/SNS/\" + Instrument + \"/\";\n GhostInfoFile = default_dir + Instrument + \"_GhostPks.dat\";\n FileUtil.CheckFile ( GhostInfoFile );\n }\n\n Vector V = FileUtil.LoadGhostMapFile( GhostInfoFile, \n nGhostIDs, \n nGhosts );\n System.out.println(\"Loaded Ghost map from \" + GhostInfoFile );\n ghost_ids =(int[][]) V.firstElement( );\n ghost_weights =(double[][]) V.lastElement( );\n }\n\n double[] d_map = null;\n if ( useDspaceMap )\n {\n try\n {\n FileUtil.CheckFile( DspaceMapFile );\n }\n catch ( Exception ex )\n {\n throw new IllegalArgumentException(\n \"Requested d-space map file \" + DspaceMapFile +\n \" can't be read.\" );\n/*\n String default_dir = SharedData.getProperty(\"ISAW_HOME\",\"\") +\n \"/InstrumentInfo/SNS/\" + Instrument + \"/\";\n DspaceMapFile = default_dir + Instrument + \"_dspacemap.dat\";\n FileUtil.CheckFile ( DspaceMapFile );\n*/\n }\n\n d_map = FileUtil.LoadDspaceMapFile( DspaceMapFile );\n System.out.println(\"Loaded d-space map from \" + DspaceMapFile );\n }\n \n IEventBinner binner;\n if( isLog)\n binner = new LogEventBinner( min, max, first_logStep);\n else\n binner = new UniformEventBinner( min,max,nUniformbins);\n\n SNS_TofEventList STOF = new SNS_TofEventList(EventFileName);\n\n long firstEvent = (long)firstToLoad;\n long NumEventsToLoad = (long)numToLoad;\n\n if ( firstEvent >= STOF.numEntries() )\n throw new IllegalArgumentException(\"first event \" + firstEvent +\n \" exceeds number of events in file \" + STOF.numEntries());\n\n // keep events in range\n long last = firstEvent + NumEventsToLoad - 1;\n if ( last >= STOF.numEntries() )\n last = STOF.numEntries() - 1;\n\n long num_to_load = last - firstEvent + 1;\n long seg_size = DEFAULT_SEG_SIZE;\n long num_segments = num_to_load / seg_size + 1;\n long num_loaded = 0;\n\n Vector ops = new Vector();\n for ( int i = 0; i < num_segments; i ++ )\n {\n seg_size = Math.min( seg_size, num_to_load - num_loaded );\n\n Make_d_Histograms_Op op;\n op = new Make_d_Histograms_Op( SMap,\n STOF, firstEvent, seg_size,\n binner,\n d_map,\n ghost_ids, ghost_weights );\n ops.add( op );\n num_loaded += seg_size;\n firstEvent += seg_size;\n }\n\n ParallelExecutor pe = new ParallelExecutor(ops, n_threads, max_time);\n Vector results = pe.runOperators();\n\n float[][] Histograms = CombinePartialHistograms( results );\n\n if( Histograms == null)\n return null;\n\n int run_num = getRunNumber( EventFileName );\n\n String title = Instrument + \"_\"+ run_num + \"_d-spacing\";\n if ( useGhosting)\n title += \"(Ghost)\";\n\n String log_message = \"Mapped events to d \";\n if ( useDspaceMap )\n log_message += \"using d-space map\\n\";\n else\n log_message += \"using instrument geometry\\n\";\n\n if ( useGhosting )\n log_message += \"formed GHOST histogram one Data block per bank.\";\n else\n log_message += \"formed histogram one Data block per bank.\";\n \n DataSet DS = MakeDataSet( Histograms, \n binner, \n title, \n log_message,\n useGhosting );\n \n DS.setX_units( \"Angstroms\");\n DS.setX_label( \"d-Spacing\" );\n DS.setY_units( \"Counts\" );\n DS.setY_label( \"Scattering Intensity\" );\n \n AddBankDetectorPositions( DS, SMap );\n SetAttributes( DS, EventFileName, SMap );\n\n DataSetFactory.add_d_Operators( DS );\n\n return DS;\n }", "public static DataSet MakeTimeFocusedDataSet( \n String EventFileName,\n String DetCalFileName,\n String bankInfoFileName,\n String MappingFileName,\n float firstToLoad,\n float numToLoad,\n float angle_deg,\n float final_L_m, \n float min,\n float max,\n boolean isLog,\n float first_logStep,\n int nUniformbins,\n boolean useGhosting,\n String GhostInfoFile,\n int nGhostIDs,\n int nGhosts\n \n )\n throws Exception\n {\n String Instrument = FileIO.getSNSInstrumentName( EventFileName );\n SNS_Tof_to_Q_map SMap = new SNS_Tof_to_Q_map( Instrument, \n DetCalFileName, \n bankInfoFileName, \n MappingFileName, \n null );\n\n SNS_TofEventList STOF = new SNS_TofEventList(EventFileName);\n \n int[][] ghost_ids = null;\n double[][] ghost_weights = null;\n \n if ( useGhosting )\n {\n if ( nGhostIDs <= 0 )\n throw new IllegalArgumentException(\n \"Specify correct number of DAS IDs, not \" + nGhostIDs );\n\n if ( nGhosts <= 0 )\n throw new IllegalArgumentException(\n \"Specify correct ghost levels(16?), not \" + nGhosts );\n try\n {\n FileUtil.CheckFile( GhostInfoFile );\n }\n catch ( Exception ex )\n {\n String default_dir = SharedData.getProperty(\"ISAW_HOME\",\"\") +\n \"/InstrumentInfo/SNS/\" + Instrument + \"/\";\n GhostInfoFile = default_dir + Instrument + \"_GhostPks.dat\";\n FileUtil.CheckFile ( GhostInfoFile );\n }\n\n Vector V = FileUtil.LoadGhostMapFile( GhostInfoFile, \n nGhostIDs, \n nGhosts );\n System.out.println(\"Loaded Ghost map from \" + GhostInfoFile );\n ghost_ids =(int[][]) V.firstElement( );\n ghost_weights =(double[][]) V.lastElement( );\n }\n\n IEventBinner binner;\n if( isLog)\n binner = new LogEventBinner( min, max, first_logStep);\n else\n binner = new UniformEventBinner( min,max,nUniformbins);\n\n long firstEvent = (long)firstToLoad;\n long NumEventsToLoad = (long)numToLoad;\n\n if ( firstEvent >= STOF.numEntries() )\n throw new IllegalArgumentException(\"first event \" + firstEvent +\n \" exceeds number of events in file \" + STOF.numEntries());\n\n // keep events in range\n long last = firstEvent + NumEventsToLoad - 1;\n if ( last >= STOF.numEntries() )\n last = STOF.numEntries() - 1;\n \n long num_to_load = last - firstEvent + 1;\n long seg_size = DEFAULT_SEG_SIZE;\n long num_segments = num_to_load / seg_size + 1;\n long num_loaded = 0;\n\n Vector ops = new Vector();\n for ( int i = 0; i < num_segments; i ++ )\n {\n seg_size = Math.min( seg_size, num_to_load - num_loaded );\n\n Make_Time_Focused_Histograms_Op op;\n op = new Make_Time_Focused_Histograms_Op( \n SMap,\n STOF, firstEvent, seg_size,\n binner,\n angle_deg, final_L_m,\n ghost_ids, ghost_weights );\n ops.add( op );\n num_loaded += seg_size;\n firstEvent += seg_size;\n }\n\n ParallelExecutor pe = new ParallelExecutor(ops, n_threads, max_time);\n Vector results = pe.runOperators();\n\n float[][] Histograms = CombinePartialHistograms( results );\n\n if( Histograms == null)\n return null;\n \n int run_num = getRunNumber( EventFileName);\n \n String title = Instrument+\"_\" + run_num + \"_TimeFocused\";\n if ( useGhosting)\n title += \"(Ghost)\";\n\n String log_message = \"Time-Focused Events and \";\n\n if ( useGhosting )\n log_message += \"formed GHOST histogram one Data block per bank.\";\n else\n log_message += \"formed histogram one Data block per bank.\";\n\n DataSet DS = MakeDataSet( Histograms, \n binner, \n title, \n log_message,\n useGhosting );\n \n DS.setX_units( \"Time(us)\");\n DS.setX_label( \"Time-of-flight\" );\n DS.setY_units( \"Counts\" );\n DS.setY_label( \"Scattering Intensity\" );\n \n AddFocusedDetectorPositions( DS, angle_deg, final_L_m );\n\n SetAttributes( DS, EventFileName, SMap );\n\n DataSetFactory.addOperators( DS, InstrumentType.TOF_DIFFRACTOMETER );\n \n return DS;\n }", "void report(DiagnoseRun run);", "public void metoda() {\n System.out.println(mongoDbReportDao.getReportByPossibleCause(\"Pre-meal insulin in prior evening(s) incorrectly timed or missed?\"));\r\n //System.out.println(mongoDbReportDao.getAll());\r\n //System.out.println(mongoDbReportDao.metoda().toString());\r\n //System.out.println(mongoStudyDao.getAll());\r\n //System.out.println(mongoPatternDao.getRangesByHighRangeAndNoOfDays(3.9, 2));\r\n }", "private void fillObservationsDataFast() {\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n// int variateCount = this.workbookStudy.getVariates().size();\n \n List<String> factorsReturn = getFactoresReturnList();\n \n fillFactorLabelDataOptimized(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n \n// List<Measurement> measurementList = workbookStudy.getMeasurements();\n \n// log.info(\"Getting Data Trial ...\");\n// List<Object> dataList;\n// if(! workbookStudy.getVariates().isEmpty()){\n// dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n// }else{\n// dataList = new ArrayList<Object>();\n// }\n// log.info(\"Getting Data Trial Done...\");\n// \n// \n// log.info(\"Getting List of Obsunit ...\");\n// List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n// log.info(\"Getting List of Obsunit...\");\n// int rowIndex = 0;\n// for (Obsunit obsUnit : obsunits) {\n// Measurement measurement = measurementList.get(rowIndex);\n// measurement.initMeasurementData(variateCount);\n//\n// assignMeasurementData(measurement, obsUnit, dataList);\n// rowIndex++;\n// }\n }", "public void debugTables(int[] dx, int[] dy){\r\n\t\ttry {\r\n\t\t\tBufferedWriter x_writer = new BufferedWriter(new FileWriter(Environment.getExternalStorageDirectory() + \"/frame_processing.csv\"));\r\n\t\t\tx_writer.write(Arrays.toString(dx));\r\n\t\t\tx_writer.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void generateCFMDataSet() throws Exception, BettyException {\n\n\t\tboolean testForVoid = validityMaxTries > 0;\n\t\t\n\t\tString directory = createDirectory();\n\t\tStringBuilder log = startLog(directory);\n GeneratorCharacteristics characteristics = setCharacteristics(new GeneratorCharacteristics());\n StringBuilder hyvarrecInputScript = new StringBuilder(\"#!/bin/bash\\n\\n\");\n \n\t\tfor (int i = 1; i <= sizeDataSet; i++){\n\t\t\tint seedIncr = ThreadLocalRandom.current().nextInt(sizeDataSet*999);\n\t\t\tcharacteristics.setSeed(characteristics.getSeed()+seedIncr);\n\t\t\tFMGenerator gen = new FMGenerator();\n\t\t\tOnlyValidModelSATGenerator genV;\n\t FAMAFeatureModel fm;\n\t if(testForVoid){\n\t \tgenV = new OnlyValidModelSATGenerator(gen);\n\t \tgenV.setMaxTries(validityMaxTries);\n\t \tfm = (FAMAFeatureModel) genV.generateFM(characteristics);\n\t }else{\n\t \tfm = (FAMAFeatureModel) gen.generateFM(characteristics);\n\t }\n\t\t\tint customRestrictionsScore = 0;\n\t\t\tif(pathRequirementTries > 0) customRestrictionsScore = customRestrictions(fm, numberOfPathsRequired, pathSearchDepth);\n\t\t\t\n\t\t\tint restrCounter = 0;\n\t\t\tFAMAFeatureModel fmTestRestr = fm;\n\t\t\twhile(customRestrictionsScore < 0 && restrCounter < pathRequirementTries){\n//\t\t\t\tSystem.out.println(\"checking custom restrictions \"+restrCounter); \t//\n\t\t\t\tseedIncr = ThreadLocalRandom.current().nextInt(sizeDataSet*999);\n\t\t\t\tcharacteristics.setSeed(characteristics.getSeed()+seedIncr);\n\t\t gen = new FMGenerator();\n\t\t if(testForVoid){\n\t\t \tgenV = new OnlyValidModelSATGenerator(gen);\n\t\t \tfmTestRestr = (FAMAFeatureModel) genV.generateFM(characteristics);\n\t\t }else{\n\t\t \tfmTestRestr = (FAMAFeatureModel) gen.generateFM(characteristics);\n\t\t }\n\t\t int newRestrictionsScore = customRestrictions(fmTestRestr, numberOfPathsRequired, pathSearchDepth);\n\t\t if (newRestrictionsScore > customRestrictionsScore){\n\t\t \tcustomRestrictionsScore = newRestrictionsScore;\n\t\t \tfm = fmTestRestr;\n\t\t }\n\t\t restrCounter++;\n\t\t\t}\n//\t\t\tSystem.out.println(\"CRS: \"+customRestrictionsScore);\n\t \n\t\t\tString fmFilename = String.format(\"%04d\", i)+\"_aFM.afm\";\n\t\t\tString fmFileDir = \"./out/data/\"+directory+\"/afm/\"+fmFilename;\n\t\t\tFMWriter writer = new FMWriter();\n\t writer.saveFM(fm, fmFileDir);\n\n\t FMextender fmParser = new FMextender(numberOfFeatures-1, contextMaxSize, contextMaxValue, maxNumberOfVFs, minAttrValue, maxAttrValue);\n\t JSONObject afmcJSON = fmParser.generateAFMwithContext(fmFileDir);\n\t String jsonFilename = String.format(\"%04d\", i)+\"_aFMwC.json\";\n\t writeJsonToFile(jsonFilename, directory, afmcJSON);\n\t \n\t updateLog(log, jsonFilename, fmParser);\n\t updateHyvarRecScript(hyvarrecInputScript, jsonFilename, i);\n\t \n\t\t}\n\t\twriteLog(\"./out/data/\"+directory+\"/dataset.txt\", log.toString());\n\t\tif(writeHVRscript) writeLog(\"./out/data/\"+directory+\"/hyvarrecInputScript.sh\", hyvarrecInputScript.toString()); // writes the hyvarrec input script\n\t}", "private void createNewDataSet() {\r\n _dataset = IntkeyDatasetFileReader.readDataSet(_charactersFile, _taxaFile);\r\n\r\n _specimen = new Specimen(_dataset, false, _matchInapplicables, _matchInapplicables, _matchType);\r\n\r\n _includedCharacters = new HashSet<Integer>();\r\n IntRange charNumRange = new IntRange(1, _dataset.getNumberOfCharacters());\r\n for (int i : charNumRange.toArray()) {\r\n _includedCharacters.add(i);\r\n }\r\n\r\n _includedTaxa = new HashSet<Integer>();\r\n IntRange taxaNumRange = new IntRange(1, _dataset.getNumberOfTaxa());\r\n for (int i : taxaNumRange.toArray()) {\r\n _includedTaxa.add(i);\r\n }\r\n\r\n // TODO need a proper listener pattern here?\r\n if (!_processingDirectivesFile) {\r\n _appUI.handleNewDataset(_dataset);\r\n }\r\n\r\n _stopBest = _dataset.getNumberOfCharacters();\r\n _appUI.clearToolbar();\r\n }", "private void exportDiagnosisDatasetSeries(Vector items,Element dataset,String attributeOptionComboUid,String categoryOptionUid, DataValueSet dataValueSet){\n\t\tHashtable targetcodes = new Hashtable();\n\t\tHashtable uidcounters = new Hashtable();\n\t\tIterator i = dataset.element(\"dataelements\").elementIterator(\"dataelement\");\n\t\twhile(i.hasNext()){\n\t\t\tElement dataelement = (Element)i.next();\n\t\t\tfor(int n=0;n<dataelement.attributeValue(\"code\").toLowerCase().split(\",\").length;n++){\n\t\t\t\ttargetcodes.put(dataelement.attributeValue(\"code\").toLowerCase().split(\",\")[n], dataelement.attributeValue(\"uid\"));\n\t\t\t}\n\t\t\tif(MedwanQuery.getInstance().getConfigInt(\"sendFullDHIS2DataSets\",0)==1){\n\t\t\t\tuidcounters.put(dataelement.attributeValue(\"uid\"), new Double(0));\n\t\t\t}\n\t\t}\n\t\tboolean bMortality = ScreenHelper.checkString(dataset.attributeValue(\"mortality\")).equalsIgnoreCase(\"true\");\n\t\tboolean bNewcase = ScreenHelper.checkString(dataset.attributeValue(\"newcase\")).equalsIgnoreCase(\"true\");\n\t\tString sTransaction = ScreenHelper.checkString(dataset.attributeValue(\"transaction\"));\n\t\tString sEncounterType = ScreenHelper.checkString(dataset.attributeValue(\"encountertype\"));\n\n\t\tHashSet encounterdiagnoses = new HashSet();\n\t\tHashSet patientdiagnoses = new HashSet();\n\n\t\t//We must calculate the total diagnosis weights of all diagnoses\n\t\tString classification = ScreenHelper.checkString(dataset.attributeValue(\"classification\")).toLowerCase();\n\t\tHashtable encounterbod = new Hashtable();\n\t\tfor(int n=0;n<items.size();n++){\n\t\t\tString item = (String)items.elementAt(n);\n\t\t\tif(classification==null || classification.equalsIgnoreCase(item.split(\";\")[4])){\n\t\t\t\tif(encounterdiagnoses.contains(item.split(\";\")[1]+\".\"+item.split(\";\")[5])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tencounterdiagnoses.add(item.split(\";\")[1]+\".\"+item.split(\";\")[5]);\n\t\t\t\t}\n\t\t\t\tif(!bMortality || item.split(\";\")[8].startsWith(\"dead\")){\n\t\t\t\t\tif(bMortality){\n\t\t\t\t\t\tif(patientdiagnoses.contains(item.split(\";\")[0]+\".\"+item.split(\";\")[5])){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpatientdiagnoses.add(item.split(\";\")[0]+\".\"+item.split(\";\")[5]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!bNewcase || item.split(\";\")[9].equalsIgnoreCase(\"1\")){\n\t\t\t\t\t\tif(sEncounterType.length()==0 || ScreenHelper.checkString(item.split(\";\")[11]).equalsIgnoreCase(sEncounterType)){\n\t\t\t\t\t\t\tif(sTransaction.length()==0 || MedwanQuery.getInstance().getTransactionType(ScreenHelper.checkString(item.split(\";\")[12])).equalsIgnoreCase(sTransaction)){\n\t\t\t\t\t\t\t\tif(encounterbod.get(item.split(\";\")[1])==null){\n\t\t\t\t\t\t\t\t\tencounterbod.put(item.split(\";\")[1], Integer.parseInt(item.split(\";\")[10]));\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\tencounterbod.put(item.split(\";\")[1],((Integer)encounterbod.get(item.split(\";\")[1]))+Integer.parseInt(item.split(\";\")[10]));\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\tencounterdiagnoses = new HashSet();\n\t\tpatientdiagnoses = new HashSet();\n\t\tfor(int n=0;n<items.size();n++){\n\t\t\tString item = (String)items.elementAt(n);\n\t\t\tif(classification==null || classification.equalsIgnoreCase(item.split(\";\")[4])){\n\t\t\t\tif(encounterdiagnoses.contains(item.split(\";\")[1]+\".\"+item.split(\";\")[5])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tencounterdiagnoses.add(item.split(\";\")[1]+\".\"+item.split(\";\")[5]);\n\t\t\t\t}\n\t\t\t\tif(!bMortality || item.split(\";\")[8].startsWith(\"dead\")){\n\t\t\t\t\tif(bMortality){\n\t\t\t\t\t\tif(patientdiagnoses.contains(item.split(\";\")[0]+\".\"+item.split(\";\")[5])){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tpatientdiagnoses.add(item.split(\";\")[0]+\".\"+item.split(\";\")[5]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(!bNewcase || item.split(\";\")[9].equalsIgnoreCase(\"1\")){\n\t\t\t\t\t\tif(sEncounterType.length()==0 || ScreenHelper.checkString(item.split(\";\")[11]).equalsIgnoreCase(sEncounterType)){\n\t\t\t\t\t\t\tif(sTransaction.length()==0 || MedwanQuery.getInstance().getTransactionType(ScreenHelper.checkString(item.split(\";\")[12])).equalsIgnoreCase(sTransaction)){\n\t\t\t\t\t\t\t\t//First find a matching targetcode\n\t\t\t\t\t\t\t\tString code = item.split(\";\")[5].toLowerCase();\n\t\t\t\t\t\t\t\tString match=null;\n\t\t\t\t\t\t\t\twhile(code.length()>0){\n\t\t\t\t\t\t\t\t\tmatch = (String)targetcodes.get(code);\n\t\t\t\t\t\t\t\t\tif(match!=null || code.length()==1){\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\tcode=code.substring(0,code.length()-1);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(match==null){\n\t\t\t\t\t\t\t\t\tmatch=(String)targetcodes.get(\"other\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(match!=null){\n\t\t\t\t\t\t\t\t\tdouble value=1;\n\t\t\t\t\t\t\t\t\tif(bMortality){\n\t\t\t\t\t\t\t\t\t\t//******************************************\n\t\t\t\t\t\t\t\t\t\t//Mortality is distributed over all diagnoses according to their weight\n\t\t\t\t\t\t\t\t\t\t//******************************************\n\t\t\t\t\t\t\t\t\t\tdouble diagnosisweight=Double.parseDouble(item.split(\";\")[10]);\n\t\t\t\t\t\t\t\t\t\tdouble encounterweight=new Double((Integer)encounterbod.get(item.split(\";\")[1]));\n\t\t\t\t\t\t\t\t\t\tvalue=diagnosisweight/encounterweight;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(uidcounters.get(match)==null){\n\t\t\t\t\t\t\t\t\t\tuidcounters.put(match, value);\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\tuidcounters.put(match,(Double)uidcounters.get(match)+value);\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\ti = uidcounters.keySet().iterator();\n\t\twhile(i.hasNext()){\n\t\t\tString uid=(String)i.next();\n\t\t\tif(MedwanQuery.getInstance().getConfigInt(\"cleanDHIS2DataSets\",0)==0 && (Double)uidcounters.get(uid)>0){\n\t\t\t\tdataValueSet.getDataValues().add(new DataValue(uid,categoryOptionUid,new Double(Math.ceil((Double)uidcounters.get(uid))).intValue()+\"\",\"\"));\n\t\t\t}\n\t\t\telse{\n\t\t\t\tdataValueSet.getDataValues().add(new DataValue(uid,categoryOptionUid,\" \",\"\"));\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void generateEncounterData(int patientId, int measurementPeriodYear, boolean isMale) {\n int numEncounters = generator.generateRandomCount(7);\n Interval currMP = generator.generateMeasurementPeriod(measurementPeriodYear);\n Interval prevMP = new Interval(currMP.getStart().minusYears(1), currMP.getEnd());\n for (int j = 0; j < numEncounters; j++) {\n Date admitDate = generator.generateRandomTimestamp(\n prevMP.getStart().toDate(), prevMP.getEnd().toDate());\n Date dschgDate = generator.generateEndOfDuration(admitDate,\n generator.generateRandomCount(8));\n Interval encIntv = new Interval(admitDate.getTime(), dschgDate.getTime());\n\n // We need to generate an encounter id, so diagnoses can be tied to\n // an encounter\n int encId = generator.generateNextEncounterSequence();\n \n // Encounters\n session.execute(this.generateEncounterDML(patientId, encIntv, encId));\n \n // Labs\n generateLabs(patientId, encIntv);\n\n // We use the discharge date as the determining factor as to which\n // population the patient will be in. If the discharge date is before\n // the measurement period, we go with AMI/Procedure route, if its after\n // we go with just the plain IVD diagnosis route.\n if (dschgDate.before(currMP.getStart().toDate())) {\n // Diagnoses\n generateDiagnoses(patientId, encIntv, true, encId);\n \n // Procedures\n generateProcedures(patientId, encIntv);\n } else {\n // Diagnoses\n generateDiagnoses(patientId, encIntv, false, encId);\n }\n } \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
greedy approximation set cover algorithm: finds the minimum number of zip codes needed to cover all store IDs
private static List<String> approximateZipCodes(List<String> allZipCodes, HashMap<String, List<String>> allZipCodeLocations) { List<String> remainingZipCodes = new ArrayList<>(allZipCodes); List<String> optimalZipCodes = new ArrayList<>(); Set<String> uncoveredIds = new HashSet<>(allIds); while(!uncoveredIds.isEmpty()) { //greedy algorithm, find the highest ids covered in the zip code set int maxIdsCovered = 0; Set<String> maxSetIdsCovered = null; String maxZipCode = null; for(String zipCode : remainingZipCodes) { int idsCovered = 0; Set<String> setIdsCovered = new HashSet<>(); for(String id : allZipCodeLocations.get(zipCode)) { if(uncoveredIds.contains(id)) { setIdsCovered.add(id); idsCovered++; } } if(idsCovered > maxIdsCovered) { maxZipCode = zipCode; maxIdsCovered = idsCovered; maxSetIdsCovered = setIdsCovered; } } //add zip code to set uncoveredIds.removeAll(maxSetIdsCovered); optimalZipCodes.add(maxZipCode); } return optimalZipCodes; }
[ "private static void feasible(int[] candidate, int[][] state, double[] cost, int[] coverCount, Integer[] sortedEle, Integer[] sortedSet)\n\t{\n\t\tint numSet = state.length;\n\t\tint numEle = state[0].length;\n\t\t\n\t\tfor(int i = 0; i < sortedEle.length; i++)\n\t\t{\n\t\t\tint indEle = sortedEle[i];\n\t\t\tif(coverCount[indEle] != 0)\n\t\t\t\tcontinue;\n\n\t\t\tdouble min = Double.MAX_VALUE; \n\t\t\tint index = -1;\n\t\t\tfor(int j = 0; j < numSet; j++)\n\t\t\t{\n\t\t\t\tint indSet = sortedSet[j];\n\t\t\t\tif(candidate[indSet] != 0)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tint count = 0;\n\t\t\t\tif(state[indSet][indEle] != 0)\n\t\t\t\t{\n\t\t\t\t\tfor(int k = 0; k < numEle; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(state[indSet][k] != 0 && coverCount[k] == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdouble value = cost[indSet] / count;\n\t\t\t\t\t\n\t\t\t\t\tif(min > value)\n\t\t\t\t\t{\n\t\t\t\t\t\tmin = value;\n\t\t\t\t\t\tindex = indSet;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(index >= 0)\n\t\t\t{\n\t\t\t\tcandidate[index] = 1;\n\t\t\t\tfor(int j = 0; j < numEle; j++)\n\t\t\t\t{\n\t\t\t\t\tif(state[index][j] != 0 && coverCount[j] >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcoverCount[j]++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor(int i = 0; i < numSet; i++)\n\t\t{\n\t\t\tint index = sortedSet[numSet-i-1];\n\t\t\tif(candidate[index] <= 0)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tboolean isDuplicate = true;\n\t\t\t\n\t\t\tfor(int j = 0; j < numEle; j++)\n\t\t\t{\n\t\t\t\tif(coverCount[j] <= 0)\n\t\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\tif(state[index][j] != 0)\n\t\t\t\t{\n\t\t\t\t\tif(coverCount[j] < 2)\n\t\t\t\t\t{\n\t\t\t\t\t\tisDuplicate = false;\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\t\t\n\t\t\tif(isDuplicate)\n\t\t\t{\n\t\t\t\tcandidate[index] = 0;\n\t\t\t\tfor(int l = 0; l < numEle; l++)\n\t\t\t\t{\n\t\t\t\t\tif(state[index][l] != 0 && coverCount[l] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tcoverCount[l]--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}", "long minimizeCost() {\n\n\t\t// note: kruskal's algorithm to find MST\n\t\tCollections.sort(roads, new Comparator<Road>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Road r1, Road r2) {\n\t\t\t\t// sort by cost\n\t\t\t\treturn Long.valueOf(r1.c).compareTo(Long.valueOf(r2.c));\n\t\t\t}\n\t\t});\n\n\t\tDisjointSet ds = new DisjointSet(n);\n\n\t\tlong c = 0;\n\t\tint rc = 0;\n\t\t// greedy searching\n\t\tfor (Road road : roads) {\n\t\t\tint u = road.u;\n\t\t\tint v = road.v;\n\n\t\t\t// add to disjoint set\n\t\t\tif (ds.union(u, v)) {\n\t\t\t\t// consider current dealer\n\t\t\t\t// it will be be part of MST\n\t\t\t\tc += road.c;\n\t\t\t\trc++; // how many road considered to check graph connectivity\n\t\t\t}\n\t\t}\n\n\t\tif (rc < n - 1) {\n\t\t\t// that means graph is disconnected\n\t\t\t// error: need more dealers\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn c;\n\t}", "private static HashSet<Integer> computeMaximalIndependetSet(HashMap<Integer, ArrayList<Integer>> mapOtoU, HashMap<Integer, ArrayList<Integer>> mapUtoO,\n HashMap<Integer, Integer> matching, HashMap<Integer, Integer> revMatching) {\n // use Koenig's theorem to find vertex cover\n // 2. add all vertices not contained in matching from O to T\n HashSet<Integer> T = new HashSet<Integer>(mapOtoU.keySet());\n T.removeAll(matching.keySet());\n\n// // -- debug\n// System.out.println(\"Initial T\");\n// for (Integer val : T) {\n// System.out.print((val+1) + \", \");\n// }\n// System.out.println();\n// System.out.println(\"------\");\n\n // recently added vertices\n HashSet<Integer> recentlyAdded = new HashSet<Integer>(T);\n HashSet<Integer> recentlyAddedTmp = new HashSet<Integer>();\n\n // true if we still need to check for more vertices\n boolean verticesAdded;\n\n // repeat until no more new vertices are found\n do {\n verticesAdded = false;\n // 3. we now move from recently added vertices to vertices in U on all not in maximum matching contained edges\n for (Integer vertex : recentlyAdded) {\n ArrayList<Integer> mapsTo = mapOtoU.get(vertex);\n Integer mapsToInMaxMatching = matching.get(vertex);\n for (Integer target : mapsTo) {\n // if this matching is not contained in maximum matching\n if (!target.equals(mapsToInMaxMatching)) {\n if (T.add(target)) {\n verticesAdded = true;\n }\n T.add(target);\n recentlyAddedTmp.add(target);\n }\n }\n }\n recentlyAdded.clear();\n recentlyAdded.addAll(recentlyAddedTmp);\n recentlyAddedTmp.clear();\n\n // check if we need to continue\n if (!verticesAdded) {\n break;\n }\n\n verticesAdded = false;\n // 4. we now move from recently added vertices to vertices in O on all in maximum matching contained edges\n for (Integer vertex : recentlyAdded) {\n Integer mapsToInMaxMatching = revMatching.get(vertex);\n if (mapsToInMaxMatching != null) {\n if (T.add(mapsToInMaxMatching)) {\n verticesAdded = true;\n }\n recentlyAddedTmp.add(mapsToInMaxMatching);\n }\n }\n recentlyAdded.clear();\n recentlyAdded.addAll(recentlyAddedTmp);\n recentlyAddedTmp.clear();\n\n } while (verticesAdded);\n\n// // -- debug\n// System.out.println(\"Final T\");\n// for (Integer val : T) {\n// System.out.print((val+1) + \", \");\n// }\n// System.out.println();\n// System.out.println(\"------\");\n\n // compute the minimal vertex cover\n HashSet<Integer> minVertexCover = new HashSet<Integer>(mapOtoU.keySet());\n minVertexCover.removeAll(T);\n HashSet<Integer> tmp = new HashSet<Integer>(mapUtoO.keySet());\n tmp.retainAll(T);\n minVertexCover.addAll(tmp);\n\n// // -- debug\n// System.out.println(\"Minimal Vertex Cover\");\n// for (Integer vertex : minVertexCover) {\n// System.out.print((vertex+1) + \", \");\n// }\n// System.out.println();\n// System.out.println(\"------\");\n\n // compute the maximal independent set\n HashSet<Integer> maxIndependentSet = new HashSet<Integer>(mapOtoU.keySet());\n maxIndependentSet.addAll(mapUtoO.keySet());\n maxIndependentSet.removeAll(minVertexCover);\n\n return maxIndependentSet;\n }", "public int getMaxCombinationsInRegion();", "private void createBitStremMap(){\n itemListMap = new HashMap<>();\n \n for (ArrayList<Integer> transactions_set1 : transactions_set) {\n ArrayList curr_tr = (ArrayList) transactions_set1;\n if(curr_tr.size() >= min_itemset_size_K) \n for (Object curr_tr1 : curr_tr) {\n int item = (int) curr_tr1;\n itemListMap.put(item, itemListMap.getOrDefault(item, 0)+1);\n }\n }\n \n // 3. Remove items without minimum support\n itemListMap.values().removeIf(val -> val<min_sup);\n \n // 4. Sort the map to a set of entries\n Set<Map.Entry<Integer, Integer>> set = itemListMap.entrySet();\n frequentItemListSetLenOne = new ArrayList<>(set);\n Collections.sort( frequentItemListSetLenOne, new Comparator<Map.Entry<Integer, Integer>>(){\n @Override\n public int compare( Map.Entry<Integer, Integer> o1, Map.Entry<Integer, Integer> o2 )\n {\n return (o2.getValue()).compareTo( o1.getValue() );\n }\n });\n\n // 5.\n itemIndex = new HashMap<>();\n for(Map.Entry<Integer, Integer> entry : frequentItemListSetLenOne){\n itemIndex.put(entry.getKey(), itemIndex.size());\n }\n\n // 6.\n bitsetLen = frequentItemListSetLenOne.size();\n }", "final private void prune(TransRecords tr, ArrayList minSup, byte itemsetSize){\n\t\tboolean incCount = true;\n\t\tString[] trans;\n\t\tint[] can;\n\t\tint t1, c1, c2, n1, i1 = -1;\n\t\tint level = 1;\n\t\tc1 = candidates.size();\n\t\tcCounters = new int[c1];\n\t\tcLevel = new int[c1];\n\t\tcSupports = new float[c1];\n\t\tcTransList = new Object[c1];\n\t\tfor (int i = 0; i < c1; i++){\n\t\t\tcCounters[i] = 0;\n\t\t\tcan = (int[])candidates.get(i);\n\t\t\tt1 = can.length;\n\t\t\tfor (int j = 0; j < t1; j++){\n\t\t\t\tn1 = tr.getName(can[j]).split(\"-\").length;\n\t\t\t\tif (n1 > level){\n\t\t\t\t\tlevel = n1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcLevel[i] = level;\n\t\t\tlevel = 1;\n\t\t}\n\t\t//Determine candidate frequency...\n\t\tObject[] temp = tr.getRec();\n\t\tString[] name = tr.getNames();\n\t\tint[] ids = tr.getIDs();\n\t\tt1 = temp.length;\n\t\tn1 = name.length;\n\t\t//Check all transactions...\n\t\tfor (int i = 0; i < t1; i++){\n\t\t\ttrans = (String[])temp[i];\n\t\t\t//Check all candidates...\n\t\t\tfor (int j = 0; j < c1; j++){\n\t\t\t\tcan = (int[])candidates.get(j);\n\t\t\t\tc2 = can.length;\n\t\t\t\t//Check all items are present in this transaction...\n\t\t\t\tfor (int k = 0; k < c2; k++){\n\t\t\t\t\ti1 = -1;\n\t\t\t\t\tfor (int l = 0; l < n1; l++){\n\t\t\t\t\t\tif (ids[l] == can[k]){\n\t\t\t\t\t\t\ti1 = l;\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 (i1 != -1 && trans[i1].equals(\"0\")){\n\t\t\t\t\t\tincCount = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (incCount){\n\t\t\t\t\t//All candidate items present...\n\t\t\t\t\tcCounters[j] = cCounters[j] + 1;\n\t\t\t\t}\n\t\t\t\tincCount = true;\n\t\t\t}\n\t\t}\n\n\t\t//Determine frequent itemset...\n\t\tfrequent = new ArrayList();\n\t\tfCounters = new ArrayList();\n\t\tfSupport = new ArrayList();\n\t\tfTransList = new ArrayList();\n\t\tint transCount = tr.getNumberRecs();\n\t\tfloat support;\n\t\t//For each candidate...\n\t\tfor (int i = 0; i < c1; i++){\n\t\t\tbfi.messageBox(\"Generating \" + itemsetSize + \" item list (Evaluating Candidate \" + (i + 1) + \" of \" + c1);\n\t\t\t//Determine the support level...\n\t\t\tif (minSupMode == 1 || minSupMode == 2){\n\t\t\t\tsupport = 1 + (float)((1/ Math.log((float)transCount)) * (Math.log((float)(cCounters[i]) / (float)transCount)));\n\t\t\t\tcSupports[i] = support;\n\t\t\t\tif (support >= (Float)minSup.get(cLevel[i])){\n\t\t\t\t\t//Candidate support high enough to be frequent item...\n\t\t\t\t\tfrequent.add((int[])candidates.get(i));\n\t\t\t\t\tfCounters.add(cCounters[i]);\n\t\t\t\t\tfSupport.add(support);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsupport = 1 + (float)((1/ Math.log((float)transCount)) * (Math.log((float)(cCounters[i]) / (float)transCount)));\n\t\t\t\tcSupports[i] = support;\n\t\t\t\tif ((float)cCounters[i] >= Float.valueOf((Integer)minSup.get(cLevel[i])).floatValue()){\n\t\t\t\t\t//Candidate support/frequency high enough to be frequent item...\n\t\t\t\t\tfrequent.add((int[])candidates.get(i));\n\t\t\t\t\tfCounters.add(cCounters[i]);\n\t\t\t\t\tfSupport.add(support);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (candidates.size() > 0){\n\t\t\tcl.addEntry(candidates, cCounters, cSupports, cTransList);\n\t\t}\n\t\tif (frequent.size() > 0){\n\t\t\tfl.addEntry(frequent, fCounters, fSupport, fTransList);\n\t\t}\n\t}", "private static void pickSatisfyMinLeaves(gpswabePolicy p) {\n\t\tint i, k, l, c_i;\n\t\tint len;\n\t\tList<Integer> c = new ArrayList<Integer>();\n\n\t\tassert(p.satisfiable);\n\t\tif (p.children == null || p.children.length == 0)\n\t\t\tp.min_leaves = 1;\n\t\telse {\n\t\t\tlen = p.children.length;\n\t\t\tfor (i = 0; i < len; i++)\n\t\t\t\tif (p.children[i].satisfiable)\n\t\t\t\t\tpickSatisfyMinLeaves(p.children[i]);\n\n\t\t\tfor (i = 0; i < len; i++)\n\t\t\t\tc.add(i);\n\n\t\t\tCollections.sort(c, new IntegerComparator(p));\n\n\t\t\tp.satl = new ArrayList<Integer>();\n\t\t\tp.min_leaves = 0;\n\t\t\tl = 0;\n\n\t\t\tfor (i = 0; i < len && l < p.k; i++) {\n\t\t\t\tc_i = c.get(i).intValue(); /* c[i] */\n\t\t\t\tif (p.children[c_i].satisfiable) {\n\t\t\t\t\tl++;\n\t\t\t\t\tp.min_leaves += p.children[c_i].min_leaves;\n\t\t\t\t\tk = c_i + 1;\n\t\t\t\t\tp.satl.add(k);\n\t\t\t\t}\n\t\t\t}\n\t\t\tassert(l==p.k);\n\t\t}\n\t}", "private static int heuristic(int[] unsortedPancakes) {\n int h = 0;\n for (int i = 0; i < unsortedPancakes.length - 1; i++) {\n if (Math.abs(unsortedPancakes[i] - unsortedPancakes[i + 1]) > 1) {\n h++;\n }\n }\n return h;\n }", "public ZipCodeRangeSet optimizeZipCodeRangeSet(ZipCodeRangeSet inputZipSet) {\n\t\tZipCodeRangeSet optimizedZipSet = new ZipCodeRangeSet(); \n\t\tIterator<ZipCodeRange> zipIterator = inputZipSet.iterator();\n\t\twhile(zipIterator.hasNext()) {\n\t\t\tZipCodeRange newRange =zipIterator.next();\n\n\t\t\tif(optimizedZipSet.size() > 0) {\n\t\t\t\tZipCodeRange range = checkRange(newRange,optimizedZipSet.last());\n\t\t\t\tif(range != null) {\n\t\t\t\t\tif(!range.isNewRange()) {\n\t\t\t\t\t\toptimizedZipSet.pollLast();\n\t\t\t\t\t}\n\t\t\t\t\toptimizedZipSet.add(range);\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t//Lets add the first Element\n\t\t\t\toptimizedZipSet.add(newRange);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\treturn optimizedZipSet;\n\t}", "static int findIslands(ArrayList<ArrayList<Integer>> a, int N, int M)\n {\n \n // Your code here\n int island_count = 0;\n for(int i=0;i<N;i++){\n for(int j=0;j<M;j++){\n if(a.get(i).get(j) == 1){\n island_count++;\n explore_island(a, i, j);\n }\n }\n }\n \n return island_count;\n \n }", "int countSusbset(int n, int w){\n //i.e target sum achieved\n if(w == 0){\n return 1;\n }\n \n //if sum not achieved and no items left\n if(n == 0){\n return 0;\n }\n \n //if item is gretart than target weight, we have to exclude it\n if(arr[n-1] > w){\n return countSusbset(n-1, w)\n }else{ \n return countSusbset(n-1, w) + countSusbset(n-1, w - arr[n-1]);\n }\n}", "private static Map<Set<FpNode>, Long> combiPattern(List<FpNode> paths, String idMark)\n\t{\n\t\tMap<Set<FpNode>, Long> qualifyFreq = new HashMap<Set<FpNode>, Long>();\n\t\tint size = paths.size();\n\t\tfor (int mask = 1; mask < (1 << size); mask++) // Find out all the combinations, count from 1 and ignore all empty set\n\t\t{\n\t\t\tSet<FpNode> set = new HashSet<FpNode>();\n\t\t\t\n\t\t\tfor (int i = 0; i < paths.size(); i++) // Find out every possible choice\n\t\t\t{\n\t\t\t\tif ((mask & (1 << i)) > 0) \n\t\t\t\t{\n\t\t\t\t\tset.add(paths.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\tlong minValue = Long.MAX_VALUE;\n\t\t\tfor (FpNode node : set) \n\t\t\t{\n\t\t\t\tif (node.count < minValue)\n\t\t\t\t{\t\n\t\t\t\t\tminValue = node.count;\n\t\t\t\t}\n\t\t\t}\n\t\t\tqualifyFreq.put(set, minValue);\n\t\t}\n\t\treturn qualifyFreq;\n\t}", "final private void prune(TransRecords tr, float minSup, byte itemsetSize){\n\t\tboolean incCount = true;\n\t\tString[] trans;\n\t\tint[] can;\n\t\tint t1, c1, c2, n1, i1 = -1;\n\t\tc1 = candidates.size();\n\t\tcCounters = new int[c1];\n\t\tcSupports = new float[c1];\n\t\tcTransList = new Object[c1];\n\t\tfor (int i = 0; i < c1; i++){\n\t\t\tcCounters[i] = 0;\n\t\t}\n\t\t//Determine candidate frequency...\n\t\tObject[] temp = tr.getRec();\n\t\tString[] name = tr.getNames();\n\t\tint[] ids = tr.getIDs();\n\t\tt1 = temp.length;\n\t\tn1 = name.length;\n\t\t//Check all transactions...\n\t\tfor (int i = 0; i < t1; i++){\n\t\t\ttrans = (String[])temp[i];\n\t\t\t//Check all candidates...\n\t\t\tfor (int j = 0; j < c1; j++){\n\t\t\t\tcan = (int[])candidates.get(j);\n\t\t\t\tc2 = can.length;\n\t\t\t\t//Check all items are present in this transaction...\n\t\t\t\tfor (int k = 0; k < c2; k++){\n\t\t\t\t\ti1 = -1;\n\t\t\t\t\tfor (int l = 0; l < n1; l++){\n\t\t\t\t\t\tif (ids[l] == can[k]){\n\t\t\t\t\t\t\ti1 = l;\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 (i1 != -1 && trans[i1].equals(\"0\")){\n\t\t\t\t\t\tincCount = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (incCount){\n\t\t\t\t\t//All candidate items present...\n\t\t\t\t\tcCounters[j] = cCounters[j] + 1;\n\t\t\t\t}\n\t\t\t\tincCount = true;\n\t\t\t}\n\t\t}\n\n\t\t//Determine frequent itemset...\n\t\tfrequent = new ArrayList();\n\t\tfCounters = new ArrayList();\n\t\tfSupport = new ArrayList();\n\t\tfTransList = new ArrayList();\n\t\tint transCount = tr.getNumberRecs();\n\t\tfloat support;\n\t\t//For each candidate...\n\t\tfor (int i = 0; i < c1; i++){\n\t\t\tbfi.messageBox(\"Generating \" + itemsetSize + \" item list (Evaluating Candidate \" + (i + 1) + \" of \" + c1);\n\t\t\t//Determine the support level...\n\t\t\tif (minSupMode == 1 || minSupMode == 2){\n\t\t\t\tsupport = 1 + (float)((1/ Math.log((float)transCount)) * (Math.log((float)(cCounters[i]) / (float)transCount)));\n\t\t\t\tcSupports[i] = support;\n\t\t\t\tif (support >= minSup){\n\t\t\t\t\t//Candidate support high enough to be frequent item...\n\t\t\t\t\tfrequent.add((int[])candidates.get(i));\n\t\t\t\t\tfCounters.add(cCounters[i]);\n\t\t\t\t\tfSupport.add(support);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsupport = 1 + (float)((1/ Math.log((float)transCount)) * (Math.log((float)(cCounters[i]) / (float)transCount)));\n\t\t\t\tcSupports[i] = support;\n\t\t\t\tif ((float)cCounters[i] >= minSup){\n\t\t\t\t\t//Candidate support/frequency high enough to be frequent item...\n\t\t\t\t\tfrequent.add((int[])candidates.get(i));\n\t\t\t\t\tfCounters.add(cCounters[i]);\n\t\t\t\t\tfSupport.add(support);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (candidates.size() > 0){\n\t\t\tcl.addEntry(candidates, cCounters, cSupports, cTransList);\n\t\t}\n\t\tif (frequent.size() > 0){\n\t\t\tfl.addEntry(frequent, fCounters, fSupport, fTransList);\n\t\t}\n\t}", "public List<ZipCode> findZipCodeRestrictions(String... args) {\n\t\t\n\t\tif(args.length == 0) {\n\t\t\tSystem.out.println(\"Please provide input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tList<ZipCode> zipcodesList = new ArrayList<ZipCode>(); \n\t\t\n\t\t//Extract given zip codes and make Zipcode object list with start and end codes\n\t\tList<String> zipcodesStringList =Arrays.asList(args[0].split(\" \"));\n\t\tfor(String zipcodesString: zipcodesStringList) {\n\t\t\tString[] codes = zipcodesString.replace(\"[\", \"\").replace(\"]\", \"\").split(\",\");\n\t\t\t\n\t\t\t//Check for invalid ranges\n\t\t\tif(codes.length != 2) {\n\t\t\t\tSystem.out.println(\"One or more invalid ranges provided.\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t//Check for invalid lengths\n\t\t\tif(codes[0].length() != 5 || codes[1].length() !=5) {\n\t\t\t\tSystem.out.println(\"One of more invalid zip codes.\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tZipCode zipcode = new ZipCode();\n\t\t\tzipcode.setStartZipCode(Integer.valueOf(codes[0]));\n\t\t\tzipcode.setEndZipCode(Integer.valueOf(codes[1]));\n\t\t\tzipcodesList.add(zipcode);\n\t\t}\n\t\t\n\t\t//Sort list based on sart zip code\n\t\tzipcodesList.sort((ZipCode o1, ZipCode o2)->o1.getStartZipCode()-o2.getStartZipCode());\n\t\t\n\t\t//Take each item and compare with rest of the items, if any overlap between two then combine items into one item\n\t\tfor(int i=0;i<zipcodesList.size();i++) {\n\t\t\tfor (int j=i+1;j<zipcodesList.size();j++) {\n\t\t\t\t\t//if second item start zip code is greater than first item end zip code then dont compare first item with anyother items\n\t\t\t\t\tif(zipcodesList.get(i).getEndZipCode() < zipcodesList.get(j).getStartZipCode()) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//Compare only if item end code greater than next item start zip code\n\t\t\t\t\tif(zipcodesList.get(i).getEndZipCode() >=zipcodesList.get(j).getStartZipCode()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if item end zip code less than or equal to next item end zip code, then set item end zip code to next item end zip code and remove next item.\n\t\t\t\t\t\tif(zipcodesList.get(i).getEndZipCode() <=zipcodesList.get(j).getEndZipCode()) {\n\t\t\t\t\t\t\tzipcodesList.get(i).setEndZipCode(zipcodesList.get(j).getEndZipCode());\n\t\t\t\t\t\t\tzipcodesList.remove(j);\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//if item end zip code greater than next item zip code then just keep item and remove next item\n\t\t\t\t\t\tif(zipcodesList.get(i).getEndZipCode() >zipcodesList.get(j).getEndZipCode()) {\n\t\t\t\t\t\t\tzipcodesList.remove(j);\n\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Printing minimum number of ranges required \n\t\tfor(int i=0;i<zipcodesList.size();i++) {\n\t\t\tSystem.out.println(zipcodesList.get(i).getStartZipCode()+\" \"+zipcodesList.get(i).getEndZipCode());\n\t\t\t\n\t\t}\n\t\t\n\t\treturn zipcodesList;\n\t\t\n\t}", "private int helper(int[] coins, int rem, int[] count) {\n if (rem < 0) // not valid\n return -1;\n if (rem == 0) // completed\n return 0;\n if (count[rem-1] != 0) // already computed, so reuse\n return count[rem-1];\n int min = Integer.MAX_VALUE;\n for(int coin : coins) {\n int res = helper(coins, rem-coin, count);\n if(res >= 0 && res < min)\n min = 1+res;\n }\n count[rem-1] = (min == Integer.MAX_VALUE) ? -1 : min;\n return count[rem-1];\n }", "public int minimumSizeOfSubsetWhoseGCDDivisibleBy(int x) {\n if (dp == null) {\n dp = new int[m + 1];\n Arrays.fill(dp, INF);\n for (int e : seq) {\n dp[e] = 1;\n }\n for (int i = m; i >= 1; i--) {\n for (int j = i + i; j <= m; j += i) {\n if (coprime(j / i) > 0) {\n dp[i] = Math.min(dp[i], dp[j] + 1);\n }\n }\n }\n }\n return dp[x];\n }", "public static void main(String[] args) {\n\t\tSet<Point> set = new HashSet<Point>();\n\t\tset.add(new Point(1,1));\n\t\tset.add(new Point(1,3));\n\t\tset.add(new Point(3,1));\n\t\tset.add(new Point(1,4));\n\t\tset.add(new Point(1,5));\n\t\tset.add(new Point(5,5));\n List<Point> answ = minK(3, set);\n System.out.println(answ.toString());\n\n\t}", "int getMinDistToFestiveCity(){\n\t\t\tint minDist = Integer.MAX_VALUE;\r\n\t\t\tIterator<Integer> itIdx = rootIndices.iterator();\r\n\t\t\tIterator<Integer> itDist = rootDists.iterator();\r\n\t\t\twhile(itIdx.hasNext()){\r\n\t\t\t\tint idx = itIdx.next();\r\n\t\t\t\tint dist = itDist.next();\r\n\t\t\t\tif(minDist - dist > cities[idx].minDistToSubFestive)\r\n\t\t\t\t\tminDist = cities[idx].minDistToSubFestive + dist;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn minDist;\r\n\t\t}", "static Float estimate2(HashMap<String, ArrayList<String>> queryCSPairs, HashMap<String,Star> starList) throws IOException, ClassNotFoundException{\n\t\t\n\t\t\n\t\t\n\t\tHashMap<String, ArrayList<Set<String>>> starToCS =new HashMap();\n\t\t\n\t\t/*\n\t\t * find the matching(superset of query CS) CS of dataset\n\t\t */\n\t\tfor(String starSub: starList.keySet()){\n\t\t\t\n\t\t\tString starCS = starList.get(starSub).get_CS();\n\t\t\tString[] cs_comp= starCS.substring(1, starCS.length()-1).split(\", \");\n\t\t\tHashSet<String> cs_set=new HashSet(Arrays.asList(cs_comp));\n\t\t\tint distCount=0;\n\n\t\t\t\n\t\t\tArrayList<Set<String>> csList= new ArrayList();\n\t\t\n\t\t\tfor(Set<String> cs_id: cs.keySet()){ // for yago\n\t\t\t\t\t\t\n\t\t\t\t\tif(cs_id.containsAll(cs_set)){\n\t\t\t\n\t\t\t\t\tcsList.add(cs_id);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tstarToCS.put(starSub, csList);\n\t\t//\tSystem.out.println(\"Star: \"+starSub);\n\n\n\t\t}\n\n\t//\tSystem.out.println(\"********Star Result:\");\n\t//\tSystem.out.println(starToCS.keySet().toString());\n\t\t\n\t//\tString center= new String();\n\t\tHashSet<String> centerSet= new HashSet();\n\t\tcenterSet.addAll(starList.keySet());\n\t\t\n\t\tfor(String str: starList.keySet()){\n\t\t\n\t\t\tint flag=0;\n\t\t\tfor(String neighbor: starList.get(str).getNeighbors()){\n\t\t\t\t\n\t\t\t\tif(centerSet.contains(neighbor))\n\t\t\t\t{\n\t\t\t\t\tcenterSet.remove(neighbor);\n\t\t\t\t\t\n\t\t\t\t\tif(centerSet.size()==1){\n\t\t\t\t\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(flag==1)\n\t\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\t\n\n\t\t\n\t\t// Difference\n\t\tArrayList<Float> estimatedSizeList = new ArrayList();\n\t\t\n\t//\tSystem.out.println(\"Number of starting points: \"+centerSet.size());\n\t\n\t\tif(centerSet.size()==1){\n\t\t\t\n\t\t\tString center=centerSet.iterator().next();\n\t\t//\tSystem.out.println(\"Center is: \"+center+\"\\n\"+starToCS.values().toString());\n\t\t}\n\n\n\t\tfor (String center: centerSet) {\n\t\t\tArrayList<HashMap<String, Set<String>>> partialResult = new ArrayList();\n\n\t\t\tfor(Set<String> centerCS: starToCS.get(center)){\n\t\t\t\n\t\t\t\tHashMap<String, Set<String>> map = new HashMap();\n\t\t\t\tmap.put(center, centerCS);\n\t\t\t\tpartialResult.add(map);\n\t\t\t//\tSystem.out.println(centerCS.toString());\n\t\t\t}\n\t\t\n\t\tArrayList<HashMap<String, Set<String>>> result = cartesianProd(center, partialResult, starToCS, starList.get(center));\n\t\tint flag=0;\n\t\tint c=0;\n\t\tFloat estimatedSize= new Float(0.0);\n\t\t\n\t\t//difference\n\t\tHashSet<String> localStarList = new HashSet();\n\t\t\n\t\tfor (HashMap<String, Set<String>> e: result) {\n\t\t\tlocalStarList.addAll(e.keySet());\n\t\t}\n\t\t// \n\t\tHashSet set = new HashSet();\n\t\tset.addAll(result);\n\t\t\n\t\tfor(HashMap<String, Set<String>> entry: result){\n\t\t\n\t//\t\tSystem.out.println(\"REsult Keys: \"+entry.keySet().toString());\n\t\t\t\n\t\t\t//\t\tfor(String key: entry.keySet())\n\t\t\t//\t\tSystem.out.println(starList.get(key).get_CS()+\"\\t\"+entry.get(key));\n\t\t\t\t\t\n\t\t\t\t\tFloat localEstimate = new Float(1.0);\n\t\t\t\t//\tlocalEstimate= ((float) cs_distinct.get(entry.get(center))); //for yago\n\t\t\t\t\tlocalEstimate= ((float) CSDistinct.get(entry.get(center)));\n\n\t\t\t\t\tHashMap<String, HashSet<String>> redundantEdges= new HashMap();\n\t\t\t//\t\tSystem.out.println(\"Query CS Pair: \"+queryCSPairs.keySet().toString());\n\n\t\t\t\t\tHashSet<String> centerNodesSet = new HashSet();\n\t\t\t\t\tcenterNodesSet.addAll(entry.keySet());\n\t\n\t\t\t\t\tfor(String cspair: queryCSPairs.keySet()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tString comp[]= cspair.split(\" : \");\n\t\t\t\t\t\tString sub= comp[0];\n\t\t\t\t\t\tString obj= comp[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * it is to check if the CS pair is related to the correct startingpoint or not\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif(centerNodesSet.contains(sub) && centerNodesSet.contains(obj)) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSet<String> subCS= entry.get(sub);\n\t\t\t\t\t\t\tSet<String> objCS=entry.get(obj);\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\t\tSystem.out.print(\"CSPair: \"+cspair);\n\t\t\t\t\t//\t\tSystem.out.print(\"Obj: \"+obj);\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\t\tSystem.out.print(\"SubCS: \"+subCS.toString());\n\t\t\t\t\t//\t\tSystem.out.print(\"ObjCS: \"+objCS.toString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<Set<String>> cs_pair_id =new ArrayList();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcs_pair_id.add(subCS);\n\t\t\t\t\t\t\tcs_pair_id.add(objCS);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//String cs_pair= subCS.concat(\" : \").concat(objCS);\n\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\tHashSet<String> redun_pred=new HashSet();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tredun_pred.addAll(queryCSPairs.get(cspair));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(redundantEdges.containsKey(sub)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tredundantEdges.get(sub).addAll(redun_pred);\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\tredundantEdges.put(sub, redun_pred);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//\tSystem.out.println(\"CS Predicates: \"+csPair.get(cs_pair_id).keySet().toString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(String pred: queryCSPairs.get(cspair)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\tSystem.out.println(\"Pred: \"+ pred);\n\t\t\t\t\t\t//\tSystem.out.println(cspair+\"\\t\"+pred+\"\\t\"+(((float)csPair.get(cs_pair_id).get(pred)) / ((float) csPair_distinct.get(cs_pair_id))));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!csPair.containsKey(cs_pair_id)) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"csPair at fault \\t\"+cs_pair_id);\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\tif (!csPair_distinct.containsKey(cs_pair_id)) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"csPair_distinct at fault \\t\"+cs_pair_id);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} else if (!csPair.get(cs_pair_id).containsKey(pred)) {\n\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"csPair_distinct at fault \\t\"+cs_pair_id);\t\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\tif (!csPair.containsKey(cs_pair_id)) {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"csPair at fault \\t\"+cs_pair_id);\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\tlocalEstimate= localEstimate* (((float)csPair.get(cs_pair_id).get(pred)) / ((float) csPair_distinct.get(cs_pair_id)));\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(localEstimate==0)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\t\t\t\t//\tSystem.out.println(\"stars: \"+starList.keySet().toString());\n\t\t\t\t\t\n\t\t\t\t\tfor(String starid: localStarList){\n\t\t\t\t\t\t\n\t\t\t\t\t\tSet<String> starcs= entry.get(starid);\n\t\t\t\t\t\tStar star= starList.get(starid);\n\t\t\t\t\n\t\t\t\t\t//\tSystem.out.println(\"Entry in resultStar :\"+starcs.toString() );\n\t\t\t\t\t\t\n\t\t\t\t\t\tHashSet<String> outgoingEdges = new HashSet(star.outgoingEdgeLabels());\n\t\t\t\t\t\tif(redundantEdges.containsKey(starid))\n\t\t\t\t\t\t\toutgoingEdges.removeAll(redundantEdges.get(starid));\n\n\t\t\t\t\t//\tSystem.out.println(\"Redunudant: \"+outgoingEdges);\n\n\t\t\t\t\t\tfor(String pred: outgoingEdges){\n\n\t\t\t\t//\t\t\tlocalEstimate= localEstimate * (( (float)cs.get(starcs).get(pred)));\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//\tlocalEstimate= localEstimate * (( (float)CS.get(starcs).get(pred)) / ((float)cs_distinct.get(starcs)));\n\n\t\t\t\t\t//\t\tif (cs.get(starcs).containsKey(pred))\n\t\t\t\t\t//\t\t\tSystem.out.println(\"\\ncs doesn't exits!!\"+pred+\"\\n\");\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t//\tlocalEstimate= localEstimate * (( (float)cs.get(starcs).get(pred).get_count()) / ((float)cs_distinct.get(starcs))); //for yago\n\t\t\t\t\t\t\tlocalEstimate= localEstimate * (( (float)cs.get(starcs).get(pred).get_count()) / ((float)CSDistinct.get(starcs)));\n\n\t\t\t\t\t//\t\tSystem.out.println(\"Pedicate: \"+pred);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\testimatedSize= estimatedSize + localEstimate;\n\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\testimatedSizeList.add(estimatedSize);\n\t//\tSystem.out.println(\"Total valid pairs: \"+result.size());\n\n\t}\n\t\t\n\tFloat estimatedSize = new Float(0.0);\n\t\n\tfor (Float e: estimatedSizeList) {\n\t\testimatedSize = estimatedSize + e;\n\t}\n\t\t\n\t\t\t/*System.out.println(\"\\n\\n*****Result is************\\n\");\n\t\t\n\t\tfor(HashMap<String, String>entry: result){\n\t\n\t\t\tSystem.out.println(\"\\n\"+c+\"th result\");\n\t\t\tfor(String key: entry.keySet()){\n\t\t\t\tSystem.out.println(key+\"\\t\"+entry.get(key));\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(HashMap<String, String> entry: result){\n\t\t\t\n\t\t\tif(entry.keySet().size() != starToCS.keySet().size())\n\t\t\t\tSystem.out.println(\"Size not equal!! \\t\"+ entry.size()+\"\\t\"+starToCS.size());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"\\n\\n*****Result is************\\n\");\n*/\n\t\t/*\n\t\t * HashMap<String, HashMap<String, ModifiedPredicate>> CS= new HashMap();\n\t\tHashMap<String, Integer> cs_distinct= new HashMap();\n\t\tstatic HashMap<String, HashMap<String,Integer>> csPair =new HashMap();\n\tstatic HashMap<String,Integer> csPairCount = new HashMap();\n\t\n\t\t\n\t\t */\n\t\t\n\t//\tSystem.out.println(\"@@@ Result is: \"+result.size()+\"\\t set size: \"+set.size());\n\t\t\n\t\n\t//\tSystem.out.println(\"Estimated Size: \"+estimatedSize);\n\t\t\n\t//\tbw.write(query_id+\"\\t\"+estimatedSize+\"\\n\");\n\t//\tbw.flush();\n\t\treturn estimatedSize;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the Name first part. It fires the change event to notify the corresponding feature for the change.
public void setNameFirstpart(String nameFirstpart) { String oldValue = this.nameFirstpart; this.nameFirstpart = nameFirstpart; propertySupport.firePropertyChange(NAME_FIRST_PART_PROPERTY, oldValue, nameFirstpart); }
[ "private void respondToNameChange () {\n String text = nameField.getText();\n mainCondition.setName(text);\n }", "public void setName()\n {\n validStaffName = textFields[1].getText();\n callback.tell(validStaffName, 5);\n \n \n }", "public void setFirstNm(String aFirstNm)\n {\n firstNm = aFirstNm;\n setItDirty(true);\n }", "public void setFirstName(String newFirst)\n {\n\t \n }", "public static void setFirstName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyFName, name);\n }", "public void changeFirstName(final String newFirstName) {\n }", "public void setFirstname(String newFirstname) {\r\n\t\tthis.Firstname = newFirstname;\r\n\t}", "public void setFirstName(String fname) {\n firstNameField.setText(fname);\n }", "protected void setFirstName(String first)\n {\n firstName = first;\n }", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public void setGivenName(String value)\r\n {\r\n getSemanticObject().setProperty(data_givenName, value);\r\n }", "public void setFirstName(String newFirstName) {\r\n\t\t\r\n\t}", "public void setName(String first, String last)\n {\n firstName = first;\n lastName = last;\n }", "public void setFirstName(String newFirstName) {\n this.firstName = newFirstName;\n }", "public void setFirst_Name(java.lang.String first_Name) {\n this.first_Name = first_Name;\n }", "public void setFirstName(String f) {\n\t\tfirst = f;\n\t}", "public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }", "private void setFirstName() {\n this.firstName = firstNameTextField.getText();\n }", "public void setFirstName(String value) {\r\n setAttributeInternal(FIRSTNAME, value);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes a new instance of the UploadMetadata class for use with unit testing.
protected UploadMetadata() { this.encodingName = StandardCharsets.UTF_8.name(); }
[ "public UploadManager() {\n }", "public Metadata() {}", "public Metadata() {\n }", "public UploadFileTest() {\r\n }", "public FileMetadata() {\n this(DEFAULT_NAME);\n }", "public MinimalMetadata() {\n }", "public UploadMetadata(String metadataFilePath, UploadParameters uploadParameters) {\n this.metadataFilePath = metadataFilePath;\n\n this.uploadId = UUID.randomUUID().toString();\n this.inputFilePath = uploadParameters.getInputFilePath();\n this.targetStreamPath = uploadParameters.getTargetStreamPath();\n\n\n String[] streamData = splitTargetStreamPathByName();\n String streamName = streamData[0];\n String streamDirectory = streamData[1];\n\n if (streamDirectory == null || StringUtils.isEmpty(streamDirectory)) {\n // the scenario where the file is being uploaded at the root\n this.segmentStreamDirectory = MessageFormat.format(\"/{0}.segments.{1}\", streamName, UUID.randomUUID());\n } else {\n // the scenario where the file is being uploaded in a sub folder\n this.segmentStreamDirectory = MessageFormat.format(\"{0}/{1}.segments.{2}\",\n streamDirectory,\n streamName, UUID.randomUUID());\n }\n\n this.isBinary = uploadParameters.isBinary();\n\n File fileInfo = new File(uploadParameters.getInputFilePath());\n this.fileLength = fileInfo.length();\n\n this.encodingName = uploadParameters.getFileEncoding().name();\n\n // we are taking the smaller number of segments between segment lengths of 256 and the segment growth logic.\n // this protects us against agressive increase of thread count resulting in far more segments than\n // is reasonable for a given file size. We also ensure that each segment is at least 256mb in size.\n // This is the size that ensures we have the optimal storage creation in the store.\n int preliminarySegmentCount = (int) Math.ceil((double) fileInfo.length() / uploadParameters.getMaxSegementLength());\n this.segmentCount = Math.min(preliminarySegmentCount, UploadSegmentMetadata.calculateSegmentCount(fileInfo.length()));\n this.segmentLength = UploadSegmentMetadata.calculateSegmentLength(fileInfo.length(), this.segmentCount);\n\n this.segments = new UploadSegmentMetadata[this.segmentCount];\n for (int i = 0; i < this.segmentCount; i++) {\n this.segments[i] = new UploadSegmentMetadata(i, this);\n }\n }", "public FileUploader() {\n // fileUploader(uploadItem);\n }", "public MockMetadataNote() {}", "@Test\n public void testCloudFileDirectoryUploadMetadata() throws StorageException, URISyntaxException {\n CloudFileDirectory directory = this.share.getRootDirectoryReference();\n directory.downloadAttributes();\n Assert.assertEquals(0, directory.getMetadata().size());\n\n directory.getMetadata().put(\"key1\", \"value1\");\n directory.uploadMetadata();\n directory.getMetadata().clear();\n\n directory.downloadAttributes();\n Assert.assertEquals(1, directory.getMetadata().size());\n Assert.assertEquals(\"value1\", directory.getMetadata().get(\"key1\"));\n\n directory.getMetadata().clear();\n directory.uploadMetadata();\n directory.getMetadata().put(\"key2\", \"value2\");\n\n directory.downloadAttributes();\n Assert.assertEquals(0, directory.getMetadata().size());\n }", "private void initializeUploader(){\n buffer = new MemoryBuffer();\n upload = new Upload(buffer);\n uploaderContainer = new Div();\n\n errorContainer = new Div();\n uploaderContainer.add(errorContainer,upload);\n }", "public CompleteMultipartUploadRequest() {}", "ObjectMetadata createObjectMetadata(FileStorageRequest request);", "@JacocoGenerated\n public CreateUploadHandler() {\n this(new Environment());\n }", "public MSFfile()\n {\n }", "private void initMetadata() throws FormatException, IOException {\n MetadataStore store = getMetadataStore(currentId);\n store.setImage((String) metadata.get(\"File Name\"), null, null, null);\n \n if (bpp == 1 || bpp == 3) pixelType[0] = FormatReader.UINT8;\n else if (bpp == 2 || bpp == 6) pixelType[0] = FormatReader.UINT16;\n \n store.setPixels(\n new Integer(getSizeX(currentId)),\n new Integer(getSizeY(currentId)),\n new Integer(getSizeZ(currentId)),\n new Integer(getSizeC(currentId)),\n new Integer(getSizeT(currentId)),\n new Integer(pixelType[0]),\n new Boolean(false),\n getDimensionOrder(currentId),\n null);\n \n store.setDimensions(\n new Float((String) metadata.get(\"Scale Factor for X\")),\n new Float((String) metadata.get(\"Scale Factor for Y\")),\n new Float((String) metadata.get(\"Scale Factor for Z\")),\n null, null, null);\n }", "@Override\n public void initialize() {\n emissary.core.MetadataDictionary.initialize();\n }", "@Override\n public void initialize(Map<String, Param> params) throws TikaConfigException {\n //params have already been set...ignore them\n //TODO -- add other params to the builder as needed\n storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();\n }", "protected static void initItemWithFullMetadata() throws Exception {\n DefaultItemService service = new DefaultItemService();\n String json = updateJSON.replace(\"___COLLECTION_ID___\", collectionId);\n DefaultItemWithFileTO defaultItemWithFileTO =\n (DefaultItemWithFileTO) RestProcessUtils.buildTOFromJSON(json, DefaultItemWithFileTO.class);\n defaultItemWithFileTO.setFile(new File(\"src/test/resources/storage/test.png\"));\n itemTO = service.create(defaultItemWithFileTO, JenaUtil.testUser);\n itemId = itemTO.getId();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: this works, but TODO: essentially turns off the benefits of dictionary support TODO: even if the underlying delegate supports it. TODO: we should support it here. (
@Override public boolean hasDictionarySupport() { return false; }
[ "public interface Dictionary {\n\t\n\t/**\n\t * add key value pair to the dictionary\n\t * @param key as a String\n\t * @param value as a String\n\t * @return boolean - true/false\n\t * @throws Exception if something goes wrong\n\t */\n\tpublic boolean add(String key, String value) throws Exception;\n\n\t/**\n\t * delete a pair of the key value \n\t * @param key as String\n\t * @return boolean - true/false\n\t * @throws Exception if something goes wrong\n\t */\n\tpublic boolean delete(String key) throws Exception;\n\n\t/**\n\t * getter of value from key in a Dictionary\n\t * it uses getValueRec method \n\t * @param key as a String\n\t * @return value as a String\n\t */\n\tpublic String getValue(String key);\n\n\t/**\n\t * getter the list of key value pair in the dictionary\n\t * @return a list of value object\n\t */\n\tpublic List<Value> getAll();\n\n\t/**\n\t * get list between key 1 to key 2\n\t * @param key1 as String\n\t * @param key2 as String\n\t * @return list of value object of in between \n\t */\n\tpublic List<Value> getBetween(String key1, String key2);\n\n}", "public Object replyTypedMap_0();", "public interface Dictionary {\r\n\t/**\r\n * A signatureToWords method for dictionary class to get the word set by \r\n * inputing a signature.\r\n * @return The word set corresponding to the signature as Set<String> type\r\n */\r\n\tpublic Set<String> signatureToWords(String signature);\r\n\r\n}", "public interface Dictionary {\n\t\n\t/**\n\t * This method takes a signature and returns a set of words which correspond to\n\t * the signature.\n\t * \n\t * @param signature A string of numbers which correspond to words.\n\t * @return a set of type String which contains words which correspond to the\n\t * signature.\n\t */\n\tpublic Set<String> signatureToWords(String signature);\n}", "public Dictionary touch () {\n\tcontents = contents.touch ();\n\tif (contents instanceof DictInnerImpl) {\n\t return this;\n\t} else {\n\t return contents;\n\t}\n }", "@CalledByNative\n public void onDictionaryAdded() {\n // Left blank;\n }", "public void AddDictionary (Dictionary dictionary);", "public interface Dictionary {\n\t\n\t/** \n\t * SignatureToWords is a method to be implemented with instructions of how to convert numeric T9 String signatures to their predicted\n\t * String words.\n\t * \n\t * @param signature, is the numeric T9 String signature to be converted\n\t * @return a set of Strings containing the individual words matching the T9 numeric signature as Strings\n\t */\n\tpublic Set<String> signatureToWords(String signature);\n\t\n}", "public interface Dictionary {\n\t/**\n\t * Adds the uniquely mappedNumber to the dictionary and would maintain the corresponding set of words\n\t * which mapped to this number as its value. \n\t * @param mappedNumber Uniquely mappedNumber to a word. Since this is the key so it becomes the first argument\n\t * @param word The corresponding word\n\t */\n\tvoid insert(String mappedNumber, String word);\n\n\t/**\n\t * Returns the set of words mapping to a number. So in the example given {@link Dictionary above}\n\t * If the argument is 2255 then the returned would value would be set BALL,CALL<br>\n\t * If there are no matching words the implementation class can chose to return null or an empty set\n\t * \n\t * @param number The number for which mapping words has to be found \n\t * @return The set of words which got converted to this number\n\t */\n\tSet<String> findMatchingWords(String number);\n\t\n\t/**\n\t * Returns no. of unique number string keys added to the dictionary. Ideally the client would need to call this only after the dictionary is completely populated\n\t * @return No. of unique number string keys added to the dictionary\n\t */\n\tint getUniqueNumbersCount();\n\n}", "public Dict(Obj value) {\n this.value = value;\n }", "public interface Dictionary {\n\n public Dictionary add (Object key, Object value);\n public Dictionary remove (Object key);\n public Object get (Object key);\n public boolean containsKey (Object key);\n public Object[] getKeys ();\n public int size ();\n\n // The touch method makes the dictionary as efficient-to-use\n // as possible (after calling touch, the dictionary will\n // become a handle for a hash table).\n public Dictionary touch ();\n\n public static final Dictionary empty = new DictEmptyImpl ();\n\n}", "private Map<String, List<String>> getDictionary() {\n\t\tMap<String, List<String>> dictMap = dictionary.getMultiValueDict();\n\t\treturn dictMap;\n\t}", "public Object getDelegate() {\n\t\treturn java.util.Map.class;\n\t}", "public abstract NSDictionary configurationDictionary();", "private static void addMethod(DataItem data) {\r\n\t\ttry {\r\n\t\t\tdictionary.put(data);\r\n\t\t} catch (DictionaryException e) {}\r\n\t}", "protected DictionaryUnsagaMaterial(){\n\n\t}", "abstract com.webobjects.foundation.NSDictionary valuesForKeysWithMapping(com.webobjects.foundation.NSDictionary mapping);", "@NotNull\n @Deprecated\n @Generated\n @Selector(\"DictionaryRepresentation\")\n public native NSDictionary<?, ?> DictionaryRepresentation();", "public Dict(){\n sll = new SingleLinkList<Entry>();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Indirizzo della cartella di aggiornamento sul server FTP.
private static String getDirFTP() { return "/algosUpdate/"; }
[ "public static void connectFtp()\n\t{\n\t\tftp.connectServer(servIP,username,pwd,\"\");\n\t\tLogger(\"Ftp connected successfully.\");\n\t}", "public ClienteFTP(String servidor) {\n // crea cliente FTPClient\n cliente = new FTPClient();\n\n // Abre conexion el cliente con el servidor\n try {\n cliente.connect(servidor);\n\n // Y comprobamos la conexion y guardamos su estado en 'estadoConexion'\n estadoConexion = cliente.getReplyCode();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void receiveFile(String folder) throws ClienteFTPException {\n\n try {\n FTPClient ftp;\n ftp = connectFTP();\n //Indica arquivo do tipo ASCII\n ftp.setFileType(FTPClient.ASCII_FILE_TYPE);\n\n ftp.changeWorkingDirectory(folderserver + folder);\n\n //Obtém a lista de arquivos no FTP\n String[] lista = ftp.listNames();\n\n //Se não encontrou arquivos, aborta\n if (lista == null || lista.length == 0) {\n return;\n }\n\n //Varre a lista de arquivos\n for (int i = 0; i < lista.length; i++) {\n\n //Se for os arquivos de pasta\n if (lista[i].equals(\".\") || lista[i].equals(\"..\")){\n continue;\n }\n\n //Cria o arquivo que será baixado(Na pasta indicada)\n FileOutputStream fos = new FileOutputStream(folder + lista[i]);\n //Descarrega o arquivo na pasta corrente\n ftp.retrieveFile(lista[i], fos);\n //Exclui o arquivo da pasta do FTP\n ftp.deleteFile(lista[i]);\n }\n\n disconnectFTP(ftp);\n } catch (IOException ex) {\n throw new ClienteFTPException(\"Não foi possível receber o arquivo do FTP\");\n }\n\n }", "private FTPClient getFtpConnection() throws IOException {\n\n FTPClient mFTP = new FTPClient();\n\n mFTP.connect(host, FTPClient.DEFAULT_PORT);\n mFTP.login(user_name, user_password);\n mFTP.setFileType(FTP.BINARY_FILE_TYPE);\n mFTP.setBufferSize(bufferd_size);\n mFTP.enterLocalPassiveMode();\n\n\n final String path = \"html\";\n final String folder = \"content\";\n\n mFTP.cwd(path);\n mFTP.mkd(folder);\n mFTP.cwd(folder);\n\n return mFTP;\n }", "void sendReceive(){\r\n\r\n String remotePath=\"Batch\\\\Export\\\\\" + DAL.getStoreID();\r\n String localPath=\"Batch\\\\Import\\\\\";\r\n String filename=\"\";\r\n File dir;\r\n String[] children;//list of files at local\r\n\r\n CustomFtpClient ftpClient = new CustomFtpClient();\r\n try {\r\n //1---------- connect Ftp\r\n//System.out.println(DAL.getStoreID()+\" \"+DAL.getFtpServer()+\" \"+DAL.getFtpUser()+\" \"+DAL.getFtpPassword());\r\n ftpClient.openServer(DAL.getFtpServer());\r\n ftpClient.login(DAL.getFtpUser(), DAL.getFtpPassword());\r\n ftpClient.cd(remotePath);\r\n ftpClient.binary();\r\n\r\n //2---------- copy from SIM Export to POS Export\r\n StringBuffer pathList = new StringBuffer();\r\n InputStream is = ftpClient.list();\r\n int c;\r\n\r\n //read all file and directory at remote\r\n while ( (c = is.read()) != -1) {\r\n String s = (new Character( (char) c)).toString();\r\n pathList.append(s);\r\n }\r\n\r\n StringTokenizer st = new StringTokenizer(pathList.toString(),\"\\r\\n\");\r\n //get file from SIM Export\r\n while (st.hasMoreTokens()){\r\n filename=st.nextToken().substring(55);\r\n if(filename.indexOf(\".txt\")!=-1){\r\n is = ftpClient.get(filename);\r\n File file_out = new File(localPath + filename);\r\n FileOutputStream os = new\r\n FileOutputStream(file_out);\r\n byte[] bytes = new byte[1024];\r\n\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n //3--------- delete SIM Export\r\n ftpClient.delete(filename);\r\n }\r\n }\r\n\r\n //4--------- copy POS Import to SIM Backup\r\n remotePath=\"..\\\\..\\\\..\\\\Batch\\\\Backup\\\\Export\";\r\n localPath=\"Batch\\\\Import\\\\\";\r\n\r\n ftpClient.cd(remotePath);\r\n\r\n //get list of file\r\n dir = new File(localPath);\r\n children = dir.list();\r\n if (children != null) {\r\n for (int i = 0; i < children.length; i++) {\r\n // Get filename of file or directory\r\n filename = children[i];\r\n TelnetOutputStream os = ftpClient.put(filename);\r\n File file_in = new File(localPath + filename);\r\n is = new FileInputStream(file_in);\r\n byte[] bytes = new byte[1024];\r\n\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n }\r\n }\r\n\r\n //5--------- copy from POS Export to SIM Import\r\n remotePath=\"..\\\\..\\\\..\\\\Batch\\\\Import\";\r\n localPath=\"Batch\\\\Export\\\\\";\r\n ftpClient.cd(remotePath);\r\n\r\n //get list of file\r\n dir = new File(localPath);\r\n children = dir.list();\r\n if (children != null) {\r\n for (int i = 0; i < children.length; i++) {\r\n // Get filename of file or directory\r\n filename = children[i];\r\n TelnetOutputStream os = ftpClient.put(filename);\r\n File file_in = new File(filename);\r\n is = new FileInputStream(localPath + file_in);\r\n byte[] bytes = new byte[1024];\r\n while ( (c = is.read(bytes)) != -1) {\r\n os.write(bytes, 0, c);\r\n }\r\n is.close();\r\n os.close();\r\n }\r\n }\r\n\r\n //---------- close ftp\r\n ftpClient.closeServer();\r\n }\r\n catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "@Test\n public void ftpTransfer() {\n\n // Instantiate the File Transfer client by providing the protocol to use\n FileTransferClient transferClient = new FileTransferClient(TransferProtocol.FTP);\n transferClient.setPort(configuration.getFtpServerPort());\n\n // 1. upload a file\n transferClient.connect(configuration.getServerIp(), configuration.getUserName(),\n configuration.getUserPassword());\n transferClient.uploadFile(RESOURCES_ROOT_DIR + LOCAL_FILE_NAME, \"/\", REMOTE_FILE_NAME);\n transferClient.disconnect();\n\n // 2. make sure our we do not have the file on the local folder\n assertFalse(new FileSystemOperations().doesFileExist(DOWNLOADS_DIR + REMOTE_FILE_NAME));\n\n // 3. download a file\n transferClient.connect(configuration.getServerIp(), configuration.getUserName(),\n configuration.getUserPassword());\n transferClient.downloadFile(DOWNLOADS_DIR, \"/\", REMOTE_FILE_NAME);\n transferClient.disconnect();\n\n // 4. make sure the file is downloaded\n assertTrue(new FileSystemOperations().doesFileExist(DOWNLOADS_DIR + REMOTE_FILE_NAME));\n }", "private boolean copiaFile(FTPClient ftp, String pathServer, String pathLocale) {\n /* variabili e costanti locali di lavoro */\n boolean riuscito = false;\n OutputStream output;\n String dirName;\n boolean esiste;\n boolean continua = true;\n\n try { // prova ad eseguire il codice\n\n /* se non esiste la cartella temporanea la crea ora */\n dirName = this.getDirTemporanea();\n esiste = Lib.File.isEsisteFile(dirName);\n if (!esiste) {\n continua = (new File(dirName)).mkdir();\n }// fine del blocco if\n\n if (continua) {\n output = new FileOutputStream(pathLocale);\n riuscito = ftp.retrieveFile(pathServer, output);\n output.close();\n }// fine del blocco if\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return riuscito;\n }", "public void setFTP(Double FTP) {\n this.FTP = FTP;\n }", "public static void main(String[] args) {\n String server = \"ftp.crosswire.org\";\n int port = 21;\n String user = \"anonymous\";\n String pass = \"jsword@crosswire.org\";\n String dirToList = \"/pub/sword/avraw\";\n String confPath = \"mods.d/azeri.conf\";\n String dataPath = \"modules/texts/ztext/azeri\";\n\n FTPClient ftpClient = new FTPClient();\n try {\n ftpClient.connect(server, port);\n int replyCode = ftpClient.getReplyCode();\n if (!FTPReply.isPositiveCompletion(replyCode)) {\n System.out.println(\"Connect failed\");\n return;\n }\n boolean success = ftpClient.login(user, pass);\n if (!success) {\n System.out.println(\"Could not login to the server\");\n return;\n }\n ftpClient.setUseEPSVwithIPv4(true);\n copyFile(ftpClient, dirToList, confPath, \"/Users/DM/Library/Application Support/Sword\");\n System.out.println(\"Size is \" + getSize(ftpClient, dirToList, confPath));\n copyDirectory(ftpClient, dirToList, dataPath, \"/Users/DM/Library/Application Support/Sword\", \"\");\n System.out.println(\"Size is \" + getSize(ftpClient, dirToList, dataPath));\n } catch (IOException e) {\n System.out.println(\"Oops! Something wrong happened\");\n e.printStackTrace();\n } finally {\n // logs out and disconnects from server\n try {\n if (ftpClient.isConnected()) {\n ftpClient.logout();\n ftpClient.disconnect();\n }\n } catch (IOException ex) {\n System.out.println(\"Oops! Something wrong happened\");\n ex.printStackTrace();\n }\n }\n }", "public DataTransfer() {\n\t\tthis.setFtpSettings(new FTPSettings());\n\t}", "public FTPClient(){}", "private void setFtpInfo() {\r\n\t\tif(updateService.isInfo()) {\r\n\t\t\tupdateService.logInfo(INSTALLER + \"FTP IP Address: \" + installList.getFtpIPAddress());\r\n\t\t}\r\n\r\n\t\tftpAdapter.setRemoteIP(installList.getFtpIPAddress());\r\n\r\n\t\tftpAdapter.setRemotePort(String.valueOf(installList.getFtpPortNumber()));\r\n\r\n\t\tftpAdapter.setUserName(installList.getFtpUserName());\r\n\r\n\t\tftpAdapter.setPassword(installList.getFtpPassword());\r\n\t}", "public static void tranferFile() {\n\n FTPClient ftpClient = new FTPClient();\n try {\n ftpClient.connect(\"192.168.231.237\", 80);\n ftpClient.login(\"root\", \"xpsr@350\");\n ftpClient.enterLocalPassiveMode();\n\n ftpClient.setFileType(FTP.BINARY_FILE_TYPE);\n File sourceFile = new File(\"/home/sthiyagaraj/eclipse-workspace/KonnectAPI/target/APIURL.tar.gz\");\n InputStream inputStream = new FileInputStream(sourceFile);\n\n boolean done = ftpClient.storeFile(\"filename which receiver get\", inputStream);\n inputStream.close();\n if (done) {\n System.out.println(\"file is uploaded successfully..............\");\n }\n\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp : \"+e);\n } finally {\n try {\n if (ftpClient.isConnected()) {\n ftpClient.logout();\n ftpClient.disconnect();\n }\n } catch (IOException e) {\n System.err.println(\"Exception occured while ftp logout/disconnect : \"+e);\n }\n }\n\n }", "@InformacionMetodo(descripcion = \"Genera archivos con cupones para kioskos y los envia por ftp\")\n\tpublic void generarArchivosKioskosAndEnviarPorFTP();", "public PanelFTP(Users us) {\n\t\tthis.main_user = us;\n\t\tthis.setBounds(0 , 0 , 574 , 470);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setLayout(null);\n\t\tthis.setVisible(false);\n\t\tp = this;\n\t\tcFTP = new ConnectFTP(main_user);\n\t\tpath = \"\\\\\"+main_user.getEmail()+\"\\\\\";\n\t\t///Componentes\t\n\t\t\n\t\t\n\t\tJButton button = new JButton(\"Subir Archivo\");\n\t\tbutton.setBounds(20, 76, 150, 30);\n\t\tadd(button);\n\t\t\n\t\tJButton btnDescargarArchivo = new JButton(\"Descargar Archivo\");\n\t\tbtnDescargarArchivo.setBounds(20, 127, 150, 30);\n\t\tadd(btnDescargarArchivo);\n\t\t\n\t\tCfolders = new Choice();\n\t\tCfolders.add(\"../\");\n\t\tCfolders.setBounds(210, 127, 130, 30);\n\t\tcarp = cFTP.getUserFolders(path);\n\t\tfor(int i = 0; i<carp.size() ; i++) {\n\t\t\tif( carp.get(i) instanceof FTPFile ) {\n\t\t\t\tCfolders.add(carp.get(i).getName());\n\t\t\t}\n\t\t}\n\t\tadd(Cfolders);\n\t\t\n\t\tC_files = new Choice();\n\t\tC_files.add(\"../\");\n\t\tC_files.setBounds(360, 127, 130, 20);\n\t\tfich = cFTP.getUserFiles(path);\n\t\tfor( int i = 0 ; i < fich.size() ; i++ ) {\n\t\t\tif( fich.get(i) instanceof FTPFile ) {\n\t\t\t\tif( fich.get(i).isFile() ) {\n\t\t\t\tC_files.add(fich.get(i).getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tadd(C_files);\n\t\t\n\t\tJLabel lblCarpetas = new JLabel(\"Carpetas\");\n\t\tlblCarpetas.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblCarpetas.setBounds(210, 76, 130, 30);\n\t\tadd(lblCarpetas);\n\t\t\n\t\tJLabel lblFicheros = new JLabel(\"Ficheros\");\n\t\tlblFicheros.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblFicheros.setBounds(360, 76, 130, 30);\n\t\tadd(lblFicheros);\n\t\t\n\t\tJButton button_addFolder = new JButton(\"+\");\n\t\tbutton_addFolder.setBounds(220, 153, 41, 23);\n\t\tadd(button_addFolder);\n\t\t\n\t\tJButton button_back = new JButton(\"<--\");\n\t\tbutton_back.setBounds(271, 153, 55, 23);\n\t\tadd(button_back);\n\t\t\n\t\tlblPath = new JLabel(path);\n\t\tlblPath.setBounds(200, 390, 250, 30);\n\t\tlblPath.setBorder(BorderFactory.createLineBorder(Color.black));\n\t\tadd(lblPath);\n\t\t\n\t\tbtnR = new JButton(\"R\"); //Refresh\n\t\tbtnR.setBounds(401, 153, 49, 23);\n\t\tadd(btnR);\n\t\t\n\t\t//Logica\n\t\tbutton_back.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tpath = \"\\\\\"+main_user.getEmail()+\"\\\\\";\n\t\t\t\tbtnR.doClick();\n\t\t\t}\n\t\t});\n\t\tCfolders.addItemListener(new ItemListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tChoiceFolders();\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tC_files.addItemListener(new ItemListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\n\t\t\t\tChoiceFiles();\n\t\t\t}\n\t\t});\n\t\tbtnR.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tRefresh();\n\t\t\t}\n\t\t});\n\t\tbutton_addFolder.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Creación de carpeta: \"+AddFolder());\n\t\t\t}\n\t\t});\n\t\tbutton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Subida: \"+Upload());\n\t\t\t}\n\t\t});\n\t\tbtnDescargarArchivo.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Descarga: \"+Download());\n\t\t\t}\n\t\t});\n\t}", "public int checkListFile(String folder) throws ClienteFTPException {\n try {\n FTPClient ftp;\n ftp = connectFTP();\n //Indica arquivo do tipo ASCII\n ftp.setFileType(FTPClient.ASCII_FILE_TYPE);\n\n ftp.changeWorkingDirectory(folderserver + folder);\n\n //Obtém a lista de arquivos no FTP\n String[] lista = ftp.listNames();\n\n int qtdArquivos = lista.length;\n qtdArquivos = qtdArquivos - 2; // Retira o \".\" e \"..\" que não contam como arquivos\n\n //Disconecta do FTP\n disconnectFTP(ftp);\n\n return qtdArquivos;\n } catch (IOException ex){\n throw new ClienteFTPException(\"Não foi possível obter a quantidade de arquivos que estão no FTP\");\n }\n }", "@Test\n public void executFtpCommands() {\n\n // connect in the regular way, it is easier than sending separated FTP commands\n FileTransferClient transferClient = new FileTransferClient(TransferProtocol.FTP);\n transferClient.setPort(configuration.getFtpServerPort());\n\n transferClient.connect(configuration.getServerIp(), configuration.getUserName(),\n configuration.getUserPassword());\n\n // send FTP commands and check the returned results\n log.info(\"List of supported FTP commands:\\n\" + transferClient.executeCommand(\"help\"));\n log.info(\"Get current directory:\\n\" + transferClient.executeCommand(\"pwd\"));\n log.info(\"The connection status is:\\n\" + transferClient.executeCommand(\"stat\"));\n\n transferClient.disconnect();\n }", "public interface FtpClientInterface {\n\n\t/**\n\t * Connects to an FTP server and logs in with the supplied username and\n\t * password.\n\t * \n\t * @throws IOException\n\t */\n\tpublic void connect() throws IOException;\n\n\t/**\n\t * Disconnects from the FTP server.\n\t * \n\t * @throws IOException\n\t */\n\tpublic void disconnect() throws IOException;\n\n\t/**\n\t * Browse the current directory in depth\n\t * \n\t * @throws Exception\n\t */\n\tpublic void deepList() throws Exception;\n\n}", "public static void initFtp()\n\t{\n\t\tftp=new FtpUtil();\n\t\tLogger(\"Ftp client initialized.\");\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns this component's world.
public World getWorld() { return world; }
[ "public World getWorld() {\n return location.getWorld();\n }", "public static World getWorld() {\n\t\treturn world;\n\t}", "public GameData getWorld() {\r\n return world;\r\n }", "public World getWorld()\r\n\t{\r\n\t\tDebug.debugln(\"Entity: getWorld \" + world);\r\n\t\treturn world;\r\n\t}", "public World getWorld()\n\t{\n\t\tif (world == null)\n\t\t{\n\t\t\tworld = new World(map, team1, team2);\n\t\t}\n\t\treturn world;\n\t}", "public World getWorld() {\n try {\n return DECore.getDECore().getServer().getWorld(this.worldname); \n } catch (Exception ex) {\n return null;\n }\n }", "public String getWorld() {\r\n\t\treturn mainSpawn.getWorld().toString();\r\n\t}", "public GameWorldApi getGameWorld() {\n return gameWorld;\n }", "public static World getWorld()\n {\n Configuration c = ArenaManager.config;\n c.load();\n \n String world = c.getString(\"settings.world\", ArenaManager.server.getWorlds().get(0).getName());\n c.setProperty(\"settings.world\", world);\n \n c.save();\n return ArenaManager.server.getWorld(world);\n }", "public static World getInstance() {\n\t\treturn world.inRoom ? world.room : world;\n\t}", "public Pane getWorldDisplay() {\n return worldDisplay;\n }", "public static List<World> getWorlds() {\n\t\treturn worlds;\n\t}", "public List<String> getWorlds() {\n return worlds;\n }", "public long getWorldId() {\n return worldId_;\n }", "public long getWorldId() {\n return worldId_;\n }", "@NotNull\n public Collection<MultiverseWorld> getWorlds() {\n return Collections.unmodifiableCollection(this.worldsMap.values());\n }", "public World getClientWorld()\n {\n return null;\n }", "public int getWorldId() {\n return worldId;\n }", "public java.util.List<String> getWorlds() {\n\t\treturn WorldSettings.worlds;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructs a resource reference with Application.class scope and the given name. All resource references constructed with this constructor must have unique names since they all have the same Applicationwide scope that is the org.apache.wicket.Application.class
public ResourceReference(final String name) { this(Application.class, name); }
[ "public ResourceReference(final Class< ? > scope, final String name)\n\t{\n\t\tthis(scope, name, null, null);\n\t}", "public final void bind(final Application application)\n\t{\n\t\t// Try to resolve resource\n\t\tif (resource == null)\n\t\t{\n\t\t\tSharedResources sharedResources = application.getSharedResources();\n\t\t\t// Try to get resource from Application repository\n\t\t\tresource = sharedResources.get(getScope(), name, locale, style, true);\n\n\t\t\t// Not available yet?\n\t\t\tif (resource == null)\n\t\t\t{\n\t\t\t\t// Create resource using lazy-init factory method\n\t\t\t\tresource = newResource();\n\t\t\t\tif (resource == null)\n\t\t\t\t{\n\t\t\t\t\t// If lazy-init did not create resource with correct locale\n\t\t\t\t\t// and style then we should default the resource\n\t\t\t\t\tresource = sharedResources.get(getScope(), name, locale, style, false);\n\t\t\t\t\tif (resource == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t// still null? try to see whether it is a package\n\t\t\t\t\t\t// resource that should\n\t\t\t\t\t\t// be lazily loaded\n\t\t\t\t\t\tPackageResource packageResource = PackageResource.get(getScope(), name);\n\t\t\t\t\t\t// will throw an exception if not found, so if we come\n\t\t\t\t\t\t// here, it was found\n\t\t\t\t\t\tsharedResources.add(name, packageResource);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Share through application\n\t\t\t\tsharedResources.add(getScope(), name, locale, style, resource);\n\t\t\t}\n\t\t}\n\t}", "public ResourceReference(final Class< ? > scope, final String name, Locale locale, String style)\n\t{\n\t\tscopeName = scope.getName();\n\t\tthis.name = name;\n\t\tthis.locale = locale;\n\t\tthis.style = style;\n\t}", "ApplicationTypeResource.DefinitionStages.Blank define(String name);", "@InterfaceAudience.Public\n @InterfaceStability.Unstable\n public static ResourceTypeInfo newInstance(String name) {\n return ResourceTypeInfo.newInstance(name, \"\");\n }", "private String getResourceName()\n {\n return getClass().getName() + \"Resources\";\n }", "public StreamableClassPathResource(final String name) {\n super();\n this.name = name;\n }", "public static Application create(String name) throws Exception{\n \tMap<String, Object> params = new HashMap<String, Object>();\n \tparams.put(\"name\", name);\n \t\n \treturn create(params);\n }", "public void setApplicationName(String applicationName);", "public HelloworldResource() {\r\n }", "private Application createApplication(Class<? extends Application> applicationClass) {\n if (applicationClass == ResourceConfig.class) {\n return new ResourceConfig();\n } else if (applicationClass == Application.class) {\n return new Application();\n } else {\n return services.forContract(applicationClass).get();\n }\n }", "public StreamFacebooksResource() {\n }", "@Override\n\tpublic final String getName() {\n\t\treturn getClass().getSimpleName().replaceAll(\"Application$\", \"\").toLowerCase();\n\t}", "@Nullable\n Application getApplication(String name);", "public ResourceTypeTest(String name) {\n\t\tsuper(name);\n\t}", "void setResourceName(String name)\n {\n this.name = name;\n }", "public void setResourceName(final String name) {\n this.resourceName = name;\n }", "public ExtensionResource(IComponentRepository extSvc, String urnid, String extResLocation, String codebase, String classname){\n\t\t\n\t\tthis.extID = urnid;\n\t\tif (extResLocation != null)\n\t\t\tthis.extResLocation = extResLocation;\n\t\tthis.codebase = codebase;\n\t\tthis.classname = classname;\n\t\t\n\t\tthis.extSvc = extSvc;\n\t}", "Application createApplication();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the investorFlag value for this Account.
public java.lang.String getInvestorFlag() { return investorFlag; }
[ "public java.lang.String getAccountFlag() {\n return accountFlag;\n }", "public java.lang.String getFundEligibleFlag() {\n return fundEligibleFlag;\n }", "public void setInvestorFlag(java.lang.String investorFlag) {\n this.investorFlag = investorFlag;\n }", "public String getPayInterestFlag() {\n return payInterestFlag;\n }", "public int getPayFlag() {\r\n return payFlag_;\r\n }", "int getPayFlag();", "public String getInvestor() {\r\n\t\treturn investor;\r\n\t}", "public BigDecimal getTransFlag() {\n return transFlag;\n }", "public Character getRentalFlag() {\n return rentalFlag;\n }", "public String getAvailableForRentFlag() {\n return (String) getAttributeInternal(AVAILABLEFORRENTFLAG);\n }", "public String getInvestor() {\r\n return investor;\r\n }", "public String getIs_org_unit_lead_flag() {\r\n return (String) get(\"is_org_unit_lead_flag\");\r\n }", "java.lang.String getCashBackFlag();", "public Character getAdjustmentFeeFlag() {\n return adjustmentFeeFlag;\n }", "public String getIvaFlag() {\n return (String) getAttributeInternal(IVAFLAG);\n }", "public String getFlag() {\n return (String) getAttributeInternal(FLAG);\n }", "public java.lang.String getOpenMarketRetailFlag() {\n return openMarketRetailFlag;\n }", "public boolean getIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "public org.apache.xmlbeans.XmlBoolean xgetIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n return target;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
DELETE /propertyserves/:id : delete the "id" propertyServe.
@DeleteMapping("/property-serves/{id}") public ResponseEntity<Void> deletePropertyServe(@PathVariable Long id) { log.debug("REST request to delete PropertyServe : {}", id); propertyServeService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); }
[ "public void delete(String id) {\n log.debug(\"Request to delete Property : {}\", id);\n propertyRepository.deleteById(id);\n propertySearchRepository.deleteById(id);\n }", "void removeProperty(String id);", "@DeleteMapping(\"/market-variety-properties/{id}\")\n @Timed\n public ResponseEntity<Void> deleteMarketVarietyPropertyPriceList(@PathVariable Long id) {\n log.debug(\"REST request to delete MarketVarietyPropertyPriceList : {}\", id);\n marketVarietyPropertyPriceListService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@DeleteMapping(\"solcommerce/pdp-service/spu/{id}\")\n\t public ResponseEntity<?> delete(@PathVariable(\"id\") long id) {\n\t\t storePickupService.deleteStorePickup(id);\n\t return ResponseEntity.ok().body(\"StorePickup has been deleted successfully.\");\n\t }", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Servings : {}\", id);\n servingsRepository.deleteById(id);\n }", "@RequestMapping(value = \"/plantmcs/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public void delete(@PathVariable Long id) {\n log.debug(\"REST request to delete Plantmc : {}\", id);\n plantmcRepository.delete(id);\n }", "@DeleteMapping (\"shops/pictures/{id}\")\n\tpublic void deletePaint(@PathVariable(name=\"id\")Long id) {\n\t\tSystem.out.println(\"Se borra el paint con id: \" +id);\n\n\t\tpaintServiceImpl.deletePaint(id);\n\t\t\n\t\tSystem.out.println(\"PAINT BORRADA\");\n\t}", "@DeleteMapping(\"/web-services/{id}\")\n @Timed\n public ResponseEntity<Void> deleteWebService(@PathVariable Long id) {\n log.debug(\"REST request to delete WebService : {}\", id);\n webServiceService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void delete(Long id) {\n log.debug(\"Request to delete Serveur : {}\", id);\n serveurRepository.deleteById(id);\n }", "@DELETE\n\t@Path(\"{id}\")\n\tpublic String delete(@PathParam(\"id\") String id) {\n\t\t\n\t\tlog.info(\"Suppression de l'event d'id : \" + id);\n\t\t\n\t\tEntityManager em = Tools.getEntityManager();\n\t\tEvent persistedEvent = em.getReference(Event.class, id);\n\t\t\n\t\tif (persistedEvent == null) {\n\t\t\tthrow new NotFoundException();\n\t\t}\n\n\t\tem.getTransaction().begin();\n\t\tem.remove(persistedEvent);\n\t\tem.getTransaction().commit();\n\t\t\n\t\treturn id;\n\t}", "@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n @DeleteMapping(value = \"/cake-application/cakes/{id}\")\n public void delete(@PathVariable(\"id\") String id) {\n cakeService.delete(id);\n }", "@DeleteMapping(\"/prizes/{id}\")\n @Timed\n public ResponseEntity<Void> deletePrize(@PathVariable Long id) {\n log.debug(\"REST request to delete Prize : {}\", id);\n prizeService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@DeleteMapping(\"/{id}\")\n public void deleteVenda(@PathVariable(\"id\") Long id) {\n vendaRepository.deleteById(id);\n }", "@DeleteMapping(\"/pets/{id}\")\n public ResponseEntity<Void> deletePet(@PathVariable Long id) {\n log.debug(\"REST request to delete Pet : {}\", id);\n petService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@GetMapping(\"/property-serves/{id}\")\n public ResponseEntity<PropertyServe> getPropertyServe(@PathVariable Long id) {\n log.debug(\"REST request to get PropertyServe : {}\", id);\n Optional<PropertyServe> propertyServe = propertyServeService.findOne(id);\n return ResponseUtil.wrapOrNotFound(propertyServe);\n }", "@DeleteMapping(\"/style-photos/{id}\")\n public ResponseEntity<Void> deleteStylePhoto(@PathVariable Long id) {\n log.debug(\"REST request to delete StylePhoto : {}\", id);\n stylePhotoRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\r\n public ResponseObject delete(@PathVariable(\"id\") Long id) {\r\n return candidateService.delete(id);\r\n }", "@DeleteMapping(\"/{id}\")\n public void deleteProduct(@PathVariable Long id) {\n\n productService.deleteProduct(id);\n }", "@DeleteMapping(value=\"/delete/{id}\", consumes= {\"application/json\"})\n public String delete(@PathVariable int id) {\n \tSession session=service.byId(id);\n \tservice.deleteById(session);\n \treturn \"Session deleted!\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Methode getAankomendeReservering Roept methode zoekReserveringenVanAuto voor iedere auto in de gegeven ArrayList
public ArrayList<Reservering> getAankomendeReservering(ArrayList<Auto> autos){ ArrayList<Reservering> deReserveringen = new ArrayList<Reservering>(); for(Auto a: autos){ ArrayList<Reservering> res = zoekReserveringenVanAuto(a.getID()); for(Reservering r: res){ deReserveringen.add(r); } } return deReserveringen; }
[ "public ArrayList<Reservering> zoekReserveringenVanAuto(int autoid){\r\n\t\tArrayList<Reservering> terug = new ArrayList<Reservering>();\r\n\t\ttry{\r\n\t\t\tString sql = \"SELECT * FROM Reservering WHERE autoid=\" + autoid;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\t\t\twhile (rs.next()) { // rs.next() geeft false als er niets meer is\u000b \r\n\t\t\t\tint id = rs.getInt(\"reserveringid\");\r\n\t\t\t\tint dP = rs.getInt(\"deParkeerplek\");\r\n\t\t\t\tjava.sql.Date bdat = rs.getDate(\"beginDat\");\r\n\t\t\t\tjava.util.Date bD = new Date(bdat.getTime());\r\n\t\t\t\tjava.sql.Date edat = rs.getDate(\"eindDat\");\r\n\t\t\t\tjava.util.Date eD = new Date(edat.getTime());\r\n\t\t\t\tString isGeweest = rs.getString(\"isGeweest\");\r\n\t\t\t\tConnectDBAuto autoconn = new ConnectDBAuto(con);\r\n\t\t\t\tAuto a = autoconn.zoekAuto(autoid);\r\n\t\t\t\tReservering nieuw = new Reservering(a, id, bD, eD, dP);\r\n\t\t\t\tif(isGeweest.equals(\"t\")){\r\n\t\t\t\t\tnieuw.setGeweest(true);\r\n\t\t\t\t}\r\n\t\t\t\tterug.add(nieuw);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tSystem.out.println(\"Probleem bij reservering zoeken \" + ex);\r\n\t\t}\r\n\t\treturn terug;\t\t\r\n\t}", "public ArrayList<Reservierungen> getReservierungen() {\n return reservierungen;\n }", "List<Reserva> consultarReservasActivas();", "List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();", "public void ReservaEfetivadas () {\n Date hoje = new Date ();\n for (int z = 0; z < vecReserva.size(); z++) {\n if (((int) ((((entReserva)vecReserva.elementAt(z)).getDatain().getTime() - (hoje.getTime())) / 86400000L)) == 0){// Reserva será relaizada hj\n if (((entReserva)vecReserva.elementAt(z)).getPagamento().getSituacao() == 0){//Cliente fez todo o pagamento e o quarto será\n vecReservaEfetivadas.add(vecReserva.elementAt(z));\n }\n \n }\n }\n }", "public ArrayList<Reservation> getReservation() {\n return reservations;\n }", "public List<DetalleReserva> listadoDetalleReserva() { \r\n return detalleReservaBean.devolverDetalleReserva();\r\n }", "public Reservation[] getReservations()\n {\n return res;\n }", "public ArrayList<Reservation> getReservations() {\n\t\treturn reservations;\n\t}", "public List<Reservation> selectionTousReservation();", "public String getReservations(String owner);", "public void loadReserva() {\r\n\t\tif(listaReservas.size() != 0) {\r\n\r\n\t\t}else {\r\n\t\t\tfor(int i = 0; i < 8; i++) {\r\n\t\t\t\tReservaDAO aux = new ReservaDAO();\r\n\t\t\t\taux.load_reserva(i+1);\r\n\t\t\t\tif(aux.getTitulo() != null) {\r\n\t\t\t\t\tlistaReservas.add(aux);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ArrayList<Dibujable> getAutos(){\n ArrayList<Dibujable> salida = new ArrayList<Dibujable>();\n for(int i=0; i<vivos.size(); i++)\n salida.add(vivos.get(i).getAuto());\n for(int i=0; i<muertos.size(); i++)\n salida.add(muertos.get(i).getAuto());\n return salida;\n }", "public ArrayList<Reservering> getReserveringenTussen(java.util.Date begin, java.util.Date eind){\r\n\t\tArrayList<Reservering> terug = new ArrayList<Reservering>();\r\n\t\ttry{\r\n\t\t\tjava.sql.Date beginDat = new java.sql.Date(begin.getTime());\r\n\t\t\tjava.sql.Date eindDat = new java.sql.Date(eind.getTime());\r\n\t\t\tString sql = \"SELECT * FROM Reservering WHERE (beginDat BETWEEN'\" + beginDat + \"' AND '\"\r\n\t\t\t\t\t+ eindDat + \"') OR (eindDat BETWEEN '\" + beginDat + \"' AND '\" + beginDat + \"')\";\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\t\t\twhile (rs.next()) { // rs.next() geeft false als er niets meer is\u000b \r\n\t\t\t\tint id = rs.getInt(\"reserveringid\");\r\n\t\t\t\tint dP = rs.getInt(\"deParkeerplek\");\r\n\t\t\t\tjava.sql.Date bdat = rs.getDate(\"beginDat\");\r\n\t\t\t\tjava.util.Date bD = new Date(bdat.getTime());\r\n\t\t\t\tjava.sql.Date edat = rs.getDate(\"eindDat\");\r\n\t\t\t\tjava.util.Date eD = new Date(edat.getTime());\r\n\t\t\t\tint autoid = rs.getInt(\"autoid\");\r\n\t\t\t\tString isGeweest = rs.getString(\"isGeweest\");\r\n\t\t\t\tConnectDBAuto autoconn = new ConnectDBAuto(con);\r\n\t\t\t\tAuto a = autoconn.zoekAuto(autoid);\r\n\t\t\t\tReservering nieuw = new Reservering(a, id, bD, eD, dP);\r\n\t\t\t\tif(isGeweest.equals(\"t\")){\r\n\t\t\t\t\tnieuw.setGeweest(true);\r\n\t\t\t\t}\r\n\t\t\t\tterug.add(nieuw);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tSystem.out.println(\"Probleem bij reserveringen tussen data ophalen \" + ex);\r\n\t\t}\r\n\t\treturn terug;\r\n\t}", "public Reservation getReservations() {\n return reservations;\n }", "List<Reservation> getAllReservations();", "private Raum reservierungAnlegen(){\n Uhrzeit beginn;\n Uhrzeit ende;\n String bemerkung;\n \n System.out.print(\"Beginn: \");\n beginn = uhrzeitAnlegen();\n System.out.print(\"Ende: \");\n ende = uhrzeitAnlegen();\n System.out.print(\"Bemerkung: \");\n input.nextLine();\n bemerkung = input.nextLine();\n mitarbeiter.reserviere(raum, beginn, ende, bemerkung);\n return raum;\n }", "public List<Reserva> obtenerTodasLasReservas(){\r\n\t\tList<Reserva> listaReservas = new ArrayList<>();\r\n\r\n\t\tString consulta = \"Select * from reserva;\";\r\n\t\ttry (Statement statement = conexion.createStatement();ResultSet rs = statement.executeQuery(consulta)){\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tlistaReservas.add(new Reserva(rs.getString(\"dniCliente\"), rs.getString(\"matricula\"),\r\n\t\t\t\t\t\tAuxiliar.formatearFecha(rs.getString(\"fechaInicio\")),\r\n\t\t\t\t\t\trs.getInt(\"diasContratados\"), Auxiliar.formatearHora(rs.getString(\"horaReserva\")),\r\n\t\t\t\t\t\tAuxiliar.comprobarRecogida(rs.getString(\"recogida\")), Auxiliar.comprobarEstado(rs.getString(\"estado\"))));\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\r\n\t\treturn listaReservas;\r\n\t}", "public Reservering zoekReservering(int id){\r\n\t\tReservering terug = null;\r\n\t\ttry{\r\n\t\t\tString sql = \"SELECT * FROM Reservering WHERE reserveringid=\" + id;\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(sql);\r\n\t\t\twhile (rs.next()) { // rs.next() geeft false als er niets meer is\u000b \r\n\t\t\t\tint dP = rs.getInt(\"deParkeerplek\");\r\n\t\t\t\tjava.sql.Date bdat = rs.getDate(\"beginDat\");\r\n\t\t\t\tjava.util.Date bD = new Date(bdat.getTime());\r\n\t\t\t\tjava.sql.Date edat = rs.getDate(\"eindDat\");\r\n\t\t\t\tjava.util.Date eD = new Date(edat.getTime());\r\n\t\t\t\tint autoid = rs.getInt(\"autoid\");\r\n\t\t\t\tString isGeweest = rs.getString(\"isGeweest\");\r\n\t\t\t\tConnectDBAuto autoconn = new ConnectDBAuto(con);\r\n\t\t\t\tAuto a = autoconn.zoekAuto(autoid);\r\n\t\t\t\tterug = new Reservering(a, id, bD, eD, dP);\r\n\t\t\t\tif(isGeweest.equals(\"t\")){\r\n\t\t\t\t\tterug.setGeweest(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\tSystem.out.println(\"Probleem bij reservering zoeken \" + ex);\r\n\t\t}\r\n\t\treturn terug;\t\t\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the value of tipoEntidadRespondioModified
public void setTipoEntidadRespondioModified(boolean tipoEntidadRespondioModified) { this.tipoEntidadRespondioModified = tipoEntidadRespondioModified; }
[ "public boolean isTipoEntidadRespondioModified()\r\n\t{\r\n\t\treturn tipoEntidadRespondioModified;\r\n\t}", "public void setIdEntidadRespondioModified(boolean idEntidadRespondioModified)\r\n\t{\r\n\t\tthis.idEntidadRespondioModified = idEntidadRespondioModified;\r\n\t}", "public boolean isIdEntidadRespondioModified()\r\n\t{\r\n\t\treturn idEntidadRespondioModified;\r\n\t}", "@PUT\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response updateTipo(Tipo Tipo) {\n\t\tRotondAndesTM tm = new RotondAndesTM(getPath());\n\t\ttry {\n\t\t\ttm.updateTipo(Tipo);\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t\treturn Response.status(200).entity(Tipo).build();\n\t}", "@RequestMapping(value = \"/update\", method = RequestMethod.POST)\r\n public ResponseEntity<JCommunicationType> updateCommunicationType(HttpServletRequest request, HttpServletResponse response,\r\n @ModelAttribute CommunicationType type) {\r\n this.communicationTypeDao.update(type);\r\n return new ResponseEntity<JCommunicationType>(this.convert(type), HttpStatus.OK);\r\n }", "public void setTipoDocumento(int tipoDocumento);", "public void setMailType(int v) \n {\n \n if (this.mailType != v)\n {\n this.mailType = v;\n setModified(true);\n }\n \n \n }", "public void modificar_tipo_vehiculo(String dato_nuevo)\n {\n tipo_vehiculo = dato_nuevo;\n }", "public void setTipoDocumento(TipoDocumento tipoDocumento) {\n this.tipoDocumento = tipoDocumento;\n }", "public void setTipo(String tipo);", "public abstract void setTipo_elemento(java.lang.Long newTipo_elemento);", "private void setResponseType(org.chromium.components.sync.protocol.CommitResponse.ResponseType value) {\n responseType_ = value.getNumber();\n bitField0_ |= 0x00000001;\n }", "public void setIdTipoNotificacion(java.lang.Long idTipoNotificacion) {\r\n this.idTipoNotificacion = idTipoNotificacion;\r\n }", "public void setModifiedExpenseTypeTyDescription(boolean modified) {\n this.modifiedExpenseTypeTyDescription = modified;\n }", "public abstract void setTipo_equipo(java.lang.String newTipo_equipo);", "public void setTipoNotificacion(int value) {\n this.tipoNotificacion = value;\n }", "public abstract void setTipo_inventario(java.lang.String newTipo_inventario);", "public void setRespondentId(Integer respondentId) {\n this.respondentId = respondentId;\n }", "public void setAppointmentType(AppointmentTypeDTO newValue){\r\n\t\t\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Visit (a part of) a file in a range of files
void visitFile(StorageUnit unit, long off, long lim);
[ "boolean getFileRange(String path, OutputStream stream, long startByteIndex, long endByteIndex) throws NotFoundException, IOException;", "void matchFilePattern(String pattern, List<OperationFile> targetFiles) throws Exception;", "public void visit(FilenameNode node);", "public void foundFile(File file);", "void fileStart(File file);", "private void searchParts(AbstractFile part1) {\r\n \t\tAbstractFile parent = part1.getParentSilently();\r\n \t\tif (parent == null) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString ext = part1.getExtension();\r\n \t\tint firstIndex;\r\n \t\ttry {\r\n \t\t\tfirstIndex = Integer.parseInt(ext);\r\n \t\t} catch (NumberFormatException e) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tString name = part1.getNameWithoutExtension();\r\n \t\tFilenameFilter startsFilter = new StartsFilenameFilter(name, false);\r\n \t\tAttributeFileFilter filesFilter = new AttributeFileFilter(AttributeFileFilter.FILE);\r\n \t\tEqualsFilenameFilter part1Filter = new EqualsFilenameFilter(part1.getName(), false);\r\n \t\tpart1Filter.setInverted(true);\r\n \t\tAndFileFilter filter = new AndFileFilter();\r\n \t\tfilter.addFileFilter(startsFilter);\r\n \t\tfilter.addFileFilter(filesFilter);\r\n \t\tfilter.addFileFilter(part1Filter);\r\n \t\ttry {\r\n \t\t\tAbstractFile[] otherParts = parent.ls(filter);\r\n \t\t\tfor (int i = 0; i < otherParts.length; i++) {\r\n \t\t\t\tString ext2 = otherParts[i].getExtension();\r\n \t\t\t\ttry {\r\n \t\t\t\t\tint partIdx = Integer.parseInt(ext2);\r\n \t\t\t\t\tif (partIdx > firstIndex)\r\n \t\t\t\t\t\tfiles.add(otherParts[i]);\r\n \t\t\t\t} catch (NumberFormatException e) {\r\n \t\t\t\t\t// nothing\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t} catch (IOException e) {\r\n \t\t\te.printStackTrace();\r\n \t\t}\r\n\t\tsetFiles(files);\r\n \t}", "public List getTargetPages(int p_primaryFileType);", "public void seperateDocsInFile() {\r\n try {\r\n docsBeforeParse = new HashMap<>();\r\n for (int i = 0; i < FILES_PER_CHUNK && filesCounter < totalFilesToRead; i++) {\r\n Document document = Jsoup.parse(new File(filePaths.get(filesCounter)), \"UTF-8\");\r\n Elements documents = document.getElementsByTag(\"DOC\");\r\n filesCounter++;\r\n splitDoc_Header_Text(documents);\r\n }\r\n }\r\n catch (Exception e){ e.getCause(); }\r\n }", "@Test\r\n public void testWalk() throws Exception {\r\n String r=this.getClass().getClassLoader().getResource(\"resources/__HEADER__.txt\").toString();\r\n FindFiles instance = new FindFiles(r.substring(6,r.length()-15),\"*\");\r\n ArrayList result = instance.walk();\r\n if( result.size()!=2 )\r\n fail(result.size()+\" entries while 2 attented\");\r\n for(Iterator it=result.iterator(); it.hasNext();){\r\n File f=new File(it.next().toString());\r\n String fn=f.getName();\r\n if( ! fn.equals(\"__HEADER__.txt\") && ! fn.equals(\"CPU.all.txt\") )\r\n fail(\"Unknown file \"+fn);\r\n }\r\n }", "public void splitFile(File file, String targetPath) {\n try {\n toolUtils.logMemory();\n Date curDate = new Date(System.currentTimeMillis());\n String strCurrTime = fastDateFormat.format(curDate);\n begin = new Date().getTime();\n String fileSize = toolUtils.GetFileSize(file);\n Integer splitCount = toolUtils.GetFileNums(file);\n log.info(\"The file's Size:\" + fileSize + \" spilt file's num:\" + splitCount);\n\n /**\n * when cutting files, record the name of the cutting file and the number of cutting subfiles for easy combination\n * this information is described in the properties object using key-value pairs for simplicity\n */\n Properties pro = new Properties();\n // 定义输出的文件夹路径\n File dir = new File(targetPath);\n // 判断文件夹是否存在,不存在则创建\n if (!dir.exists()) {\n dir.mkdirs();\n }\n\n // 将碎片文件存入到集合中\n List<FileOutputStream> al = new ArrayList<FileOutputStream>();\n List<StringBuffer> alsb = new ArrayList<StringBuffer>();\n\n for (int i = 0; i < splitCount; i++) {\n try {\n al.add(new FileOutputStream(new File(dir, i + \".part\")));\n alsb.add(new StringBuffer());\n } catch (Exception e) {\n // 异常\n e.printStackTrace();\n }\n }\n\n// BufferedInputStream fis = new BufferedInputStream(new FileInputStream(file));\n// // 用5M的缓冲读取文本文件\n// BufferedReader reader = new BufferedReader(new InputStreamReader(fis, \"utf-8\"), 100 * 1024 * 1024);\n// String line;\n// while ((line = reader.readLine()) != null) {\n// Integer target_file_name = (int) (hashUtils.hash(line) % splitCount);\n// alsb.get(target_file_name).append(line);\n// alsb.get(target_file_name).append(\"\\n\");\n// Integer len = alsb.get(target_file_name).toString().getBytes().length;\n// if (len % 1024 == 0) {\n// al.get(target_file_name).write(alsb.get(target_file_name).toString().getBytes());\n// al.get(target_file_name).flush();\n// alsb.get(target_file_name).setLength(0);\n// }\n// }\n//\n// for (int i = 0; i < al.size(); i++) {\n// if (alsb.get(i).length() > 0) {\n// al.get(i).write(alsb.get(i).toString().getBytes());\n// al.get(i).flush();\n// }\n// al.get(i).close();\n// }\n//\n// fis.close();\n\n // 切割文件\n try (LineIterator it = FileUtils.lineIterator(file, \"UTF-8\")) {\n while (it.hasNext()) {\n String line = it.nextLine();\n Integer target_file_name = (int) (toolUtils.hash(line) % splitCount);\n alsb.get(target_file_name).append(line);\n alsb.get(target_file_name).append(\"\\n\");\n Integer len = alsb.get(target_file_name).toString().getBytes().length;\n if (len % 1024 == 0) {\n al.get(target_file_name).write(alsb.get(target_file_name).toString().getBytes());\n al.get(target_file_name).flush();\n alsb.get(target_file_name).setLength(0);\n }\n }\n\n for (int i = 0; i < al.size(); i++) {\n if (alsb.get(i).length() > 0) {\n al.get(i).write(alsb.get(i).toString().getBytes());\n al.get(i).flush();\n }\n al.get(i).close();\n }\n\n } catch (IOException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n\n end = new Date().getTime();\n zxsj = (end - begin) / 1000;\n log.info(\"当前时间为:\" + strCurrTime + \" 执行时间为: \" + zxsj + \" s\");\n\n // 将被切割的文件信息保存到properties中\n pro.setProperty(\"partCount\", splitCount + \"\");\n pro.setProperty(\"fileName\", file.getName());\n pro.setProperty(\"currTime\", strCurrTime);\n pro.setProperty(\"zxsj\", zxsj.toString());\n FileOutputStream fo = new FileOutputStream(new File(dir, (splitCount++) + \".properties\"));\n // 写入properties文件\n pro.store(fo, \"save file info\");\n fo.close();\n toolUtils.logMemory();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public abstract void ScanAlphabetFiles(Collection<String> vFileList);", "abstract public void processing_file();", "@Override\n public void startReading() {\n\n byte[] bytes = getByteArrayFromFile();\n int ammountOfChunkFiles = bytes.length/188;\n\n for(int i=0; i< ammountOfChunkFiles;i++){\n byte[] chunkFile = Arrays.copyOfRange(bytes,i*188,i*188+188);\n super.observer.onNext188Bytes(chunkFile);\n }\n\n super.observer.onEnd(ammountOfChunkFiles);\n }", "private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String processPart(int start, int end) throws Exception {\n // BufferedReader is = null;\n // is = new BufferedReader(new FileReader(file));\n\n\n // int i = 0;\n // for(i = 0; i < start; i++) {\n // is.readLine();\n // }\n // is.skip(start);\n\n // do a computation using the input stream,\n // checking that we don't read more than (end-start) bytes\n\n ArrayList<String> list = listOfLines(file, start, end);\n\n // System.out.println(\"Computing the part from \" + start + \" to \" + end);\n\n // while(i < end && is.readLine() != null) {\n // String line = is.readLine();\n for(String line : list) {\n // System.out.println(line + \" \" + map.containsKey(line) + \"< \" + start + \", \" + end + \" >\");\n\n if(map.containsKey(line)) {\n int next = map.get(line) + 1;\n map.put(line, next);\n } else {\n map.put(line, 1);\n }\n }\n \n // }\n \n\n // Thread.sleep(5);\n // System.out.println(\"Finished the part from \" + start + \" to \" + end);\n\n return \"Some result\";\n }", "org.mojolang.mojo.lang.SourceFile getSourceFiles(int index);", "long getFileIndex();", "private boolean isWithinAccessedRange(File file)\n {\n\n String istoday=searchCriterial.getTimeOption();\n boolean isInRangeAccess=false;\n BasicFileAttributes fileAttributes;\n DateFormat dateFormat=new SimpleDateFormat(\"yyyy-MM-dd\");\n switch(istoday) {\n case \"Today\":\n\n\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getTodayDate());\n String formatDate = (dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n isInRangeAccess = ((formatDate.equals(startDate)));\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"Yesterday\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n\n String startDate = dateFormat.format(searchCriterial.getYesterdayDate());\n String formatDate = (dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess = ((formatDate.equals(startDate)));\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n break;\n case \"All Time\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n case \"Time Range\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n case \"\":\n try {\n fileAttributes = Files.readAttributes(Paths.get(file.getAbsolutePath()), BasicFileAttributes.class);\n Date testDate = dateFormat.parse(dateFormat.format(fileAttributes.lastAccessTime().toMillis()));\n isInRangeAccess= !(testDate.before(searchCriterial.getAccessedStartDate()) || testDate.after(searchCriterial.getAccessedEndDate()));\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n\n break;\n }\n return isInRangeAccess;\n\n }", "private void findFilesIncomplete() {\n\n\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
the variance: get values by subtracting mean from each value in the list, square each of these values, add all of the squres together, divide the sum by the number of values.
public int variance() { int sumofSquare = 0; for (int i = 0; i < number.length; i++) { sumofSquare += Math.pow(number[i] - averageValue(), 2); } return sumofSquare; }
[ "public double variance(){\n\t\tdouble mean = this.average();\n\t\tdouble sum = 0.0;\n\t\tfor (int i = 0; i < this.length; i++) {\n\t\t\tdouble var = this.x[i] - mean;\n\t\t\tdouble var2 = var * var;\n\t\t\tsum = sum + var2;\n\t\t}\n\t\tdouble n = (double)this.length;\n\t\tdouble out = sum/(n - 1.0);\n\t\treturn out;\n\t}", "public static double computeVariance(ArrayList<Double> vector, double mean){\n\t\tdouble var = 0;\n\n\t\tfor(double v: vector){\n\t\t\tvar+=(v-mean)*(v-mean);\n\t\t}\n\t\t\n\t\tif(vector.size()>0){\n\t\t\tvar = var/vector.size();\n\t\t}\n\t\t\n\t\treturn var;\n\t}", "public java.lang.Double getVariance() {\n double mean = 0;\n double var = 0;\n for(T d:this){\n mean += d.doubleValue();\n var += d.doubleValue()*d.doubleValue();\n }\n mean = mean/(double)size();\n return var/(double)size() - mean*mean;\n }", "public double getVariance()\n\t{\n\t\t\n\t\tdouble avg = returns.stream().mapToDouble(i -> i).average().getAsDouble();\t\t\t\t\n\t\treturn\treturns.stream().mapToDouble(i -> Math.pow((i-avg), 2)).sum() /(returns.size()-1);\t\t\n\t}", "public double variance() {\n\t\tif (data.length == 0) {\n\t\t\treturn Double.NaN;\n\t\t}\n\t\tdouble[] variances = new double[data.length];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tvariances[i] = Math.pow((data[i] - average()), 2);\n\t\t}\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t\tsum = sum + variances[i];\n\t\tdouble variance = sum / variances.length;\n\t\treturn variance;\n\t}", "public static double variance(double[] data) {\n double mean = mean(data);\n\n double sumOfSquaredDeviations = 0;\n\n for (int i = 0; i < data.length; i++) {\n sumOfSquaredDeviations += Math.pow(data[i] - mean, 2);\n }\n\n return sumOfSquaredDeviations / (data.length - 1);\n }", "private static final float variance(final float[] data, final float mean) {\r\n\t\t//Mean squared error of the dataset\r\n\t\tfloat mse = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < data.length; i++) {\r\n\t\t\tmse += (data[i] - mean) * (data[i] - mean);\r\n\t\t}\r\n\t\t\r\n\t\treturn mse / data.length;\t\t\r\n\t}", "private double[] varianceArray(){\n\t\tdouble[] varianceVals = new double[values.length];\n\t\tfor(int i = 0; i < values.length; i++){\n\t\t\tvarianceVals[i] = Math.pow(values[i] - mean , 2.0);\n\t\t}\n\t\treturn varianceVals;\n\t}", "public double stdev(List<Integer> list) {\n double listMean = mean(list);\n\n double sd = 0;\n for (Integer i : list) {\n double diff = i - listMean;\n sd += diff * diff;\n }\n double variance = sd / (list.size() - 1);\n\n return Math.round(Math.sqrt(variance));\n }", "double variance(double mean) throws MatrixException;", "public static double variance( Object array ) {\n try {\n int n = Array.getLength( array );\n double sum = 0;\n double sum2 = 0;\n int count = 0;\n for ( int i = 0; i < n; i++ ) {\n double d = Array.getDouble( array, i );\n if ( ! Double.isNaN( d ) ) {\n sum += d;\n sum2 += d * d;\n count++;\n }\n }\n double mean = sum / (double) count;\n return sum2 / (double) count - mean * mean;\n }\n catch ( RuntimeException e ) {\n return Double.NaN;\n }\n }", "public static double populationVariance(double[] data) {\n double mean = mean(data);\n\n double sumOfSquaredDeviations = 0;\n\n for (int i = 0; i < data.length; i++) {\n sumOfSquaredDeviations += Math.pow(data[i] - mean, 2);\n }\n\n return sumOfSquaredDeviations / data.length;\n }", "private void updateVariance() {\r\n double variance = 0.0;\r\n updateMean();\r\n for (Tweet t : members) {\r\n variance += ((t.getDateLong() - this.mean) * (t.getDateLong() - this.mean));\r\n }\r\n variance /= members.size();\r\n this.variance = variance;\r\n }", "public double varianceOfMean() {\n\t\treturn variance() * getWeight();\n\t}", "private double variance() {\r\n double variance = ((gamma(1 + lambda) / gamma(0.5 * (1 + lambda))) *\r\n (Math.sin(Math.PI * 0.5 * lambda) / (0.5 * Math.pow(2, 0.5 * (lambda - 1)))));\r\n return Math.pow(variance, 1 / lambda);\r\n }", "double getVariance();", "private double[] getVariance(int numWts) {\n double []variance = new double[numWts];\n for (int formulaNum = 0; formulaNum < numWts; formulaNum++) {\n// double sd = priorStdDevs[formulaNum];\n// variance[formulaNum] = 1.0/(sd * sd);\n for (int i = 0; i < domain_cnt; i++) {\n double trueCnts[] = inferences.get(i).numFormulaTrueCnts;\n double trueSqCnts[] = inferences.get(i).numFormulaTrueSqCnts;\n int numSamples = inferences.get(i).numIter;\n double x = trueCnts[formulaNum];\n double xsq = trueSqCnts[formulaNum];\n\n // Add variance for this domain\n variance[formulaNum] += xsq/numSamples - (x/numSamples)*(x/numSamples);\n }\n }\n return variance;\n }", "public static double populationVariance(double[] values) {\n double stdP = populationStandardDeviation(values);\n\n return stdP * stdP;\n }", "public double standardizedVarianceOfItemMeans(){\n return standardizedItemMeansVar;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Queue "seed" documents. Seed documents are the starting places for crawling activity. Documents are seeded when this method calls appropriate methods in the passed in ISeedingActivity object. This method can choose to find repository changes that happen only during the specified time interval. The seeds recorded by this method will be viewed by the framework based on what the getConnectorModel() method returns. It is not a big problem if the connector chooses to create more seeds than are strictly necessary; it is merely a question of overall work required. The end time and seeding version string passed to this method may be interpreted for greatest efficiency. For continuous crawling jobs, this method will be called once, when the job starts, and at various periodic intervals as the job executes. When a job's specification is changed, the framework automatically resets the seeding version string to null. The seeding version string may also be set to null on each job run, depending on the connector model returned by getConnectorModel(). Note that it is always ok to send MORE documents rather than less to this method. The connector will be connected before this method can be called.
@Override public String addSeedDocuments(ISeedingActivity activities, Specification spec, String lastSeedVersion, long seedTime, int jobMode) throws ManifoldCFException, ServiceInterruption { String dropboxPath = StringUtils.EMPTY; int i = 0; while (i < spec.getChildCount()) { SpecificationNode sn = spec.getChild(i); if (sn.getType().equals(JOB_STARTPOINT_NODE_TYPE)) { dropboxPath = sn.getAttributeValue(JOB_PATH_ATTRIBUTE); break; } i++; } getSession(); GetSeedsThread t = new GetSeedsThread(dropboxPath); try { t.start(); boolean wasInterrupted = false; try { XThreadStringBuffer seedBuffer = t.getBuffer(); // Pick up the paths, and add them to the activities, before we join with the child thread. while (true) { // The only kind of exceptions this can throw are going to shut the process down. String docPath = seedBuffer.fetch(); if (docPath == null) break; // Add the pageID to the queue activities.addSeedDocument(docPath); } } catch (InterruptedException e) { wasInterrupted = true; throw e; } catch (ManifoldCFException e) { if (e.getErrorCode() == ManifoldCFException.INTERRUPTED) wasInterrupted = true; throw e; } finally { if (!wasInterrupted) t.finishUp(); } } catch (InterruptedException e) { t.interrupt(); throw new ManifoldCFException("Interrupted: " + e.getMessage(), e, ManifoldCFException.INTERRUPTED); } catch (DropboxException e) { Logging.connectors.warn("DROPBOX: Error adding seed documents: " + e.getMessage(), e); handleDropboxException(e); } return ""; }
[ "@Test\n public void testNumberOfJobsCreatedBySeedJobPerInvocation() {\n int batchJobsPerSeed = 10;\n engineRule.getProcessEngineConfiguration().setBatchJobsPerSeed(10);\n\n Batch batch = helper.migrateProcessInstancesAsync(batchJobsPerSeed * 2 + 4);\n\n // when\n helper.executeSeedJob(batch);\n\n // then the default number of jobs was created\n assertEquals(batch.getBatchJobsPerSeed(), helper.getExecutionJobs(batch).size());\n\n // when the seed job is executed a second time\n helper.executeSeedJob(batch);\n\n // then the same amount of jobs was created\n assertEquals(2 * batch.getBatchJobsPerSeed(), helper.getExecutionJobs(batch).size());\n\n // when the seed job is executed a third time\n helper.executeSeedJob(batch);\n\n // then the all jobs where created\n assertEquals(2 * batch.getBatchJobsPerSeed() + 4, helper.getExecutionJobs(batch).size());\n\n // and the seed job is removed\n assertNull(helper.getSeedJob(batch));\n }", "public void testGenerateJobs() throws Exception {\n HarvestDefinitionDAO hddao = HarvestDefinitionDAO.getInstance();\n TemplateDAO.getInstance();\n\n final String scheduleName = \"foo\";\n final String noComments = \"\";\n \n final GregorianCalendar cal = new GregorianCalendar();\n // Avoids tedious rounding problems\n cal.set(Calendar.MILLISECOND, 0);\n // Make sure existing job is in the future\n PartialHarvest hd = (PartialHarvest) hddao.read(Long.valueOf(42));\n cal.add(Calendar.YEAR, 2);\n Date now = cal.getTime();\n Schedule s = Schedule.getInstance(now, 2, new WeeklyFrequency(2),\n scheduleName, noComments);\n ScheduleDAO.getInstance().create(s);\n hd.setSchedule(s);\n hd.reset();\n hddao.update(hd);\n\n cal.setTime(new Date()); // reset\n now = cal.getTime();\n generateJobs(now);\n JobDAO jobdao = JobDAO.getInstance();\n List<Job> jobs = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get no job for the HD in the future\", 0, jobs\n .size());\n // Make some harvest definitions with schedules around the given time\n // Requires a list of configurations for each HD\n List<DomainConfiguration> cfgs = new ArrayList<DomainConfiguration>();\n Domain domain = DomainDAO.getInstance().read(\"netarkivet.dk\");\n cfgs.add(domain.getDefaultConfiguration());\n final ScheduleDAO sdao = ScheduleDAO.getInstance();\n HarvestDefinition hd1 = HarvestDefinition.createPartialHarvest(\n cfgs,\n sdao.read(\"Hver hele time\"),\n \"Hele time\", noComments, \"EveryBody\");\n hd1.setSubmissionDate(new Date());\n hddao.create(hd1);\n HarvestDefinition hd2 = HarvestDefinition.createPartialHarvest(\n cfgs,\n sdao.read(\"Hver nat kl 4.00\"),\n \"Kl. 4\", noComments, \"EveryBody\");\n hd2.setSubmissionDate(new Date());\n hddao.create(hd2);\n generateJobs(now);\n List<Job> jobs1 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get jobs for no new defs immediately\", 0, jobs1\n .size());\n\n cal.add(Calendar.DAY_OF_MONTH, 1);\n now = cal.getTime();\n generateJobs(now);\n jobs1 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\"Should get jobs for both new defs after a day\", 2, jobs1\n .size());\n // Check that the right HD's came in\n Job j1 = jobs1.get(0);\n Job j2 = jobs1.get(1);\n assertTrue(\"Neither job must be for HD 42\", j1\n .getOrigHarvestDefinitionID() != hd.getOid() &&\n j2.getOrigHarvestDefinitionID()\n != hd.getOid());\n assertTrue(\"One of the jobs must be for the new HD \" + hd1.getOid()\n + \", but we got \" + jobs1, j1.getOrigHarvestDefinitionID()\n .equals(hd1.getOid())\n || j2.getOrigHarvestDefinitionID().equals(\n hd1.getOid()));\n assertTrue(\"One of the jobs must be for the new HD \" + hd1.getOid()\n + \", but we got \" + jobs1, j1.getOrigHarvestDefinitionID()\n .equals(hd2.getOid())\n || j2.getOrigHarvestDefinitionID().equals(hd2.getOid()));\n generateJobs(now);\n List<Job> jobs2 = IteratorUtils.toList(jobdao.getAll(JobStatus.NEW));\n assertEquals(\n \"Should generate one more job because we are past the time\"\n + \" when the next hourly job should have been scheduled.\",\n jobs1.size() + 1, jobs2.size());\n }", "@Override\n @Scheduled(fixedDelay = 500)\n public void generateData() {\n StopWatch watch = new StopWatch();\n watch.start();\n\n lastRunCount = getRandomCount();\n for (int i = 0; i < lastRunCount; i++) {\n Sample s = new Sample();\n s.setValue1(String.valueOf(i));\n s.setValue2(i);\n s.setValue3(new Date());\n repository.save(s);\n }\n\n watch.stop();\n lastRunDuration = watch.getTotalTimeMillis();\n LOGGER.debug(\"Adding {} entities in {} ms\", lastRunCount, lastRunDuration);\n }", "public void doActivities(Object seedData);", "public void seed(long seed) {\n }", "IDocumentQueryCustomization randomOrdering(String seed);", "public Seed() {\n this.seedId = SEED_COUNTER.getAndIncrement();\n }", "public void run() {\n \t\tCursor searchCursor = getContentResolver().query(Search.buildSearchUri(String.valueOf(mSearchId)),SearchQuery.PROJECTION, \n \t\t\t\tnull, null, null);\n \t\t//Checks whether synch flag is set or not.\n \t\tif (searchCursor.moveToFirst() && searchCursor.getInt(1)==0)\n \t\t\trequestSearch(Search.NEW_SEARCH);\n \tlong nextSearchTime = Integer.parseInt(mSettings.getString(SEARCH_RATE_PREFERENCE,\"600000\"));\n mMessageQueueHandler.postDelayed(mSearchRunnable, nextSearchTime);\n searchCursor.close();\n }", "public IngestLog processSeeds() throws IOException {\n long insertedcount = 0L;\n long rejectedcount = 0L;\n long duplicatecount = 0L;\n long errorcount = 0L;\n long domainsAddedCount = 0L;\n long updatecount = 0L;\n\n List<String> logentries = new ArrayList<String>();\n initalizeLogs();\n\n long lines = 0;\n SeedsDAO sdao = daoFactory.getSeedsDAO();\n DomainsDAO ddao = daoFactory.getDomainsDAO();\n\n try (BufferedReader fr = new BufferedReader(new FileReader(seedsfile))) {\n\n String line;\n while ((line = fr.readLine()) != null) {\n if (line.trim().isEmpty()) { // Silently ignore empty lines\n continue;\n }\n ++lines;\n if (lines % 10000 == 0) {\n String datestamp = \"[\" + new Date() + \"]\";\n logger.info(datestamp + \" Processed {} seeds.\", lines);\n System.out.println(datestamp + \" Processed \" + lines + \" seeds\");\n }\n\n if (insertedcount % 10000 == 0 && insertedcount>0) {\n String datestamp = \"[\" + new Date() + \"]\";\n logger.info(datestamp + \" Accepted {} seeds.\", insertedcount);\n System.out.println(datestamp + \" Accepted \" + insertedcount + \" seeds\");\n }\n if (rejectedcount % 10000 == 0 && rejectedcount>0) {\n String datestamp = \"[\" + new Date() + \"]\";\n logger.info(datestamp + \" Rejected {} seeds.\", rejectedcount);\n System.out.println(datestamp + \" Rejected \" + rejectedcount + \" seeds\");\n }\n if (updatecount % 10000 == 0 && updatecount > 0) {\n String datestamp = \"[\" + new Date() + \"]\";\n logger.info(datestamp + \" UpdatedLog reached {} lines.\", updatecount);\n System.out.println(datestamp + \" UpdatedLog reached \" + updatecount + \" lines\");\n }\n\n String errMsg = \"\";\n String url = removeAnnotationsIfNecessary(line.trim());\n URL_REJECT_REASON rejectreason = UrlUtils.isRejectableURL(url);\n \n if (!rejectreason.equals(URL_REJECT_REASON.NONE)){\n String logEntry = rejectreason + \": \" + url + \" \" + errMsg;\n if (!onlysavestats) {\n logentries.add(logEntry);\n }\n rejectedcount++;\n writeTo(logEntry, rejectLog);\n continue;\n } else {\n Seed singleSeed = new Seed(url);\n if (ingestAsDanica) {\n singleSeed.setDanicaStatus(DanicaStatus.YES);\n singleSeed.setDanicaStatusReason(\"Known by curators to be danica\");\n singleSeed.setStatus(Status.DONE);\n singleSeed.setStatusReason(\"Set to Status done at ingest to prevent further processing of this url\");\n }\n\n try {\n boolean inserted;\n inserted = sdao.insertSeed(singleSeed);\n\n if (inserted) {\n String domainName = singleSeed.getDomain();\n if (!ddao.existsDomain(domainName)) {\n Domain newdomain = Domain.createNewUndecidedDomain(domainName);\n boolean insertedDomain = ddao.insertDomain(newdomain);\n String domainLogEntry = null;\n if (!insertedDomain) {\n domainLogEntry = \"Failed to add domain '\" + domainName + \"' to domains table, the domain of seed '\" + url + \"'\";\n errorcount++;\n } else {\n domainLogEntry = \"Added domain '\" + domainName + \"' to domains table, the domain of seed '\" + url + \"'\";\n }\n\n if (!onlysavestats) {\n logentries.add(\"DOMAINS: \" + domainLogEntry); \n }\n writeTo(\"DOMAINS: \" + domainLogEntry, updateLog);\n }\n insertedcount++;\n if (!onlysavestats) {\n acceptedList.add(url);\n }\n writeTo(url, acceptLog);\n\n } else {\n if (ingestAsDanica) {\n // update state of seed if not already in Status.DONE\n Seed oldSeed = sdao.getSeed(url);\n if (oldSeed == null) {\n // Should not happen\n rejectreason = URL_REJECT_REASON.UNKNOWN;\n logger.warn(\"The url '{}' should have been in database. But no record was found\", url);\n errMsg = \"The url '\" + url + \"' should have been in database. But no record was found\";\n // Add errMsg to errors.log with datestamp\n String datestamp=\"[\" + new Date() + \"] \";\n writeTo(datestamp + errMsg, errorsLog);\n errorcount++;\n } else {\n String updateLogEntry = null;\n if (oldSeed.getDanicaStatus().equals(DanicaStatus.YES)) {\n updateLogEntry = \"The seed '\" + url + \"' is already in the database with DanicaStatus.YES and status '\" + oldSeed.getStatus() + \"'\";\n } else {\n updateLogEntry = \"The seed '\" + url + \"' is already in the database with DanicaStatus=\" + oldSeed.getDanicaStatus() + \", and status '\" +\n oldSeed.getStatus() + \"'. Changing to DanicaStatus.YES and status.DONE\";\n\n oldSeed.setDanicaStatus(DanicaStatus.YES);\n oldSeed.setDanicaStatusReason(\"Known by curators to be danica\");\n oldSeed.setStatus(Status.DONE);\n oldSeed.setStatusReason(\"Set to Status done at ingest to prevent further processing of this url\");\n sdao.updateSeed(oldSeed);\n }\n writeTo(\"UPDATED: \" + updateLogEntry, updateLog);\n\n }\n } else {\n rejectreason = URL_REJECT_REASON.DUPLICATE;\n duplicatecount++;\n }\n }\n } catch (DaoException e) {\n logger.error(\"Failure in communication with HBase\", e);\n rejectreason = URL_REJECT_REASON.UNKNOWN;\n errMsg = \"Failure in communication with HBase: \" + ExceptionUtils.getFullStackTrace(e);\n errorcount++;\n\n String datestamp=\"[\" + new Date() + \"] \";\n writeTo(datestamp + errMsg, errorsLog);\n }\n if (!rejectreason.equals(URL_REJECT_REASON.UNKNOWN)) {\n String logEntry = rejectreason + \": \" + url + \" \" + errMsg;\n if (!onlysavestats) {\n logentries.add(logEntry);\n }\n rejectedcount++;\n writeTo(logEntry, rejectLog);\n }\n\n }\n }\n } catch (IOException e) {\n throw new RuntimeException(\"Failed to read file \" + seedsfile, e);\n } finally {\n ddao.close();\n sdao.close();\n }\n // trying to update the cache\n try {\n Cache.getCache(daoFactory);\n } catch (Exception e1) {\n System.err.println(\"WARNING: failed to update the statecache: \" \n + ExceptionUtils.getFullStackTrace(e1));\n }\n\n try {\n writeStatsToLogs(insertedcount, rejectedcount, duplicatecount, errorcount, lines, logentries, onlysavestats, domainsAddedCount, updatecount); \n } catch (Exception e) {\n throw new RuntimeException(\"Failed to write logs\", e);\n }\n\n try {\n return logIngestStats(logentries, lines, insertedcount, rejectedcount, duplicatecount, errorcount);\n } catch (Exception e) {\n throw new RuntimeException(\"Failed to log ingest stats\",e);\n }\n\n}", "private void createGeneratorsSeeds(){\n if(sensorCountGeneratorSeed == null){\n sensorCountGeneratorSeed = System.currentTimeMillis();\n }\n if(refreshRateGeneratorSeed == null){\n refreshRateGeneratorSeed = System.currentTimeMillis();\n }\n if(signalGeneratorSeed == null){\n signalGeneratorSeed = System.currentTimeMillis();\n }\n if(batteryGeneratorSeed == null){\n batteryGeneratorSeed = System.currentTimeMillis();\n }\n if(valueTypeGeneratorSeed == null){\n valueTypeGeneratorSeed = System.currentTimeMillis();\n }\n if(temperatureSeed == null){\n temperatureSeed = System.currentTimeMillis();\n }\n if(humiditySeed == null){\n humiditySeed = System.currentTimeMillis();\n }\n if(pressureSeed == null){\n pressureSeed = System.currentTimeMillis();\n }\n if(lightIntensitySeed == null){\n lightIntensitySeed = System.currentTimeMillis();\n }\n if(noiseIntensitySeed == null){\n noiseIntensitySeed = System.currentTimeMillis();\n }\n if(emissionsSeed == null){\n emissionsSeed = System.currentTimeMillis();\n }\n }", "void setSeed(final long seed);", "public void feed(Document doc) {\n if (batchSize <= 1) {\r\n feedCount++;\r\n invoke(\"publishDocument\", doc);\r\n } else {\r\n // handle the batch\r\n // TODO: make this synchronized and thread safe!\r\n batch.add(doc);\r\n if (batch.size() >= batchSize) {\r\n feedCount += batch.size();\r\n //\r\n synchronized (batch) {\r\n invoke(\"publishDocuments\", batch);\r\n batch = Collections.synchronizedList(new ArrayList<Document>());\r\n }\r\n // flush();\r\n }\r\n }\r\n\r\n // update and report timing metrics\r\n long now = System.currentTimeMillis();\r\n long lastReport = now - lastUpdate;\r\n // every 10 seconds\r\n if (lastReport > 10000) {\r\n // log the throughput\r\n double speed = feedCount / (double) (now - start) * 1000;\r\n log.info(\"Feed {} docs. Current rate {}\", feedCount, speed);\r\n lastUpdate = now;\r\n }\r\n\r\n // // test the max feed count\r\n if (feedCount > maxFeedCount && maxFeedCount >= 0) {\r\n // stop this connector.\r\n setState(ConnectorState.INTERRUPTED);\r\n }\r\n }", "private void createSeedJob(String desc) throws Exception {\n FreeStyleProject seedJob = j.createFreeStyleProject();\n ExecuteDslScripts dslScript = new ExecuteDslScripts();\n dslScript.setUseScriptText(Boolean.TRUE);\n dslScript.setScriptText(desc);\n dslScript.setTargets(null);\n dslScript.setIgnoreExisting(Boolean.FALSE);\n dslScript.setRemovedJobAction(RemovedJobAction.DELETE);\n seedJob.getBuildersList().add(dslScript);\n\n j.buildAndAssertSuccess(seedJob);\n }", "protected void triggerSync() {\n FeedUtils.triggerSync(this);\n\t}", "public static void indexEnronAll(){\n\t\tString db=\"enronAll\";\n\t\tString filename=\"data/enron/all.txt\";\n\t\tString postsCol=\"posts_1\";\n\t\tlong maxInterval=1000*3600*24*7*52; \n\t\tEnronAllIndexer indexer=new EnronAllIndexer();\n\t\ttry{\n\t\t\tString stemsCol=indexer.indexStems(db, filename);\n\t\t\tIDFPruner trans=new IDFPruner(2000,db,stemsCol);\n\t\t\ttrans.learn();\n\t\t\t//String stemsCol=\"stems_2\";\n\t\t\t//NoTransform trans=new NoTransform();\n\t\t\tpostsCol=indexer.indexData(db, filename, new TF_Weighter(db,stemsCol), trans);\n\t\t\t\n\t\t\tPostsSelector postSel=new PostsSelector();\n\t\t\tpostsCol=postSel.selectPosts(db, postsCol, 10000);\n\t\t\t\n\t\t\t\n\t\t\tCascadesProducer cp=new CascadesProducer();\n\t\t\tString cascadesCol=cp.produceCascades(db,postsCol,new BasicDBObject(),0,-1,2,maxInterval);\n\t\t\t// CascadesSelector eventuellement\n\t\t\tString usersCol=(new PostsInSameCascade(true)).linkUsers(db,cascadesCol);\n\t\t\tCascadesTrainTestSetsBuilder.build(db,cascadesCol,0.5);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public DatabaseSeeder() {\n // initialSeed properties...\n super();\n\n // retrieve a database connection instance...\n this.connector = new DatabaseConnector();\n this.connection = this.connector.connect();\n }", "private void scheduleArticleRequests(){\n ComponentName componentName = new ComponentName(this.getActivity(), NewsOfTheDayJobScheduler.class);\n JobInfo info = new JobInfo.Builder(NewsOfTheDayTimeService.SCHEDULER_ID, componentName)\n .setRequiredNetworkType(JobInfo.NETWORK_TYPE_ANY)\n .setPersisted(true)\n .setPeriodic(NewsOfTheDayTimeService.getRequestIntervallMills())\n .build();\n JobScheduler scheduler = (JobScheduler) getActivity().getSystemService(JOB_SCHEDULER_SERVICE);\n int resultCode = scheduler.schedule(info);\n if(resultCode < 0){\n DailyNewsLoadingService.setLoading(false);\n }\n }", "public Source setSeed(long seed) { prng.setSeed( seed ); return this; }", "@Test\n\tpublic void testUpdatesSeeds() {\n\t\t//Arrange\n\t\tint startLoc[] = new int[]{2};\n\t\tint otherLocs[] = new int[]{0,1,3,4};\n\t\t\t\n\t\tMockito.when(randMock.generateRandomNumber(1, 4, seed)).thenReturn(startLoc);\n\t\tMockito.when(randMock.generateRandomNumber(10, 5, seed+1)).thenReturn(otherLocs);\n\t\t\t\n\t\t//Act\n\t\tlong seed = 2;\n\t\t\t\n\t\t//Assert\n\t\tassertEquals(seed, iteratorObj.startVisits());\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
A convenience method that allows retrieval of the part of speech object given the tag. Accepts both lower and upper case characters.
public static POS getPartOfSpeech(char tag) { switch(tag){ case('N'): // capital, fall through case('n'): return NOUN; case('V'): // capital, fall through case('v'): return VERB; case('R'): // capital, fall through case('r'): return ADVERB; case('s'): // special case, 's' for adjective satellite, fall through case('S'): // capital, fall through case('A'): // capital, fall through case('a'): return ADJECTIVE; } return null; }
[ "public static POS getPartOfSpeech(char tag){\r\n switch (tag) {\r\n case ('N'): // capital, fall through\r\n case ('n'):\r\n return NOUN;\r\n case ('V'): // capital, fall through\r\n case ('v'):\r\n return VERB;\r\n case ('R'): // capital, fall through\r\n case ('r'):\r\n return ADVERB;\r\n case ('s'): // special case, 's' for adjective satellite, fall through\r\n case ('S'): // capital, fall through\r\n case ('A'): // capital, fall through\r\n case ('a'):\r\n return ADJECTIVE;\r\n }\r\n return null;\r\n }", "static PartOfSpeech parse(String aTag) {\n\t\taTag = aTag.toUpperCase();\n\n\t\t/* check to see if we have a reverse string->POS index, and create one\n\t\t * if not */\n\t\tif (smTagdex == null) {\n\t\t\tsmTagdex = new HashMap<String, PartOfSpeech>();\n\n\t\t\tfor (PartOfSpeech pos : values()) {\n\t\t\t\tsmTagdex.put(pos.mTag, pos);\n\t\t\t}\n\t\t}\n\n\t\treturn smTagdex.get(aTag);\n\t}", "public String getFromTag();", "SuggestionObject getTagSuggestion();", "Object getTag();", "public Object getTag(String tagName);", "java.lang.String getTag();", "String getTag();", "public final Object get(String tag) {\n\t\treturn tags.get(tag).data;\n\t}", "public void word(String word, String tag) {}", "@VTID(91)\r\n java.lang.String getTag();", "public String process(Tag tag);", "public static POS getPartOfSpeech(int num){\r\n switch (num) {\r\n case (1):\r\n return NOUN;\r\n case (2):\r\n return VERB;\r\n case (4):\r\n return ADVERB;\r\n case (5): // special case, '5' for adjective satellite, fall through\r\n case (3):\r\n return ADJECTIVE;\r\n }\r\n return null;\r\n }", "LanguageTag tag();", "java.lang.String getWord();", "WordBean getWord(String word);", "String convertTag(String tag);", "public static POS getPartOfSpeech(int num) {\r\n \tswitch(num){\r\n \tcase(1): return NOUN;\r\n \tcase(2): return VERB;\r\n \tcase(4): return ADVERB;\r\n \tcase(5): // special case, '5' for adjective satellite, fall through\r\n \tcase(3): return ADJECTIVE;\r\n \t}\r\n return null;\r\n }", "abstract Fragment find(String tag);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Store an object in the object store, and assign its ownership to owner. This function is experimental.
<T> ObjectRef<T> put(T obj, BaseActorHandle owner);
[ "public static <T> ObjectRef<T> put(T obj, BaseActorHandle owner) {\n return internal().put(obj, owner);\n }", "public void store(Book object)\r\n {\r\n storePersisent(object);\r\n }", "void store(T object);", "public void storeObject(String key, Object object) {\n\t\tsynchronized (mutex) {\n\t\t\tLogger.printMessage(TAG, \"storing object \" + object + \" with key \"\n\t\t\t\t\t+ key + \" in data model \", Logger.INFO);\n\n\t\t\tmodel.put(key, object);\n\t\t}\n\t}", "public void storeObject( SharedObjectInterface sharedObject ) {\n SharedEntry key = new SharedEntry( sharedObject.getClass().getName(), sharedObject.getName() );\n objectsMap.put( key, sharedObject );\n }", "private void storeObject(String name, Object obj)\r\n {\r\n objectNames.put(obj, name);\r\n\r\n if (!nameObjects.containsKey(name))\r\n nameObjects.put(name, new WeakReference(obj));\r\n }", "public void storeObject(final GameObject object) {\n final var id = object.getId();\n if (this.objectsById.containsKey(id)) {\n throw new EngineException(\"The id \" + id + \" is already used in this scene\");\n }\n this.objectsById.put(id, object);\n\n object.getTags().forEach(tag -> this.objectsByTags.computeIfAbsent(tag, key -> new ArrayList<>()).add(object));\n }", "public void save(Owner o){\n this.ownerRepo.save(o);\n }", "public abstract void setObject(EObject obj);", "@Override\n protected void _putObjectToActorInstance(String name, Object object) throws ScriptException {\n String globalName = \"_yyy_\" + name;\n _engine.put(globalName, object);\n _engine.eval(_ACTOR_INSTANCE_NAME + \".\" + name + \" = \" + globalName);\n }", "protected void createObjectIdentity(ObjectIdentity object, Sid owner) {\n Long sidId = createOrRetrieveSidPrimaryKey(owner, true);\n Long classId = createOrRetrieveClassPrimaryKey(object.getJavaType(), true);\n jdbcTemplate.update(insertObjectIdentity,\n new Object[] {classId, object.getIdentifier().toString(), sidId, new Boolean(true)});\n }", "protected void createObjectIdentity(ObjectIdentity object, Sid owner) {\n\t\tLong sidId = createOrRetrieveSidPrimaryKey(owner, true);\n\t\tLong classId = createOrRetrieveClassPrimaryKey(object.getType(), true, object.getIdentifier().getClass());\n\t\tthis.jdbcOperations.update(this.insertObjectIdentity, classId, object.getIdentifier().toString(), sidId,\n\t\t\t\tBoolean.TRUE);\n\t}", "protected void createObjectIdentity(ObjectIdentity object, Sid owner) {\n Long sidId = createOrRetrieveSidPrimaryKey(owner, true);\n Long classId = createOrRetrieveClassPrimaryKey(object.getType(), true);\n Long objectId = Long.parseLong(object.getIdentifier().toString());\n jdbcTemplate.update(insertObjectIdentity, new Object[]{classId, objectId, sidId, new Boolean(true)});\n }", "public Object persist(Object o) throws Exception;", "public void setObject (Object object)\n {\n _object = object;\n }", "SELF setOwner(com.example.custom.CustomOwnerClass value);", "@Override\n public void createOwner(Owner owner) throws CarDBException {\n Session session = null;\n try {\n session = factory.openSession();\n tx = session.beginTransaction();\n session.persist(owner);\n tx.commit();\n } catch (HibernateException e) {\n tx.rollback();\n throw new CarDBException(e.getCause());\n } finally {\n if (session != null) session.close();\n }\n }", "public void saveObjectAndSync(final Object objectType) throws Exception;", "public void addToOwningObject() {\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new BeanWrapperImpl, allowing specification of whether event propagation is enabled.
public BeanWrapperImpl(Object object, boolean eventPropagationEnabled) throws BeansException { this.eventPropagationEnabled = eventPropagationEnabled; setObject(object); }
[ "public BeanWrapperImpl(Object object) throws BeansException {\n\t\tthis(object, DEFAULT_EVENT_PROPAGATION_ENABLED);\n\t}", "public static BeanWrapper createWrapper(Object bean) {\r\n BeanWrapper wrapper;\r\n wrapper = PropertyAccessorFactory.forBeanPropertyAccess(bean);\r\n try {\r\n ConversionService conversionService = getConversionsService();\r\n if (conversionService!=null) {\r\n wrapper.setConversionService(conversionService);\r\n } // if\r\n if (log.isInfoEnabled()) {\r\n log.info(\"createWrapper() conversion service \"+wrapper.getConversionService());\r\n } // if\r\n } catch (Exception e) {\r\n // conversion services are still optional for some time\r\n } // try/catch\r\n return wrapper;\r\n }", "public BeanWrapper newWrapper(Object obj) throws BeansException {\n\t\tif (!this.cachedIntrospectionResults.getBeanClass().equals(obj.getClass()))\n\t\t\tthrow new FatalBeanException(\"Cannot create new wrapper for object of class \" + obj.getClass().getName() + \" using cached information for class \" + cachedIntrospectionResults.getBeanClass(), null);\n\t\treturn new BeanWrapperImpl(this.cachedIntrospectionResults, obj);\n\t}", "@Override\n\tpublic JuffrouBeanWrapper getBeanWrapper(Object instance) {\n\t\treturn new JuffrouBeanWrapper(getBeanWrapperContext(\n\t\t\t\tinstance.getClass(), null), instance);\n\t}", "public ExtrachargetaxBean createExtrachargetaxBean()\n {\n return new ExtrachargetaxBean();\n }", "private NotificationListener getListenerWrapper(NotificationListener l,\n ObjectName name,\n Object mbean,\n boolean create) {\n NotificationListener wrapper = new ListenerWrapper(l, name, mbean);\n synchronized (listenerWrappers) {\n WeakReference ref = (WeakReference) listenerWrappers.get(wrapper);\n if (ref != null) {\n NotificationListener existing =\n (NotificationListener) ref.get();\n if (existing != null)\n return existing;\n }\n if (create) {\n listenerWrappers.put(wrapper, new WeakReference(wrapper));\n return wrapper;\n } else\n return null;\n }\n }", "protected AbstractViewBindingDelegate createBinding() {\n \t\treturn new DefaultSwtBindingDelegate();\n \t}", "public interface BeanWrapper extends PropertyAccessor, PropertyEditorRegistry {\r\n\r\n\t/**\r\n\t * Change the wrapped object. Implementations are required\r\n\t * to allow the type of the wrapped object to change.\r\n\t * @param obj wrapped object that we are manipulating\r\n\t */\r\n\tvoid setWrappedInstance(Object obj);\r\n\r\n\t/**\r\n\t * Return the bean wrapped by this object (cannot be <code>null</code>).\r\n\t * @return the bean wrapped by this object\r\n\t */\r\n\tObject getWrappedInstance();\r\n\r\n\t/**\r\n\t * Convenience method to return the class of the wrapped object.\r\n\t * @return the class of the wrapped object\r\n\t */\r\n\tClass getWrappedClass();\r\n\r\n\t/**\r\n\t * Set whether to extract the old property value when applying a\r\n\t * property editor to a new value for a property.\r\n\t * <p>Default is \"false\", avoiding side effects caused by getters.\r\n\t * Turn this to \"true\" to expose previous property values to custom editors.\r\n\t */\r\n\tvoid setExtractOldValueForEditor(boolean extractOldValueForEditor);\r\n\r\n\r\n\t/**\r\n\t * Get the PropertyDescriptors identified on this object\r\n\t * (standard JavaBeans introspection).\r\n\t * @return the PropertyDescriptors identified on this object\r\n\t */\r\n\tPropertyDescriptor[] getPropertyDescriptors() throws BeansException;\r\n\r\n\t/**\r\n\t * Get the property descriptor for a particular property.\r\n\t * @param propertyName property to check status for\r\n\t * @return the property descriptor for the particular property\r\n\t * @throws InvalidPropertyException if there is no such property\r\n\t */\r\n\tPropertyDescriptor getPropertyDescriptor(String propertyName) throws BeansException;\r\n\r\n\t/**\r\n\t * Return whether this property is readable.\r\n\t * Returns false if the property doesn't exist.\r\n\t * @param propertyName property to check status for\r\n\t * @return whether this property is readable\r\n\t */\r\n\tboolean isReadableProperty(String propertyName) throws BeansException;\r\n\r\n\t/**\r\n\t * Return whether this property is writable.\r\n\t * Returns false if the property doesn't exist.\r\n\t * @param propertyName property to check status for\r\n\t * @return whether this property is writable\r\n\t */\r\n\tboolean isWritableProperty(String propertyName) throws BeansException;\r\n\r\n\t/**\r\n\t * Determine the property type for a particular property, either checking\r\n\t * the property descriptor or checking the value in case of an indexed or\r\n\t * mapped element.\r\n\t * @param propertyName property to check status for\r\n\t * @return the property type for the particular property, or <code>null</code>\r\n\t * if not determinable (can only happen with an indexed or mapped element)\r\n\t * @throws InvalidPropertyException if there is no such property\r\n\t */\r\n\tClass getPropertyType(String propertyName) throws BeansException;\r\n\r\n}", "interface BeanCreator {\n /**\n * Obtains a new instance of the Bean this BeanProcessor handled. <br>\n * New instances have been processed by the same chain of BeanProcessors\n * that the original Bean had been. \n * @return new instance of bean.\n */\n Object getBean();\n }", "EventBinding createEventBinding();", "public ActBean createActBean()\n {\n return new ActBean();\n }", "public TrlibBean createTrlibBean()\n {\n return new TrlibBean();\n }", "SpringImplementation createSpringImplementation();", "ISIntracomponentPropagation createISIntracomponentPropagation();", "void registerBeans(@Observes AfterBeanDiscovery event, BeanManager manager) {\n {\n AnnotatedType<Office> oat = manager.createAnnotatedType(Office.class);\n BeanAttributes<Office> oa = manager.createBeanAttributes(oat);\n InjectionTargetFactory<Office> factory = manager.getInjectionTargetFactory(oat);\n Bean<?> bean = manager.createBean(oa, Office.class, factory);\n event.addBean(bean);\n }\n // create a serializable synthetic class bean\n {\n AnnotatedType<SerializableOffice> oat = manager.createAnnotatedType(SerializableOffice.class);\n BeanAttributes<SerializableOffice> oa = manager.createBeanAttributes(oat);\n InjectionTargetFactory<SerializableOffice> factory = manager.getInjectionTargetFactory(oat);\n Bean<?> bean = manager.createBean(oa, SerializableOffice.class, factory);\n event.addBean(bean);\n }\n // create a synthetic decorator\n {\n AnnotatedType<VehicleDecorator> oat = manager.createAnnotatedType(VehicleDecorator.class);\n BeanAttributes<VehicleDecorator> oa = addDecoratorStereotype(manager.createBeanAttributes(oat));\n InjectionTargetFactory<VehicleDecorator> factory = manager.getInjectionTargetFactory(oat);\n Bean<?> bean = manager.createBean(oa, VehicleDecorator.class, factory);\n assertTrue(bean instanceof Decorator<?>);\n event.addBean(bean);\n }\n\n assertNotNull(zooBean);\n\n // create synthetic producer field\n {\n AnnotatedType<Zoo> zoo = manager.createAnnotatedType(Zoo.class);\n assertEquals(1, zoo.getFields().size());\n AnnotatedField<? super Zoo> field = zoo.getFields().iterator().next();\n BeanAttributes<Lion> attributes = Reflections.cast(starveOut(manager.createBeanAttributes(field)));\n ProducerFactory<Zoo> factory = getManagerImpl(manager).getProducerFactory(field, zooBean);\n event.addBean(manager.createBean(attributes, Zoo.class, factory));\n }\n // create synthetic producer method\n {\n AnnotatedType<Zoo> zoo = manager.createAnnotatedType(Zoo.class);\n AnnotatedMethod<? super Zoo> method = null;\n for (AnnotatedMethod<? super Zoo> _method : zoo.getMethods()) {\n if (_method.getBaseType().equals(Tiger.class)) {\n method = _method;\n }\n }\n assertNotNull(method);\n BeanAttributes<Tiger> attributes = Reflections.cast(starveOut(manager.createBeanAttributes(method)));\n ProducerFactory<Zoo> factory = getManagerImpl(manager).getProducerFactory(method, zooBean);\n event.addBean(manager.createBean(attributes, Zoo.class, factory));\n }\n }", "public WrapperGenerator(DeploymentContext context, EjbDescriptor dd, \n\t\t\t boolean isLocal, Vector existingClassNames)\n\tthrows GeneratorException \n {\n\tsuper();\n\n\tthis.dd = dd;\n\tthis.isLocal = isLocal;\n \n ClassLoader cl = context.getClassLoader();\n\ttry {\n\t //IASRI 4725194 this.bean = cl.loadClass(dd.getEjbClassName());\n\t this.bean = cl.loadClass(dd.getEjbImplClassName());\n\t} catch (ClassNotFoundException ex) {\n\t throw new InvalidBean(\n\t\tlocalStrings.getLocalString(\n\t\t\"generator.bean_class_not_found\",\n\t\t\"Bean class not found \"));\n\t}\n\n\tString compIntfName;\n\tif ( isLocal ) {\n\t compIntfName = dd.getLocalClassName();\n\t ejbClassSymbol = MethodDescriptor.EJB_LOCAL;\n\t}\n\telse {\n\t compIntfName = dd.getRemoteClassName();\n\t ejbClassSymbol = MethodDescriptor.EJB_REMOTE;\n\t}\n\ttry {\n\t this.componentInterface = cl.loadClass(compIntfName);\n\t} catch (ClassNotFoundException ex) {\n\t throw new InvalidBean(\n\t\tlocalStrings.getLocalString(\n\t\t\"generator.remote_interface_not_found\",\n\t\t\"Remote interface not found \"));\n\t}\n\t\n\tString suffix;\n\tif ( isLocal ) {\n\t wrapperBase = \"com.sun.ejb.containers.EJBLocalObjectImpl\";\n\t suffix = LOCAL_SUFFIX;\n\t}\n\telse {\n\t wrapperBase = \"com.sun.ejb.containers.EJBObjectImpl\";\n\t suffix = REMOTE_SUFFIX;\n\t}\n\n\t// find a unique classname for this ejbObject/LocalObject impl\n\tString wrapperClassName = getUniqueClassName(context, bean.getName(), \n\t\t\t\t\t\t suffix, existingClassNames);\n\twrapperImpl = getBaseName(wrapperClassName);\n\n\tbizMethods = removeDups(componentInterface.getMethods());\n\tbizMethods = removeEJBObjectMethods(bizMethods);\n }", "@Bean\n @ConditionalOnProperty(name = \"allownbsbean\", havingValue = \"true\")\n @Primary\n public EmployeeService getEmployeeServiceBean() {\n EmployeeServiceProxy serviceAdvice = new EmployeeServiceProxy(data);\n\n return (EmployeeService) Proxy.newProxyInstance(EmployeeService.class.getClassLoader(),\n new Class[] {EmployeeService.class}, serviceAdvice);\n }", "public PersonnelBean createPersonnelBean()\r\n {\r\n return new PersonnelBean();\r\n }", "public FlPersonGroupBean createBean()\n {\n return new FlPersonGroupBean();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
POST /tipdocs : Create a new tipdoc.
@PostMapping("/tipdocs") @Timed public ResponseEntity<Tipdoc> createTipdoc(@Valid @RequestBody Tipdoc tipdoc) throws URISyntaxException { log.debug("REST request to save Tipdoc : {}", tipdoc); if (tipdoc.getId() != null) { return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "idexists", "A new tipdoc cannot already have an ID")).body(null); } Tipdoc result = tipdocRepository.save(tipdoc); tipdocSearchRepository.save(result); return ResponseEntity.created(new URI("/api/tipdocs/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); }
[ "@PreAuthorize(\"isAuthenticated()\")\n\t@RequestMapping(value = \"/create\", method = RequestMethod.POST, produces = \"application/json\")\n\tpublic String create(@RequestBody Tip tip) {\n\t\tthis.logger.debug(\"landed at /ugc/tips/create\");\n\n\t\ttip.setUsr(User.getLoggedInUser());\n\t\t/*\n\t\tJsonArray errors = new JsonArray();\n\t\tif (errors.size() > 0) {\n\t\t\treturn errors.toString();\n\t\t}\n\t\t*/\n\n\t\t// persist and return id\n\t\ttip.persist();\n\t\treturn tip.getId().toString();\n\t}", "@PostMapping(\"/tipcalperis\")\n @Timed\n public ResponseEntity<Tipcalperi> createTipcalperi(@Valid @RequestBody Tipcalperi tipcalperi) throws URISyntaxException {\n log.debug(\"REST request to save Tipcalperi : {}\", tipcalperi);\n if (tipcalperi.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new tipcalperi cannot already have an ID\")).body(null);\n }\n Tipcalperi result = tipcalperiRepository.save(tipcalperi);\n tipcalperiSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/tipcalperis/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public boolean postTip(final String tip) {\r\n\t\tLog.d(\"help\", \"Creating new tip: \" + tip);\r\n\t\tservice.submit(new Callable<Boolean>(){\r\n\t\t\tpublic Boolean call() {\r\n\t\t\t\treturn conn.postTip(tip, userID);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//Assume the tip was posted\r\n\t\treturn true;\r\n\t}", "@POST\n @Path(\"createDocument\")\n public Object createDocument(@Context\n HttpServletRequest request) throws Exception {\n CoreSession session = ctx.getCoreSession();\n FormData formData = new FormData(request);\n String type = formData.getDocumentType();\n String title = formData.getDocumentTitle();\n DocumentRef docRef = getDocumentRef(formData.getString(\"docRef\"));\n DocumentModel parent = session.getDocument(docRef);\n DocumentModel newDoc = session.createDocumentModel(\n parent.getPathAsString(), title, type);\n formData.fillDocument(newDoc);\n newDoc = session.createDocument(newDoc);\n session.save();\n if (newDoc.isFolder()) {\n return buildDocumentList(newDoc.getId(), 0, 0, null);\n } else {\n return buildDocumentList(parent.getId(), 0, 0, null);\n }\n }", "String createDocumentFromTemplate(DocumentModel doc) throws ClientException;", "Documento createDocumento();", "TDDocumentation createTDDocumentation();", "@GetMapping(\"/tipdocs/{id}\")\n @Timed\n public ResponseEntity<Tipdoc> getTipdoc(@PathVariable Long id) {\n log.debug(\"REST request to get Tipdoc : {}\", id);\n Tipdoc tipdoc = tipdocRepository.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(tipdoc));\n }", "public void testCreateSampleNoteForOffActn() {\n UrlInputDto urlInput = new UrlInputDto(TradeMarkDocumentTypes.TYPE_NOTE.getAlfrescoTypeName());\n urlInput.setSerialNumber(ParameterValues.VALUE_SERIAL_77777777_NUMBER.toString());\n urlInput.setFileName(\"NoteForOffActnAssoc.pdf\");\n String NOTE_CREATE_WEBSCRIPT_URL = CaseCreateUrl.returnGenericCreateUrl(urlInput);\n Map<String, String> noteParam = new HashMap<String, String>();\n noteParam.put(ParameterKeys.URL.toString(), NOTE_CREATE_WEBSCRIPT_URL);\n noteParam.put(ParameterKeys.METADATA.toString(), NoteBaseTest.VALUE_NOTE_METADATA);\n noteParam.put(ParameterKeys.CONTENT_ATTACHEMENT.toString(), NoteBaseTest.CONTENT_NOTE_TTACHMENT);\n ClientResponse response = createDocument(noteParam);\n // String str = response.getEntity(String.class);\n // System.out.println(str);\n assertEquals(201, response.getStatus());\n }", "public com.ext.portlet.model.OntologyTerm create(long id);", "@RequestMapping(method = RequestMethod.POST, value = \"/topics\")\n public void addTopic(@RequestBody Topic topic) {\n topicService.addTopic(topic);\n }", "@DeleteMapping(\"/tipdocs/{id}\")\n @Timed\n public ResponseEntity<Void> deleteTipdoc(@PathVariable Long id) {\n log.debug(\"REST request to delete Tipdoc : {}\", id);\n tipdocRepository.delete(id);\n tipdocSearchRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public Todo create(long todoId);", "@PostMapping(\"/documents\")\r\n\tpublic ResponseEntity<String> create(String content) {\r\n\t\tString docId = this.documentHandler.createDocument(content);\r\n\t\tHttpHeaders headers = new HttpHeaders();\r\n\t\theaders.setContentType(MediaType.TEXT_PLAIN);\r\n\t\theaders.setAcceptCharset(Collections.singletonList(StandardCharsets.US_ASCII));\r\n\t\theaders.setContentLength(docId.length());\r\n\t\treturn new ResponseEntity<String>(docId, headers, HttpStatus.CREATED);\r\n\t}", "@PostMapping(\"/docentes\")\n public ResponseEntity<DocenteDTO> createDocente(@Valid @RequestBody DocenteDTO docenteDTO) throws URISyntaxException {\n log.debug(\"REST request to save Docente : {}\", docenteDTO);\n if (docenteDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new docente cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n DocenteDTO result = docenteService.save(docenteDTO);\n return ResponseEntity.created(new URI(\"/api/docentes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "@RequestMapping(value = \"add\", method = RequestMethod.POST)\n public @ResponseBody TreeNode createTreeNode(@RequestBody TreeNode tn) \n\t{\n \n\t\ttn = gm.createNode(tn);\n\t\t\n\t\treturn tn;\n\t\t\n }", "public void doNewDocument() {\n\n if (this.data.getAdapter() != null) {\n try {\n DocumentListEntry entry = this.data.getAdapter().createNewDocument(\"New\", \"document\");\n doRefresh();\n // this.data.getAdapter().loadDocumentsList();\n // entry = this.data.getAdapter().getDocumentEntry(entry.getDocId());\n // GDocsEditorData.GDocNode newNode = new GDocsEditorData.GDocNode(entry.getTitle().getPlainText(), entry.getDocId(), entry);\n // data.treeModel.insertNodeInto(new DefaultMutableTreeNode(newNode), data.googleDocsNode, 0);\n // this.activeNode = new GDocsEditorData.GDocNode(entry.getTitle().getPlainText(), entry.getDocId(), entry);\n // ((DefaultMutableTreeNode) data.treeModel.getChild(data.googleDocsNode, 0)).setUserObject(this.activeNode);\n } catch (IOException ex) {\n Logger.getLogger(GDocsEditorApp.class.getName()).log(Level.SEVERE, null, ex);\n } catch (ServiceException ex) {\n Logger.getLogger(GDocsEditorApp.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void documentos(String tipdoc, String titulo){\n\n if(VarGlobales.getPais().equals(\"Costa Rica (es_CR)\") && tipdoc.equals(\"NRC\")){\n// RecepcionDocElectronicos recepcionDocElectronicos = new RecepcionDocElectronicos();\n// \n// Dimension desktopSize = escritorioERP.getSize();\n// Dimension jInternalFrameSize = recepcionDocElectronicos.getSize();\n// recepcionDocElectronicos.setLocation((desktopSize.width - jInternalFrameSize.width)/2,(desktopSize.height- jInternalFrameSize.height)/2);\n//\n// escritorioERP.add(recepcionDocElectronicos);\n// recepcionDocElectronicos.toFront();\n// recepcionDocElectronicos.setVisible(true);\n }else{\n// Facturacion docs = new Facturacion(tipdoc, titulo);\n// \n// Dimension desktopSize = escritorioERP.getSize();\n// Dimension jInternalFrameSize = docs.getSize();\n// docs.setLocation((desktopSize.width - jInternalFrameSize.width)/2,(desktopSize.height- jInternalFrameSize.height)/2);\n//\n// escritorioERP.add(docs);\n// docs.toFront();\n// docs.setVisible(true);\n }\n }", "Documentation createDocumentation();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get a copy of the value of the VolumeLimit property
public long getPropertyVolumeLimit() { return iPropertyVolumeLimit.getValue(); }
[ "public long getPropertyVolumeLimit();", "public long getPropertyVolumeMax();", "public long getPropertyVolume();", "public boolean setPropertyVolumeLimit(long aValue);", "public long getPropertyVolumeMax()\n {\n return iPropertyVolumeMax.getValue();\n }", "public long getBuyBackLimitVol() {\n return buyBackLimitVol_;\n }", "public int getVolumeMax() {\n return mVolumeMax;\n }", "public long getBuyBackLimitVol() {\n return buyBackLimitVol_;\n }", "double getMaxVolume();", "public double getmaxVolume() {\n\t return this.maxVolume;\n\t}", "long getVolume();", "public boolean setPropertyVolumeMax(long aValue);", "public long getPropertyVolumeUnity();", "public int getCurrentVolume() {\n return mCurrentVolume;\n }", "public int getVolumeMax() {\n return mBundle.getInt(KEY_VOLUME_MAX);\n }", "public float getMaximumVolume();", "long getVolumeForceMax();", "@Override\n public double getVolume() {\n return l.getVolume();\n }", "public int getMaxVolume() {\n return mMaxVolume;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function to perform Question Classification with the help of Voters
private static void performAmbiguosQuestionClassification(Question question,List<String> tnerlist){ String nerConfidence = performOtherNERValidation(question); String verbsConfidence = performOtherVerbsValidation(question); String nounsConfidence = performOtherNounsValidation(question); String rootConfidence = performRootsValidation(question); int countOfCategoryMusicMovie = getCountOfCategoryMusicMovie( nerConfidence, verbsConfidence, nounsConfidence, rootConfidence); //Perform classification based on what majority of voters think is the category int countOfMusic = (nounsConfidence.equals(CATEGORY_MUSIC)) ? 1 : 0; question.qnCategory = (countOfCategoryMusicMovie > countOfMusic) ? CATEGORY_MUSIC_MOVIE : CATEGORY_MUSIC; }
[ "private static void performUniqueQuestionClassification(Question question,List<String> tnerlist) {\n\t\t//Checks for unique verbs identifiers in the categories\n\t\tif (!Collections.disjoint(UNIQUE_MOVIE_VERBS, question.verbList)\n\t\t\t\t|| !Collections.disjoint(WIN_SYNONYMS, question.verbList)) {\n\t\t\tquestion.qnCategory = CATEGORY_MOVIE;\n\t\t} else if (!Collections.disjoint(UNIQUE_MUSIC_VERBS, question.verbList)\n\t\t\t\t|| !Collections.disjoint(SING_SYNONYMS, question.verbList)) {\n\t\t\tquestion.qnCategory = CATEGORY_MUSIC;\n\t\t\t//Checks for unique nouns identifiers in the categories\n\t\t} else if (!Collections.disjoint(MUSIC_NOUNS, question.nounList)) {\n\t\t\tquestion.qnCategory = CATEGORY_MUSIC;\n\t\t} else if (!Collections.disjoint(MOVIE_NOUNS, question.nounList)\n\t\t\t\t|| !Collections.disjoint(MOVIE_SYNONYMS, question.verbList)\n\t\t\t\t|| !Collections.disjoint(ACTOR_SYNONYMS, question.verbList)) {\n\t\t\tquestion.qnCategory = CATEGORY_MOVIE;\n\t\t} else if (!Collections.disjoint(GEO_NOUNS, question.nounList)) {\n\n\t\t\tquestion.qnCategory = CATEGORY_GEOGRAPHY;\n\n\t\t}\n\t\t// Performs Question Classification with the help of Named Entity Recognition\n\t\telse if ((!tnerlist.contains(\"PERSON\"))\n\t\t\t\t&& tnerlist.contains(\"LOCATION\")) {\n\t\t\tquestion.qnCategory = CATEGORY_GEOGRAPHY;\n\t\t}\n\t\telse {\n\t\t\t//Perform Question Classification with the help of Voters\n\t\t\tperformAmbiguosQuestionClassification(question,tnerlist);\n\t\t}}", "public void classify() {\n\t\ttry {\n\t\t\tdouble pred = classifier.classifyInstance(instances.instance(0));\n\t\t\tSystem.out.println(\"===== Classified instance =====\");\n\t\t\tSystem.out.println(\"Class predicted: \" + instances.classAttribute().value((int) pred));\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Problem found when classifying the text\");\n\t\t}\t\t\n\t}", "public abstract double test(ClassifierData<U> testData);", "@Test\n\tpublic void testClassifier() {\n\t\t// Ensure there are no intermediate files left in tmp directory\n\t\tFile exampleFile = FileUtils.getTmpFile(FusionClassifier.EXAMPLE_FILE_NAME);\n\t\tFile predictionsFile = FileUtils.getTmpFile(FusionClassifier.PREDICTIONS_FILE_NAME);\n\t\texampleFile.delete();\n\t\tpredictionsFile.delete();\n\t\t\n\t\tList<List<Double>> columnFeatures = new ArrayList<>();\n\t\tSet<String> inputRecognizers = new HashSet();\n\t\tList<Map<String, Double>> supportingCandidates = new ArrayList();\n\t\tList<Map<String, Double>> competingCandidates = new ArrayList();\n\t\t\n\t\t// Supporting candidates\n\t\tMap<String, Double> supportingCandidatesTipo = new HashMap();\n\t\tsupportingCandidatesTipo.put(INPUT_RECOGNIZER_ID, TIPO_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesTipo);\n\n\t\tMap<String, Double> supportingCandidatesInsegna = new HashMap();\n\t\tsupportingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, INSEGNA_SIMILARITY_SCORE);\n\t\tsupportingCandidates.add(supportingCandidatesInsegna);\n\t\t\n\t\t// Competing candidates\n\t\tMap<String, Double> competingCandidatesTipo = new HashMap();\n\t\tcompetingCandidatesTipo.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesTipo);\n\t\tMap<String, Double> competingCandidatesInsegna = new HashMap();\n\t\tcompetingCandidatesInsegna.put(INPUT_RECOGNIZER_ID, 0.);\n\t\tcompetingCandidates.add(competingCandidatesInsegna);\n\n\t\t// Two columns: insegna and tipo from osterie_tipiche\n\t\t// A single column feature: uniqueness\n\t\tList<Double> featuresTipo = new ArrayList();\n\t\tfeaturesTipo.add(0.145833);\n\t\tcolumnFeatures.add(featuresTipo);\n\t\t\n\t\tList<Double> featuresInsegna = new ArrayList();\n\t\tfeaturesInsegna.add(1.0);\n\t\tcolumnFeatures.add(featuresInsegna);\n\t\t\n\t\t// A single input recognizer\n\t\tinputRecognizers.add(INPUT_RECOGNIZER_ID);\n\n\t\t// Create the classifier\n\t\tFusionClassifier classifier \n\t\t\t= new FusionClassifier(FileUtils.getSVMModelFile(MINIMAL_FUSION_CR_NAME), \n\t\t\t\t\tcolumnFeatures, \n\t\t\t\t\tRESTAURANT_CONCEPT_ID, \n\t\t\t\t\tinputRecognizers);\n\t\tList<Double> predictions \n\t\t\t= classifier.classifyColumns(supportingCandidates, competingCandidates);\n\t\t\n\t\tboolean tipoIsNegativeExample = predictions.get(0) < -0.5;\n\t\t\n//\t\tTODO This currently doesn't work -- need to investigate\n//\t\tboolean insegnaIsPositiveExample = predictions.get(1) > 0.5;\n\t\t\n\t\tassertTrue(tipoIsNegativeExample);\n//\t\tassertTrue(insegnaIsPositiveExample);\n\t\t\n\ttry {\n\t\tSystem.out.println(new File(\".\").getCanonicalPath());\n\t\tSystem.out.println(getClass().getProtectionDomain().getCodeSource().getLocation());\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\t\n\t}", "public double[] classify(double[] partialResults, Hashtable<String,Double> partialInstance);", "@Override\n\tpublic ClassifyResult classify(String[] words) {\n\n\t// \"This method returns the classification result for a single message\"\n\n\t// Instantiate new ClassifyResult to hold results to return\n\tClassifyResult resultsToReturn = new ClassifyResult();\n\t \n\t/**\n\t * Log probabilities:\n\t * The second gotcha that any implementation of a Naive Bayes classifier\n\t * must contend with is underflow. Underflow can occur when we take the \n\t * product of a number of small floating-point values. Fortunately, there\n\t * is a workaround. Recall that a Naive Bayes classifier computes:\n\t * f(w) = argmax[P(Ham) * PI from i = 1 to k of (P(w | HAM)\n\t * f(w) = argmax[P(Spam) * PI from i = 1 to k of (P(w | SPAM)\n\t * where l is HAM or SPAM and w is the ith word of your SMS message, numbered\n\t * 1 to k.\n\t * \n\t * So, for the first part: \n\t * g(w) = argmax[log P(Ham) + ...\n\t * g(w) = argmax[log P(Spam) + ...\n\t */\n\n\t// g(w) = argmax[log P(Ham) + ...\n\tresultsToReturn.log_prob_ham = Math.log(((double) HAMInstanceHits) / \n\t\t\t\t\t\t (double) (trainingDataLength));\n\n\t// g(w) = argmax[log P(Spam) + ...\n\tresultsToReturn.log_prob_spam = Math.log(((double) SPAMInstanceHits) / \n\t\t\t\t\t\t (double) (trainingDataLength));\n\t\n\t/**\n\t * Now, the summation part:\n\t *\n * g(w) = ... + summation from i = 1 to k of (logP(w | ham))]\n\t * g(w) = ... + summation from i = 1 to k of (logP(w | spam))]\n\t */\n\tfor (int i = 0; i < words.length; i++) {\n\t \n\t // g(w) = ... + summation from i = 1 to k of (logP(w | ham))]\n\t resultsToReturn.log_prob_ham += \n\t\tMath.log(p_w_given_l(words[i], Label.HAM));\n\n\t // g(w) = ... + summation from i = 1 to k of (logP(w | spam))]\n\t resultsToReturn.log_prob_spam += \n\t\tMath.log(p_w_given_l(words[i], Label.SPAM));\n\t\n\t}\n\n\t// Lastly, label the ClassifyResult as ham if log_prob_ham is greater (argmax)\n\tif (resultsToReturn.log_prob_ham > resultsToReturn.log_prob_spam)\n\t resultsToReturn.label = Label.HAM;\n\n\t// Lastly, label the ClassifyResult as spam if log_prob_spam is greater (argmax)\n\telse\n\t resultsToReturn.label = Label.SPAM;\n\n\treturn resultsToReturn;\n\n }", "C classification(I item, boolean useThreshold);", "@Override\n public double makePrediction(ParsedText text) {\n double pr = 0.0;\n\n /* FILL IN HERE */\n double productSpam = 0;\n double productNoSpam = 0;\n \n int i, tempSpam,tempNoSpam;\n int minSpam, minNoSpam ;\n \n \n for (String ng: text.ngrams) {\n \tminSpam = Integer.MAX_VALUE;\n \tminNoSpam = Integer.MAX_VALUE;\n \n\n \tfor (int h = 0;h < nbOfHashes; h++) {\n \t\ti = hash(ng,h);\n\n \t\ttempSpam = counts[1][h][i];\n \t\ttempNoSpam = counts[0][h][i];\n \t\t\n \t\t//System.out.print(tempSpam + \" \");\n\n \t\tminSpam = minSpam<tempSpam?minSpam:tempSpam; \n \t\tminNoSpam = minNoSpam<tempNoSpam?minNoSpam:tempNoSpam; \n \t\t\n \t}\n\n \t//System.out.println(minSpam + \"\\n\");\n \tproductSpam += Math.log(minSpam);\n \tproductNoSpam += Math.log(minNoSpam);\n }\n \n // size of set minus 1\n int lm1 = text.ngrams.size() - 1;\n \n //System.out.println((productNoSpam - productSpam ));\n //System.out.println((lm1*Math.log(this.classCounts[1]) - lm1*Math.log(this.classCounts[0])));\n\n //\n pr = 1 + Math.exp(productNoSpam - productSpam + lm1*(Math.log(classCounts[1]) - Math.log(classCounts[0])));\n // System.out.print(1.0/pr + \"\\n\");\n \n return 1.0 / pr;\n\n }", "public static void main(){\n \n \n String question = \"There are 10 types of people in this world, those who understand binary and those who don't.\";\n String answer = \"true\";\n \n Question tfQuest = new Question (question, answer);\n tfQuest.getAnswer();\n \n }", "public static double classifyMe(String attFile, String dataFile, String testCaseFile) {\n\t\tdouble ratio=0;\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"WELCOME TO C4.5\");\r\n\t\tSystem.out.println(\"\");\r\n\t\t\r\n\t\t\r\n\t\t//Create the data structure used to build the tree\r\n\t\tdataStruc myData=new dataStruc(attFile, dataFile);\r\n\t\t\r\n\t\tSystem.out.println(\"DATA STRUCTURES INITIALIZED\");\r\n\t\tSystem.out.println(\"\");\r\n\r\n\t\t\r\n\r\n\t\t//Create data structure to hold test cases\r\n\t\tArrayList<Case> myTestCases=createTestCasesList(testCaseFile, myData.getAttributeList(), myData.getAttributeMap());\r\n\t\tSystem.out.println(\"Test cases now initialized\");\r\n\t\tSystem.out.println(\" \");\r\n\t\t\r\n\t\t//Get target attribute\r\n\t\tAttribute target=myData.getTarget();\r\n\t\tSystem.out.println(\"Data cases are being classified by the attribute: \" +target);\r\n\t\tSystem.out.println(\" \");\r\n\t\t\r\n\t\tif(target==null) {\r\n\t\t\tSystem.out.println(\"No target attribute\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\t//Create the decision tree\r\n\t\tSystem.out.println(\"CALLING C4.5 TO BUILD THE DECISION TREE\");\r\n\t\tSystem.out.println(\" \");\r\n\t\t\r\n\t\tNode treeRoot=c4_5_main.c4_5_call(myData, target);\r\n\r\n\t\tSystem.out.println(\"The root of the tree is: \" +treeRoot);\r\n\t\tSystem.out.println(\"Its children are: \" +treeRoot.children);\r\n\t\t\r\n\t\t\r\n\t\t//Initialize count for data that is correctly classified (countMatch) \r\n\t\t//and data that is not correctly classified (countNotMatch)\r\n\t\tdouble countMatch=0;\r\n\t\tdouble countNotMatch=0;\r\n\t\t\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\tSystem.out.println(\"NOW ENTERING THE CLASSIFICATION STAGE\");\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(\"The following is a sample classification: \");\r\n\t\t\r\n\t\t//Classification procedure begins\r\n\t\t//Note: print statements are called only for the first case (i=0) so as to show how classification works,\r\n\t\t//but not to print an overwhelming amount of output \r\n\t\t\r\n\t\t//For each test case\r\n\t\tfor (int i=0; i<myTestCases.size();i++) {\r\n\t\t\r\n\t\t\tif(i==0) {\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\tSystem.out.println(\"The test case is \" +myTestCases.get(i));\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Call traverseTree, which returns the predicted class of the test case as a string\r\n\t\t\tString rslt=traverseTree(myTestCases.get(i), treeRoot,i);\r\n\r\n\t\t\t//Compare the predicted class (rslt) to the case's actual class \r\n\t\t\t\r\n\t\t\tif (rslt.equals(myTestCases.get(i).getValue(target.getAName()))) {\r\n\t\t\t\t//If equal, increment countMatch\r\n\t\t\t\tcountMatch++;\r\n\t\t\t\tif(i==0) {\r\n\t\t\t\t\tSystem.out.println(\"MATCH!\");\r\n\t\t\t\t\tSystem.out.println(\"Algorithm classified case as: \" + rslt + \" and test case \" + myTestCases.get(i).getValue(\"User_ID\") + \" was a \" +myTestCases.get(i).getValue(target.getAName()));\r\n\t\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\t//If not equal, increment countNotMatch\r\n\t\t\t\tcountNotMatch++;\r\n\t\t\t\tif(i==0) {\r\n\t\t\t\t\tSystem.out.println(\"NO MATCH!\");\r\n\t\t\t\t\tSystem.out.println(\"Algorithm classified case as: \" + rslt + \" and test case \" + myTestCases.get(i).getValue(\"User_ID\") + \" was a \" +myTestCases.get(i).getValue(target.getAName()));\r\n\t\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}//for all test cases\r\n\t\t\r\n\t\tif(countNotMatch==0) {\r\n\t\t\t//Ensure we don't divide by 0. \r\n\t\t\tcountNotMatch=1;\r\n\t\t}\r\n\t\t\r\n\t\t//All done! Find ratio\r\n\t\tratio=countMatch/countNotMatch;\r\n\t\t\r\n\t\t//Display output \r\n\t\tSystem.out.println(\"The number of matches is: \" +countMatch);\r\n\t\tSystem.out.println(\"The number of non-matches is: \" +countNotMatch);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---------------------------\");\r\n\t\tSystem.out.println(\"RATIO IS \" + ratio);\r\n\t\t\r\n\t\t\r\n\t\treturn ratio;\t\r\n\t\t\r\n\t}", "private void classify(final String text) {\n executorService.execute(\n () -> {\n // TODO 7: Run sentiment analysis on the input text\n List<Category> results = textClassifier.classify(text);\n\n // TODO 8: Convert the result to a human-readable text\n String textToShow = \"Input: \" + text + \"\\nOutput:\\n\";\n for (int i = 0; i < results.size(); i++) {\n Category result = results.get(i);\n textToShow +=\n String.format(\" %s: %s\\n\", result.getLabel(), result.getScore());\n }\n textToShow += \"---------\\n\";\n\n // Show classification result on screen\n showResult(textToShow);\n });\n }", "boolean classify()\n throws ClassificationException;", "@Test\r\n public void testLVExamples(){\r\n try {\r\n // Found 3 re-classifications\r\n\r\n new ClassificationTester(\"14.4 Säljaren garanterar att av Leverantören hostad interaktiv utb\"+\r\n \"ildning uppfyller kapacitetskraven i Bilaga 2. Vid brist i kapacitetsk\"+\r\n \"raven, har Las Vegas rätt till ett vite vid var tillfälle om tio (10) \"+\r\n \"procent av månadsavgiften för hostingen av den aktuella utbildningen. \"+\r\n \"\")\r\n .withParser(swedishParser)\r\n .withHeadline(\" add headline...\")\r\n .withProject(mockProject, mockDocument)\r\n .withClassifier(new NumberClassifierSV())\r\n .withClassifier(new DefinitionUsageClassifierSV())\r\n .withClassifier(new WarrantyClassifierSV())\r\n .expectingClassification(new ClassificationAssertion(FeatureTypeTree.WARRANTY, 1)\r\n .withPattern(\"Säljaren garanterar\")\r\n\r\n )\r\n .test();\r\n\r\n\r\n\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace(System.out);\r\n assertTrue(false);\r\n }\r\n }", "@Override\n\tpublic ClassifyResult classify(List<String> words) {\n\t\t// TODO : Implement\n\t\t// Sum up the log probabilities for each word in the input data, and the\n\t\t// probability of the label\n\t\t// Set the label to the class with larger log probability\n\t\tdouble log_POSITIVE = Math.log(p_l(Label.POSITIVE));\n\t\tfor (String word : words)\n\t\t\tlog_POSITIVE += Math.log(p_w_given_l(word, Label.POSITIVE));\n\n\t\tdouble log_NEGATIVE = Math.log(p_l(Label.NEGATIVE));\n\t\tfor (String word : words)\n\t\t\tlog_NEGATIVE += Math.log(p_w_given_l(word, Label.NEGATIVE));\n\n\t\t// Create the ClassifyResult\n\t\tClassifyResult result = new ClassifyResult();\n\t\tresult.logProbPerLabel = new HashMap<Label, Double>();\n\t\tresult.logProbPerLabel.put(Label.POSITIVE, log_POSITIVE);\n\t\tresult.logProbPerLabel.put(Label.NEGATIVE, log_NEGATIVE);\n\t\t\n\t\tif (log_POSITIVE > log_NEGATIVE)\n\t\t\tresult.label = Label.POSITIVE;\n\t\telse\n\t\t\tresult.label = Label.NEGATIVE;\n\n\t\treturn result;\n\t}", "protected abstract void evaluate(Vector target, List<Vector> predictions);", "public void predict()\n {\n int correctPrediction = 0;\n if (numClass == 2)\n {\n for (int i = 0; i < testSet.size(); i++)\n {\n double dotProduct = 0;\n for (int j = 0; j < testSet.get(0).length - 1; j++)\n {\n dotProduct += weightsList.get(0)[j] * testSet.get(i)[j];\n }\n int predictClass = (dotProduct > theta) ? 1 : 0;\n prediction[i] = predictClass;\n }\n }\n else\n {/* For multiple classes, predict the class with the highest score (dot\n product) */\n for (int i = 0; i < testSet.size(); i++)\n {\n double maxScore = 0;\n int maxScoreClass = 0;\n for (int j = 0; j < numClass; j++)\n {\n double dotProduct = 0;\n for (int k = 0; k < testSet.get(0).length - 1; k++)\n {\n dotProduct += weightsList.get(j)[k] \n * testSet.get(i)[k];\n }\n if (dotProduct > maxScore)\n {\n maxScore = dotProduct;\n maxScoreClass = j + 1;\n }\n }\n prediction[i] = maxScoreClass;\n }\n }\n for (int i = 0; i < prediction.length; i++)\n {\n if (testSet.get(i)[testSet.get(0).length - 1] == prediction[i])\n {\n correctPrediction++;\n }\n }\n accuracy = Math.round(correctPrediction * 10000.0 / prediction.length) \n / 100.0;\n }", "@Override\n // public double makePrediction(ParsedText text) {\n // double pr;\n // // stores the count of each ngram\n // HashMap<String, Integer> ngramCountHam = new HashMap<String, Integer>();\n // HashMap<String, Integer> ngramCountSpam = new HashMap<String, Integer>();\n // double[] labelFeatJoint = new double[2];\n // // computes the joint probability of each class and all feature\n // for (int c = 0; c < 2; c++) {\n // // class probability\n // labelFeatJoint[c] = Math.log((double) this.classCounts[c]/ this.nbExamplesProcessed);\n // for (String ngram : text.ngrams) {\n // int minCount = this.counts[c][0][this.hashFunctions[0].apply(ngram)];\n // // finds minimum count of an ngram out of all hashing functions\n // for (int d = 1; d < this.nbOfHashes; d++) {\n // int hashedNgram = this.hashFunctions[d].apply(ngram);\n // // int hashedNgram = this.hashFunctions[d](ngram);\n // int hashCount = this.counts[c][d][hashedNgram];\n // minCount = hashCount < minCount ? hashCount : minCount;\n // }\n // // add log(conditional probability) of each feature by class,\n // // using the minCount and laplace smoothing\n // labelFeatJoint[c] += Math.log((1.0 + minCount) /\n // (this.classCounts[0] + this.hashSize));\n // }\n // }\n // //log-sum trick. Log(a) = spamSum, Log(b) = hamSum\n // // pr = spamSum - (spamSum + Log(1 + e^(hamSum-spamSum))\n // pr = -Math.log(1 + Math.exp(labelFeatJoint[0] - labelFeatJoint[1]));\n // return Math.exp(pr);\n // }\n public double makePrediction(ParsedText text) {\n double pr;\n // stores the count of each ngram\n // HashMap<String, Integer> ngramCountHam = new HashMap<String, Integer>();\n // HashMap<String, Integer> ngramCountSpam = new HashMap<String, Integer>();\n double[] labelFeatJoint = new double[2];\n // computes the joint probability of each class and all feature\n // for (int c = 0; c < 2; c++) {\n // // class probability\n // labelFeatJoint[c] = Math.log((double) this.classCounts[c]/ this.nbExamplesProcessed);\n // for (String ngram : text.ngrams) {\n // int minCount = Integer.MAX_VALUE;\n // // this.counts[c][0][this.hashFunctions[0].apply(ngram)];\n // // finds minimum count of an ngram out of all hashing functions\n // for (int d = 0; d < this.nbOfHashes; d++) {\n // int hashedNgram = this.hashFunctions[d].apply(ngram);\n // // int hashedNgram = this.hashFunctions[d](ngram);\n // int hashCount = this.counts[c][d][hashedNgram];\n // minCount = hashCount < minCount ? hashCount : minCount;\n // }\n // // add log(conditional probability) of each feature by class,\n // // using the minCount and laplace smoothing\n // labelFeatJoint[c] += Math.log((1.0 + minCount) /\n // (this.classCounts[c] + this.hashSize));\n // }\n // }\n // //log-sum trick. Log(a) = spamSum, Log(b) = hamSum\n // // pr = spamSum - (spamSum + Log(1 + e^(hamSum-spamSum))\n // pr = -Math.log(1 + Math.exp(labelFeatJoint[0] - labelFeatJoint[1]));\n\n\n double prHam = (double) classCounts[0]/this.nbExamplesProcessed;\n double prSpam = 1 - prHam;\n // double prWordGivenSpam=0;\n // double prWordGivenHam=0; \n double prWordGivenSpam=Math.log(prSpam);\n double prWordGivenHam=Math.log(prHam);\n\n // for spam\n int minCount = Integer.MAX_VALUE;\n\n int [] minCountWord0 = new int [text.ngrams.size()];\n int [] minCountWord = new int [text.ngrams.size()];\n for (int i =0; i< text.ngrams.size(); i++){\n minCountWord[i]= minCount;\n minCountWord0[i]= minCount;\n }\n // System.out.println(text.ngrams.size());\n for (int d = 0; d < this.nbOfHashes; d++) {\n int i=0;\n for (String ngram: text.ngrams){\n // if (i==1){ System.out.println(ngram);}\n int hashedNgram = this.hashFunctions[d].apply(ngram);\n int hashCount = this.counts[1][d][hashedNgram];\n minCountWord[i] = hashCount < minCountWord[i] ? hashCount : minCountWord[i];\n // if (i==1){ System.out.println(minCountWord[i]);}\n i++;\n }\n // System.out.println(i);\n }\n for (int d = 0; d < this.nbOfHashes; d++) {\n int i=0;\n for (String ngram: text.ngrams){\n int hashedNgram = this.hashFunctions[d].apply(ngram);\n int hashCount = this.counts[0][d][hashedNgram];\n minCountWord0[i] = hashCount < minCountWord0[i] ? hashCount : minCountWord0[i];\n i++;\n }\n // System.out.println(i);\n }\n for (int i =0; i< text.ngrams.size(); i++){\n prWordGivenSpam += Math.log((1.0 + minCountWord[i]) / (this.classCounts[1] + this.hashSize));\n prWordGivenHam += Math.log((1.0 + minCountWord0[i]) / (this.classCounts[0] + this.hashSize));\n }\n pr = -Math.log(1 + Math.exp(prWordGivenHam - prWordGivenSpam));\n return Math.exp(pr);\n\n }", "public interface TextModelWithProbability extends TextModel {\n\n /**\n * Returns predicted class and probability for the classification together with probabilities per each class.\n * <p>\n * The ordering of probabilities in a probability vector will be <strong>same as the ordering of keys in\n * learning set </strong> used to train model.\n * </p>\n *\n * @param words to classify\n * @return predicted class and probability for <em>words</em>\n */\n ClassificationResult classifyWithProb(String[] words);\n}", "public void genererQuestions(){\n\t\t\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Resets the interpreter back to its starting state.
public void resetInterpreter() { env.clear(); }
[ "public void resetState();", "public void reset()\n {\n sstack = new State[ 128];\n pstack = new int[ 128];\n sindex = 0;\n \n sstack[ 0] = start;\n pstack[ 0] = 0;\n }", "public static void reset() {\r\n\t\t// System.out.println(\"ExPar.reset()\");\r\n\t\t// new RuntimeException().printStackTrace();\r\n\t\truntimePars.clear();\r\n\t\tresetValues();\r\n\t\tGlobalAssignments.exec();\r\n\t}", "public void reset() {\n currentStatement = 0;\n }", "public void reset() {\n this.lastRun = 0;\n }", "public void reset() {\r\n state = 0;\r\n }", "public void reset() {\n finished = false;\n this.state = CURRENT_EVALUATION_NOT_STARTED;\n this.functions = null;\n this.constraints = null;\n this.popSize = 0;\n this.barrier = null;\n if (this.statistics != null) {\n this.statistics.reset();\n }\n }", "protected void resetState()\n {\n // Nothing to do by default.\n }", "public void reset() {\n\t\treset(ModSettings.currentContext);\n\t}", "public void reset( )throws CodeGeneratorException;", "private void reset() {\r\n\t\tthis.parser.reset();\r\n\t}", "public void reset() {\r\n\t\tundoStorage.clear();\r\n\t\tredoStorage.clear();\r\n\r\n\t\t/*\r\n\t\t * Set the recentGrid to the startGrid (initial state).\r\n\t\t */\r\n\t\tthis.recentGrid = SudokuBuilder.deepCopy(this.startGrid);\r\n\r\n\t}", "public synchronized void reset () {\r\n start = System.currentTimeMillis();\r\n if (paused) {\r\n end = start;\r\n }\r\n halted = 0;\r\n }", "public void reset() {\n _walker.moveToStart();\n _operators.clear();\n }", "TerminalOutput reset() throws NativeException;", "final public void temporarilyReset()\n\t{\n\t\tthis.m_savedOutputMode = this.OUTPUT_MODE;\n\t\tthis.m_savedVariables.clear();\n\t\tfor (int i = 0; i < this.m_variables.size(); i++)\n\t\t{\n\t\t\tthis.m_savedVariables.add(this.m_variables.get(i));\n\t\t}\n\t\tresetVariables();\n\t}", "public void resetAll() {\n\t\tunbind();\n\t\tthis.commander = null;\n\t}", "public void reset(){\r\n\t\tSystem.out.println(\"(EnigmaMachine) Initial Positions: \" + Arrays.toString(initPositions));\r\n\t\trotors.setPositions(initPositions);\r\n\t}", "@Override\n public void reset()\n {\n state = \"initial state\";\n nbChanges = 0;\n nbResets++;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Default constructor which takes the name of the facet and the string representing this hierarchical facet entry.
public HierarchicalFacet(String fieldName, String facetString){ this.count = 0; this.fieldName = fieldName; this.value = facetString; this.facetTiers = unpackTiers(facetString); }
[ "public FacetEntry() {\n\t\tsuper();\n\t}", "public AbstractFacetCollector(String facetName) {\n\t\tthis.facetName = facetName;\n\t}", "public HierarchicalFacetTier(String facetString) throws InvalidHierarchicalFacetException {\n\t\t\tString facetComponents[] = facetString.split(searchSettings.getFacetSubfieldDelimiter(), 3);\n\t\t\tif (facetComponents.length > 0){\n\t\t\t\ttry {\n\t\t\t\t\tthis.tier = Integer.parseInt(facetComponents[0]);\n\t\t\t\t} catch (Exception e){\n\t\t\t\t\tthrow new InvalidHierarchicalFacetException(\"Invalid tier value.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (facetComponents.length > 1){\n\t\t\t\tthis.searchValue = facetComponents[1];\n\t\t\t} else {\n\t\t\t\t//If there isn't a search value\n\t\t\t\tthrow new InvalidHierarchicalFacetException(\"No search value provided.\");\n\t\t\t}\n\t\t\tif (facetComponents.length > 2){\n\t\t\t\tthis.displayValue = facetComponents[2];\n\t\t\t} else {\n\t\t\t\tthis.displayValue = this.searchValue;\n\t\t\t}\n\t\t}", "Facet createFacet();", "public Solid() {\n\t\tthis.name = null;\n\t\tthis.facets = new ArrayList<Facet>(0);\n\t}", "public Plotter() {\n this(\"Default\");\n }", "public Entry(String n)\n {\n name = n;\n }", "public HistogramScriptFacetBuilder(String name) {\n\t\tsuper(name);\n\t}", "public BasicKPartiteGraph(String name) {\n\t\tthis(name,UNLIMITED_PARTITIONS);\n\t}", "public NamedEntity(String name) { this(name, \"\"); }", "public NamedEntity() { this(\"\", \"\"); }", "public abstract UIComponent getFacet(String name);", "public Entry(String name) {\n this.name = name;\n this.isDirectory = true;\n }", "public FacetBaseWrapper(Facet facet,CategoryFacet categoryFacet) {\n\t\t\n\t\tthis.systemName = facet.getSystemName();\n\t\tthis.displayName = facet.getDisplayName();\n\t\tif(facet.getAttribute() != null){\n\t\t\tthis.facetField = facet.getAttribute().getAttributeName();\n\t\t}\n\t\tthis.facetDisplay = getDisplay(facet.getDisplay());\n\t\tthis.displayMode = getDisplayMode(facet.getDisplayMode());\n\t\tthis.displayRecurrence = getDisplay(facet.getDisplayRecurrence());\n\t\tthis.displayFacetRemoveLink = getDisplay(facet.getDisplayFacetRemoveLink());\n\t\tthis.displayMobileFacet = getDisplay(facet.getDisplayMobileFacet());\n\t\tthis.displayMobileFacetRemoveLink = getDisplay(facet.getDisplayMobileFacetRemoveLink());\n\t\tthis.glossaryItem = facet.getGlossaryItem();\n\t\tthis.minValue = facet.getMinAttrValue();\n\t\tif(facet.getMaxAttrValue() != null){\n\t\t\tthis.maxValue = facet.getMaxAttrValue();\n\t\t}\n\t\tthis.startDate = facet.getStartDate();\n\t\tthis.endDate = facet.getEndDate();\n\t\tif(categoryFacet.getApplySubCategory() != null){\n\t\t\tthis.setApplyToSubCategories(getDisplay(categoryFacet.getApplySubCategory()));\n\t\t}\n\t\tif(categoryFacet.getDisplay() != null){\n\t\t\tthis.setDisplayContext(getDisplay(categoryFacet.getDisplay()));\n\t\t}\n\t\tif(categoryFacet.getDepFacetDisplay() != null){\n\t\t\tthis.setDisplayDepFacet(getDisplay(categoryFacet.getDepFacetDisplay()));\n\t\t}\n\n\t\tif(categoryFacet.getDepFacet() != null && categoryFacet.getDepFacet().getAttribute() != null){\n\t\t\tthis.setDepFacetField(categoryFacet.getDepFacet().getAttribute().getAttributeName());\n\t\t}\n\t\tif(categoryFacet.getAttributeValue() != null){\n\t\t\tthis.setDepFacetFieldValue(categoryFacet.getAttributeValue().getAttributeValue());\n\t\t}\n\t\tif(categoryFacet.getDisplayOrder() != null){\n\t\t\tfacetDisplayOrder = new Long(categoryFacet.getDisplayOrder().longValue());\n\t\t}\n\t\tprepareFacetFields(facet);\n\t}", "public final void rule__Facet__Group__0__Impl() throws RecognitionException {\n\n\t\t\t\tint stackSize = keepStackSize();\n\t\t\t\n\t\ttry {\n\t\t\t// InternalMyDsl.g:310:2: ( ( 'facet' ) )\n\t\t\t// InternalMyDsl.g:311:2: ( 'facet' )\n\t\t\t{\n\t\t\t// InternalMyDsl.g:311:2: ( 'facet' )\n\t\t\t// InternalMyDsl.g:312:2: 'facet'\n\t\t\t{\n\t\t\t before(grammarAccess.getFacetAccess().getFacetKeyword_0()); \n\t\t\tmatch(input,15,FOLLOW_2); \n\t\t\t after(grammarAccess.getFacetAccess().getFacetKeyword_0()); \n\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\n\t\t\t\trestoreStackSize(stackSize);\n\n\t\t}\n\t}", "public FolderBar(String text) {\n this(text, null);\n\n }", "public Plotter(final String name) {\n this.name = name;\n }", "public ZNameGroup() { }", "protected Geom( String name ) {\r\n this.name = name;\r\n deleted = false;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tells whether the Java version is compatible with Java 14.
public boolean isJava14Compatible() { return javaSpecVersionNumber.getMajor() >= 14; }
[ "public boolean isJava14() {\n return \"14\".equals(javaSpecVersion);\n }", "public boolean isJava17Compatible() {\n return javaSpecVersionNumber.getMajor() >= 17;\n }", "public boolean isJava18Compatible() {\n return javaSpecVersionNumber.getMajor() >= 18;\n }", "public boolean isJava17() {\n return \"17\".equals(javaSpecVersion);\n }", "public boolean isJava16Compatible() {\n return javaSpecVersionNumber.getMajor() >= 16;\n }", "public boolean isJava19Compatible() {\n return javaSpecVersionNumber.getMajor() >= 19;\n }", "public boolean isJava22Compatible() {\n return javaSpecVersionNumber.getMajor() >= 22;\n }", "private static boolean checkJava() {\r\n\t\tString v = System.getProperty(\"java.version\");\r\n\t\tSystem.out.println(\"Java Version: \" + v);\r\n\t\tif (!v.equals(\"9\")) {\r\n\t\t\tdouble version = Double.parseDouble(v.substring(0, v.indexOf('.', 2)));\r\n\t\t\tif (version < 1.8) {\r\n\t\t\t\tmessage(\"Java version 8 or higher is required!\\nYou are currently using \" + version + \"!\\n\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean isJava15Compatible() {\n return javaSpecVersionNumber.getMajor() >= 15;\n }", "boolean hasKotlinSupportVersion();", "public boolean isJava18() {\n return \"18\".equals(javaSpecVersion);\n }", "public boolean isJava16() {\n return \"16\".equals(javaSpecVersion);\n }", "public boolean isJava15() {\n return \"15\".equals(javaSpecVersion);\n }", "public boolean isJava21() {\n return \"21\".equals(javaSpecVersion);\n }", "public boolean isJava21Compatible() {\n return javaSpecVersionNumber.getMajor() >= 21;\n }", "public boolean isJava13Compatible() {\n return javaSpecVersionNumber.getMajor() >= 13;\n }", "public boolean isJava20Compatible() {\n return javaSpecVersionNumber.getMajor() >= 20;\n }", "public boolean isJava19() {\n return \"19\".equals(javaSpecVersion);\n }", "private static boolean checkJavaVersion() {\n // Must use string comparison because some JVM's provide\n // versions like \"1.4.1\"\n String version = System.getProperty(\"java.version\");\n boolean success = (version.compareTo(MIN_JDK_VERSION) >= 0);\n return success;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }